A capistrano plugin that aids in rendering templates.
Add this line to your application's Gemfile:
gem 'capistrano-template'
And then execute:
$ bundle
Or install it yourself as:
$ gem install capistrano-template
Best explained with an example deploy.rb file.
require 'capistrano/template'
set :application, "example"
# ...
task :configure_apache, :roles => :web do
put(template.render('vhost.conf'), "/etc/apache2/sites-available/#{application}.conf")
end
All supported functions live under the template
namespace.
ERBs the given template and returns the result.
The location to search for templates. Relative to the current working directory of the cap command. Defaults to config/deploy/templates
.
An array of bindings that represent the search path for variables when rendering templates. An extension point to allow external sources for data. Defaults to [Bindings::CapistranoBinding.new(self)]
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request