Sha256: dbf0c05feee55ff10094e3c588cfbe21a87755859c58809b0933632f8918cfcf

Contents?: true

Size: 768 Bytes

Versions: 16

Compression:

Stored size: 768 Bytes

Contents

require 'commander'
require_relative './environments'

class ConfigureSentry
  ADMIN_EMAIL = 'admin@renuo.ch'.freeze

  def initialize; end

  def run(args)
    project_name = args[0]
    sentry_dsn = args[1]
    abort('>> No project name given.') unless project_name
    abort('>> No sentry DSN name given.') unless sentry_dsn

    say "# Commands to setup Sentry on Heroku\n".colorize :green
    ENVIRONMENTS.each { |env| print_environment_commands(env, project_name, sentry_dsn) }
  end

  private

  def print_environment_commands(env, project_name, sentry_dsn)
    heroku_name = "#{project_name}-#{env}"
    say "heroku config:set SENTRY_DSN=#{sentry_dsn} --app #{heroku_name}"
    say "heroku config:set SENTRY_ENVIRONMENT=#{env} --app #{heroku_name}"
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
renuo-cli-3.1.6 lib/renuo/cli/app/configure_sentry.rb
renuo-cli-3.1.5 lib/renuo/cli/app/configure_sentry.rb
renuo-cli-3.1.4 lib/renuo/cli/app/configure_sentry.rb
renuo-cli-3.1.3 lib/renuo/cli/app/configure_sentry.rb
renuo-cli-3.1.2 lib/renuo/cli/app/configure_sentry.rb
renuo-cli-3.1.1 lib/renuo/cli/app/configure_sentry.rb
renuo-cli-3.1.0 lib/renuo/cli/app/configure_sentry.rb
renuo-cli-3.0.0 lib/renuo/cli/app/configure_sentry.rb
renuo-cli-2.0.0 lib/renuo/cli/app/configure_sentry.rb
renuo-cli-1.8.0 lib/renuo/cli/app/configure_sentry.rb
renuo-cli-1.7.3 lib/renuo/cli/app/configure_sentry.rb
renuo-cli-1.7.2 lib/renuo/cli/app/configure_sentry.rb
renuo-cli-1.7.1 lib/renuo/cli/app/configure_sentry.rb
renuo-cli-1.7.0 lib/renuo/cli/app/configure_sentry.rb
renuo-cli-1.6.0 lib/renuo/cli/app/configure_sentry.rb
renuo-cli-1.5.0 lib/renuo/cli/app/configure_sentry.rb