Sha256: 3fb4e07a025d5295cc0729921c65521b645b618bbea95c90759ed5ac44a7b70d

Contents?: true

Size: 580 Bytes

Versions: 5

Compression:

Stored size: 580 Bytes

Contents

require 'active_support'
require "fresh_connection"
require "ebisu_connection/conf_file"

module EbisuConnection
  class << self
    attr_writer :env

    def replica_file=(file)
      ConfFile.replica_file = file
    end

    def slaves_file=(file)
      ConfFile.slaves_file = file
    end

    def env
      @env ||= defined?(Rails) && Rails.env || ENV["RAILS_ENV"] || ENV["RACK_ENV"]
    end
  end
end

require "ebisu_connection/connection_manager"
FreshConnection.connection_manager = EbisuConnection::ConnectionManager

require "ebisu_connection/railtie" if defined?(Rails)

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ebisu_connection-2.4.0 lib/ebisu_connection.rb
ebisu_connection-2.4.0.rc4 lib/ebisu_connection.rb
ebisu_connection-2.4.0.rc3 lib/ebisu_connection.rb
ebisu_connection-2.4.0.rc2 lib/ebisu_connection.rb
ebisu_connection-2.4.0.rc1 lib/ebisu_connection.rb