Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Config badger don't care.
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
doc @ 7716f75
lib
spec
.gitignore
.gitmodules
Gemfile
Guardfile
LICENSE
README.rdoc
Rakefile
config_badger.gemspec

README.rdoc

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

Something went wrong with that request. Please try again.