Sha256: 73b81035bdfcb32ad452b16700a8743cce7ec3956eb2ed8ffafd2e6694640180

Contents?: true

Size: 678 Bytes

Versions: 7

Compression:

Stored size: 678 Bytes

Contents

if defined?(::Rails)
  module Appsignal
    module Integrations
      class Railtie < ::Rails::Railtie
        initializer 'appsignal.configure_rails_initialization' do |app|
          app.middleware.insert_before(
            ActionDispatch::RemoteIp,
            Appsignal::Rack::Listener
          )
        end

        config.after_initialize do
          # Start logger
          Appsignal.start_logger(Rails.root.join('log'))

          # Load config
          Appsignal.config = Appsignal::Config.new(Rails.root, Rails.env)

          # Start agent if config for this env is present
          Appsignal.start if Appsignal.active?
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
appsignal-0.8.0.alpha.0 lib/appsignal/integrations/rails.rb
appsignal-0.7.1 lib/appsignal/integrations/rails.rb
appsignal-0.7.1.beta.1 lib/appsignal/integrations/rails.rb
appsignal-0.7.0.beta.1 lib/appsignal/integrations/rails.rb
appsignal-0.7.0.alpha.4 lib/appsignal/integrations/rails.rb
appsignal-0.7.0.alpha.3 lib/appsignal/integrations/rails.rb
appsignal-0.7.0.alpha.2 lib/appsignal/integrations/rails.rb