splitclient-rb 7.3.5.pre.rc2-java → 7.3.5.pre.rc5-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: 4057a9d01946967eb3b35a624eb4456c72c67c4b
4
- data.tar.gz: 28ab3e1971b46453a94392bb5c1b2230a9b1c226
3
+ metadata.gz: 977dd4ad2b5e91d089796e2cc452f18dd1865465
4
+ data.tar.gz: dba8da2b6f8e25bd670f40588a6c8ce004ac2719
5
5
  SHA512:
6
- metadata.gz: 1e90fe6953a748f65a96c38b96924821aef9403c52ba525bc5157c4840047c82213c8cb184dae31f2f206841bf028f6d058ab0254df5e7fef0bc9fc0b589a248
7
- data.tar.gz: 1b43e98f1e5a400988d2d87e29c5a37075720469b71187f0760019cd9f76850bd2a54fcf084de25ad9c15093a95f7d8e908593051989cc89092c5de03feefcce
6
+ metadata.gz: 5b874e277d8ed4f803591238f130b1f16b885909f480f97aaf4f007f189d6699ddef901105a622784c9d6a17f18b418db1f284834d4c4367b28e133bc73b1fb3
7
+ data.tar.gz: 9e955a69fa2d695d65a3b8131c84e413e87ffffb66e927573a85954691f953c36eb6f0149fe772174ec7d0944c35271198d3c3d627b3173fcae0adab32c652f4
@@ -1,10 +1,10 @@
1
1
  on:
2
2
  push:
3
3
  branches:
4
- - master
4
+ - do-not-send-impressions
5
5
  pull_request:
6
6
  branches:
7
- - master
7
+ - do-not-send-impressions
8
8
 
9
9
  jobs:
10
10
  test:
@@ -21,7 +21,7 @@ jobs:
21
21
  fetch-depth: 0
22
22
 
23
23
  - name: Set up Ruby
24
- uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6
24
+ uses: ruby/setup-ruby@v1
25
25
  with:
26
26
  ruby-version: 2.5
27
27
 
@@ -24,7 +24,7 @@ module SplitIoClient
24
24
  sleep(@config.counter_refresh_rate)
25
25
  post_impressions_count
26
26
  end
27
- rescue SplitIoClient::SDKShutdownException
27
+ rescue SplitIoClient::SDKShutdownException
28
28
  post_impressions_count
29
29
 
30
30
  @config.logger.info('Posting impressions count due to shutdown')
@@ -9,15 +9,13 @@ module SplitIoClient
9
9
  impression_counter,
10
10
  telemetry_runtime_producer,
11
11
  impression_observer,
12
- unique_keys_tracker,
13
- impression_router)
12
+ unique_keys_tracker)
14
13
  @config = config
15
14
  @impressions_repository = impressions_repository
16
15
  @impression_counter = impression_counter
17
16
  @impression_observer = impression_observer
18
17
  @telemetry_runtime_producer = telemetry_runtime_producer
19
18
  @unique_keys_tracker = unique_keys_tracker
20
- @impression_router = impression_router
21
19
  end
22
20
 
23
21
  def build_impression(matching_key, bucketing_key, split_name, treatment, params = {})
@@ -58,12 +56,18 @@ module SplitIoClient
58
56
  @config.log_found_exception(__method__.to_s, e)
59
57
  ensure
60
58
  record_stats(stats)
61
- @impression_router.add_bulk(impressions)
59
+ impression_router.add_bulk(impressions)
62
60
  end
63
61
  end
64
62
 
65
63
  private
66
64
 
65
+ def impression_router
66
+ @impression_router ||= SplitIoClient::ImpressionRouter.new(@config)
67
+ rescue StandardError => error
68
+ @config.log_found_exception(__method__.to_s, error)
69
+ end
70
+
67
71
  def record_stats(stats)
68
72
  return if redis?
69
73
 
@@ -51,7 +51,7 @@ module SplitIoClient
51
51
 
52
52
  @segments_refresh_rate = opts[:segments_refresh_rate] || SplitConfig.default_segments_refresh_rate
53
53
 
54
- @impressions_mode = init_impressions_mode(opts[:impressions_mode])
54
+ @impressions_mode = init_impressions_mode(opts[:impressions_mode], opts[:cache_adapter])
55
55
 
56
56
  @impressions_refresh_rate = SplitConfig.init_impressions_refresh_rate(@impressions_mode, opts[:impressions_refresh_rate], SplitConfig.default_impressions_refresh_rate)
57
57
  @impressions_queue_size = opts[:impressions_queue_size] || SplitConfig.default_impressions_queue_size
@@ -314,14 +314,16 @@ module SplitIoClient
314
314
  :optimized
315
315
  end
316
316
 
317
- def init_impressions_mode(impressions_mode)
317
+ def init_impressions_mode(impressions_mode, adapter)
318
318
  impressions_mode ||= SplitConfig.default_impressions_mode
319
319
 
320
+ return :debug if adapter == :redis
321
+
320
322
  case impressions_mode
321
323
  when :debug
322
324
  return :debug
323
- when :none
324
- return :none
325
+ # when :none // we not support :none impression mode yet. Defaulting to :optimized mode
326
+ # return :none
325
327
  else
326
328
  @logger.error('You passed an invalid impressions_mode, impressions_mode should be one of the following values: :debug or :optimized. Defaulting to :optimized mode') unless impressions_mode == :optimized
327
329
  return :optimized
@@ -249,8 +249,7 @@ module SplitIoClient
249
249
  build_impressions_observer
250
250
  build_impression_counter
251
251
 
252
- impression_router = ImpressionRouter.new(@config)
253
- @impressions_manager = Engine::Common::ImpressionManager.new(@config, @impressions_repository, @impression_counter, @runtime_producer, @impression_observer, @unique_keys_tracker, impression_router)
252
+ @impressions_manager = Engine::Common::ImpressionManager.new(@config, @impressions_repository, @impression_counter, @runtime_producer, @impression_observer, @unique_keys_tracker)
254
253
  end
255
254
  end
256
255
  end
@@ -11,12 +11,12 @@ module SplitIoClient
11
11
  def record_config(config_data)
12
12
  return if config_data.nil?
13
13
 
14
- data = { m: { i: @config.machine_ip, n: @config.machine_name, s: "#{@config.language}-#{@config.version}" },
15
- t: { oM: config_data.om, st: config_data.st, aF: config_data.af, rF: config_data.rf, t: config_data.t } }
14
+ data = { t: { oM: config_data.om, st: config_data.st, aF: config_data.af, rF: config_data.rf, t: config_data.t } }
15
+ field = "#{@config.language}-#{@config.version}/#{@config.machine_name}/#{@config.machine_ip}"
16
16
 
17
- @adapter.add_to_queue(config_key, data.to_json)
18
- rescue StandardError => error
19
- @config.log_found_exception(__method__.to_s, error)
17
+ @adapter.add_to_map(config_key, field, data.to_json)
18
+ rescue StandardError => e
19
+ @config.log_found_exception(__method__.to_s, e)
20
20
  end
21
21
 
22
22
  def record_bur_timeout
@@ -1,3 +1,3 @@
1
1
  module SplitIoClient
2
- VERSION = '7.3.5.pre.rc2'
2
+ VERSION = '7.3.5.pre.rc5'
3
3
  end
@@ -41,7 +41,7 @@ Gem::Specification.new do |spec|
41
41
  spec.add_development_dependency 'bundler', '~> 2.2'
42
42
  spec.add_development_dependency 'pry', '~> 0.14'
43
43
  spec.add_development_dependency 'pry-nav', '~> 1.0'
44
- spec.add_development_dependency 'rake', '~> 12.3'
44
+ spec.add_development_dependency 'rake', '~> 13.0'
45
45
  spec.add_development_dependency 'rake-compiler', '~> 1.1'
46
46
  spec.add_development_dependency 'rspec', '~> 3.10'
47
47
  spec.add_development_dependency 'rubocop', '0.59.0'
@@ -49,6 +49,7 @@ Gem::Specification.new do |spec|
49
49
  spec.add_development_dependency 'simplecov-json', '~> 0.2'
50
50
  spec.add_development_dependency 'timecop', '~> 0.9'
51
51
  spec.add_development_dependency 'webmock', '~> 3.14'
52
+ spec.add_development_dependency 'webrick', '~> 1.7'
52
53
 
53
54
  spec.add_runtime_dependency 'bitarray', '~> 1.3'
54
55
  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: 7.3.5.pre.rc2
4
+ version: 7.3.5.pre.rc5
5
5
  platform: java
6
6
  authors:
7
7
  - Split Software
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-07 00:00:00.000000000 Z
11
+ date: 2022-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -85,7 +85,7 @@ dependencies:
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: '12.3'
88
+ version: '13.0'
89
89
  name: rake
90
90
  prerelease: false
91
91
  type: :development
@@ -93,7 +93,7 @@ dependencies:
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '12.3'
96
+ version: '13.0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  requirement: !ruby/object:Gem::Requirement
99
99
  requirements:
@@ -192,6 +192,20 @@ dependencies:
192
192
  - - "~>"
193
193
  - !ruby/object:Gem::Version
194
194
  version: '3.14'
195
+ - !ruby/object:Gem::Dependency
196
+ requirement: !ruby/object:Gem::Requirement
197
+ requirements:
198
+ - - "~>"
199
+ - !ruby/object:Gem::Version
200
+ version: '1.7'
201
+ name: webrick
202
+ prerelease: false
203
+ type: :development
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - "~>"
207
+ - !ruby/object:Gem::Version
208
+ version: '1.7'
195
209
  - !ruby/object:Gem::Dependency
196
210
  requirement: !ruby/object:Gem::Requirement
197
211
  requirements: