faraday-net_http 3.1.0 → 3.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/faraday/adapter/net_http.rb +9 -5
- data/lib/faraday/net_http/version.rb +1 -1
- metadata +7 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 737599a223dbac248cbbbbd9135fb6435b9fe3b340549b87c9e5176ce066e3fd
|
4
|
+
data.tar.gz: 5d7e885ac59d063f49a7fb999f1cf86ebd66aa1c0c76a5d0273bdd4992b72eb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 413aabd776695183fa818a0c022e8e2b450724bcfb6b0255e1a9240ef321d3d7f58e3988c68110a669234c830a2ac2f2a1ce04ad5d1fb2afde9b23998a183e82
|
7
|
+
data.tar.gz: 5931da595d755e6c86b71387335231201706391cf6faed61d46c2ddeb2667090d6fc397d9918d82079d5db8dd125c55e760a8ae393cc9771f2408435065df8fb
|
@@ -42,8 +42,7 @@ module Faraday
|
|
42
42
|
|
43
43
|
def build_connection(env)
|
44
44
|
net_http_connection(env).tap do |http|
|
45
|
-
http
|
46
|
-
configure_ssl(http, env[:ssl])
|
45
|
+
configure_ssl(http, env[:ssl]) if env[:url].scheme == 'https' && env[:ssl]
|
47
46
|
configure_request(http, env[:request])
|
48
47
|
end
|
49
48
|
end
|
@@ -54,7 +53,8 @@ module Faraday
|
|
54
53
|
if proxy
|
55
54
|
Net::HTTP.new(env[:url].hostname, port,
|
56
55
|
proxy[:uri].hostname, proxy[:uri].port,
|
57
|
-
proxy[:user], proxy[:password]
|
56
|
+
proxy[:user], proxy[:password],
|
57
|
+
nil, proxy[:uri].scheme == 'https')
|
58
58
|
else
|
59
59
|
Net::HTTP.new(env[:url].hostname, port, nil)
|
60
60
|
end
|
@@ -129,12 +129,15 @@ module Faraday
|
|
129
129
|
end
|
130
130
|
|
131
131
|
def configure_ssl(http, ssl)
|
132
|
-
|
132
|
+
http.use_ssl = true if http.respond_to?(:use_ssl=)
|
133
133
|
|
134
134
|
http.verify_mode = ssl_verify_mode(ssl)
|
135
135
|
http.cert_store = ssl_cert_store(ssl)
|
136
136
|
|
137
|
-
|
137
|
+
cert, *extra_chain_cert = ssl[:client_cert]
|
138
|
+
http.cert = cert if cert
|
139
|
+
http.extra_chain_cert = extra_chain_cert if extra_chain_cert.any?
|
140
|
+
|
138
141
|
http.key = ssl[:client_key] if ssl[:client_key]
|
139
142
|
http.ca_file = ssl[:ca_file] if ssl[:ca_file]
|
140
143
|
http.ca_path = ssl[:ca_path] if ssl[:ca_path]
|
@@ -143,6 +146,7 @@ module Faraday
|
|
143
146
|
http.min_version = ssl[:min_version] if ssl[:min_version]
|
144
147
|
http.max_version = ssl[:max_version] if ssl[:max_version]
|
145
148
|
http.verify_hostname = ssl[:verify_hostname] if verify_hostname_enabled?(http, ssl)
|
149
|
+
http.ciphers = ssl[:ciphers] if ssl[:ciphers]
|
146
150
|
end
|
147
151
|
|
148
152
|
def configure_request(http, req)
|
metadata
CHANGED
@@ -1,43 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faraday-net_http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan van der Pas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: faraday
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '2.5'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '2.5'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: net-http
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
30
16
|
requirements:
|
31
17
|
- - ">="
|
32
18
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
19
|
+
version: 0.5.0
|
34
20
|
type: :runtime
|
35
21
|
prerelease: false
|
36
22
|
version_requirements: !ruby/object:Gem::Requirement
|
37
23
|
requirements:
|
38
24
|
- - ">="
|
39
25
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
26
|
+
version: 0.5.0
|
41
27
|
description: Faraday adapter for Net::HTTP
|
42
28
|
email:
|
43
29
|
- janvanderpas@gmail.com
|
@@ -56,7 +42,8 @@ licenses:
|
|
56
42
|
metadata:
|
57
43
|
homepage_uri: https://github.com/lostisland/faraday-net_http
|
58
44
|
source_code_uri: https://github.com/lostisland/faraday-net_http
|
59
|
-
changelog_uri: https://github.com/lostisland/faraday-net_http/releases/tag/v3.
|
45
|
+
changelog_uri: https://github.com/lostisland/faraday-net_http/releases/tag/v3.4.0
|
46
|
+
rubygems_mfa_required: 'true'
|
60
47
|
post_install_message:
|
61
48
|
rdoc_options: []
|
62
49
|
require_paths:
|
@@ -72,7 +59,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
59
|
- !ruby/object:Gem::Version
|
73
60
|
version: '0'
|
74
61
|
requirements: []
|
75
|
-
rubygems_version: 3.5.
|
62
|
+
rubygems_version: 3.5.11
|
76
63
|
signing_key:
|
77
64
|
specification_version: 4
|
78
65
|
summary: Faraday adapter for Net::HTTP
|