Module: Capnotify::Plugin::Details
- Defined in:
- lib/capnotify/plugin/details.rb
Constant Summary collapse
- PLUGIN_NAME =
:capnotify_details
Instance Method Summary collapse
Instance Method Details
#init ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/capnotify/plugin/details.rb', line 7 def init capnotify.components << Capnotify::Component.new(PLUGIN_NAME) do |c| c.header = 'Deployment Details' c.content = {} c.content['Branch'] = fetch(:branch, 'n/a') c.content['Sha1'] = fetch(:latest_revision, 'n/a') c.content['Release'] = fetch(:release_name, 'n/a') if fetch(:github_url, nil) c.content['WWW'] = "#{ fetch(:github_url) }/tree/#{ fetch(:latest_revision) }" end end end |
#unload ⇒ Object
22 23 24 |
# File 'lib/capnotify/plugin/details.rb', line 22 def unload capnotify.delete_component PLUGIN_NAME end |