Config Badger don’t care.
Config Badger makes it easy to set up a central config repository. It uses a pluggable storage system so you can start with YAML files and easily switch to a service (Redis, Zookeeper, etc) as your needs require.
Examples will use the YAML storage.
Set Config Badger’s options at load time (for instance, in a Rails environment.rb):
ConfigBadger.options = { :store => ConfigBadger::YAMLStore, :path => Rails.root + 'config', :env => Rails.env }
YAML files in config/ can now be addressed by their name. They must contain your config values namespaced by environment, similar to Rails’s database.yml. In fact, Config Badger can read your database.yml:
# database.yml --- development: adapter: mysql user: root
Can be read like so:
ConfigBadger['database']['adapter'] #=> 'mysql'
Write some code and send a pull request to github.com/reinh/config_badger. Or not. Config Badger don’t give a shit.
MIT, see LICENSE
- Rein Henrichs