Sha256: a822082acf2368ac9d06d41beb849ef879f5072e7c80f47f7abcbb2b95c36bd9
Contents?: true
Size: 839 Bytes
Versions: 4
Compression:
Stored size: 839 Bytes
Contents
# frozen_string_literal: true require 'commander' require_relative 'environments' class ConfigureSentry ADMIN_EMAIL = 'admin@renuo.ch' 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}" say "heroku labs:enable runtime-dyno-metadata --app #{heroku_name}" end end
Version data entries
4 entries across 4 versions & 1 rubygems