Sha256: bdfbd1d558b0639b570a4c4319e053edd39074d4209d72c75d9de66b4bb8b473
Contents?: true
Size: 885 Bytes
Versions: 40
Compression:
Stored size: 885 Bytes
Contents
module CopyTunerClient # 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 CopyTunerClient.configure(false) do |config| config.environment_name = ::Rails.env config.logger = if defined?(::Rails::Console) Logger.new('/dev/null') elsif defined?(::Rails) && ::Rails.env.development? Logger.new('log/copy_tuner.log') else ::Rails.logger end config.framework = "Rails: #{::Rails::VERSION::STRING}" config.middleware = ::Rails.configuration.middleware end end end end if defined?(::Rails::Railtie) require 'copy_tuner_client/engine' else CopyTunerClient::Rails.initialize end
Version data entries
40 entries across 40 versions & 1 rubygems