faraday-net_http 0.0.6 → 1.0.0
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/lib/faraday/adapter/net_http.rb +8 -7
- data/lib/faraday/net_http/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6e5d7596613c3f2bcfde1d254ab83f9a01e23b8180d852bb08c4311a183f92f
|
4
|
+
data.tar.gz: e4fa72a0f4b435d2d4d7a8594c235593c5d4797bbb33e27c47fd9c58d3e3b095
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0de17541184794c11df1c0cd37c220a1b36dbfcfc7fdfec88dcd860f354dd7916b146c8a0b18e3bc4ae770bd4ca78e3d5ff1ef623d30c2e2e2af68c118c3d496
|
7
|
+
data.tar.gz: 7403a56c1f396f290f76302d1ea665c371fab0c298bd4324ff779dc55567b10953bbf9a9c5872fbe51a15b3f7cd9fc9095447bf20d2f1b9068ef4ec5baefcf6e
|
@@ -48,14 +48,15 @@ module Faraday
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def net_http_connection(env)
|
51
|
-
|
52
|
-
Net::HTTP::Proxy(proxy[:uri].hostname, proxy[:uri].port,
|
53
|
-
proxy[:user], proxy[:password])
|
54
|
-
else
|
55
|
-
Net::HTTP
|
56
|
-
end
|
51
|
+
proxy = env[:request][:proxy]
|
57
52
|
port = env[:url].port || (env[:url].scheme == 'https' ? 443 : 80)
|
58
|
-
|
53
|
+
if proxy
|
54
|
+
Net::HTTP.new(env[:url].hostname, port,
|
55
|
+
proxy[:uri].hostname, proxy[:uri].port,
|
56
|
+
proxy[:user], proxy[:password])
|
57
|
+
else
|
58
|
+
Net::HTTP.new(env[:url].hostname, port, nil)
|
59
|
+
end
|
59
60
|
end
|
60
61
|
|
61
62
|
def call(env)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faraday-net_http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan van der Pas
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -169,7 +169,7 @@ metadata:
|
|
169
169
|
homepage_uri: https://github.com/lostisland/faraday-net_http
|
170
170
|
source_code_uri: https://github.com/lostisland/faraday-net_http
|
171
171
|
changelog_uri: https://github.com/lostisland/faraday-net_http
|
172
|
-
post_install_message:
|
172
|
+
post_install_message:
|
173
173
|
rdoc_options: []
|
174
174
|
require_paths:
|
175
175
|
- lib
|
@@ -185,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
185
185
|
version: '0'
|
186
186
|
requirements: []
|
187
187
|
rubygems_version: 3.1.4
|
188
|
-
signing_key:
|
188
|
+
signing_key:
|
189
189
|
specification_version: 4
|
190
190
|
summary: Faraday adapter for Net::HTTP
|
191
191
|
test_files: []
|