Skip to content

Commit 554b6c3

Browse files
authored
Merge pull request #438 from splitio/development
[8.0.1] Development into master
2 parents c5c38c6 + 5ab9624 commit 554b6c3

5 files changed

Lines changed: 19 additions & 7 deletions

File tree

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
CHANGES
22

3+
8.0.1 (Jul 20, 2022)
4+
- Updated dependencies to support faraday > 2.0
5+
36
8.0.0 (May 10, 2022)
47
- BREAKING CHANGE: Deprecated support for ruby 2.3 and 2.4 versions. The minimum ruby version required is 2.5 now.
58
- Updated redis command for config telemetry, using hset instead of rpush now.

lib/splitclient-rb/engine/api/client.rb

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
module SplitIoClient
44
module Api
55
class Client
6-
RUBY_ENCODING = '1.9'.respond_to?(:force_encoding)
7-
86
def initialize(config)
9-
@config = config
7+
@config = config
8+
9+
check_faraday_compatibility
1010
end
1111

1212
def get_api(url, api_key, params = {}, cache_control_headers = false)
@@ -64,6 +64,14 @@ def common_headers(api_key)
6464
'SplitSDKVersion' => "#{@config.language}-#{@config.version}",
6565
}
6666
end
67+
68+
def check_faraday_compatibility
69+
version = Faraday::VERSION.split('.')[0]
70+
71+
require 'faraday/net_http_persistent' if version.to_i >= 2
72+
rescue StandardError => e
73+
@config.logger.warn(e)
74+
end
6775
end
6876
end
6977
end

lib/splitclient-rb/engine/sync_manager.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ def start_thread
4747
connected = false
4848

4949
if @config.streaming_enabled
50-
@config.logger.debug('Starting Straming mode ...')
50+
@config.logger.debug('Starting Streaming mode ...')
5151
start_push_status_monitor
5252
connected = @push_manager.start_sse
5353
end
5454

5555
unless connected
56-
@config.logger.debug('Starting polling mode ...')
56+
@config.logger.debug('Starting Polling mode ...')
5757
@synchronizer.start_periodic_fetch
5858
record_telemetry(Telemetry::Domain::Constants::SYNC_MODE, SYNC_MODE_POLLING)
5959
end

lib/splitclient-rb/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module SplitIoClient
2-
VERSION = '8.0.0'
2+
VERSION = '8.0.1'
33
end

splitclient-rb.gemspec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ Gem::Specification.new do |spec|
5151

5252
spec.add_runtime_dependency 'bitarray', '~> 1.3'
5353
spec.add_runtime_dependency 'concurrent-ruby', '~> 1.0'
54-
spec.add_runtime_dependency 'faraday', '>= 1.1', '< 2.0'
54+
spec.add_runtime_dependency 'faraday', '>= 1.1', '< 3.0'
55+
spec.add_runtime_dependency 'faraday-net_http_persistent', '>= 1.0', '< 3.0'
5556
spec.add_runtime_dependency 'json', '>= 1.8', '< 3.0'
5657
spec.add_runtime_dependency 'jwt', '>= 1.0.0', '< 3.0'
5758
spec.add_runtime_dependency 'lru_redux', '~> 1.1'

0 commit comments

Comments
 (0)