replica_pools 2.4.2 → 2.5.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
  SHA256:
3
- metadata.gz: bbd92d614f51ed7b7d9ed39d174fff5b7574b6dfe1f9fc09370e823237b6278b
4
- data.tar.gz: 03f068ac02942552e6aa847e95012f1e38f4dc56ba63f580459c7446290edf4f
3
+ metadata.gz: 5266f3b52cb6ff8d9e54175b60ee4938a2765ac08fc5c1a09af659b8a93d61f4
4
+ data.tar.gz: ad735b62e57f38f238941e579b106f744c41db7b2985d9a7044fd4fa3f738227
5
5
  SHA512:
6
- metadata.gz: 5aee205f1a54bfd92eaaa27dd6696f6d3ee337f58a95ee3f273a88167250c8fa9f5e4372ea18e2c261011c01d502f614aa6bc8d6b0225b3b77b58e1d960e5b7a
7
- data.tar.gz: 81833fdc2aeb92f02ad89e907d8c36498e2816310ab8935590c312e052909cb244df315ad2038eaa809d625e379c9edf6c8e4ed3218f398f5b752f095282f9be
6
+ metadata.gz: a8a5292802eab9a70512d8e91b6838556614f35c43efd3d277c54b838e913168980bfbab0dedfd961ab55e4a0dc1b65f5422ee0cb3f4afddacc923d3a75b26e7
7
+ data.tar.gz: 9c7e5fa395316788a77e836a82a83a1e6141df829ea573539421e95e8d4b3ade55e6588afd85990dbbc2101fc519006312c022f1ad1524e1f74dc4e25a19fa2d
@@ -20,7 +20,7 @@ module ReplicaPools
20
20
  # Make sure transactions run on leader
21
21
  # Even if they're initiated from ActiveRecord::Base
22
22
  # (which doesn't have our hijack).
23
- def transaction(options = {}, &block)
23
+ def transaction(**options, &block)
24
24
  if self.connection.kind_of?(ConnectionProxy)
25
25
  super
26
26
  else
@@ -101,9 +101,9 @@ module ReplicaPools
101
101
  leader_depth > 0
102
102
  end
103
103
 
104
- def route_to(conn, method, *args, &block)
104
+ def route_to(conn, method, *args, **keyword_args, &block)
105
105
  raise ReplicaPools::LeaderDisabled.new if ReplicaPools.config.disable_leader && conn == leader
106
- conn.retrieve_connection.send(method, *args, &block)
106
+ conn.retrieve_connection.send(method, *args, **keyword_args, &block)
107
107
  rescue => e
108
108
  ReplicaPools.log :error, "Error during ##{method}: #{e}"
109
109
  log_proxy_state
@@ -1,3 +1,3 @@
1
1
  module ReplicaPools
2
- VERSION = "2.4.2"
2
+ VERSION = "2.5.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: replica_pools
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.2
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Drabik
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-02-09 00:00:00.000000000 Z
12
+ date: 2023-03-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
@@ -158,14 +158,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
158
  - !ruby/object:Gem::Version
159
159
  version: '1.2'
160
160
  requirements: []
161
- rubygems_version: 3.1.6
161
+ rubygems_version: 3.2.33
162
162
  signing_key:
163
163
  specification_version: 4
164
164
  summary: Connection proxy for ActiveRecord for leader / replica setups.
165
165
  test_files:
166
- - spec/spec_helper.rb
167
- - spec/pool_spec.rb
168
- - spec/slave_pools_spec.rb
169
166
  - spec/config/test_model.rb
170
- - spec/query_cache_spec.rb
171
167
  - spec/connection_proxy_spec.rb
168
+ - spec/pool_spec.rb
169
+ - spec/query_cache_spec.rb
170
+ - spec/slave_pools_spec.rb
171
+ - spec/spec_helper.rb