Skip to content

Configatron/Rails integration for per-environment project-wide configuration variables.

License

Notifications You must be signed in to change notification settings

raavin/configatron-rails

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ConfigatronRails is a plugin born out of a want for environment-specific
variables using a gem I’ve grown to appreciate:
configatron.



h3. Installation / Upgrading

Make sure you have configatron (2.0 or higher) installed before following these steps!


> sudo gem install configatron

  1. Or toss this in your environment.rb (preferred method)
    config.gem “configatron”

cd vendor/plugins
git clone git://github.com/cmaggard/configatron-rails.git configatron_rails
cd configatron_rails
git checkout 0.4
cd ..
rm -rf configatron_rails/.git
cd ../..
script/generate config

If upgrading, run script/generate config again, as this will copy the necessary
initializer file over. Just don’t overwrite your config.yml. ;)



h3. Sample Usage:

In config.yml


    development: &local
      site_address: http://localhost:3000/

test: <<: *local production: site_address: http://www.thebestappev.er/

In ‘script/console development’ and ‘script/console test’


    >> configatron.site_address  # => "http://localhost:3000/"
  

In ‘script/console production’


    >> configatron.site_address  # => "http://www.thebestappev.er/"
  



h3. Version History

  • 0.4 – Updated for configatron 2.1.1, changed to initializer script
  • 0.3 – Updated for configatron 2.0
  • 0.2.1 – Minor tweaks to template file
  • 0.2 – Environment seeding of config.yml based upon database.yml
  • 0.1 – First Release

Copyright © 2008 Cody Maggard, released under the MIT license

About

Configatron/Rails integration for per-environment project-wide configuration variables.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages