0.0
No commit activity in last 3 years
No release in over 3 years
A gem to easily handle environment specific settings
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 0
~> 2.13.0
 Project Readme

SimpleSettings¶ ↑

A gem for managing a settings file.

<img src=“https://travis-ci.org/aosmith/simple-settings.png?branch=master” />

Usage¶ ↑

At some point you’ll need to load settings. In a rails project I’d do this in config/initializers/01_settings.rb:

“‘

SimpleSettings.load

“‘

If you’re not using a rails project you’ll need to set the location of the settings.yml and your current environment via:

“‘

SimpleSettings.file_path = "~/path_to/settings.yml"
SimpleSettings.env = "development"

“‘

These values will default to ./config/settings.yml and development.

Env is read from: 1- Rails 2- ENV

Your yaml file will be available via: “‘

SimpleSettings.config[:setting_name]
SimpleSettings.config[:nested_attributes][:work_too]

“‘