class Airbrake::DeployNotifier

DeployNotifier sends deploy information to Airbrake. The information consists of:

@api public @since v3.2.0

Public Class Methods

new() click to toggle source
# File lib/airbrake-ruby/deploy_notifier.rb, line 15
def initialize
  @config = Airbrake::Config.instance
  @sender = SyncSender.new
end

Public Instance Methods

notify(deploy_info) click to toggle source

@see Airbrake.notify_deploy

# 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