huesler-informatik My 2 cents

simple_app_config - A little ruby helper to define and access the app configuration

Having a convenient way to store an applications configuration is something I want in every Ruby project. There are plenty of solutions for Ruby on Rails but none of them did really match my taste, because they did way too much. I wanted something simple that does not depend on Ruby on Rails and does not try to be too clever.

Here are my requirements for a configuration lib:

  • Nesting and namespaces
  • Simple string interpolation
  • Support for environments e.g testing, production, debug
  • Defaults for each environment

And this is what I came up with:

  • Use YAML (defaults, namespaces, scopes)
  • Parse the YAML file with ERB
  • Return an OpenStruct object for easy method accessors

The code and and information on how to install and use the lib can be found here: http://github.com/phuesler/simple_app_config