Class: Capistrano::Messaging::Telegram

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Helpers
Defined in:
lib/capistrano/messaging/telegram.rb

Instance Method Summary collapse

Methods included from Helpers

#application, #branch, #deployer, #elapsed_time, #icon_emoji, #stage

Instance Method Details

#payload_for(action) ⇒ Object



31
32
33
34
# File 'lib/capistrano/messaging/telegram.rb', line 31

def payload_for(action)
  method = "payload_for_#{action}"
  respond_to?(method) && send(method)
end

#payload_for_failedObject



27
28
29
# File 'lib/capistrano/messaging/telegram.rb', line 27

def payload_for_failed
  "#{deployer} has failed to #{deploying? ? 'deploy' : 'rollback'} branch #{branch} of #{application} to #{stage}"
end

#payload_for_revertedObject



23
24
25
# File 'lib/capistrano/messaging/telegram.rb', line 23

def payload_for_reverted
  "#{deployer} has finished rolling back branch of #{application} to #{stage}"
end

#payload_for_revertingObject



15
16
17
# File 'lib/capistrano/messaging/telegram.rb', line 15

def payload_for_reverting
  "#{deployer} has started rolling back branch `#{branch}` of #{application} to #{stage}"
end

#payload_for_updatedObject



19
20
21
# File 'lib/capistrano/messaging/telegram.rb', line 19

def payload_for_updated
  "#{deployer} has finished deploying branch #{branch} of #{application} to #{stage}"
end

#payload_for_updatingObject



11
12
13
# File 'lib/capistrano/messaging/telegram.rb', line 11

def payload_for_updating
  "#{deployer} has started deploying branch #{branch} of #{application} to #{stage}"
end