faraday-net_http_persistent 2.1.0 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ffe757e1437110d467bf12e5b02dfb9c645148637fda7dbd819960bc606a083f
4
- data.tar.gz: ea0f218c8a5cc9fff614d7642148059e98c3664fb66a8c9a82b520c19aa4f74a
3
+ metadata.gz: f0b25e05ab410cbcbabe4c2ffef6bdebbf17b816ab0585299ccfc2ab6e84a6f2
4
+ data.tar.gz: 633f9198253455e34c773e4fc9c1bd0de5f19c464b57fe49181ea422c8e77cad
5
5
  SHA512:
6
- metadata.gz: 704efa657b1583d555b29a6cc71d75e936dc2dab9ac419d09d92a0a433eba72470f48b7dede5a005c8604a7a36dae62b86c53249be1090819df472a3bee55542
7
- data.tar.gz: ec494b194dbbf5dd42c91166a2cd17de25d57d7cf0155cabaf4c9dda60d906592cd8fa8558b7a6d34b523e3bedaeeaffa39b03beedfc56459bdc6bc454a6a8f0
6
+ metadata.gz: de8e7458abed9d8503ba67b4241d64a4b02baa528b316e0e10394dbfe40cfdb0a8a9ba9b71c5dd204c2a8a7c89aed6a529013aa52ee158335962fb46cadb3b01
7
+ data.tar.gz: bed233f50fd228cac2044a5a57892f368d76f779c29b41514abbd3190a10d89ccc08968aa85a9c7b40f8cf44bb014cb1ef7a83a1c1d018b0479538d7307731be
@@ -56,6 +56,10 @@ module Faraday
56
56
  raise Faraday::TimeoutError, e
57
57
  end
58
58
 
59
+ def close
60
+ @cached_connection&.shutdown
61
+ end
62
+
59
63
  private
60
64
 
61
65
  def build_connection(env)
@@ -128,7 +132,8 @@ module Faraday
128
132
  end
129
133
 
130
134
  def init_options
131
- options = {name: "Faraday"}
135
+ options = {}
136
+ options[:name] = @connection_options.fetch(:name, "Faraday")
132
137
  options[:pool_size] = @connection_options[:pool_size] if @connection_options.key?(:pool_size)
133
138
  options
134
139
  end
@@ -179,8 +184,15 @@ module Faraday
179
184
  ca_file: :ca_file,
180
185
  ssl_version: :version,
181
186
  min_version: :min_version,
182
- max_version: :max_version
183
- }.freeze
187
+ max_version: :max_version,
188
+ verify_hostname: :verify_hostname
189
+ }
190
+
191
+ if Gem::Version.new(Faraday::VERSION) >= Gem::Version.new("2.11.0")
192
+ SSL_CONFIGURATIONS[:ciphers] = :ciphers
193
+ end
194
+
195
+ SSL_CONFIGURATIONS.freeze
184
196
 
185
197
  def configure_ssl(http, ssl)
186
198
  return unless ssl
@@ -189,7 +201,7 @@ module Faraday
189
201
  http_set(http, :cert_store, ssl_cert_store(ssl))
190
202
 
191
203
  SSL_CONFIGURATIONS
192
- .select { |_, key| ssl[key] }
204
+ .select { |_, key| !ssl[key].nil? }
193
205
  .each { |target, key| http_set(http, target, ssl[key]) }
194
206
  end
195
207
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Faraday
4
4
  module NetHttpPersistent
5
- VERSION = "2.1.0"
5
+ VERSION = "2.3.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faraday-net_http_persistent
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Rogers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-11 00:00:00.000000000 Z
11
+ date: 2024-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -28,16 +28,22 @@ dependencies:
28
28
  name: net-http-persistent
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 4.0.4
34
+ - - "<"
32
35
  - !ruby/object:Gem::Version
33
- version: '4.0'
36
+ version: '5'
34
37
  type: :runtime
35
38
  prerelease: false
36
39
  version_requirements: !ruby/object:Gem::Requirement
37
40
  requirements:
38
- - - "~>"
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: 4.0.4
44
+ - - "<"
39
45
  - !ruby/object:Gem::Version
40
- version: '4.0'
46
+ version: '5'
41
47
  description: Faraday adapter for NetHttpPersistent
42
48
  email:
43
49
  - me@mikerogers.io
@@ -56,7 +62,7 @@ licenses:
56
62
  metadata:
57
63
  homepage_uri: https://github.com/lostisland/faraday-net_http_persistent
58
64
  source_code_uri: https://github.com/lostisland/faraday-net_http_persistent
59
- changelog_uri: https://github.com/lostisland/faraday-net_http_persistent/releases/tag/v2.1.0
65
+ changelog_uri: https://github.com/lostisland/faraday-net_http_persistent/releases/tag/v2.3.0
60
66
  post_install_message:
61
67
  rdoc_options: []
62
68
  require_paths: