active_record_host_pool 1.0.0 → 1.0.1

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
  SHA256:
3
- metadata.gz: c4b82dd2e0f36c9d8bb1be0984fd6c2ff78b8a049b1662e7ac80f21612ed8f5b
4
- data.tar.gz: 523727dba7a6bf79b57d57ed0a0b9b4db68ac4b9503f8ce9c5b85ce26d4ffa9e
3
+ metadata.gz: a62e23b1cbccc5365b119d31329f4c227a6efebf729ce49edb5f2dd63d704e39
4
+ data.tar.gz: 815dcd119bebc0ddb5ad7308ca41b4906e15cc72ede2048d164623cdd539df7f
5
5
  SHA512:
6
- metadata.gz: 0734f8acb5d7b6bcdc0a317063589c812c1be49990e992c19016b133f9e8537083ba7b881b1a0337ae39d3cd544081b98022f4109be7b9e7709da520e138ac42
7
- data.tar.gz: 0accd390306edc6968d4457b7504654dd75e82218d818f39f05735c2f2f658f6ca394b92fcfca4cf223f758f1974ce3131efc7cdd0e67e421eff01df26091356
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(owner_thread = Thread.current)
87
+ def release_connection(*args)
88
88
  p = _connection_pool(false)
89
89
  return unless p
90
90
 
91
- p.release_connection(owner_thread)
91
+ p.release_connection(*args)
92
92
  end
93
93
 
94
94
  def flush!
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveRecordHostPool
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.1"
5
5
  end
@@ -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.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-02-25 00:00:00.000000000 Z
14
+ date: 2020-03-30 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activerecord