Sha256: d055983bb33ceb232c1f80cfbbf778fee86fa1ea39b3b16242a396b2bb8916fc

Contents?: true

Size: 766 Bytes

Versions: 24

Compression:

Stored size: 766 Bytes

Contents

if defined?(::Rails)
  Appsignal.logger.info("Loading Rails (#{Rails.version}) integration")

  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,
            :name => Rails.application.class.parent_name
          )

          Appsignal.start
        end
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
appsignal-0.11.7 lib/appsignal/integrations/rails.rb
appsignal-0.11.7.beta.1 lib/appsignal/integrations/rails.rb
appsignal-0.11.6 lib/appsignal/integrations/rails.rb
appsignal-0.11.6.beta.0 lib/appsignal/integrations/rails.rb
appsignal-0.11.5 lib/appsignal/integrations/rails.rb
appsignal-0.11.4 lib/appsignal/integrations/rails.rb
appsignal-0.11.4.beta.0 lib/appsignal/integrations/rails.rb
appsignal-0.11.3 lib/appsignal/integrations/rails.rb
appsignal-0.11.2 lib/appsignal/integrations/rails.rb
appsignal-0.11.1 lib/appsignal/integrations/rails.rb
appsignal-0.11.0 lib/appsignal/integrations/rails.rb
appsignal-0.11.0.beta.2 lib/appsignal/integrations/rails.rb
appsignal-0.11.0.beta.1 lib/appsignal/integrations/rails.rb
appsignal-0.10.6 lib/appsignal/integrations/rails.rb
appsignal-0.10.5 lib/appsignal/integrations/rails.rb
appsignal-0.10.4 lib/appsignal/integrations/rails.rb
appsignal-0.10.3 lib/appsignal/integrations/rails.rb
appsignal-0.10.2 lib/appsignal/integrations/rails.rb
appsignal-0.10.1 lib/appsignal/integrations/rails.rb
appsignal-0.10.0 lib/appsignal/integrations/rails.rb