splitclient-rb 8.1.3.pre.rc1 → 8.1.3.pre.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/splitclient-rb/sse/workers/splits_worker.rb +21 -10
- data/lib/splitclient-rb/version.rb +1 -1
- data/splitclient-rb.gemspec +1 -1
- metadata +16 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5508fee5ba933e333d48d3659f2193cba3e0ac5d3ef9c6a11fcf1b9c171919a1
|
4
|
+
data.tar.gz: 64db776591fe9f3db5f9820114338cf05270a881d8b249881941f416bfd28b48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7890055fe01a272791d102927aef116bbafe7acec3075a05d9ccdbec4587cca96643a8c801a8519d6a47a9a73ec37dce3500da00fada9ec17e0ce5092c58b1e
|
7
|
+
data.tar.gz: 67c6b57d9b30adde1e99c071c16d3b616e83a283f37b264e7f020cbfa8e4830f9ae72bf39cce27b5a054efd96cc1daee3017713da8b7656449eaf44799e93309
|
@@ -39,20 +39,31 @@ module SplitIoClient
|
|
39
39
|
|
40
40
|
private
|
41
41
|
|
42
|
+
def return_split_from_json(notification)
|
43
|
+
JSON.parse(
|
44
|
+
SplitIoClient::Helpers::DecryptionHelper.get_encoded_definition(
|
45
|
+
notification.data['c'],
|
46
|
+
notification.data['d']
|
47
|
+
),
|
48
|
+
symbolize_names: true
|
49
|
+
)
|
50
|
+
end
|
51
|
+
|
52
|
+
def check_update(notification)
|
53
|
+
@feature_flags_repository.get_change_number == notification.data['pcn'] && !notification.data['d'].nil?
|
54
|
+
end
|
55
|
+
|
42
56
|
def update_feature_flag(notification)
|
43
57
|
return if @feature_flags_repository.get_change_number.to_i > notification.data['changeNumber']
|
44
58
|
|
45
|
-
if
|
59
|
+
if check_update(notification)
|
46
60
|
begin
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
symbolize_names: true
|
54
|
-
)
|
55
|
-
)
|
61
|
+
new_split = return_split_from_json(notification)
|
62
|
+
if SplitIoClient::Engine::Models::Split.archived?(new_split)
|
63
|
+
@feature_flags_repository.remove_split(new_split)
|
64
|
+
else
|
65
|
+
@feature_flags_repository.add_split(new_split)
|
66
|
+
end
|
56
67
|
@feature_flags_repository.set_change_number(notification.data['changeNumber'])
|
57
68
|
return
|
58
69
|
rescue StandardError => e
|
data/splitclient-rb.gemspec
CHANGED
@@ -37,6 +37,7 @@ Gem::Specification.new do |spec|
|
|
37
37
|
|
38
38
|
spec.add_development_dependency 'allocation_stats', '~> 0.1'
|
39
39
|
spec.add_development_dependency 'bundler', '~> 2.2'
|
40
|
+
spec.add_development_dependency 'byebug', '~> 11.1'
|
40
41
|
spec.add_development_dependency 'pry', '~> 0.14'
|
41
42
|
spec.add_development_dependency 'pry-nav', '~> 1.0'
|
42
43
|
spec.add_development_dependency 'rake', '~> 13.0'
|
@@ -48,7 +49,6 @@ Gem::Specification.new do |spec|
|
|
48
49
|
spec.add_development_dependency 'timecop', '~> 0.9'
|
49
50
|
spec.add_development_dependency 'webmock', '~> 3.14'
|
50
51
|
spec.add_development_dependency 'webrick', '~> 1.7'
|
51
|
-
spec.add_development_dependency 'byebug', '~> 11.1'
|
52
52
|
|
53
53
|
spec.add_runtime_dependency 'bitarray', '~> 1.3'
|
54
54
|
spec.add_runtime_dependency 'concurrent-ruby', '~> 1.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: splitclient-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 8.1.3.pre.
|
4
|
+
version: 8.1.3.pre.rc2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Split Software
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-06-
|
11
|
+
date: 2023-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: allocation_stats
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '2.2'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: byebug
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '11.1'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '11.1'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: pry
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -192,20 +206,6 @@ dependencies:
|
|
192
206
|
- - "~>"
|
193
207
|
- !ruby/object:Gem::Version
|
194
208
|
version: '1.7'
|
195
|
-
- !ruby/object:Gem::Dependency
|
196
|
-
name: byebug
|
197
|
-
requirement: !ruby/object:Gem::Requirement
|
198
|
-
requirements:
|
199
|
-
- - "~>"
|
200
|
-
- !ruby/object:Gem::Version
|
201
|
-
version: '11.1'
|
202
|
-
type: :development
|
203
|
-
prerelease: false
|
204
|
-
version_requirements: !ruby/object:Gem::Requirement
|
205
|
-
requirements:
|
206
|
-
- - "~>"
|
207
|
-
- !ruby/object:Gem::Version
|
208
|
-
version: '11.1'
|
209
209
|
- !ruby/object:Gem::Dependency
|
210
210
|
name: bitarray
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|