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 +4 -4
- data/.github/workflows/ci.yml +3 -3
- data/lib/splitclient-rb/cache/senders/impressions_count_sender.rb +1 -1
- data/lib/splitclient-rb/engine/common/impressions_manager.rb +8 -4
- data/lib/splitclient-rb/split_config.rb +6 -4
- data/lib/splitclient-rb/split_factory.rb +1 -2
- data/lib/splitclient-rb/telemetry/redis/redis_init_producer.rb +5 -5
- data/lib/splitclient-rb/version.rb +1 -1
- data/splitclient-rb.gemspec +2 -1
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 977dd4ad2b5e91d089796e2cc452f18dd1865465
|
4
|
+
data.tar.gz: dba8da2b6f8e25bd670f40588a6c8ce004ac2719
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b874e277d8ed4f803591238f130b1f16b885909f480f97aaf4f007f189d6699ddef901105a622784c9d6a17f18b418db1f284834d4c4367b28e133bc73b1fb3
|
7
|
+
data.tar.gz: 9e955a69fa2d695d65a3b8131c84e413e87ffffb66e927573a85954691f953c36eb6f0149fe772174ec7d0944c35271198d3c3d627b3173fcae0adab32c652f4
|
data/.github/workflows/ci.yml
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
on:
|
2
2
|
push:
|
3
3
|
branches:
|
4
|
-
-
|
4
|
+
- do-not-send-impressions
|
5
5
|
pull_request:
|
6
6
|
branches:
|
7
|
-
-
|
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@
|
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
|
-
|
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
|
-
|
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
|
-
|
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 = {
|
15
|
-
|
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.
|
18
|
-
rescue StandardError =>
|
19
|
-
@config.log_found_exception(__method__.to_s,
|
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
|
data/splitclient-rb.gemspec
CHANGED
@@ -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', '~>
|
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.
|
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-
|
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: '
|
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: '
|
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:
|