Sha256: 15cfe366389de06262268ed8d3b5114c6d1c0b03505e9f297e3e4f0d3dd60bac

Contents?: true

Size: 1.02 KB

Versions: 14

Compression:

Stored size: 1.02 KB

Contents

require 'rails'
require 'yaml'

require 'honeybadger/ruby'

module Honeybadger
  module Init
    module Rails
      class Railtie < ::Rails::Railtie
        rake_tasks do
          load 'honeybadger/tasks.rb'
        end

        initializer 'honeybadger.install_middleware' do |app|
          app.config.middleware.insert(0, Honeybadger::Rack::ErrorNotifier)
          app.config.middleware.insert_before(Honeybadger::Rack::ErrorNotifier, Honeybadger::Rack::UserInformer)
          app.config.middleware.insert_before(Honeybadger::Rack::ErrorNotifier, Honeybadger::Rack::UserFeedback)
        end

        config.after_initialize do
          Honeybadger.init!({
            :root           => ::Rails.root.to_s,
            :env            => ::Rails.env,
            :'config.path'  => ::Rails.root.join('config', 'honeybadger.yml'),
            :logger         => Logging::FormattedLogger.new(::Rails.logger),
            :framework      => :rails
          })
          Honeybadger.load_plugins!
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
honeybadger-3.2.0 lib/honeybadger/init/rails.rb
honeybadger-3.2.0.beta1 lib/honeybadger/init/rails.rb
honeybadger-3.1.2 lib/honeybadger/init/rails.rb
honeybadger-3.1.1 lib/honeybadger/init/rails.rb
honeybadger-3.1.0 lib/honeybadger/init/rails.rb
honeybadger-3.0.2 lib/honeybadger/init/rails.rb
honeybadger-3.0.1 lib/honeybadger/init/rails.rb
honeybadger-3.0.0 lib/honeybadger/init/rails.rb
honeybadger-3.0.0.beta6 lib/honeybadger/init/rails.rb
honeybadger-3.0.0.beta5 lib/honeybadger/init/rails.rb
honeybadger-3.0.0.beta4 lib/honeybadger/init/rails.rb
honeybadger-3.0.0.beta3 lib/honeybadger/init/rails.rb
honeybadger-3.0.0.beta2 lib/honeybadger/init/rails.rb
honeybadger-3.0.0.beta1 lib/honeybadger/init/rails.rb