Capistrano Configuration allows you to create configurations on deployment, so you don't have to worry about copy different yml files to the right place (especially when you have multiple deploy stages in one repository)
sudo gem install capistrano-configuration --source=http://gemcutter.org
Simply add the following to your deploy.rb file:
and then write your configurations in ruby like so:
configure :database do environment 'development' do config 'username', 'app' config 'password', 'secret' end environment 'production' do config 'username', 'app_production' config 'password', 'secret_production' end end configure :google_map_key do config 'map_key', 'u232398b208x9830x30xb383' end
The gem will take care of the rest. It stores your configurations, and after the code is updated, it'll write the configurations needed for things like migrations.
Note: The method name environment doesn't suit all configurations, so that method has an alias called 'context' which you can use to do the same thing.
Bug and Feature Requests
You can report bugs and request features / submit patches at our Lighthouse account
Gem created and maintained by Kieran Pilkington <email@example.com>