active_record_host_pool 0.9.5 → 0.10.0

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: e15fabd363b8e13ab05d30c7ea4473bba5fad470
4
- data.tar.gz: 498d652b40f38ce57864a6b33d1a86e446793b3d
3
+ metadata.gz: 741be382dcf1536af363b25893861f8ad2378593
4
+ data.tar.gz: 9a36bdfa1a6443f397d60f6d3269842bd29ec0ff
5
5
  SHA512:
6
- metadata.gz: 87fa9167105a51de5895a20adb1e421acdc0a7a1b81113b8fb8f885530f642a5bdaafeabf9d03c1bd5f54e0c2358e67d46840e44ef2df304c861746b471a97c4
7
- data.tar.gz: c9f22cd3feae4da0a61a6ca1f748ca8639ed845d0dd9c58d13e5ac1a173d9e0f452b5c5e24f0d222e27f80b11f9396c12aa42f36460a81f1c98cf6ed6d95235b
6
+ metadata.gz: 7bbb1ad8a038fee0a4a71d5404e1dd4a3b44e8c122d0f582305fa3b2a0b521525f028a83fd0e307273a8aeb3fa3f2dc767a046a6300a119b66ebc61e53a80111
7
+ data.tar.gz: aa02de512df8b45a4bfa3bd02e529ee33de4ad72403ab8c1e3948e610cc6f6d6c8983f64b13167f36f2a07343848cb51b3542b39925c2da98f46f0aa875d5bf8
@@ -86,10 +86,18 @@ module ActiveRecord
86
86
  module ConnectionAdapters
87
87
  class ConnectionHandler
88
88
 
89
- if ActiveRecord::VERSION::MAJOR >= 5
90
-
91
- def establish_connection(spec)
92
- owner_to_pool[spec.name] = ActiveRecordHostPool::PoolProxy.new(spec)
89
+ if ActiveRecord::VERSION::MAJOR == 5
90
+ if ActiveRecord::VERSION::MINOR == 0
91
+ def establish_connection(spec)
92
+ owner_to_pool[spec.name] = ActiveRecordHostPool::PoolProxy.new(spec)
93
+ end
94
+ else
95
+ def establish_connection(spec)
96
+ resolver = ConnectionAdapters::ConnectionSpecification::Resolver.new(Base.configurations)
97
+ spec = resolver.spec(spec)
98
+
99
+ owner_to_pool[spec.name] = ActiveRecordHostPool::PoolProxy.new(spec)
100
+ end
93
101
  end
94
102
 
95
103
  elsif ActiveRecord::VERSION::MAJOR == 4
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module ActiveRecordHostPool
3
- VERSION = "0.9.5"
3
+ VERSION = "0.10.0"
4
4
  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.5
4
+ version: 0.10.0
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-09-29 00:00:00.000000000 Z
11
+ date: 2017-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: 3.2.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '5.1'
22
+ version: '5.2'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: 3.2.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '5.1'
32
+ version: '5.2'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: wwtd
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -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.4.5.1
171
+ rubygems_version: 2.5.1
172
172
  signing_key:
173
173
  specification_version: 4
174
174
  summary: Allow ActiveRecord to share a connection to multiple databases on the same