active_record_host_pool 0.9.3 → 0.9.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 746fb94750dec52eb06c977d5462405e494a7506
|
4
|
+
data.tar.gz: db8a2468e592d02083e7bf41d3e15e270850d733
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8669bb88fe35a49e01b0ec9555df9fbc5e06f7daaa9d296eb53a25b26087e7fe6797d69658ca3e51feacb4256b12dd60971eee9915934a7603213e6fb5d7cb76
|
7
|
+
data.tar.gz: 782f375c36b1bdcc74596bb745b87dc7640eaa891fa2f2f5fb44d76a4afc0dde2c06d9edb1e4f2c0f33ee84c591500547da3ffac077d62dd93d6d1e445fc9fb4
|
@@ -81,18 +81,36 @@ end
|
|
81
81
|
module ActiveRecord
|
82
82
|
module ConnectionAdapters
|
83
83
|
class ConnectionHandler
|
84
|
-
|
85
|
-
|
84
|
+
|
85
|
+
if ActiveRecord::VERSION::MAJOR >= 5
|
86
|
+
|
87
|
+
def establish_connection(spec)
|
88
|
+
owner_to_pool[spec.name] = ActiveRecordHostPool::PoolProxy.new(spec)
|
89
|
+
end
|
90
|
+
|
91
|
+
elsif ActiveRecord::VERSION::MAJOR == 4
|
92
|
+
|
93
|
+
def establish_connection(owner, spec)
|
86
94
|
@class_to_pool.clear
|
87
95
|
raise RuntimeError, "Anonymous class is not allowed." unless owner.name
|
88
96
|
owner_to_pool[owner.name] = ActiveRecordHostPool::PoolProxy.new(spec)
|
89
|
-
|
97
|
+
end
|
98
|
+
|
99
|
+
elsif ActiveRecord::VERSION::MAJOR == 3 && ActiveRecord::VERSION::MINOR == 2
|
100
|
+
|
101
|
+
def establish_connection(owner, spec)
|
90
102
|
@connection_pools[spec] ||= ActiveRecordHostPool::PoolProxy.new(spec)
|
91
103
|
@class_to_pool[owner] = @connection_pools[spec]
|
92
|
-
|
104
|
+
end
|
105
|
+
|
106
|
+
else
|
107
|
+
|
108
|
+
def establish_connection(owner, spec)
|
93
109
|
@connection_pools[owner] = ActiveRecordHostPool::PoolProxy.new(spec)
|
94
110
|
end
|
111
|
+
|
95
112
|
end
|
113
|
+
|
96
114
|
end
|
97
115
|
end
|
98
116
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_record_host_pool
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Osheroff
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -168,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
168
168
|
version: '0'
|
169
169
|
requirements: []
|
170
170
|
rubyforge_project:
|
171
|
-
rubygems_version: 2.
|
171
|
+
rubygems_version: 2.6.6
|
172
172
|
signing_key:
|
173
173
|
specification_version: 4
|
174
174
|
summary: Allow ActiveRecord to share a connection to multiple databases on the same
|