Capistrano::Webhooks
Webhooks for Capistrano.
Installation
Add this line to your application's Gemfile under the 'development' group:
gem 'capistrano-webhooks'
Execute:
bundle
Add this to Capfile
:
require 'capistrano/webhooks'
Usage
Add this to deploy.rb
or to stage configuration file.
# Example
set :webhooks, 'http://example.com': {
method: :post, # Request send method. POST by default
payload: { user: fetch(:local_user) }, # Data will be sent
before: {
'deploy:updating': {
payload: { par1: 'val1' } # Override data
}
},
after: {
'deploy:finishing': {},
'deploy:failed': { method: :get } # Override send method
}
}
Contributing
- Fork it ( http://github.com/iamdeuterium/capistrano-webhooks/fork )
- 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