Sha256: e6855acabb17577e2d0aa861817df02d876f17cf9cc119519d7d117e3c2e1da9

Contents?: true

Size: 1.12 KB

Versions: 27

Compression:

Stored size: 1.12 KB

Contents

module Rollbar
  module RailtieMixin
    extend ActiveSupport::Concern

    included do
      rake_tasks do
        require 'rollbar/rake_tasks'
      end

      initializer 'rollbar.configuration' do
        config.after_initialize do
          Rollbar.preconfigure do |config|
            config.default_logger = proc { ::Rails.logger }
            config.environment ||= ::Rails.env
            config.root ||= ::Rails.root
            config.framework = "Rails: #{::Rails::VERSION::STRING}"
            config.filepath ||= begin
              if ::Rails.application.class.respond_to?(:module_parent_name)
                ::Rails.application.class.module_parent_name + '.rollbar'
              else
                ::Rails.application.class.parent_name + '.rollbar'
              end
            end
          end
        end
      end

      initializer 'rollbar.controller_methods' do
        ActiveSupport.on_load(:action_controller) do
          # lazily load action_controller methods
          require 'rollbar/plugins/rails/controller_methods'
          include Rollbar::Rails::ControllerMethods
        end
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
rollbar-3.2.0 lib/rollbar/plugins/rails/railtie_mixin.rb
rollbar-3.1.2 lib/rollbar/plugins/rails/railtie_mixin.rb
rollbar-3.1.1 lib/rollbar/plugins/rails/railtie_mixin.rb
rollbar-3.1.0 lib/rollbar/plugins/rails/railtie_mixin.rb
rollbar-3.0.1 lib/rollbar/plugins/rails/railtie_mixin.rb
rollbar-3.0.0 lib/rollbar/plugins/rails/railtie_mixin.rb
rollbar-2.27.1 lib/rollbar/plugins/rails/railtie_mixin.rb
rollbar-2.27.0 lib/rollbar/plugins/rails/railtie_mixin.rb
rollbar-2.26.1 lib/rollbar/plugins/rails/railtie_mixin.rb
rollbar-2.26.0 lib/rollbar/plugins/rails/railtie_mixin.rb
rollbar-2.25.1 lib/rollbar/plugins/rails/railtie_mixin.rb
rollbar-2.25.0 lib/rollbar/plugins/rails/railtie_mixin.rb
rollbar-2.24.0 lib/rollbar/plugins/rails/railtie_mixin.rb
rollbar-2.23.2 lib/rollbar/plugins/rails/railtie_mixin.rb
rollbar-2.23.1 lib/rollbar/plugins/rails/railtie_mixin.rb
rollbar-2.23.0 lib/rollbar/plugins/rails/railtie_mixin.rb
rollbar-2.22.1 lib/rollbar/plugins/rails/railtie_mixin.rb
rollbar-2.22.0 lib/rollbar/plugins/rails/railtie_mixin.rb
rollbar-2.21.0 lib/rollbar/plugins/rails/railtie_mixin.rb
rollbar-2.20.2 lib/rollbar/plugins/rails/railtie_mixin.rb