Module: Capistrano::Messaging::Helpers
- Included in:
- Telegram
- Defined in:
- lib/capistrano/messaging/helpers.rb
Instance Method Summary collapse
- #application ⇒ Object
- #branch ⇒ Object
- #deployer ⇒ Object
-
#elapsed_time ⇒ Object
Return the elapsed running time as a string.
- #icon_emoji ⇒ Object
- #stage(default = 'an unknown stage') ⇒ Object
Instance Method Details
#application ⇒ Object
17 18 19 |
# File 'lib/capistrano/messaging/helpers.rb', line 17 def application fetch(:application) end |
#branch ⇒ Object
13 14 15 |
# File 'lib/capistrano/messaging/helpers.rb', line 13 def branch fetch(:branch) end |
#deployer ⇒ Object
9 10 11 |
# File 'lib/capistrano/messaging/helpers.rb', line 9 def deployer Etc.getpwnam(ENV['USER']).gecos end |
#elapsed_time ⇒ Object
Return the elapsed running time as a string.
Examples: 21-18:26:30, 15:28:37, 01:14
30 31 32 |
# File 'lib/capistrano/messaging/helpers.rb', line 30 def elapsed_time `ps -p #{$$} -o etime=`.strip end |
#icon_emoji ⇒ Object
5 6 7 |
# File 'lib/capistrano/messaging/helpers.rb', line 5 def icon_emoji .fetch(:icon_emoji, nil) end |
#stage(default = 'an unknown stage') ⇒ Object
21 22 23 |
# File 'lib/capistrano/messaging/helpers.rb', line 21 def stage(default = 'an unknown stage') fetch(:stage, default) end |