faraday-net_http 0.0.6 → 1.0.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: 6e961bbdeefeaa1bc3a8faa0433fde49e9c3f2ee0eb4e27523abcbd0e7dcedde
4
- data.tar.gz: 2380be8e9ad3d94c14c03c929922cb6827d12e6d392ae445707a98c84a383290
3
+ metadata.gz: e6e5d7596613c3f2bcfde1d254ab83f9a01e23b8180d852bb08c4311a183f92f
4
+ data.tar.gz: e4fa72a0f4b435d2d4d7a8594c235593c5d4797bbb33e27c47fd9c58d3e3b095
5
5
  SHA512:
6
- metadata.gz: 6deb98d5ba3ae81d9748fda3a0cc342f5a41b25490fca35fb3f33ffbde10783eca848b26c950ae41091c891d0f1316f87fb90452c49c37f359491b18442cdcff
7
- data.tar.gz: 3bafd4c7fc07d5205e161a68d832f832e66c84ab04f1611863124b987c14ecec260be91db143de705c8c56c029a066063ee937494a73f505b3a3c05813703195
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
- klass = if (proxy = env[:request][:proxy])
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
- klass.new(env[:url].hostname, port)
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)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Faraday
4
4
  module NetHttp
5
- VERSION = '0.0.6'
5
+ VERSION = '1.0.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
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
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-10-29 00:00:00.000000000 Z
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: []