Parse n Upload ERB files with Capistrano
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib/capistrano
.gitignore
.travis.yml
CODE_OF_CONDUCT.md
Gemfile
LICENSE.txt
README.md
Rakefile
capistrano_erb_uplader.gemspec

README.md

Capistrano ERB Uploader

Parse various ERB template based configuration files and upload them with Capistrano.

Installation

Add this line to your application's Gemfile:

gem 'capistrano-erb-uploader'

And then execute:

$ bundle

Or install it yourself as:

$ gem install capistrano-erb-uplaader

Then add this line in your Capfile

require 'capistrano/erb-uploader'

Usage

You can list a bunch of ERB templates to parse and upload in your deploy.rb file.

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

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/albabar/capistrano-erb-uplaader.

License

The gem is available as open source under the terms of the MIT License.