Sha256: d132a0a6a800bbe7e6019e0603382d0d445922eda2aaaec521c22ae80bdb4d78

Contents?: true

Size: 973 Bytes

Versions: 16

Compression:

Stored size: 973 Bytes

Contents

require 'action_controller'
require 'errplane'
require 'errplane/rails/middleware/hijack_rescue_action_everywhere'
require 'errplane/rails/air_traffic_controller'

module Errplane
  module Rails
    def self.initialize
      ActionController::Base.send(:include, Errplane::Rails::AirTrafficController)
      ActionController::Base.send(:include, Errplane::Rails::Middleware::HijackRescueActionEverywhere)

      ::Rails.configuration.middleware.insert_after 'ActionController::Failsafe', Errplane::Rack

      Errplane.configure(true) do |config|
        config.logger                ||= ::Rails.logger
        config.debug                   = true
        config.rails_environment     ||= ::Rails.env
        config.application_root      ||= ::Rails.root
        config.application_name      ||= "Application"
        config.framework               = "Rails"
        config.framework_version       = ::Rails.version
      end
    end
  end
end

Errplane::Rails.initialize

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
errplane-0.5.8 lib/errplane/rails.rb
errplane-0.5.7 lib/errplane/rails.rb
errplane-0.5.6 lib/errplane/rails.rb
errplane-0.5.5 lib/errplane/rails.rb
errplane-0.5.4 lib/errplane/rails.rb
errplane-0.5.3 lib/errplane/rails.rb
errplane-0.5.0 lib/errplane/rails.rb
errplane-0.4.12 lib/errplane/rails.rb
errplane-0.4.11 lib/errplane/rails.rb
errplane-0.4.10 lib/errplane/rails.rb
errplane-0.4.9 lib/errplane/rails.rb
errplane-0.4.8 lib/errplane/rails.rb
errplane-0.4.7 lib/errplane/rails.rb
errplane-0.4.6 lib/errplane/rails.rb
errplane-0.4.5 lib/errplane/rails.rb
errplane-0.4.4 lib/errplane/rails.rb