Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Configatron/Rails integration for per-environment project-wide configuration variables.
Ruby
branch: master
Failed to load latest commit information.
generators/config Changed config.yml path
tasks First release
test Testing injection
MIT-LICENSE First release
README.textile Updating README
Rakefile First release
install.rb Updated for configatron 2.1.1
uninstall.rb First release

README.textile

ConfigatronRails

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

Something went wrong with that request. Please try again.