faraday-net_http 0.0.5 → 0.0.6
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 +6 -9
- 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: 6e961bbdeefeaa1bc3a8faa0433fde49e9c3f2ee0eb4e27523abcbd0e7dcedde
|
4
|
+
data.tar.gz: 2380be8e9ad3d94c14c03c929922cb6827d12e6d392ae445707a98c84a383290
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6deb98d5ba3ae81d9748fda3a0cc342f5a41b25490fca35fb3f33ffbde10783eca848b26c950ae41091c891d0f1316f87fb90452c49c37f359491b18442cdcff
|
7
|
+
data.tar.gz: 3bafd4c7fc07d5205e161a68d832f832e66c84ab04f1611863124b987c14ecec260be91db143de705c8c56c029a066063ee937494a73f505b3a3c05813703195
|
@@ -9,10 +9,8 @@ rescue LoadError
|
|
9
9
|
end
|
10
10
|
require 'zlib'
|
11
11
|
|
12
|
-
# rubocop:disable Metrics/ClassLength
|
13
12
|
module Faraday
|
14
13
|
class Adapter
|
15
|
-
# Net::HTTP adapter.
|
16
14
|
class NetHttp < Faraday::Adapter
|
17
15
|
exceptions = [
|
18
16
|
IOError,
|
@@ -63,11 +61,13 @@ module Faraday
|
|
63
61
|
def call(env)
|
64
62
|
super
|
65
63
|
http_response = connection(env) do |http|
|
66
|
-
|
67
|
-
|
68
|
-
|
64
|
+
begin
|
65
|
+
perform_request(http, env)
|
66
|
+
rescue *NET_HTTP_EXCEPTIONS => e
|
67
|
+
raise Faraday::SSLError, e if defined?(OpenSSL) && e.is_a?(OpenSSL::SSL::SSLError)
|
69
68
|
|
70
|
-
|
69
|
+
raise Faraday::ConnectionFailed, e
|
70
|
+
end
|
71
71
|
end
|
72
72
|
|
73
73
|
save_response(env, http_response.code.to_i,
|
@@ -153,7 +153,6 @@ module Faraday
|
|
153
153
|
end
|
154
154
|
end
|
155
155
|
|
156
|
-
# rubocop:disable Metrics/AbcSize
|
157
156
|
def configure_ssl(http, ssl)
|
158
157
|
return unless ssl
|
159
158
|
|
@@ -169,7 +168,6 @@ module Faraday
|
|
169
168
|
http.min_version = ssl[:min_version] if ssl[:min_version]
|
170
169
|
http.max_version = ssl[:max_version] if ssl[:max_version]
|
171
170
|
end
|
172
|
-
# rubocop:enable Metrics/AbcSize
|
173
171
|
|
174
172
|
def configure_request(http, req)
|
175
173
|
if (sec = request_timeout(:read, req))
|
@@ -212,4 +210,3 @@ module Faraday
|
|
212
210
|
end
|
213
211
|
end
|
214
212
|
end
|
215
|
-
# rubocop:enable Metrics/ClassLength
|
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: 0.0.6
|
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-
|
11
|
+
date: 2020-10-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: []
|