class Honeybadger::CLI::Deploy

Attributes

args[R]
config[R]
options[R]

Public Class Methods

new(options, args, config) click to toggle source
# File lib/honeybadger/cli/deploy.rb, line 12
def initialize(options, args, config)
  @options = options
  @args = args
  @config = config
  @shell = ::Thor::Base.shell.new
end

Public Instance Methods

run() click to toggle source
# File lib/honeybadger/cli/deploy.rb, line 19
def run
  payload = {
    environment: config.get(:env),
    revision: options['revision'],
    repository: options['repository'],
    local_username: options['user']
  }

  response = config.backend.notify(:deploys, payload)
  if response.success?
    say("Deploy notification complete.", :green)
  else
    say(error_message(response), :red)
    exit(1)
  end
end