Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
49 lines (31 sloc) 1.11 KB

config_badger

Config Badger don't care.

Summary

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.

Usage

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'

Contributing

Write some code and send a pull request to github.com/reinh/config_badger. Or not. Config Badger don't give a shit.

License

MIT, see LICENSE

Contributors

Rein Henrichs

reinh@reinh.com

Jump to Line
Something went wrong with that request. Please try again.