Class: KapostDeploy::Plugins::SlackAfterPromote
- Inherits:
-
Object
- Object
- KapostDeploy::Plugins::SlackAfterPromote
- Defined in:
- lib/kapost_deploy/plugins/slack_after_promote.rb
Overview
After-promotion plugin to notify via slack after a promotion is complete with an optional message.
Instance Method Summary collapse
- #after ⇒ Object
- #before ⇒ Object
-
#initialize(config, notifier: KapostDeploy::Slack::Notifier.new(config.options.fetch(:slack_config, nil))) ⇒ SlackAfterPromote
constructor
A new instance of SlackAfterPromote.
Constructor Details
#initialize(config, notifier: KapostDeploy::Slack::Notifier.new(config.options.fetch(:slack_config, nil))) ⇒ SlackAfterPromote
Returns a new instance of SlackAfterPromote.
10 11 12 13 14 |
# File 'lib/kapost_deploy/plugins/slack_after_promote.rb', line 10 def initialize(config, notifier: KapostDeploy::Slack::Notifier.new(config..fetch(:slack_config, nil))) self.config = config self.notifier = notifier end |
Instance Method Details
#after ⇒ Object
19 20 21 22 23 24 |
# File 'lib/kapost_deploy/plugins/slack_after_promote.rb', line 19 def after return unless notifier.configured? = "#{identity} promoted *#{config.app}* to *#{config.to}*#{}" notifier.notify() end |
#before ⇒ Object
16 17 |
# File 'lib/kapost_deploy/plugins/slack_after_promote.rb', line 16 def before end |