show deploy time in a skype chat

This commit is contained in:
Alexander Machehin 2015-03-25 22:03:05 +05:00
parent 366e17b75d
commit cb9431e1b0
1 changed files with 3 additions and 2 deletions

View File

@ -3,6 +3,7 @@ require 'skype'
Capistrano::Configuration.instance(:must_exist).load do Capistrano::Configuration.instance(:must_exist).load do
Skype.config app_name: 'test-message' Skype.config app_name: 'test-message'
set :skype_send_notification, true set :skype_send_notification, true
set :start_time, Time.now
namespace :skype do namespace :skype do
task :trigger_notification do task :trigger_notification do
@ -35,8 +36,8 @@ Capistrano::Configuration.instance(:must_exist).load do
if self.respond_to?(:stage) if self.respond_to?(:stage)
environment_string = "#{stage} (#{env})" environment_string = "#{stage} (#{env})"
end end
elapsed = (Time.now - start_time).to_i
send("Finished deploying #{deployment_name} to #{environment_string}#{fetch(:skype_with_migrations, '')}.\n#{'#'*60}") send("(#{elapsed} secs) Finished deploying #{deployment_name} to #{environment_string}#{fetch(:skype_with_migrations, '')}.\n#{'#'*60}")
end end
end end