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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4d6c72b579bf974d75846d8b6e149f0790736f16848fe4b0e54a7fa2907262c8
4
- data.tar.gz: de4029f2a4a2e6c8a869cfc1c2eb15b65d97ae627844b22fdc0274c4c9bf8e83
3
+ metadata.gz: 18500d2bb4a616c89ca974e8c6328d12d6079ef87cd6bdb679711cac461c8ebc
4
+ data.tar.gz: c170462a9bbb135de87bcef3e50a840bc5330d9858400288e20d420fd108917f
5
5
  SHA512:
6
- metadata.gz: cf9efccca1b72b1ef7c99b822ad6507a8fb5040f1460b6a2ed4eacc4d62278f72c1419db54a05e0c2ad3348b6dde4d76f011c314b41bc6ffb9f35e07e1f08a18
7
- data.tar.gz: b864b6658ef23db29a0f3007fb24b7f641f26d59be006473102b39c2c42e6905ec776df28e2a47e5ab6e8d780f41862aae1a3b7ef9f8a8ac80a693beb7000501
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
- @gate_class.create! do |g|
177
- g.feature_key = feature.key
178
- g.key = gate.key
179
- g.value = thing.value.to_s
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
 
@@ -1,3 +1,3 @@
1
1
  module Flipper
2
- VERSION = '0.22.0'.freeze
2
+ VERSION = '0.22.1'.freeze
3
3
  end
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.0
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-07-08 00:00:00.000000000 Z
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.0
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.0
26
+ version: 0.22.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activerecord
29
29
  requirement: !ruby/object:Gem::Requirement