replica_pools 2.6.3 → 2.6.4

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: e01d82e28f2d89abe76f89d880196de84b563e9b08401d94867828b5368a164d
4
- data.tar.gz: cf5aa2ea0c91abaa27cd7fb2fdc99dbcd327188f3427572c8add0f13930cdf97
3
+ metadata.gz: fec69b8b572b701e6f50e555c91b38d9c166ee9ff2b1f9e1afff6b925483d224
4
+ data.tar.gz: 3be5fab5ae1aeb1609ac669fa85da3b0741b4eaa9f8066575b5f17c04d991590
5
5
  SHA512:
6
- metadata.gz: eb6791fcbac25902d48092c5c6faa1cd60753419003ff9b3c957bce185e0c27fd9ec0db59653667bad7dee2247a242c232a4f30ebcbc67694d0657c4c16e25c8
7
- data.tar.gz: ea3f61c5f4499437f74a28b81cddef31000c5d8323e81e53ebccef6d3d7d8501fd5537b469cc29a5c67a2c8bc58bec3057cde6ddef132ef17af53e50b966ccaf
6
+ metadata.gz: 507f274afcd27011fa4e40de581d59914423bfa3ff98398dcc744a56affe781b88d4aeecd3c22ca88419ef73752792fa25b791692d1f2d0b999c270509e68560
7
+ data.tar.gz: 5917987630ff6f7b2703223674df73590d3f60f54ea9e054966db3a4a30a5a3eaa063c785811bc97da45a55eff4d234e537ed7fc5505462f0eed2ede823fdec2
@@ -109,7 +109,10 @@ module ReplicaPools
109
109
 
110
110
  def route_to(conn, method, *args, **keyword_args, &block)
111
111
  raise ReplicaPools::LeaderDisabled.new if ReplicaPools.config.disable_leader && conn == leader
112
- conn.retrieve_connection.send(method, *args, **keyword_args, &block)
112
+ connection = conn.retrieve_connection
113
+
114
+ connection.verify!
115
+ connection.send(method, *args, **keyword_args, &block)
113
116
  rescue => e
114
117
  ReplicaPools.log :error, "Error during ##{method}: #{e}"
115
118
  log_proxy_state
@@ -1,3 +1,3 @@
1
1
  module ReplicaPools
2
- VERSION = "2.6.3"
2
+ VERSION = "2.6.4"
3
3
  end
data/spec/spec_helper.rb CHANGED
@@ -11,7 +11,7 @@ end
11
11
  require 'active_record'
12
12
  spec_dir = File.dirname(__FILE__)
13
13
  ActiveRecord::Base.logger = Logger.new(spec_dir + "/debug.log")
14
- ActiveRecord::Base.configurations = YAML::load(ERB.new(File.read(spec_dir + '/config/database.yml')).result)
14
+ ActiveRecord::Base.configurations = YAML::safe_load(ERB.new(File.read(spec_dir + '/config/database.yml')).result, aliases: true)
15
15
  ActiveRecord::Base.establish_connection :test
16
16
  ActiveRecord::Migration.verbose = false
17
17
  ActiveRecord::Migration.create_table(:test_models, :force => true) {}
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: replica_pools
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.3
4
+ version: 2.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Drabik
8
8
  - Lance Ivy
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-06-28 00:00:00.000000000 Z
12
+ date: 2023-10-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
@@ -143,7 +143,7 @@ homepage: https://github.com/kickstarter/replica_pools
143
143
  licenses:
144
144
  - MIT
145
145
  metadata: {}
146
- post_install_message:
146
+ post_install_message:
147
147
  rdoc_options: []
148
148
  require_paths:
149
149
  - lib
@@ -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.2.33
162
- signing_key:
161
+ rubygems_version: 3.1.6
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/config/test_model.rb
167
- - spec/connection_proxy_spec.rb
166
+ - spec/spec_helper.rb
168
167
  - spec/pool_spec.rb
169
- - spec/query_cache_spec.rb
170
168
  - spec/slave_pools_spec.rb
171
- - spec/spec_helper.rb
169
+ - spec/config/test_model.rb
170
+ - spec/query_cache_spec.rb
171
+ - spec/connection_proxy_spec.rb