Sha256: 954e58da9db912d1709e2899c42428e197ed6236802f8f75992d8ee5d2afb7a7

Contents?: true

Size: 672 Bytes

Versions: 18

Compression:

Stored size: 672 Bytes

Contents

class Recipes::ErrorReporting < Rails::AppBuilder
  def ask
    response = answer(:sentry) do
      Ask.confirm("Do you need to report application errors with Sentry?")
    end
    set(:report_error, response)
  end

  def create
    if selected?(:report_error)
      gather_gem 'sentry-raven'
      template '../assets/config/sentry.rb.erb', 'config/initializers/sentry.rb'
      append_to_file '.env.development', "SENTRY_DSN=\n"
      add_readme_section :internal_dependencies, :sentry
    end
  end

  def install
    set(:report_error, true)
    create
  end

  def installed?
    gem_exists?(/sentry-raven/) && file_exist?('config/initializers/sentry.rb')
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
potassium-6.7.0 lib/potassium/recipes/error_reporting.rb
potassium-6.6.0 lib/potassium/recipes/error_reporting.rb
potassium-6.5.0 lib/potassium/recipes/error_reporting.rb
potassium-6.4.0 lib/potassium/recipes/error_reporting.rb
potassium-6.3.0 lib/potassium/recipes/error_reporting.rb
potassium-6.2.0 lib/potassium/recipes/error_reporting.rb
potassium-6.1.0 lib/potassium/recipes/error_reporting.rb
potassium-6.0.0 lib/potassium/recipes/error_reporting.rb
potassium-5.2.3 lib/potassium/recipes/error_reporting.rb
potassium-5.2.2 lib/potassium/recipes/error_reporting.rb
potassium-5.2.1 lib/potassium/recipes/error_reporting.rb
potassium-5.2.0 lib/potassium/recipes/error_reporting.rb
potassium-5.1.4 lib/potassium/recipes/error_reporting.rb
potassium-5.1.3 lib/potassium/recipes/error_reporting.rb
potassium-5.1.2 lib/potassium/recipes/error_reporting.rb
potassium-5.1.1 lib/potassium/recipes/error_reporting.rb
potassium-3.0.0 lib/potassium/recipes/error_reporting.rb
potassium-2.3.0 lib/potassium/recipes/error_reporting.rb