active_record_host_pool 0.13.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c4b82dd2e0f36c9d8bb1be0984fd6c2ff78b8a049b1662e7ac80f21612ed8f5b
|
|
4
|
+
data.tar.gz: 523727dba7a6bf79b57d57ed0a0b9b4db68ac4b9503f8ce9c5b85ce26d4ffa9e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0734f8acb5d7b6bcdc0a317063589c812c1be49990e992c19016b133f9e8537083ba7b881b1a0337ae39d3cd544081b98022f4109be7b9e7709da520e138ac42
|
|
7
|
+
data.tar.gz: 0accd390306edc6968d4457b7504654dd75e82218d818f39f05735c2f2f658f6ca394b92fcfca4cf223f758f1974ce3131efc7cdd0e67e421eff01df26091356
|
|
@@ -85,22 +85,21 @@ module ActiveRecordHostPool
|
|
|
85
85
|
end
|
|
86
86
|
end
|
|
87
87
|
|
|
88
|
+
# rubocop:disable Lint/DuplicateMethods
|
|
88
89
|
module ActiveRecord
|
|
89
90
|
module ConnectionAdapters
|
|
90
91
|
class ConnectionHandler
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
owner_to_pool[spec.name] = ActiveRecordHostPool::PoolProxy.new(spec)
|
|
100
|
-
end
|
|
92
|
+
case "#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}"
|
|
93
|
+
when '5.1', '5.2', '6.0'
|
|
94
|
+
|
|
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)
|
|
101
100
|
end
|
|
102
101
|
|
|
103
|
-
|
|
102
|
+
when '4.2'
|
|
104
103
|
|
|
105
104
|
def establish_connection(owner, spec)
|
|
106
105
|
@class_to_pool.clear
|
|
@@ -116,5 +115,6 @@ module ActiveRecord
|
|
|
116
115
|
end
|
|
117
116
|
end
|
|
118
117
|
end
|
|
118
|
+
# rubocop:enable Lint/DuplicateMethods
|
|
119
119
|
|
|
120
120
|
ActiveRecord::ConnectionAdapters::Mysql2Adapter.include(ActiveRecordHostPool::DatabaseSwitch)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: active_record_host_pool
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Benjamin Quorning
|
|
@@ -11,7 +11,7 @@ authors:
|
|
|
11
11
|
autorequire:
|
|
12
12
|
bindir: bin
|
|
13
13
|
cert_chain: []
|
|
14
|
-
date:
|
|
14
|
+
date: 2020-02-25 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: activerecord
|
|
@@ -22,7 +22,7 @@ dependencies:
|
|
|
22
22
|
version: 4.2.0
|
|
23
23
|
- - "<"
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: '6.
|
|
25
|
+
version: '6.1'
|
|
26
26
|
type: :runtime
|
|
27
27
|
prerelease: false
|
|
28
28
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -32,7 +32,7 @@ dependencies:
|
|
|
32
32
|
version: 4.2.0
|
|
33
33
|
- - "<"
|
|
34
34
|
- !ruby/object:Gem::Version
|
|
35
|
-
version: '6.
|
|
35
|
+
version: '6.1'
|
|
36
36
|
- !ruby/object:Gem::Dependency
|
|
37
37
|
name: mysql2
|
|
38
38
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -109,14 +109,14 @@ dependencies:
|
|
|
109
109
|
requirements:
|
|
110
110
|
- - "~>"
|
|
111
111
|
- !ruby/object:Gem::Version
|
|
112
|
-
version: 0.
|
|
112
|
+
version: 0.80.0
|
|
113
113
|
type: :development
|
|
114
114
|
prerelease: false
|
|
115
115
|
version_requirements: !ruby/object:Gem::Requirement
|
|
116
116
|
requirements:
|
|
117
117
|
- - "~>"
|
|
118
118
|
- !ruby/object:Gem::Version
|
|
119
|
-
version: 0.
|
|
119
|
+
version: 0.80.0
|
|
120
120
|
- !ruby/object:Gem::Dependency
|
|
121
121
|
name: shoulda
|
|
122
122
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -172,7 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
172
172
|
- !ruby/object:Gem::Version
|
|
173
173
|
version: '0'
|
|
174
174
|
requirements: []
|
|
175
|
-
rubygems_version: 3.
|
|
175
|
+
rubygems_version: 3.1.1
|
|
176
176
|
signing_key:
|
|
177
177
|
specification_version: 4
|
|
178
178
|
summary: Allow ActiveRecord to share a connection to multiple databases on the same
|