splitclient-rb 7.3.0.pre.rc2-java → 7.3.2-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +78 -0
- data/.rubocop.yml +3 -0
- data/CHANGES.txt +11 -0
- data/LICENSE +1 -1
- data/README.md +1 -1
- data/lib/splitclient-rb/cache/fetchers/segment_fetcher.rb +10 -13
- data/lib/splitclient-rb/cache/fetchers/split_fetcher.rb +7 -9
- data/lib/splitclient-rb/cache/stores/localhost_split_store.rb +3 -6
- data/lib/splitclient-rb/clients/split_client.rb +5 -5
- data/lib/splitclient-rb/engine/api/segments.rb +8 -4
- data/lib/splitclient-rb/engine/api/splits.rb +5 -3
- data/lib/splitclient-rb/engine/back_off.rb +26 -0
- data/lib/splitclient-rb/engine/common/impressions_manager.rb +4 -4
- data/lib/splitclient-rb/engine/push_manager.rb +1 -1
- data/lib/splitclient-rb/engine/status_manager.rb +33 -0
- data/lib/splitclient-rb/engine/sync_manager.rb +27 -48
- data/lib/splitclient-rb/engine/synchronizer.rb +124 -14
- data/lib/splitclient-rb/managers/split_manager.rb +4 -4
- data/lib/splitclient-rb/split_config.rb +14 -0
- data/lib/splitclient-rb/split_factory.rb +27 -23
- data/lib/splitclient-rb/sse/event_source/client.rb +3 -2
- data/lib/splitclient-rb/sse/workers/segments_worker.rb +1 -5
- data/lib/splitclient-rb/sse/workers/splits_worker.rb +1 -8
- data/lib/splitclient-rb/telemetry/domain/constants.rb +2 -2
- data/lib/splitclient-rb/telemetry/redis/redis_evaluation_producer.rb +4 -4
- data/lib/splitclient-rb/version.rb +1 -1
- data/lib/splitclient-rb.rb +4 -4
- data/splitclient-rb.gemspec +3 -2
- metadata +24 -11
- data/.travis.yml +0 -20
- data/lib/splitclient-rb/cache/stores/sdk_blocker.rb +0 -64
- data/lib/splitclient-rb/sse/event_source/back_off.rb +0 -25
- data/sonar-scanner.sh +0 -42
@@ -6,13 +6,14 @@ module SplitIoClient
|
|
6
6
|
include SplitIoClient::Cache::Fetchers
|
7
7
|
include SplitIoClient::Cache::Senders
|
8
8
|
|
9
|
-
|
9
|
+
ON_DEMAND_FETCH_BACKOFF_BASE_SECONDS = 10
|
10
|
+
ON_DEMAND_FETCH_BACKOFF_MAX_WAIT_SECONDS = 60
|
11
|
+
ON_DEMAND_FETCH_BACKOFF_MAX_RETRIES = 10
|
10
12
|
|
11
13
|
def initialize(
|
12
14
|
repositories,
|
13
15
|
api_key,
|
14
16
|
config,
|
15
|
-
sdk_blocker,
|
16
17
|
params
|
17
18
|
)
|
18
19
|
@splits_repository = repositories[:splits]
|
@@ -21,7 +22,6 @@ module SplitIoClient
|
|
21
22
|
@events_repository = repositories[:events]
|
22
23
|
@api_key = api_key
|
23
24
|
@config = config
|
24
|
-
@sdk_blocker = sdk_blocker
|
25
25
|
@split_fetcher = params[:split_fetcher]
|
26
26
|
@segment_fetcher = params[:segment_fetcher]
|
27
27
|
@impressions_api = SplitIoClient::Api::Impressions.new(@api_key, @config, params[:telemetry_runtime_producer])
|
@@ -29,12 +29,16 @@ module SplitIoClient
|
|
29
29
|
@telemetry_synchronizer = params[:telemetry_synchronizer]
|
30
30
|
end
|
31
31
|
|
32
|
-
def sync_all
|
32
|
+
def sync_all(asynchronous = true)
|
33
|
+
unless asynchronous
|
34
|
+
return sync_splits_and_segments
|
35
|
+
end
|
36
|
+
|
33
37
|
@config.threads[:sync_all_thread] = Thread.new do
|
34
|
-
|
35
|
-
@split_fetcher.fetch_splits
|
36
|
-
@segment_fetcher.fetch_segments
|
38
|
+
sync_splits_and_segments
|
37
39
|
end
|
40
|
+
|
41
|
+
true
|
38
42
|
end
|
39
43
|
|
40
44
|
def start_periodic_data_recording
|
@@ -54,19 +58,114 @@ module SplitIoClient
|
|
54
58
|
@segment_fetcher.stop_segments_thread
|
55
59
|
end
|
56
60
|
|
57
|
-
def fetch_splits
|
58
|
-
|
59
|
-
|
61
|
+
def fetch_splits(target_change_number)
|
62
|
+
return if target_change_number <= @splits_repository.get_change_number.to_i
|
63
|
+
|
64
|
+
fetch_options = { cache_control_headers: true, till: nil }
|
65
|
+
|
66
|
+
result = attempt_splits_sync(target_change_number,
|
67
|
+
fetch_options,
|
68
|
+
@config.on_demand_fetch_max_retries,
|
69
|
+
@config.on_demand_fetch_retry_delay_seconds,
|
70
|
+
false)
|
71
|
+
|
72
|
+
attempts = @config.on_demand_fetch_max_retries - result[:remaining_attempts]
|
73
|
+
if result[:success]
|
74
|
+
@segment_fetcher.fetch_segments_if_not_exists(result[:segment_names], true) unless result[:segment_names].empty?
|
75
|
+
@config.logger.debug("Refresh completed in #{attempts} attempts.") if @config.debug_enabled
|
76
|
+
|
77
|
+
return
|
78
|
+
end
|
79
|
+
|
80
|
+
fetch_options[:till] = target_change_number
|
81
|
+
result = attempt_splits_sync(target_change_number,
|
82
|
+
fetch_options,
|
83
|
+
ON_DEMAND_FETCH_BACKOFF_MAX_RETRIES,
|
84
|
+
nil,
|
85
|
+
true)
|
86
|
+
|
87
|
+
attempts = ON_DEMAND_FETCH_BACKOFF_MAX_RETRIES - result[:remaining_attempts]
|
88
|
+
|
89
|
+
if result[:success]
|
90
|
+
@segment_fetcher.fetch_segments_if_not_exists(result[:segment_names], true) unless result[:segment_names].empty?
|
91
|
+
@config.logger.debug("Refresh completed bypassing the CDN in #{attempts} attempts.") if @config.debug_enabled
|
92
|
+
else
|
93
|
+
@config.logger.debug("No changes fetched after #{attempts} attempts with CDN bypassed.") if @config.debug_enabled
|
94
|
+
end
|
95
|
+
rescue StandardError => error
|
96
|
+
@config.log_found_exception(__method__.to_s, error)
|
60
97
|
end
|
61
98
|
|
62
|
-
def fetch_segment(name)
|
63
|
-
@
|
99
|
+
def fetch_segment(name, target_change_number)
|
100
|
+
return if target_change_number <= @segments_repository.get_change_number(name).to_i
|
101
|
+
|
102
|
+
fetch_options = { cache_control_headers: true, till: nil }
|
103
|
+
result = attempt_segment_sync(name,
|
104
|
+
target_change_number,
|
105
|
+
fetch_options,
|
106
|
+
@config.on_demand_fetch_max_retries,
|
107
|
+
@config.on_demand_fetch_retry_delay_seconds,
|
108
|
+
false)
|
109
|
+
|
110
|
+
attempts = @config.on_demand_fetch_max_retries - result[:remaining_attempts]
|
111
|
+
if result[:success]
|
112
|
+
@config.logger.debug("Segment #{name} refresh completed in #{attempts} attempts.") if @config.debug_enabled
|
113
|
+
|
114
|
+
return
|
115
|
+
end
|
116
|
+
|
117
|
+
fetch_options = { cache_control_headers: true, till: target_change_number }
|
118
|
+
result = attempt_segment_sync(name,
|
119
|
+
target_change_number,
|
120
|
+
fetch_options,
|
121
|
+
ON_DEMAND_FETCH_BACKOFF_MAX_RETRIES,
|
122
|
+
nil,
|
123
|
+
true)
|
124
|
+
|
125
|
+
attempts = @config.on_demand_fetch_max_retries - result[:remaining_attempts]
|
126
|
+
if result[:success]
|
127
|
+
@config.logger.debug("Segment #{name} refresh completed bypassing the CDN in #{attempts} attempts.") if @config.debug_enabled
|
128
|
+
else
|
129
|
+
@config.logger.debug("No changes fetched for segment #{name} after #{attempts} attempts with CDN bypassed.") if @config.debug_enabled
|
130
|
+
end
|
131
|
+
rescue StandardError => error
|
132
|
+
@config.log_found_exception(__method__.to_s, error)
|
64
133
|
end
|
65
134
|
|
66
135
|
private
|
67
136
|
|
68
|
-
def
|
69
|
-
|
137
|
+
def attempt_segment_sync(name, target_cn, fetch_options, max_retries, retry_delay_seconds, with_backoff)
|
138
|
+
remaining_attempts = max_retries
|
139
|
+
backoff = Engine::BackOff.new(ON_DEMAND_FETCH_BACKOFF_BASE_SECONDS, 0, ON_DEMAND_FETCH_BACKOFF_MAX_WAIT_SECONDS) if with_backoff
|
140
|
+
|
141
|
+
loop do
|
142
|
+
remaining_attempts -= 1
|
143
|
+
|
144
|
+
@segment_fetcher.fetch_segment(name, fetch_options)
|
145
|
+
|
146
|
+
return sync_result(true, remaining_attempts) if target_cn <= @segments_repository.get_change_number(name).to_i
|
147
|
+
return sync_result(false, remaining_attempts) if remaining_attempts <= 0
|
148
|
+
|
149
|
+
delay = with_backoff ? backoff.interval : retry_delay_seconds
|
150
|
+
sleep(delay)
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
def attempt_splits_sync(target_cn, fetch_options, max_retries, retry_delay_seconds, with_backoff)
|
155
|
+
remaining_attempts = max_retries
|
156
|
+
backoff = Engine::BackOff.new(ON_DEMAND_FETCH_BACKOFF_BASE_SECONDS, 0, ON_DEMAND_FETCH_BACKOFF_MAX_WAIT_SECONDS) if with_backoff
|
157
|
+
|
158
|
+
loop do
|
159
|
+
remaining_attempts -= 1
|
160
|
+
|
161
|
+
result = @split_fetcher.fetch_splits(fetch_options)
|
162
|
+
|
163
|
+
return sync_result(true, remaining_attempts, result[:segment_names]) if target_cn <= @splits_repository.get_change_number
|
164
|
+
return sync_result(false, remaining_attempts, result[:segment_names]) if remaining_attempts <= 0
|
165
|
+
|
166
|
+
delay = with_backoff ? backoff.interval : retry_delay_seconds
|
167
|
+
sleep(delay)
|
168
|
+
end
|
70
169
|
end
|
71
170
|
|
72
171
|
# Starts thread which loops constantly and sends impressions to the Split API
|
@@ -87,6 +186,17 @@ module SplitIoClient
|
|
87
186
|
def start_telemetry_sync_task
|
88
187
|
Telemetry::SyncTask.new(@config, @telemetry_synchronizer).call
|
89
188
|
end
|
189
|
+
|
190
|
+
def sync_result(success, remaining_attempts, segment_names = nil)
|
191
|
+
{ success: success, remaining_attempts: remaining_attempts, segment_names: segment_names }
|
192
|
+
end
|
193
|
+
|
194
|
+
def sync_splits_and_segments
|
195
|
+
@config.logger.debug('Synchronizing Splits and Segments ...') if @config.debug_enabled
|
196
|
+
splits_result = @split_fetcher.fetch_splits
|
197
|
+
|
198
|
+
splits_result[:success] && @segment_fetcher.fetch_segments
|
199
|
+
end
|
90
200
|
end
|
91
201
|
end
|
92
202
|
end
|
@@ -4,9 +4,9 @@ module SplitIoClient
|
|
4
4
|
# Creates a new split manager instance that connects to split.io API.
|
5
5
|
#
|
6
6
|
# @return [SplitIoManager] split.io client instance
|
7
|
-
def initialize(splits_repository = nil,
|
7
|
+
def initialize(splits_repository = nil, status_manager, config)
|
8
8
|
@splits_repository = splits_repository
|
9
|
-
@
|
9
|
+
@status_manager = status_manager
|
10
10
|
@config = config
|
11
11
|
end
|
12
12
|
|
@@ -78,7 +78,7 @@ module SplitIoClient
|
|
78
78
|
end
|
79
79
|
|
80
80
|
def block_until_ready(time = nil)
|
81
|
-
@
|
81
|
+
@status_manager.wait_until_ready(time) if @status_manager
|
82
82
|
end
|
83
83
|
|
84
84
|
private
|
@@ -111,7 +111,7 @@ module SplitIoClient
|
|
111
111
|
|
112
112
|
# move to blocker, alongside block until ready to avoid duplication
|
113
113
|
def ready?
|
114
|
-
return @
|
114
|
+
return @status_manager.ready? if @status_manager
|
115
115
|
true
|
116
116
|
end
|
117
117
|
end
|
@@ -113,6 +113,9 @@ module SplitIoClient
|
|
113
113
|
|
114
114
|
@sdk_start_time = Time.now
|
115
115
|
|
116
|
+
@on_demand_fetch_retry_delay_seconds = SplitConfig.default_on_demand_fetch_retry_delay_seconds
|
117
|
+
@on_demand_fetch_max_retries = SplitConfig.default_on_demand_fetch_max_retries
|
118
|
+
|
116
119
|
startup_log
|
117
120
|
end
|
118
121
|
|
@@ -278,6 +281,17 @@ module SplitIoClient
|
|
278
281
|
|
279
282
|
attr_accessor :sdk_start_time
|
280
283
|
|
284
|
+
attr_accessor :on_demand_fetch_retry_delay_seconds
|
285
|
+
attr_accessor :on_demand_fetch_max_retries
|
286
|
+
|
287
|
+
def self.default_on_demand_fetch_retry_delay_seconds
|
288
|
+
0.05
|
289
|
+
end
|
290
|
+
|
291
|
+
def self.default_on_demand_fetch_max_retries
|
292
|
+
10
|
293
|
+
end
|
294
|
+
|
281
295
|
def self.default_impressions_mode
|
282
296
|
:optimized
|
283
297
|
end
|
@@ -28,45 +28,49 @@ module SplitIoClient
|
|
28
28
|
|
29
29
|
raise 'Invalid SDK mode' unless valid_mode
|
30
30
|
|
31
|
+
validate_api_key
|
32
|
+
|
33
|
+
register_factory
|
34
|
+
|
31
35
|
build_telemetry_components
|
32
36
|
|
33
37
|
@splits_repository = SplitsRepository.new(@config)
|
34
38
|
@segments_repository = SegmentsRepository.new(@config)
|
35
39
|
@impressions_repository = ImpressionsRepository.new(@config)
|
36
40
|
@events_repository = EventsRepository.new(@config, @api_key, @runtime_producer)
|
37
|
-
@sdk_blocker = SDKBlocker.new(@splits_repository, @segments_repository, @config)
|
38
41
|
@impression_counter = SplitIoClient::Engine::Common::ImpressionCounter.new
|
39
42
|
@impressions_manager = SplitIoClient::Engine::Common::ImpressionManager.new(@config, @impressions_repository, @impression_counter, @runtime_producer)
|
40
43
|
@telemetry_api = SplitIoClient::Api::TelemetryApi.new(@config, @api_key, @runtime_producer)
|
41
44
|
@telemetry_synchronizer = Telemetry::Synchronizer.new(@config, @telemetry_consumers, @init_producer, repositories, @telemetry_api)
|
45
|
+
@status_manager = Engine::StatusManager.new(@config)
|
42
46
|
|
43
47
|
start!
|
44
48
|
|
45
|
-
@client = SplitClient.new(@api_key, repositories, @
|
46
|
-
@manager = SplitManager.new(@splits_repository, @
|
47
|
-
|
48
|
-
validate_api_key
|
49
|
-
|
50
|
-
register_factory
|
49
|
+
@client = SplitClient.new(@api_key, repositories, @status_manager, @config, @impressions_manager, @evaluation_producer)
|
50
|
+
@manager = SplitManager.new(@splits_repository, @status_manager, @config)
|
51
51
|
end
|
52
52
|
|
53
53
|
def start!
|
54
|
-
if @config.localhost_mode
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
split_fetcher: split_fetcher,
|
61
|
-
segment_fetcher: segment_fetcher,
|
62
|
-
imp_counter: @impression_counter,
|
63
|
-
telemetry_runtime_producer: @runtime_producer,
|
64
|
-
telemetry_synchronizer: @telemetry_synchronizer
|
65
|
-
}
|
66
|
-
|
67
|
-
synchronizer = SplitIoClient::Engine::Synchronizer.new(repositories, @api_key, @config, @sdk_blocker, params)
|
68
|
-
SplitIoClient::Engine::SyncManager.new(repositories, @api_key, @config, synchronizer, @runtime_producer, @sdk_blocker, @telemetry_synchronizer).start
|
54
|
+
return start_localhost_components if @config.localhost_mode
|
55
|
+
|
56
|
+
if @config.consumer?
|
57
|
+
@status_manager.ready!
|
58
|
+
@telemetry_synchronizer.synchronize_config
|
59
|
+
return
|
69
60
|
end
|
61
|
+
|
62
|
+
split_fetcher = SplitFetcher.new(@splits_repository, @api_key, config, @runtime_producer)
|
63
|
+
segment_fetcher = SegmentFetcher.new(@segments_repository, @api_key, config, @runtime_producer)
|
64
|
+
params = {
|
65
|
+
split_fetcher: split_fetcher,
|
66
|
+
segment_fetcher: segment_fetcher,
|
67
|
+
imp_counter: @impression_counter,
|
68
|
+
telemetry_runtime_producer: @runtime_producer,
|
69
|
+
telemetry_synchronizer: @telemetry_synchronizer
|
70
|
+
}
|
71
|
+
|
72
|
+
synchronizer = SplitIoClient::Engine::Synchronizer.new(repositories, @api_key, @config, params)
|
73
|
+
SplitIoClient::Engine::SyncManager.new(repositories, @api_key, @config, synchronizer, @runtime_producer, @telemetry_synchronizer, @status_manager).start
|
70
74
|
end
|
71
75
|
|
72
76
|
def stop!
|
@@ -145,7 +149,7 @@ module SplitIoClient
|
|
145
149
|
end
|
146
150
|
|
147
151
|
def start_localhost_components
|
148
|
-
LocalhostSplitStore.new(@splits_repository, @config, @
|
152
|
+
LocalhostSplitStore.new(@splits_repository, @config, @status_manager).call
|
149
153
|
|
150
154
|
# Starts thread which loops constantly and cleans up repositories to avoid memory issues in localhost mode
|
151
155
|
LocalhostRepoCleaner.new(@impressions_repository, @events_repository, @config).call
|
@@ -77,7 +77,7 @@ module SplitIoClient
|
|
77
77
|
end
|
78
78
|
|
79
79
|
def connect_stream(latch)
|
80
|
-
socket_write
|
80
|
+
socket_write(latch)
|
81
81
|
|
82
82
|
while connected? || @first_event.value
|
83
83
|
begin
|
@@ -96,13 +96,14 @@ module SplitIoClient
|
|
96
96
|
end
|
97
97
|
end
|
98
98
|
|
99
|
-
def socket_write
|
99
|
+
def socket_write(latch)
|
100
100
|
@first_event.make_true
|
101
101
|
@socket = socket_connect
|
102
102
|
@socket.write(build_request(@uri))
|
103
103
|
rescue StandardError => e
|
104
104
|
@config.logger.error("Error during connecting to #{@uri.host}. Error: #{e.inspect}")
|
105
105
|
close(Constants::PUSH_NONRETRYABLE_ERROR)
|
106
|
+
latch.count_down
|
106
107
|
end
|
107
108
|
|
108
109
|
def read_first_event(data, latch)
|
@@ -51,11 +51,7 @@ module SplitIoClient
|
|
51
51
|
cn = item[:change_number]
|
52
52
|
@config.logger.debug("SegmentsWorker change_number dequeue #{segment_name}, #{cn}")
|
53
53
|
|
54
|
-
|
55
|
-
while cn > @segments_repository.get_change_number(segment_name).to_i && attempt <= Workers::MAX_RETRIES_ALLOWED
|
56
|
-
@synchronizer.fetch_segment(segment_name)
|
57
|
-
attempt += 1
|
58
|
-
end
|
54
|
+
@synchronizer.fetch_segment(segment_name, cn)
|
59
55
|
end
|
60
56
|
end
|
61
57
|
|
@@ -3,8 +3,6 @@
|
|
3
3
|
module SplitIoClient
|
4
4
|
module SSE
|
5
5
|
module Workers
|
6
|
-
MAX_RETRIES_ALLOWED = 10
|
7
|
-
|
8
6
|
class SplitsWorker
|
9
7
|
def initialize(synchronizer, config, splits_repository)
|
10
8
|
@synchronizer = synchronizer
|
@@ -62,12 +60,7 @@ module SplitIoClient
|
|
62
60
|
def perform
|
63
61
|
while (change_number = @queue.pop)
|
64
62
|
@config.logger.debug("SplitsWorker change_number dequeue #{change_number}")
|
65
|
-
|
66
|
-
attempt = 0
|
67
|
-
while change_number > @splits_repository.get_change_number.to_i && attempt <= Workers::MAX_RETRIES_ALLOWED
|
68
|
-
@synchronizer.fetch_splits
|
69
|
-
attempt += 1
|
70
|
-
end
|
63
|
+
@synchronizer.fetch_splits(change_number)
|
71
64
|
end
|
72
65
|
end
|
73
66
|
|
@@ -33,8 +33,8 @@ module SplitIoClient
|
|
33
33
|
|
34
34
|
TREATMENT = 'treatment'
|
35
35
|
TREATMENTS = 'treatments'
|
36
|
-
TREATMENT_WITH_CONFIG = '
|
37
|
-
TREATMENTS_WITH_CONFIG = '
|
36
|
+
TREATMENT_WITH_CONFIG = 'treatmentWithConfig'
|
37
|
+
TREATMENTS_WITH_CONFIG = 'treatmentsWithConfig'
|
38
38
|
TRACK = 'track'
|
39
39
|
end
|
40
40
|
end
|
@@ -14,14 +14,14 @@ module SplitIoClient
|
|
14
14
|
|
15
15
|
def record_latency(method, bucket)
|
16
16
|
@adapter.hincrby(latency_key, "#{@sdk_version}/#{@name}/#{@ip}/#{method}/#{bucket}", 1)
|
17
|
-
rescue StandardError =>
|
18
|
-
@config.log_found_exception(__method__.to_s,
|
17
|
+
rescue StandardError => e
|
18
|
+
@config.log_found_exception(__method__.to_s, e)
|
19
19
|
end
|
20
20
|
|
21
21
|
def record_exception(method)
|
22
22
|
@adapter.hincrby(exception_key, "#{@sdk_version}/#{@name}/#{@ip}/#{method}", 1)
|
23
|
-
rescue StandardError =>
|
24
|
-
@config.log_found_exception(__method__.to_s,
|
23
|
+
rescue StandardError => e
|
24
|
+
@config.log_found_exception(__method__.to_s, e)
|
25
25
|
end
|
26
26
|
|
27
27
|
private
|
data/lib/splitclient-rb.rb
CHANGED
@@ -28,10 +28,9 @@ require 'splitclient-rb/cache/senders/impressions_sender'
|
|
28
28
|
require 'splitclient-rb/cache/senders/events_sender'
|
29
29
|
require 'splitclient-rb/cache/senders/impressions_count_sender'
|
30
30
|
require 'splitclient-rb/cache/senders/localhost_repo_cleaner'
|
31
|
-
require 'splitclient-rb/cache/stores/store_utils'
|
32
31
|
require 'splitclient-rb/cache/stores/localhost_split_builder'
|
33
|
-
require 'splitclient-rb/cache/stores/sdk_blocker'
|
34
32
|
require 'splitclient-rb/cache/stores/localhost_split_store'
|
33
|
+
require 'splitclient-rb/cache/stores/store_utils'
|
35
34
|
|
36
35
|
require 'splitclient-rb/clients/split_client'
|
37
36
|
require 'splitclient-rb/managers/split_manager'
|
@@ -85,13 +84,14 @@ require 'splitclient-rb/engine/models/split'
|
|
85
84
|
require 'splitclient-rb/engine/models/label'
|
86
85
|
require 'splitclient-rb/engine/models/treatment'
|
87
86
|
require 'splitclient-rb/engine/auth_api_client'
|
87
|
+
require 'splitclient-rb/engine/back_off'
|
88
88
|
require 'splitclient-rb/engine/push_manager'
|
89
|
+
require 'splitclient-rb/engine/status_manager'
|
89
90
|
require 'splitclient-rb/engine/sync_manager'
|
90
91
|
require 'splitclient-rb/engine/synchronizer'
|
91
92
|
require 'splitclient-rb/utilitites'
|
92
93
|
|
93
|
-
# SSE
|
94
|
-
require 'splitclient-rb/sse/event_source/back_off'
|
94
|
+
# SSE
|
95
95
|
require 'splitclient-rb/sse/event_source/client'
|
96
96
|
require 'splitclient-rb/sse/event_source/event_parser'
|
97
97
|
require 'splitclient-rb/sse/event_source/event_types'
|
data/splitclient-rb.gemspec
CHANGED
@@ -38,14 +38,15 @@ Gem::Specification.new do |spec|
|
|
38
38
|
|
39
39
|
spec.add_development_dependency 'allocation_stats'
|
40
40
|
spec.add_development_dependency 'appraisal'
|
41
|
-
spec.add_development_dependency 'bundler', '~>
|
41
|
+
spec.add_development_dependency 'bundler', '~> 2.2'
|
42
42
|
spec.add_development_dependency 'pry'
|
43
43
|
spec.add_development_dependency 'pry-nav'
|
44
44
|
spec.add_development_dependency 'rake', '12.3.3'
|
45
45
|
spec.add_development_dependency 'rake-compiler'
|
46
46
|
spec.add_development_dependency 'rspec'
|
47
47
|
spec.add_development_dependency 'rubocop', '0.59.0'
|
48
|
-
spec.add_development_dependency 'simplecov'
|
48
|
+
spec.add_development_dependency 'simplecov', '0.20.0'
|
49
|
+
spec.add_development_dependency 'simplecov-json'
|
49
50
|
spec.add_development_dependency 'timecop'
|
50
51
|
spec.add_development_dependency 'webmock'
|
51
52
|
|
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.
|
4
|
+
version: 7.3.2
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Split Software
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
requirements:
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
46
|
+
version: '2.2'
|
47
47
|
name: bundler
|
48
48
|
prerelease: false
|
49
49
|
type: :development
|
@@ -51,7 +51,7 @@ dependencies:
|
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '2.2'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
@@ -136,13 +136,27 @@ dependencies:
|
|
136
136
|
- - '='
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: 0.59.0
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
requirement: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - '='
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: 0.20.0
|
145
|
+
name: simplecov
|
146
|
+
prerelease: false
|
147
|
+
type: :development
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - '='
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 0.20.0
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
requirement: !ruby/object:Gem::Requirement
|
141
155
|
requirements:
|
142
156
|
- - ">="
|
143
157
|
- !ruby/object:Gem::Version
|
144
158
|
version: '0'
|
145
|
-
name: simplecov
|
159
|
+
name: simplecov-json
|
146
160
|
prerelease: false
|
147
161
|
type: :development
|
148
162
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -312,10 +326,10 @@ extensions: []
|
|
312
326
|
extra_rdoc_files: []
|
313
327
|
files:
|
314
328
|
- ".github/pull_request_template.md"
|
329
|
+
- ".github/workflows/ci.yml"
|
315
330
|
- ".gitignore"
|
316
331
|
- ".rubocop.yml"
|
317
332
|
- ".simplecov"
|
318
|
-
- ".travis.yml"
|
319
333
|
- Appraisals
|
320
334
|
- CHANGES.txt
|
321
335
|
- CONTRIBUTORS-GUIDE.md
|
@@ -356,7 +370,6 @@ files:
|
|
356
370
|
- lib/splitclient-rb/cache/senders/localhost_repo_cleaner.rb
|
357
371
|
- lib/splitclient-rb/cache/stores/localhost_split_builder.rb
|
358
372
|
- lib/splitclient-rb/cache/stores/localhost_split_store.rb
|
359
|
-
- lib/splitclient-rb/cache/stores/sdk_blocker.rb
|
360
373
|
- lib/splitclient-rb/cache/stores/store_utils.rb
|
361
374
|
- lib/splitclient-rb/clients/split_client.rb
|
362
375
|
- lib/splitclient-rb/constants.rb
|
@@ -369,6 +382,7 @@ files:
|
|
369
382
|
- lib/splitclient-rb/engine/api/splits.rb
|
370
383
|
- lib/splitclient-rb/engine/api/telemetry_api.rb
|
371
384
|
- lib/splitclient-rb/engine/auth_api_client.rb
|
385
|
+
- lib/splitclient-rb/engine/back_off.rb
|
372
386
|
- lib/splitclient-rb/engine/common/impressions_counter.rb
|
373
387
|
- lib/splitclient-rb/engine/common/impressions_manager.rb
|
374
388
|
- lib/splitclient-rb/engine/evaluator/splitter.rb
|
@@ -402,6 +416,7 @@ files:
|
|
402
416
|
- lib/splitclient-rb/engine/parser/evaluator.rb
|
403
417
|
- lib/splitclient-rb/engine/parser/partition.rb
|
404
418
|
- lib/splitclient-rb/engine/push_manager.rb
|
419
|
+
- lib/splitclient-rb/engine/status_manager.rb
|
405
420
|
- lib/splitclient-rb/engine/sync_manager.rb
|
406
421
|
- lib/splitclient-rb/engine/synchronizer.rb
|
407
422
|
- lib/splitclient-rb/exceptions.rb
|
@@ -412,7 +427,6 @@ files:
|
|
412
427
|
- lib/splitclient-rb/split_factory_builder.rb
|
413
428
|
- lib/splitclient-rb/split_factory_registry.rb
|
414
429
|
- lib/splitclient-rb/split_logger.rb
|
415
|
-
- lib/splitclient-rb/sse/event_source/back_off.rb
|
416
430
|
- lib/splitclient-rb/sse/event_source/client.rb
|
417
431
|
- lib/splitclient-rb/sse/event_source/event_parser.rb
|
418
432
|
- lib/splitclient-rb/sse/event_source/event_types.rb
|
@@ -446,7 +460,6 @@ files:
|
|
446
460
|
- lib/splitclient-rb/utilitites.rb
|
447
461
|
- lib/splitclient-rb/validators.rb
|
448
462
|
- lib/splitclient-rb/version.rb
|
449
|
-
- sonar-scanner.sh
|
450
463
|
- splitclient-rb.gemspec
|
451
464
|
- tasks/benchmark_get_treatment.rake
|
452
465
|
- tasks/irb.rake
|
@@ -465,9 +478,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
465
478
|
version: '0'
|
466
479
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
467
480
|
requirements:
|
468
|
-
- - "
|
481
|
+
- - ">="
|
469
482
|
- !ruby/object:Gem::Version
|
470
|
-
version:
|
483
|
+
version: '0'
|
471
484
|
requirements: []
|
472
485
|
rubyforge_project:
|
473
486
|
rubygems_version: 2.6.14
|
data/.travis.yml
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
|
3
|
-
rvm:
|
4
|
-
- "2.3.6"
|
5
|
-
|
6
|
-
services:
|
7
|
-
- redis-server
|
8
|
-
|
9
|
-
addons:
|
10
|
-
sonarqube: true
|
11
|
-
|
12
|
-
git:
|
13
|
-
depth: false
|
14
|
-
|
15
|
-
before_install:
|
16
|
-
- gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
|
17
|
-
- gem install bundler -v '< 2'
|
18
|
-
|
19
|
-
after_success:
|
20
|
-
- bash sonar-scanner.sh
|