Sha256: abd93401bfb482fb228f1b3095ca11cb1f90baa267c2d21b5510b613f6447daa

Contents?: true

Size: 686 Bytes

Versions: 11

Compression:

Stored size: 686 Bytes

Contents

module CopycopterClient
  # Responsible for Rails initialization
  module Rails
    # Sets up the logger, environment, name, project root, and framework name
    # for Rails applications. Must be called after framework initialization.
    def self.initialize
      CopycopterClient.configure(false) do |config|
        config.environment_name = ::Rails.env
        config.logger           = ::Rails.logger
        config.framework        = "Rails: #{::Rails::VERSION::STRING}"
        config.middleware       = ::Rails.configuration.middleware
      end
    end
  end
end

if defined?(Rails::Railtie)
  require 'copycopter_client/railtie'
else
  CopycopterClient::Rails.initialize
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
copycopter_client-2.0.1 lib/copycopter_client/rails.rb
copycopter_client-2.0.0 lib/copycopter_client/rails.rb
copycopter_client-1.1.2 lib/copycopter_client/rails.rb
copycopter_client-1.1.1 lib/copycopter_client/rails.rb
copycopter_client-1.1.0 lib/copycopter_client/rails.rb
copycopter_client-1.0.4 lib/copycopter_client/rails.rb
copycopter_client-1.0.3 lib/copycopter_client/rails.rb
copycopter_client-1.0.2 lib/copycopter_client/rails.rb
copycopter_client-1.0.1 lib/copycopter_client/rails.rb
copycopter_client-1.0.0 lib/copycopter_client/rails.rb
copycopter_client-1.0.0.beta11 lib/copycopter_client/rails.rb