Sha256: 2bd469aa9bba2ced2a6d2409c8c395c780e0e71ab075c5cbdbacec1bca929650

Contents?: true

Size: 617 Bytes

Versions: 2

Compression:

Stored size: 617 Bytes

Contents

require 'raven'
require 'rails'

module Raven
  class Railtie < ::Rails::Railtie
    initializer "raven.use_rack_middleware" do |app|
      app.config.middleware.use "Raven::Rack" unless defined?(::ActionDispatch::DebugExceptions)
    end

    config.after_initialize do
      Raven.configure(true) do |config|
        config.logger ||= ::Rails.logger
      end

      if defined?(::ActionDispatch::DebugExceptions)
        require 'raven/rails/middleware/debug_exceptions_catcher'
        ::ActionDispatch::DebugExceptions.send(:include, Raven::Rails::Middleware::DebugExceptionsCatcher)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sentry-raven-0.2 lib/raven/railtie.rb
sentry-raven-0.1 lib/raven/railtie.rb