splitclient-rb 7.3.5.pre.rc3-java → 8.0.0-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 +8 -10
- data/.rubocop.yml +19 -15
- data/CHANGES.txt +7 -0
- data/README.md +2 -2
- data/Rakefile +1 -8
- data/lib/splitclient-rb/cache/fetchers/segment_fetcher.rb +6 -6
- data/lib/splitclient-rb/cache/fetchers/split_fetcher.rb +2 -2
- data/lib/splitclient-rb/cache/repositories/events/memory_repository.rb +2 -2
- data/lib/splitclient-rb/cache/repositories/events_repository.rb +2 -2
- data/lib/splitclient-rb/cache/repositories/segments_repository.rb +2 -2
- data/lib/splitclient-rb/cache/routers/impression_router.rb +4 -4
- data/lib/splitclient-rb/cache/senders/impressions_adapter/memory_sender.rb +6 -6
- data/lib/splitclient-rb/cache/senders/impressions_adapter/redis_sender.rb +2 -4
- data/lib/splitclient-rb/cache/senders/impressions_count_sender.rb +3 -3
- data/lib/splitclient-rb/cache/senders/impressions_sender.rb +2 -2
- data/lib/splitclient-rb/cache/stores/localhost_split_store.rb +2 -2
- data/lib/splitclient-rb/clients/split_client.rb +4 -4
- data/lib/splitclient-rb/engine/api/client.rb +0 -23
- data/lib/splitclient-rb/engine/api/telemetry_api.rb +2 -2
- data/lib/splitclient-rb/engine/auth_api_client.rb +2 -2
- data/lib/splitclient-rb/engine/common/impressions_manager.rb +8 -4
- data/lib/splitclient-rb/engine/matchers/contains_all_matcher.rb +0 -4
- data/lib/splitclient-rb/engine/matchers/contains_any_matcher.rb +0 -4
- data/lib/splitclient-rb/engine/matchers/equal_to_set_matcher.rb +0 -4
- data/lib/splitclient-rb/engine/matchers/part_of_set_matcher.rb +0 -4
- data/lib/splitclient-rb/engine/push_manager.rb +14 -11
- data/lib/splitclient-rb/engine/synchronizer.rb +4 -4
- data/lib/splitclient-rb/split_config.rb +6 -4
- data/lib/splitclient-rb/split_factory.rb +4 -5
- data/lib/splitclient-rb/sse/notification_manager_keeper.rb +3 -2
- data/lib/splitclient-rb/telemetry/memory/memory_evaluation_consumer.rb +1 -1
- data/lib/splitclient-rb/telemetry/memory/memory_evaluation_producer.rb +5 -5
- data/lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb +1 -1
- data/lib/splitclient-rb/telemetry/memory/memory_init_producer.rb +5 -5
- data/lib/splitclient-rb/telemetry/memory/memory_runtime_consumer.rb +1 -1
- data/lib/splitclient-rb/telemetry/memory/memory_runtime_producer.rb +20 -20
- data/lib/splitclient-rb/telemetry/memory/memory_synchronizer.rb +5 -5
- data/lib/splitclient-rb/telemetry/redis/redis_evaluation_producer.rb +1 -1
- data/lib/splitclient-rb/telemetry/redis/redis_init_producer.rb +7 -7
- data/lib/splitclient-rb/telemetry/redis/redis_synchronizer.rb +3 -3
- data/lib/splitclient-rb/telemetry/sync_task.rb +11 -11
- data/lib/splitclient-rb/version.rb +1 -1
- data/lib/splitclient-rb.rb +0 -1
- data/splitclient-rb.gemspec +6 -7
- metadata +26 -28
- data/Appraisals +0 -10
- data/lib/splitclient-rb/engine/api/faraday_adapter/patched_net_http_persistent.rb +0 -46
|
@@ -61,10 +61,11 @@ module SplitIoClient
|
|
|
61
61
|
end
|
|
62
62
|
|
|
63
63
|
def update_publishers(channel, publishers)
|
|
64
|
-
|
|
64
|
+
case channel
|
|
65
|
+
when Constants::CONTROL_PRI
|
|
65
66
|
@telemetry_runtime_producer.record_streaming_event(Telemetry::Domain::Constants::OCCUPANCY_PRI, publishers)
|
|
66
67
|
@publishers_pri.value = publishers
|
|
67
|
-
|
|
68
|
+
when Constants::CONTROL_SEC
|
|
68
69
|
@telemetry_runtime_producer.record_streaming_event(Telemetry::Domain::Constants::OCCUPANCY_SEC, publishers)
|
|
69
70
|
@publishers_sec.value = publishers
|
|
70
71
|
end
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
module SplitIoClient
|
|
4
4
|
module Telemetry
|
|
5
|
-
class MemoryEvaluationProducer
|
|
5
|
+
class MemoryEvaluationProducer
|
|
6
6
|
def initialize(config)
|
|
7
7
|
@config = config
|
|
8
8
|
@adapter = config.telemetry_adapter
|
|
@@ -10,14 +10,14 @@ module SplitIoClient
|
|
|
10
10
|
|
|
11
11
|
def record_latency(method, bucket)
|
|
12
12
|
@adapter.latencies.find { |l| l[:method] == method }[:latencies][bucket] += 1
|
|
13
|
-
rescue StandardError =>
|
|
14
|
-
@config.log_found_exception(__method__.to_s,
|
|
13
|
+
rescue StandardError => e
|
|
14
|
+
@config.log_found_exception(__method__.to_s, e)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
def record_exception(method)
|
|
18
18
|
@adapter.exceptions.find { |l| l[:method] == method }[:exceptions].increment
|
|
19
|
-
rescue StandardError =>
|
|
20
|
-
@config.log_found_exception(__method__.to_s,
|
|
19
|
+
rescue StandardError => e
|
|
20
|
+
@config.log_found_exception(__method__.to_s, e)
|
|
21
21
|
end
|
|
22
22
|
end
|
|
23
23
|
end
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
module SplitIoClient
|
|
4
4
|
module Telemetry
|
|
5
|
-
class MemoryInitProducer
|
|
5
|
+
class MemoryInitProducer
|
|
6
6
|
def initialize(config)
|
|
7
7
|
@config = config
|
|
8
8
|
@adapter = config.telemetry_adapter
|
|
@@ -14,14 +14,14 @@ module SplitIoClient
|
|
|
14
14
|
|
|
15
15
|
def record_bur_timeout
|
|
16
16
|
find_factory_counters(Domain::Constants::BUR_TIMEOUT)[:counts].increment
|
|
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_non_ready_usages
|
|
22
22
|
find_factory_counters(Domain::Constants::NON_READY_USAGES)[:counts].increment
|
|
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
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
module SplitIoClient
|
|
4
4
|
module Telemetry
|
|
5
|
-
class MemoryRuntimeProducer
|
|
5
|
+
class MemoryRuntimeProducer
|
|
6
6
|
def initialize(config)
|
|
7
7
|
@config = config
|
|
8
8
|
@adapter = config.telemetry_adapter
|
|
@@ -16,22 +16,22 @@ module SplitIoClient
|
|
|
16
16
|
|
|
17
17
|
def record_impressions_stats(type, count)
|
|
18
18
|
@adapter.impressions_data_records.find { |l| l[:type] == type }[:value].value += count unless count.zero?
|
|
19
|
-
rescue StandardError =>
|
|
20
|
-
@config.log_found_exception(__method__.to_s,
|
|
19
|
+
rescue StandardError => e
|
|
20
|
+
@config.log_found_exception(__method__.to_s, e)
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
def record_events_stats(type, count)
|
|
24
24
|
@adapter.events_data_records.find { |l| l[:type] == type }[:value].value += count unless count.zero?
|
|
25
|
-
rescue StandardError =>
|
|
26
|
-
@config.log_found_exception(__method__.to_s,
|
|
25
|
+
rescue StandardError => e
|
|
26
|
+
@config.log_found_exception(__method__.to_s, e)
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
def record_successful_sync(type, value = nil)
|
|
30
30
|
value = (Time.now.to_f * 1000.0).to_i if value.nil?
|
|
31
31
|
|
|
32
32
|
@adapter.last_synchronization.find { |l| l[:type] == type }[:value] = Concurrent::AtomicFixnum.new(value)
|
|
33
|
-
rescue StandardError =>
|
|
34
|
-
@config.log_found_exception(__method__.to_s,
|
|
33
|
+
rescue StandardError => e
|
|
34
|
+
@config.log_found_exception(__method__.to_s, e)
|
|
35
35
|
end
|
|
36
36
|
|
|
37
37
|
def record_sync_error(type, status)
|
|
@@ -39,42 +39,42 @@ module SplitIoClient
|
|
|
39
39
|
|
|
40
40
|
begin
|
|
41
41
|
http_errors[status] += 1
|
|
42
|
-
rescue StandardError =>
|
|
42
|
+
rescue StandardError => _e
|
|
43
43
|
http_errors[status] = 1
|
|
44
44
|
end
|
|
45
|
-
rescue StandardError =>
|
|
46
|
-
@config.log_found_exception(__method__.to_s,
|
|
45
|
+
rescue StandardError => e
|
|
46
|
+
@config.log_found_exception(__method__.to_s, e)
|
|
47
47
|
end
|
|
48
48
|
|
|
49
49
|
def record_sync_latency(type, bucket)
|
|
50
50
|
@adapter.http_latencies.find { |l| l[:type] == type }[:value][bucket] += 1
|
|
51
|
-
rescue StandardError =>
|
|
52
|
-
@config.log_found_exception(__method__.to_s,
|
|
51
|
+
rescue StandardError => e
|
|
52
|
+
@config.log_found_exception(__method__.to_s, e)
|
|
53
53
|
end
|
|
54
54
|
|
|
55
55
|
def record_auth_rejections
|
|
56
56
|
@adapter.auth_rejections.increment
|
|
57
|
-
rescue StandardError =>
|
|
58
|
-
@config.log_found_exception(__method__.to_s,
|
|
57
|
+
rescue StandardError => e
|
|
58
|
+
@config.log_found_exception(__method__.to_s, e)
|
|
59
59
|
end
|
|
60
60
|
|
|
61
61
|
def record_token_refreshes
|
|
62
62
|
@adapter.token_refreshes.increment
|
|
63
|
-
rescue StandardError =>
|
|
64
|
-
@config.log_found_exception(__method__.to_s,
|
|
63
|
+
rescue StandardError => e
|
|
64
|
+
@config.log_found_exception(__method__.to_s, e)
|
|
65
65
|
end
|
|
66
66
|
|
|
67
67
|
def record_streaming_event(type, data = nil, timestamp = nil)
|
|
68
68
|
timestamp ||= (Time.now.to_f * 1000.0).to_i
|
|
69
69
|
@adapter.streaming_events << { e: type, d: data, t: timestamp } unless @adapter.streaming_events.length >= 19
|
|
70
|
-
rescue StandardError =>
|
|
71
|
-
@config.log_found_exception(__method__.to_s,
|
|
70
|
+
rescue StandardError => e
|
|
71
|
+
@config.log_found_exception(__method__.to_s, e)
|
|
72
72
|
end
|
|
73
73
|
|
|
74
74
|
def record_session_length(session)
|
|
75
75
|
@adapter.session_length.value = session
|
|
76
|
-
rescue StandardError =>
|
|
77
|
-
@config.log_found_exception(__method__.to_s,
|
|
76
|
+
rescue StandardError => e
|
|
77
|
+
@config.log_found_exception(__method__.to_s, e)
|
|
78
78
|
end
|
|
79
79
|
end
|
|
80
80
|
end
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
module SplitIoClient
|
|
4
4
|
module Telemetry
|
|
5
|
-
class MemorySynchronizer
|
|
5
|
+
class MemorySynchronizer
|
|
6
6
|
def initialize(config,
|
|
7
7
|
telemtry_consumers,
|
|
8
8
|
repositories,
|
|
@@ -37,8 +37,8 @@ module SplitIoClient
|
|
|
37
37
|
@telemetry_runtime_consumer.pop_tags)
|
|
38
38
|
|
|
39
39
|
@telemetry_api.record_stats(format_stats(usage))
|
|
40
|
-
rescue StandardError =>
|
|
41
|
-
@config.log_found_exception(__method__.to_s,
|
|
40
|
+
rescue StandardError => e
|
|
41
|
+
@config.log_found_exception(__method__.to_s, e)
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
def synchronize_config(active_factories = nil, redundant_active_factories = nil, time_until_ready = nil)
|
|
@@ -75,8 +75,8 @@ module SplitIoClient
|
|
|
75
75
|
@telemetry_init_consumer.non_ready_usages)
|
|
76
76
|
|
|
77
77
|
@telemetry_api.record_init(fornat_init_config(init_config))
|
|
78
|
-
rescue StandardError =>
|
|
79
|
-
@config.log_found_exception(__method__.to_s,
|
|
78
|
+
rescue StandardError => e
|
|
79
|
+
@config.log_found_exception(__method__.to_s, e)
|
|
80
80
|
end
|
|
81
81
|
|
|
82
82
|
private
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
module SplitIoClient
|
|
4
4
|
module Telemetry
|
|
5
|
-
class RedisInitProducer
|
|
5
|
+
class RedisInitProducer
|
|
6
6
|
def initialize(config)
|
|
7
7
|
@config = config
|
|
8
8
|
@adapter = config.telemetry_adapter
|
|
@@ -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
|
|
@@ -30,7 +30,7 @@ module SplitIoClient
|
|
|
30
30
|
private
|
|
31
31
|
|
|
32
32
|
def config_key
|
|
33
|
-
"#{@config.redis_namespace}.telemetry.
|
|
33
|
+
"#{@config.redis_namespace}.telemetry.init"
|
|
34
34
|
end
|
|
35
35
|
end
|
|
36
36
|
end
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
module SplitIoClient
|
|
4
4
|
module Telemetry
|
|
5
|
-
class RedisSynchronizer
|
|
5
|
+
class RedisSynchronizer
|
|
6
6
|
def initialize(config,
|
|
7
7
|
telemetry_init_producer)
|
|
8
8
|
@config = config
|
|
@@ -20,8 +20,8 @@ module SplitIoClient
|
|
|
20
20
|
init_config = ConfigInit.new(@config.mode, 'redis', active_factories, redundant_active_factories, tags)
|
|
21
21
|
|
|
22
22
|
@telemetry_init_producer.record_config(init_config)
|
|
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
|
end
|
|
27
27
|
end
|
|
@@ -15,21 +15,21 @@ module SplitIoClient
|
|
|
15
15
|
private
|
|
16
16
|
|
|
17
17
|
def stats_thread
|
|
18
|
-
@config.threads[:telemetry_stats_sender] = Thread.new
|
|
19
|
-
|
|
20
|
-
@config.logger.info('Starting Telemetry Sync Task')
|
|
18
|
+
@config.threads[:telemetry_stats_sender] = Thread.new { telemetry_sync_task }
|
|
19
|
+
end
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
def telemetry_sync_task
|
|
22
|
+
@config.logger.info('Starting Telemetry Sync Task')
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
rescue SplitIoClient::SDKShutdownException
|
|
28
|
-
@telemetry_synchronizer.synchronize_stats
|
|
24
|
+
loop do
|
|
25
|
+
sleep(@config.telemetry_refresh_rate)
|
|
29
26
|
|
|
30
|
-
|
|
31
|
-
end
|
|
27
|
+
@telemetry_synchronizer.synchronize_stats
|
|
32
28
|
end
|
|
29
|
+
rescue SplitIoClient::SDKShutdownException
|
|
30
|
+
@telemetry_synchronizer.synchronize_stats
|
|
31
|
+
|
|
32
|
+
@config.logger.info('Posting Telemetry due to shutdown')
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
end
|
data/lib/splitclient-rb.rb
CHANGED
|
@@ -49,7 +49,6 @@ require 'splitclient-rb/validators'
|
|
|
49
49
|
require 'splitclient-rb/split_factory_registry'
|
|
50
50
|
|
|
51
51
|
require 'splitclient-rb/engine/api/faraday_middleware/gzip'
|
|
52
|
-
require 'splitclient-rb/engine/api/faraday_adapter/patched_net_http_persistent'
|
|
53
52
|
require 'splitclient-rb/engine/api/client'
|
|
54
53
|
require 'splitclient-rb/engine/api/impressions'
|
|
55
54
|
require 'splitclient-rb/engine/api/segments'
|
data/splitclient-rb.gemspec
CHANGED
|
@@ -8,16 +8,15 @@ Gem::Specification.new do |spec|
|
|
|
8
8
|
spec.name = 'splitclient-rb'
|
|
9
9
|
spec.version = SplitIoClient::VERSION
|
|
10
10
|
spec.authors = ['Split Software']
|
|
11
|
-
spec.email = ['
|
|
12
|
-
|
|
11
|
+
spec.email = ['mauro.sanz@split.io']
|
|
13
12
|
spec.summary = 'Ruby client for split SDK.'
|
|
14
13
|
spec.description = 'Ruby client for using split SDK.'
|
|
15
14
|
spec.homepage = 'https://github.com/splitio/ruby-client'
|
|
16
15
|
spec.license = 'Apache-2.0'
|
|
17
16
|
|
|
18
17
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(spec|features|ext)/}) }
|
|
19
|
-
|
|
20
18
|
spec.require_paths = ['lib']
|
|
19
|
+
spec.required_ruby_version = '>= 2.5.0'
|
|
21
20
|
|
|
22
21
|
if defined?(JRUBY_VERSION)
|
|
23
22
|
spec.platform = 'java'
|
|
@@ -37,22 +36,22 @@ Gem::Specification.new do |spec|
|
|
|
37
36
|
end
|
|
38
37
|
|
|
39
38
|
spec.add_development_dependency 'allocation_stats', '~> 0.1'
|
|
40
|
-
spec.add_development_dependency 'appraisal', '~> 2.4'
|
|
41
39
|
spec.add_development_dependency 'bundler', '~> 2.2'
|
|
42
40
|
spec.add_development_dependency 'pry', '~> 0.14'
|
|
43
41
|
spec.add_development_dependency 'pry-nav', '~> 1.0'
|
|
44
|
-
spec.add_development_dependency 'rake', '~>
|
|
42
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
|
45
43
|
spec.add_development_dependency 'rake-compiler', '~> 1.1'
|
|
46
44
|
spec.add_development_dependency 'rspec', '~> 3.10'
|
|
47
|
-
spec.add_development_dependency 'rubocop', '
|
|
45
|
+
spec.add_development_dependency 'rubocop', '1.28.2'
|
|
48
46
|
spec.add_development_dependency 'simplecov', '~> 0.20'
|
|
49
47
|
spec.add_development_dependency 'simplecov-json', '~> 0.2'
|
|
50
48
|
spec.add_development_dependency 'timecop', '~> 0.9'
|
|
51
49
|
spec.add_development_dependency 'webmock', '~> 3.14'
|
|
50
|
+
spec.add_development_dependency 'webrick', '~> 1.7'
|
|
52
51
|
|
|
53
52
|
spec.add_runtime_dependency 'bitarray', '~> 1.3'
|
|
54
53
|
spec.add_runtime_dependency 'concurrent-ruby', '~> 1.0'
|
|
55
|
-
spec.add_runtime_dependency 'faraday', '>=
|
|
54
|
+
spec.add_runtime_dependency 'faraday', '>= 1.1', '< 2.0'
|
|
56
55
|
spec.add_runtime_dependency 'json', '>= 1.8', '< 3.0'
|
|
57
56
|
spec.add_runtime_dependency 'jwt', '>= 1.0.0', '< 3.0'
|
|
58
57
|
spec.add_runtime_dependency 'lru_redux', '~> 1.1'
|
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:
|
|
4
|
+
version: 8.0.0
|
|
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-
|
|
11
|
+
date: 2022-05-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -24,20 +24,6 @@ dependencies:
|
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '0.1'
|
|
27
|
-
- !ruby/object:Gem::Dependency
|
|
28
|
-
requirement: !ruby/object:Gem::Requirement
|
|
29
|
-
requirements:
|
|
30
|
-
- - "~>"
|
|
31
|
-
- !ruby/object:Gem::Version
|
|
32
|
-
version: '2.4'
|
|
33
|
-
name: appraisal
|
|
34
|
-
prerelease: false
|
|
35
|
-
type: :development
|
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
-
requirements:
|
|
38
|
-
- - "~>"
|
|
39
|
-
- !ruby/object:Gem::Version
|
|
40
|
-
version: '2.4'
|
|
41
27
|
- !ruby/object:Gem::Dependency
|
|
42
28
|
requirement: !ruby/object:Gem::Requirement
|
|
43
29
|
requirements:
|
|
@@ -85,7 +71,7 @@ dependencies:
|
|
|
85
71
|
requirements:
|
|
86
72
|
- - "~>"
|
|
87
73
|
- !ruby/object:Gem::Version
|
|
88
|
-
version: '
|
|
74
|
+
version: '13.0'
|
|
89
75
|
name: rake
|
|
90
76
|
prerelease: false
|
|
91
77
|
type: :development
|
|
@@ -93,7 +79,7 @@ dependencies:
|
|
|
93
79
|
requirements:
|
|
94
80
|
- - "~>"
|
|
95
81
|
- !ruby/object:Gem::Version
|
|
96
|
-
version: '
|
|
82
|
+
version: '13.0'
|
|
97
83
|
- !ruby/object:Gem::Dependency
|
|
98
84
|
requirement: !ruby/object:Gem::Requirement
|
|
99
85
|
requirements:
|
|
@@ -127,7 +113,7 @@ dependencies:
|
|
|
127
113
|
requirements:
|
|
128
114
|
- - '='
|
|
129
115
|
- !ruby/object:Gem::Version
|
|
130
|
-
version:
|
|
116
|
+
version: 1.28.2
|
|
131
117
|
name: rubocop
|
|
132
118
|
prerelease: false
|
|
133
119
|
type: :development
|
|
@@ -135,7 +121,7 @@ dependencies:
|
|
|
135
121
|
requirements:
|
|
136
122
|
- - '='
|
|
137
123
|
- !ruby/object:Gem::Version
|
|
138
|
-
version:
|
|
124
|
+
version: 1.28.2
|
|
139
125
|
- !ruby/object:Gem::Dependency
|
|
140
126
|
requirement: !ruby/object:Gem::Requirement
|
|
141
127
|
requirements:
|
|
@@ -192,6 +178,20 @@ dependencies:
|
|
|
192
178
|
- - "~>"
|
|
193
179
|
- !ruby/object:Gem::Version
|
|
194
180
|
version: '3.14'
|
|
181
|
+
- !ruby/object:Gem::Dependency
|
|
182
|
+
requirement: !ruby/object:Gem::Requirement
|
|
183
|
+
requirements:
|
|
184
|
+
- - "~>"
|
|
185
|
+
- !ruby/object:Gem::Version
|
|
186
|
+
version: '1.7'
|
|
187
|
+
name: webrick
|
|
188
|
+
prerelease: false
|
|
189
|
+
type: :development
|
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
191
|
+
requirements:
|
|
192
|
+
- - "~>"
|
|
193
|
+
- !ruby/object:Gem::Version
|
|
194
|
+
version: '1.7'
|
|
195
195
|
- !ruby/object:Gem::Dependency
|
|
196
196
|
requirement: !ruby/object:Gem::Requirement
|
|
197
197
|
requirements:
|
|
@@ -225,7 +225,7 @@ dependencies:
|
|
|
225
225
|
requirements:
|
|
226
226
|
- - ">="
|
|
227
227
|
- !ruby/object:Gem::Version
|
|
228
|
-
version: '
|
|
228
|
+
version: '1.1'
|
|
229
229
|
- - "<"
|
|
230
230
|
- !ruby/object:Gem::Version
|
|
231
231
|
version: '2.0'
|
|
@@ -236,7 +236,7 @@ dependencies:
|
|
|
236
236
|
requirements:
|
|
237
237
|
- - ">="
|
|
238
238
|
- !ruby/object:Gem::Version
|
|
239
|
-
version: '
|
|
239
|
+
version: '1.1'
|
|
240
240
|
- - "<"
|
|
241
241
|
- !ruby/object:Gem::Version
|
|
242
242
|
version: '2.0'
|
|
@@ -370,7 +370,7 @@ dependencies:
|
|
|
370
370
|
version: '0.3'
|
|
371
371
|
description: Ruby client for using split SDK.
|
|
372
372
|
email:
|
|
373
|
-
-
|
|
373
|
+
- mauro.sanz@split.io
|
|
374
374
|
executables: []
|
|
375
375
|
extensions: []
|
|
376
376
|
extra_rdoc_files: []
|
|
@@ -381,7 +381,6 @@ files:
|
|
|
381
381
|
- ".gitignore"
|
|
382
382
|
- ".rubocop.yml"
|
|
383
383
|
- ".simplecov"
|
|
384
|
-
- Appraisals
|
|
385
384
|
- CHANGES.txt
|
|
386
385
|
- CONTRIBUTORS-GUIDE.md
|
|
387
386
|
- Gemfile
|
|
@@ -432,7 +431,6 @@ files:
|
|
|
432
431
|
- lib/splitclient-rb/constants.rb
|
|
433
432
|
- lib/splitclient-rb/engine/api/client.rb
|
|
434
433
|
- lib/splitclient-rb/engine/api/events.rb
|
|
435
|
-
- lib/splitclient-rb/engine/api/faraday_adapter/patched_net_http_persistent.rb
|
|
436
434
|
- lib/splitclient-rb/engine/api/faraday_middleware/gzip.rb
|
|
437
435
|
- lib/splitclient-rb/engine/api/impressions.rb
|
|
438
436
|
- lib/splitclient-rb/engine/api/segments.rb
|
|
@@ -535,12 +533,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
535
533
|
requirements:
|
|
536
534
|
- - ">="
|
|
537
535
|
- !ruby/object:Gem::Version
|
|
538
|
-
version:
|
|
536
|
+
version: 2.5.0
|
|
539
537
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
540
538
|
requirements:
|
|
541
|
-
- - "
|
|
539
|
+
- - ">="
|
|
542
540
|
- !ruby/object:Gem::Version
|
|
543
|
-
version:
|
|
541
|
+
version: '0'
|
|
544
542
|
requirements: []
|
|
545
543
|
rubyforge_project:
|
|
546
544
|
rubygems_version: 2.6.14
|
data/Appraisals
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module SplitIoClient
|
|
4
|
-
module FaradayAdapter
|
|
5
|
-
class PatchedNetHttpPersistent < Faraday::Adapter::NetHttpPersistent
|
|
6
|
-
##
|
|
7
|
-
# Borrowed directly from the latest `NetHttpPersistent` adapter implementation.
|
|
8
|
-
#
|
|
9
|
-
# https://github.com/lostisland/faraday/blob/master/lib/faraday/adapter/net_http_persistent.rb
|
|
10
|
-
#
|
|
11
|
-
def net_http_connection(env)
|
|
12
|
-
@cached_connection ||=
|
|
13
|
-
if Net::HTTP::Persistent.instance_method(:initialize).parameters.first == [:key, :name]
|
|
14
|
-
Net::HTTP::Persistent.new(name: 'Faraday')
|
|
15
|
-
else
|
|
16
|
-
Net::HTTP::Persistent.new('Faraday')
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
proxy_uri = proxy_uri(env)
|
|
20
|
-
@cached_connection.proxy = proxy_uri if @cached_connection.proxy_uri != proxy_uri
|
|
21
|
-
@cached_connection
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
def proxy_uri(env)
|
|
25
|
-
proxy_uri = nil
|
|
26
|
-
if (proxy = env[:request][:proxy])
|
|
27
|
-
proxy_uri = ::URI::HTTP === proxy[:uri] ? proxy[:uri].dup : ::URI.parse(proxy[:uri].to_s)
|
|
28
|
-
proxy_uri.user = proxy_uri.password = nil
|
|
29
|
-
# awful patch for net-http-persistent 2.8 not unescaping user/password
|
|
30
|
-
(
|
|
31
|
-
class << proxy_uri;
|
|
32
|
-
self;
|
|
33
|
-
end).class_eval do
|
|
34
|
-
define_method(:user) { proxy[:user] }
|
|
35
|
-
define_method(:password) { proxy[:password] }
|
|
36
|
-
end if proxy[:user]
|
|
37
|
-
end
|
|
38
|
-
proxy_uri
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
def with_net_http_connection(env)
|
|
42
|
-
yield net_http_connection(env)
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
end
|
|
46
|
-
end
|