switchman 1.12.14 → 1.12.15

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: ff01aec7e29d41ff4153b5a0d630809c3cb6c593b979931887b893fbdba5e566
4
- data.tar.gz: 78968b03376b3d66005f5e7b025fe48d96fe6a3752388cd5d77ec27e61b64f0a
3
+ metadata.gz: 131e490eb45f936d65fe5f6e560ccd272f0dd462ee7ae517dbab1b167855a20c
4
+ data.tar.gz: 7f74765e6c98eb1d54d05d2bed699ccc7479595b850b35c27720316f828b8e48
5
5
  SHA512:
6
- metadata.gz: c9d2a8cba6cf0c7c16d8a3ad437224e7a1ba11cf5e506840bbef46d846e8d839ea36b8b7845443a6f4c2c28bb209079041d1f7e278e0dd00d7d638f534cca305
7
- data.tar.gz: 79206bb762a133632db6b56df8a9a0e9851d3a3f235339928de76e65a802274c3e5da353a6c7fbbeaa95490387baf5d8ba1ac5a0a7c9eb42db07ad966ed5ca2e
6
+ metadata.gz: 4b9b3680ed4aaa458a8c94b1a3f479699f852528c907d554923fdcdbcfbfa476ba5e7caa6a3cb8d39b243e92f50821031403d0af93194d2947112a34a80c197a
7
+ data.tar.gz: fe07f31620503511bb963255dbadb012c696b42f47ee39e3fc9bf69d5744348bde292f41f9bc32d1df21e0e8fc235d8030f9d3f45fd86ea00831763e4a6ca16e
@@ -130,7 +130,7 @@ module Switchman
130
130
  primary_pool = retrieve_connection_pool("primary")
131
131
  if primary_pool.is_a?(ConnectionPoolProxy)
132
132
  pool = ConnectionPoolProxy.new(spec_name.to_sym, primary_pool.default_pool, @shard_connection_pools)
133
- pool.instance_variable_set(:@schema_cache, primary_pool.schema_cache)
133
+ pool.schema_cache.copy_values(primary_pool.schema_cache)
134
134
  pool
135
135
  else
136
136
  primary_pool
@@ -7,5 +7,12 @@ module Switchman
7
7
  @pool = pool
8
8
  super(nil)
9
9
  end
10
+
11
+ def copy_values(other_cache)
12
+ # use the same cached values but still fall back to the correct pool
13
+ [:@columns, :@columns_hash, :@primary_keys, :@data_sources].each do |iv|
14
+ instance_variable_set(iv, other_cache.instance_variable_get(iv))
15
+ end
16
+ end
10
17
  end
11
18
  end
@@ -1,3 +1,3 @@
1
1
  module Switchman
2
- VERSION = "1.12.14"
2
+ VERSION = "1.12.15"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: switchman
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.14
4
+ version: 1.12.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Cutrer
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2019-01-02 00:00:00.000000000 Z
13
+ date: 2019-01-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: railties