elastic-transport 8.1.0.pre1 → 8.1.0.pre2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/elastic/transport/client.rb +12 -10
- data/lib/elastic/transport/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '019bec0fce3232610f573b32a72456674018954609728aba574165f3e4b16393'
|
4
|
+
data.tar.gz: 9f5ef21b2823bccf5c6e22c47420bf543931b1b76cd3b7050272cababffe2929
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 623ad8af7121423ae67655c684293a14f41faffbf76368fc8b2b4b23ce0a48793d238b209d3f8867808a8567b496d6186c8e700be9371d59839154f460f52eb3
|
7
|
+
data.tar.gz: 7cdbcbcb8ab41e11a1a3acd5de8b25520b10823e2706cc8d432fb7057d06181cb0730272289614b34302182d925b82d31a422a0a664c461051db34ce81c3939d
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## 8.1.0.pre2
|
2
|
+
|
3
|
+
Updates Faraday's adapter detection code.
|
4
|
+
|
1
5
|
## 8.1.0.pre1
|
2
6
|
|
3
7
|
Adds support for Faraday version 2. From [Faraday's Upgrading guide](https://github.com/lostisland/faraday/blob/main/UPGRADING.md#faraday-20), the main change is the adapters have moved:
|
@@ -283,24 +283,26 @@ module Elastic
|
|
283
283
|
# Auto-detect the best adapter (HTTP "driver") available, based on libraries
|
284
284
|
# loaded by the user, preferring those with persistent connections
|
285
285
|
# ("keep-alive") by default
|
286
|
+
# Check adapters based on the usage of Faraday 1 or 2. Faraday should be defined here
|
287
|
+
# since this is only called when transport class is Transport::HTTP::Faraday
|
286
288
|
#
|
287
289
|
# @return [Symbol]
|
288
290
|
#
|
289
291
|
# @api private
|
290
292
|
#
|
291
293
|
def __auto_detect_adapter
|
292
|
-
|
293
|
-
|
294
|
-
:
|
295
|
-
|
296
|
-
:
|
297
|
-
when defined?(::HTTPClient)
|
298
|
-
:httpclient
|
299
|
-
when defined?(::Net::HTTP::Persistent)
|
300
|
-
:net_http_persistent
|
294
|
+
if Gem::Version.new(Faraday::VERSION) >= Gem::Version.new(2)
|
295
|
+
return :patron if defined?(Faraday::Adapter::Patron)
|
296
|
+
return :typhoeus if defined?(Faraday::Adapter::Typhoeus)
|
297
|
+
return :httpclient if defined?(Faraday::Adapter::HTTPClient)
|
298
|
+
return :net_http_persistent if defined?(Faraday::Adapter::NetHttpPersistent)
|
301
299
|
else
|
302
|
-
::
|
300
|
+
return :patron if defined?(::Patron)
|
301
|
+
return :typhoeus if defined?(::Typhoeus)
|
302
|
+
return :httpclient if defined?(::HTTPClient)
|
303
|
+
return :net_http_persistent if defined?(::Net::HTTP::Persistent)
|
303
304
|
end
|
305
|
+
::Faraday.default_adapter
|
304
306
|
end
|
305
307
|
end
|
306
308
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elastic-transport
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 8.1.0.
|
4
|
+
version: 8.1.0.pre2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karel Minarik
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2022-08-
|
13
|
+
date: 2022-08-24 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: faraday
|