Hey everyone! Yesterday, I released my first public RubyGem. It's a small utility to use along with Capistrano. Nothing fancy, but my first. :)
I was impatient to hard code different env values in configuration files like NginX, Monit conf. Specially things like application path and so on.
So I wrote a small snippet to make them dynamic. But copying it in every project was another pain. The birth of Capistrano ERB Uploader.
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install capistrano-erb-uplader
Then add this line in your
You can list a bunch of ERB templates to parse and upload in your
set :erb_files, fetch(:erb_files, ).push('config/nginx.conf.erb', 'config/app.monit.erb')
You might also use this on your own task:
namespace :some do desc 'Some task to upload specialised erb files' task :task do on rolse(:app) upload_erb 'config/deploy/templates/some.conf.erb', 'config/some.conf' execute :sudo, 'service some restart' end end end
Any suggestion to improve is most welcome. You can find the source at GitHub - Capistrano ERB Uploader.