splitclient-rb 8.1.3.pre.rc1-java → 8.1.3.pre.rc2-java

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
  SHA1:
3
- metadata.gz: 5aeedfe4b86ecd8ca68ce4a5f309758f48f7cbc1
4
- data.tar.gz: b1c284a4d23b41582e0e58fd8f827b10e13490d9
3
+ metadata.gz: 967ac13ea5a9ebfc1ba22869010fe2996e8af399
4
+ data.tar.gz: 8f38579fa0e4bd5220d8ff050178df8e7317bd2a
5
5
  SHA512:
6
- metadata.gz: cea9bc6609a23fd184f1e406fac905b06e1df66db297027b28ada289e17d7d46be7f58b4f7a8a2f26ff04287e146344b606c0a284c4acba8d537fa262fbad867
7
- data.tar.gz: a26df41524283c15ddc5935b8151a533624b56bd71e24f6d6c0514f024281b77ee970314b8c36f52c4922dc5574b8998adccd298a0e96a0050b16b008bd9ee51
6
+ metadata.gz: d9b66788f9ca970e98233386a68607638ac6be83bc6f15d1921d86596fcc3b74479549a26b037d8061c5b842aa4d0bbfa2fd4bc574dd70587325c971d6153e6d
7
+ data.tar.gz: c8e7656ebf927bae70ad2c19b7b7be635ca55f5c0fff3745faa7b18f7a5ac7276fa16e3ee0f3a8a13402653e65c664d0339852e5ee82f8b86914ad8dd6e80d93
@@ -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 @feature_flags_repository.get_change_number == notification.data['pcn']
59
+ if check_update(notification)
46
60
  begin
47
- @feature_flags_repository.add_split(
48
- JSON.parse(
49
- SplitIoClient::Helpers::DecryptionHelper.get_encoded_definition(
50
- notification.data['c'],
51
- notification.data['d']
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
@@ -1,3 +1,3 @@
1
1
  module SplitIoClient
2
- VERSION = '8.1.3.pre.rc1'
2
+ VERSION = '8.1.3.pre.rc2'
3
3
  end
@@ -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.rc1
4
+ version: 8.1.3.pre.rc2
5
5
  platform: java
6
6
  authors:
7
7
  - Split Software
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-06 00:00:00.000000000 Z
11
+ date: 2023-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '2.2'
41
+ - !ruby/object:Gem::Dependency
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '11.1'
47
+ name: byebug
48
+ prerelease: false
49
+ type: :development
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
  requirement: !ruby/object:Gem::Requirement
43
57
  requirements:
@@ -192,20 +206,6 @@ dependencies:
192
206
  - - "~>"
193
207
  - !ruby/object:Gem::Version
194
208
  version: '1.7'
195
- - !ruby/object:Gem::Dependency
196
- requirement: !ruby/object:Gem::Requirement
197
- requirements:
198
- - - "~>"
199
- - !ruby/object:Gem::Version
200
- version: '11.1'
201
- name: byebug
202
- prerelease: false
203
- type: :development
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
  requirement: !ruby/object:Gem::Requirement
211
211
  requirements: