guardrail 3.0.1 → 3.0.2

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: 356cff039858ba07cbc234ab54cf80c96c8211a2dea702c020a48fd108dc87ae
4
- data.tar.gz: 768e3d4069f07db8e7c0d67eb1c858a826977c0e8261604217fbd87580afb33b
3
+ metadata.gz: 47d7992dda76992bfb3e4aa615f5aed7fddc08683aed0b958b709eb2dcfa0c45
4
+ data.tar.gz: 19697845f2f658d4a169f0edfa1a71fcc8e09815a9ff7bf4a5c8ab3878f1f78e
5
5
  SHA512:
6
- metadata.gz: 9aab9b92d9de1ecd7867085b2938686e02e4ef3caa37a04b9e2d8ddb0ebcb3395cfca0e95e14559a5694ef3e0b5de83d61478eaccac1c9169240e0c521fb72c8
7
- data.tar.gz: '02464494bbb4c25425154b4c9bb1958938becb94da6678bfe6af2baf42b557cb4be62b75bf79aae280eee685629c8fb5799298f3681aeceb72a9b321aac03de7'
6
+ metadata.gz: 3a23c2441398929d68101b306bcd6f1af6d66e6100c7a0e6455eeb4f542fbec0e255ec9966a5f0261d35d94cab23ece0123fafe73dea2b78bdc2ab579144dd76
7
+ data.tar.gz: da97aacea0678a52ec6f593c8481602e27d14ba700fed980efb9f2de555e2b92e00b79efb5c81a9b4920045cd82f1d6925439a9f2c36c54ba78bd50322b20d37
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GuardRail
4
- VERSION = "3.0.1"
4
+ VERSION = "3.0.2"
5
5
  end
data/lib/guard_rail.rb CHANGED
@@ -13,7 +13,8 @@ module GuardRail
13
13
 
14
14
  def activate!(role)
15
15
  return if environment == role
16
- ActiveRecord::Base.connecting_to(role: role)
16
+ # Don't reset the shard when changing the role
17
+ ActiveRecord::Base.connecting_to(role: role, shard: nil)
17
18
  end
18
19
  end
19
20
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guardrail
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Cutrer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-17 00:00:00.000000000 Z
11
+ date: 2022-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -110,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
110
110
  - !ruby/object:Gem::Version
111
111
  version: '0'
112
112
  requirements: []
113
- rubygems_version: 3.1.4
113
+ rubygems_version: 3.1.6
114
114
  signing_key:
115
115
  specification_version: 4
116
116
  summary: ActiveRecord database environment switching for secondaries and least-privilege