Class: Airbrake::DeployNotifier
- Inherits:
-
Object
- Object
- Airbrake::DeployNotifier
- Includes:
- Inspectable
- Defined in:
- lib/airbrake-ruby/deploy_notifier.rb
Overview
DeployNotifier sends deploy information to Airbrake. The information consists of:
-
environment
-
username
-
repository
-
revision
-
version
Constant Summary
Constants included from Inspectable
Instance Method Summary collapse
-
#initialize ⇒ DeployNotifier
constructor
A new instance of DeployNotifier.
- #notify(deploy_info) ⇒ Object
Methods included from Inspectable
Constructor Details
#initialize ⇒ DeployNotifier
Returns a new instance of DeployNotifier.
15 16 17 18 |
# File 'lib/airbrake-ruby/deploy_notifier.rb', line 15 def initialize @config = Airbrake::Config.instance @sender = SyncSender.new end |
Instance Method Details
#notify(deploy_info) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/airbrake-ruby/deploy_notifier.rb', line 21 def notify(deploy_info) promise = @config.check_configuration return promise if promise.rejected? promise = Airbrake::Promise.new deploy_info[:environment] ||= @config.environment @sender.send( deploy_info, promise, URI.join(@config.error_host, "api/v4/projects/#{@config.project_id}/deploys"), ) promise end |