Sha256: 516e71c3c55e73aa69c987834187d5cde111e2c084e167179fe460b9443a7bf2
Contents?: true
Size: 1.43 KB
Versions: 3
Compression:
Stored size: 1.43 KB
Contents
require 'rails/railtie' require 'rollbar' module Rollbar class Railtie < ::Rails::Railtie rake_tasks do require 'rollbar/rake_tasks' end if defined? ActiveRecord initializer 'rollbar.middleware.rails' do |app| require 'rollbar/middleware/rails/rollbar_request_store' app.config.middleware.use Rollbar::Middleware::Rails::RollbarRequestStore end end config.after_initialize do Rollbar.preconfigure do |config| config.logger ||= ::Rails.logger config.environment ||= ::Rails.env config.root ||= ::Rails.root config.framework = "Rails: #{::Rails::VERSION::STRING}" config.filepath ||= ::Rails.application.class.parent_name + '.rollbar' end ActiveSupport.on_load(:action_controller) do # lazily load action_controller methods require 'rollbar/rails/controller_methods' include Rollbar::Rails::ControllerMethods end if defined?(ActionDispatch::DebugExceptions) # Rails 3.2.x require 'rollbar/middleware/rails/show_exceptions' ActionDispatch::DebugExceptions.send(:include, Rollbar::Middleware::Rails::ShowExceptions) elsif defined?(ActionDispatch::ShowExceptions) # Rails 3.0.x and 3.1.x require 'rollbar/middleware/rails/show_exceptions' ActionDispatch::ShowExceptions.send(:include, Rollbar::Middleware::Rails::ShowExceptions) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rollbar-1.1.0 | lib/rollbar/railtie.rb |
rollbar-1.0.1 | lib/rollbar/railtie.rb |
rollbar-1.0.0 | lib/rollbar/railtie.rb |