Sha256: 95b0bea91259d5c2ac2d24bc9209cbaa3a96a2c1af06bf1695316af740472553

Contents?: true

Size: 787 Bytes

Versions: 35

Compression:

Stored size: 787 Bytes

Contents

require 'ratchetio'

module Ratchetio
  module Rails
    def self.initialize
      rails_logger = if defined?(::Rails.logger)
                       ::Rails.logger
                     elsif defined?(RAILS_DEFAULT_LOGGER)
                       RAILS_DEFAULT_LOGGER
                     end

      Ratchetio.configure do |config|
        config.logger = rails_logger
        config.environment = defined?(::Rails.env) && ::Rails.env || defined?(RAILS_ENV) && RAILS_ENV
        config.root = defined?(::Rails.root) && ::Rails.root || defined?(RAILS_ROOT) && RAILS_ROOT
        config.framework = defined?(::Rails.version) && "Rails: #{::Rails.version}" || defined?(::Rails::VERSION::STRING) && "Rails: #{::Rails::VERSION::STRING}"
      end
    end
  end
end

Ratchetio::Rails.initialize

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
ratchetio-0.7.1 lib/ratchetio/rails.rb
ratchetio-0.7.0 lib/ratchetio/rails.rb
ratchetio-0.6.3 lib/ratchetio/rails.rb
ratchetio-0.6.1 lib/ratchetio/rails.rb
ratchetio-0.6.0 lib/ratchetio/rails.rb
ratchetio-0.5.5 lib/ratchetio/rails.rb
ratchetio-0.5.3 lib/ratchetio/rails.rb
ratchetio-0.5.2 lib/ratchetio/rails.rb
ratchetio-0.5.1 lib/ratchetio/rails.rb
ratchetio-0.5.0 lib/ratchetio/rails.rb
ratchetio-0.4.11 lib/ratchetio/rails.rb
ratchetio-0.4.10 lib/ratchetio/rails.rb
ratchetio-0.4.9 lib/ratchetio/rails.rb
ratchetio-0.4.8 lib/ratchetio/rails.rb
ratchetio-0.4.7 lib/ratchetio/rails.rb
ratchetio-0.4.6 lib/ratchetio/rails.rb
ratchetio-0.4.5 lib/ratchetio/rails.rb
ratchetio-0.4.4 lib/ratchetio/rails.rb
ratchetio-0.4.3 lib/ratchetio/rails.rb
ratchetio-0.4.2 lib/ratchetio/rails.rb