splitclient-rb 8.1.3.pre.rc1-java → 8.1.3.pre.rc3-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: f358c7d3f053cda3aab1ac7430cb28dc05635572
4
+ data.tar.gz: 2e07e4d016beb6d886709fe6fcea9a69a976bdca
5
5
  SHA512:
6
- metadata.gz: cea9bc6609a23fd184f1e406fac905b06e1df66db297027b28ada289e17d7d46be7f58b4f7a8a2f26ff04287e146344b606c0a284c4acba8d537fa262fbad867
7
- data.tar.gz: a26df41524283c15ddc5935b8151a533624b56bd71e24f6d6c0514f024281b77ee970314b8c36f52c4922dc5574b8998adccd298a0e96a0050b16b008bd9ee51
6
+ metadata.gz: fc3f2d65ea89d3d476fe6b4eada168a7f08f50cab3e90bc69f9f8916112c00a9032f7314b7ec427a30ff5188f984ed3065e9da4e2e7c42f1f40cae15b009bbf4
7
+ data.tar.gz: ab0fc041e1104d1327ae92e3f404cc687c346284a7ce7e62d6e876f8fbb46ecf3aade99a7bf7a3976f39913bf583c971d83a6adb851dc27f723c6818d84bab87
@@ -33,6 +33,7 @@ module SplitIoClient
33
33
 
34
34
  def stop_sse
35
35
  @sse_handler.stop
36
+ SplitIoClient::Helpers::ThreadHelper.stop(:schedule_next_token_refresh, @config)
36
37
  rescue StandardError => e
37
38
  @config.logger.error(e.inspect)
38
39
  end
@@ -320,7 +320,7 @@ module SplitIoClient
320
320
  return :debug
321
321
  else
322
322
  default = adapter == :redis ? :debug : :optimized
323
- @logger.error("You passed an invalid impressions_mode, impressions_mode should be one of the following values: :debug, :optimized or :none. Defaulting to #{default} mode")
323
+ @logger.error("You passed an invalid impressions_mode, impressions_mode should be one of the following values: :debug, :optimized or :none. Defaulting to #{default} mode") unless impressions_mode.nil?
324
324
  return default
325
325
  end
326
326
  end
@@ -92,7 +92,7 @@ module SplitIoClient
92
92
 
93
93
  raise 'eof exception' if partial_data == :eof
94
94
  rescue Errno::EBADF, IOError => e
95
- @config.logger.error(e.inspect)
95
+ @config.logger.error(e.inspect) if @config.debug_enabled
96
96
  return nil
97
97
  rescue StandardError => e
98
98
  return nil if ENV['SPLITCLIENT_ENV'] == 'test'
@@ -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.rc3'
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.rc3
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-28 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: