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:
require 'capistrano-configuration'
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.
You can report bugs and request features / submit patches at our Lighthouse account
kete.lighthouseapp.com/projects/23036-capistrano-configuration
Gem created and maintained by Kieran Pilkington <[email protected]>