Sha256: a244e31f5f8efd60f4babdd89ca33ad22d76e0ca7e6dba0624157b9e6a90fb8c

Contents?: true

Size: 748 Bytes

Versions: 10

Compression:

Stored size: 748 Bytes

Contents

# Rails 3.x support

require "bugsnag"
require "rails"

module Bugsnag
  class Railtie < Rails::Railtie
    rake_tasks do
      # TODO: Add in rake tasks
    end

    initializer "bugsnag.use_rack_middleware" do |app|
      app.config.middleware.use "Bugsnag::Rack"
    end

    config.after_initialize do
      Bugsnag.configure do |config|
        config.logger ||= Rails.logger
        config.release_stage ||= Rails.env
        config.project_root ||= Rails.root
        config.framework = "Rails: #{::Rails::VERSION::STRING}"
      end

      if defined?(::ActionController::Base)
        require "bugsnag/rails/controller_methods"
        ::ActionController::Base.send(:include, Bugsnag::Rails::ControllerMethods)
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
bugsnag-1.0.10 lib/bugsnag/railtie.rb
bugsnag-1.0.9 lib/bugsnag/railtie.rb
bugsnag-1.0.8 lib/bugsnag/railtie.rb
bugsnag-1.0.7 lib/bugsnag/railtie.rb
bugsnag-1.0.6 lib/bugsnag/railtie.rb
bugsnag-1.0.5 lib/bugsnag/railtie.rb
bugsnag-1.0.4 lib/bugsnag/railtie.rb
bugsnag-1.0.3 lib/bugsnag/railtie.rb
bugsnag-1.0.2 lib/bugsnag/railtie.rb
bugsnag-1.0.1 lib/bugsnag/railtie.rb