active_record_host_pool 1.0.0 → 1.0.1
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 +4 -4
- data/lib/active_record_host_pool/pool_proxy.rb +2 -2
- data/lib/active_record_host_pool/version.rb +1 -1
- data/test/test_arhp.rb +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a62e23b1cbccc5365b119d31329f4c227a6efebf729ce49edb5f2dd63d704e39
|
4
|
+
data.tar.gz: 815dcd119bebc0ddb5ad7308ca41b4906e15cc72ede2048d164623cdd539df7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c4022f240849bdc6be2140d5b6abda363264e1f1011e6781436537516c356c2ac4a05b82d30891143274113cf18575b0817b76ccc5f22a6fcb0ebd190148db1
|
7
|
+
data.tar.gz: dd7d2ffed45316302a921ab8f70c7ae067cef09e5ae01a0961b1f899cc34808e5b6077d488182e590bc88b767dd670d29ebb6b83aaf18222c370a5fdd3c06f12
|
@@ -84,11 +84,11 @@ module ActiveRecordHostPool
|
|
84
84
|
_clear_connection_proxy_cache
|
85
85
|
end
|
86
86
|
|
87
|
-
def release_connection(
|
87
|
+
def release_connection(*args)
|
88
88
|
p = _connection_pool(false)
|
89
89
|
return unless p
|
90
90
|
|
91
|
-
p.release_connection(
|
91
|
+
p.release_connection(*args)
|
92
92
|
end
|
93
93
|
|
94
94
|
def flush!
|
data/test/test_arhp.rb
CHANGED
@@ -163,6 +163,13 @@ class ActiveRecordHostPoolTest < Minitest::Test
|
|
163
163
|
assert_equal expected_database, current_database(switch_to_klass)
|
164
164
|
end
|
165
165
|
|
166
|
+
def test_release_connection
|
167
|
+
pool = ActiveRecord::Base.connection_pool
|
168
|
+
conn = pool.connection
|
169
|
+
pool.expects(:checkin).with(conn)
|
170
|
+
pool.release_connection
|
171
|
+
end
|
172
|
+
|
166
173
|
private
|
167
174
|
|
168
175
|
def assert_action_uses_correct_database(action, sql)
|
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: 1.0.
|
4
|
+
version: 1.0.1
|
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: 2020-
|
14
|
+
date: 2020-03-30 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activerecord
|