splitclient-rb 7.3.5.pre.rc4 → 7.3.5.pre.rc5

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: 8b5c65b678e0a21998e19be01f2d5dc2fa6287d0aa45101ba065f9265de9d1d9
4
- data.tar.gz: db60a3a9a43d8d4a0c6fa01683724487adca8244b7c114bb1b9990c6e653821c
3
+ metadata.gz: '08a6682acfcd86d8f14ad73419ba14c363fdab486f74fed00ab2600102933a92'
4
+ data.tar.gz: 38263b8206e23447673e3008418bb7a4ce127ba14f8d861d748946979584f1e7
5
5
  SHA512:
6
- metadata.gz: 2a7670355e16876fe7758dd8485d5d04a3dd5d578cb63b9263c1128ee9fe784b42c4949e8640f28426cf8714d2e09fca8cc8107e29298d2e48a4fc64348cb7b7
7
- data.tar.gz: 7dddcd3c8826a607d850175c95f0fb56526d46f192f1dac369dccd88a10e6f9f4a43592ed1956f12ea10d520e6ebbaa4b54829d32ddd37f67741df165503a9e2
6
+ metadata.gz: 6ca8ca135cced312d33d7cd66d29e17c0177ce2c57b34a2c89c9b453abcde26894572ec040584890d8a7af1033629188a802a4df8c721f666ce4a5efbefaa993
7
+ data.tar.gz: bbc878936be9b1e91ea205ee13c25861d74a2cfb2e2b6d1f7d188d0f2a07609e8987dc009e9bc6869914ea667da6198f32742a5d42ded2a075e5e8b169ac119b
@@ -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')
@@ -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
@@ -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.rc4'
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.rc4
4
+ version: 7.3.5.pre.rc5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Split Software
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-13 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
  name: allocation_stats
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '12.3'
89
+ version: '13.0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
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
  name: rake-compiler
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -192,6 +192,20 @@ dependencies:
192
192
  - - "~>"
193
193
  - !ruby/object:Gem::Version
194
194
  version: '3.14'
195
+ - !ruby/object:Gem::Dependency
196
+ name: webrick
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - "~>"
200
+ - !ruby/object:Gem::Version
201
+ version: '1.7'
202
+ type: :development
203
+ prerelease: false
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
  name: bitarray
197
211
  requirement: !ruby/object:Gem::Requirement