flipper-active_record 0.22.0 → 0.22.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/flipper/adapters/active_record.rb +9 -4
- data/lib/flipper/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18500d2bb4a616c89ca974e8c6328d12d6079ef87cd6bdb679711cac461c8ebc
|
4
|
+
data.tar.gz: c170462a9bbb135de87bcef3e50a840bc5330d9858400288e20d420fd108917f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e0365f6a63821655f3d9411e0f4417b262116546feda368e3fe1f98198be8df9db7e27c2b38f7dee77fa2db71c224943bf1ebd2cd7e7919dc24197658a08f37
|
7
|
+
data.tar.gz: 39c4170606321f2befbe7b6da2316e77f2e1363476099aacbf9acaa2113c292825aff566a8fbdbe23beac9e2f25f99c7df54c7d58f1e8d1dabb2ba7d0229582e
|
@@ -173,10 +173,15 @@ module Flipper
|
|
173
173
|
@gate_class.transaction do
|
174
174
|
clear(feature) if clear_feature
|
175
175
|
@gate_class.where(feature_key: feature.key, key: gate.key).destroy_all
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
176
|
+
begin
|
177
|
+
@gate_class.create! do |g|
|
178
|
+
g.feature_key = feature.key
|
179
|
+
g.key = gate.key
|
180
|
+
g.value = thing.value.to_s
|
181
|
+
end
|
182
|
+
rescue ::ActiveRecord::RecordNotUnique
|
183
|
+
# assume this happened concurrently with the same thing and its fine
|
184
|
+
# see https://github.com/jnunemaker/flipper/issues/544
|
180
185
|
end
|
181
186
|
end
|
182
187
|
|
data/lib/flipper/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flipper-active_record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.22.
|
4
|
+
version: 0.22.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Nunemaker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: flipper
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.22.
|
19
|
+
version: 0.22.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.22.
|
26
|
+
version: 0.22.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activerecord
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|