Skip to content
This repository

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.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 generators
Octocat-spinner-32 tasks
Octocat-spinner-32 test
Octocat-spinner-32 MIT-LICENSE
Octocat-spinner-32 README.textile
Octocat-spinner-32 Rakefile
Octocat-spinner-32 install.rb
Octocat-spinner-32 uninstall.rb
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.