lib/capistrano-payload/capistrano_integration.rb in capistrano-payload-0.3.0 vs lib/capistrano-payload/capistrano_integration.rb in capistrano-payload-0.4.0
- old
+ new
@@ -8,11 +8,11 @@
capistrano_config.load do
_cset(:payload_url) {
abort 'Payload URL required! set :payload_url'
}
- _cset(:payload_message) { true }
+ _cset(:payload_prompt) { true }
_cset(:payload_format) { :json }
_cset(:payload_params) { Hash.new }
_cset(:payload_data) {
{
@@ -32,11 +32,11 @@
}
namespace :payload do
task :deploy, :roles => :app do
logger.debug("Sending deployment notification to #{fetch(:payload_url)}")
- message = payload_message == true ? Capistrano::CLI.ui.ask("Deployment message (none): ", nil) : ''
+ message = payload_prompt == true ? Capistrano::CLI.ui.ask("Deployment message (none): ", nil) : ''
begin
CapistranoPayload::Payload.new('deploy', message, payload_data, payload_format, payload_params).deliver(payload_url)
rescue DeliveryError => err
logger.debug("Payload delivery error: #{err.message}")
rescue ConfigurationError => err
@@ -44,10 +44,10 @@
end
end
task :rollback, :roles => :app do
logger.debug("Sending rollback notification to #{fetch(:payload_url)}")
- message = payload_message == true ? Capistrano::CLI.ui.ask("Rollback message (none): ", nil) : ''
+ message = payload_prompt == true ? Capistrano::CLI.ui.ask("Rollback message (none): ", nil) : ''
begin
CapistranoPayload::Payload.new('rollback', message, payload_data, payload_format, payload_params).deliver(payload_url)
rescue DeliveryError => err
logger.debug("Payload delivery error: #{err.message}")
rescue ConfigurationError => err
\ No newline at end of file