faraday-net_http 2.0.0.alpha.pre.2 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -8
- data/lib/faraday/adapter/net_http.rb +1 -1
- data/lib/faraday/net_http/version.rb +1 -1
- data/lib/faraday/net_http.rb +0 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd81d4fd0efd54bc9645740c95d58d1da812ea43be13b265f2a6031136b7d5d6
|
4
|
+
data.tar.gz: 6b53df4188f50693d8f4c7ebb2fea9ae9a5f8277e0894ba49be7f2ceb90f95e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ac00145c8e0a0a9dbb53daf0a4da960d56143227293288b5b6c4754b302f3ad3123edebefdf987d4b4250f5473e2adf2c9267eb70f8c26e141c78f0c4a478d5
|
7
|
+
data.tar.gz: e059ac1f6872511c4095136fa3b6e52fc130b303258bb4bb0a755fd5fc53ba8218e17e54ab56d3df1c92e936c416f673c7bbc1e600158eb87c503b0cab7af349
|
data/README.md
CHANGED
@@ -20,16 +20,18 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
## Usage
|
22
22
|
|
23
|
-
Configure your Faraday connection to use this adapter like this:
|
24
|
-
|
25
23
|
```ruby
|
26
|
-
|
27
|
-
|
24
|
+
conn = Faraday.new(...) do |f|
|
25
|
+
f.adapter :net_http do |http|
|
26
|
+
# yields Net::HTTP
|
27
|
+
http.idle_timeout = 100
|
28
|
+
http.verify_callback = lambda do |preverify, cert_store|
|
29
|
+
# do something here...
|
30
|
+
end
|
31
|
+
end
|
28
32
|
end
|
29
33
|
```
|
30
34
|
|
31
|
-
For more information on how to setup your Faraday connection and adapters usage, please refer to the [Faraday Website][faraday-website].
|
32
|
-
|
33
35
|
## Development
|
34
36
|
|
35
37
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -49,9 +51,8 @@ The gem is available as open source under the terms of the [license][license].
|
|
49
51
|
Everyone interacting in the Faraday Net::HTTP adapter project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct][code-of-conduct].
|
50
52
|
|
51
53
|
[faraday]: https://github.com/lostisland/faraday
|
52
|
-
[faraday-website]: https://lostisland.github.io/faraday
|
53
54
|
[net-http]: https://ruby-doc.org/stdlib-2.7.0/libdoc/net/http/rdoc/Net/HTTP.html
|
54
55
|
[rubygems]: https://rubygems.org
|
55
56
|
[repo]: https://github.com/lostisland/faraday-net_http
|
56
57
|
[license]: https://github.com/lostisland/faraday-net_http/blob/main/LICENSE.md
|
57
|
-
[code-of-conduct]: https://github.com/lostisland/faraday-net_http/blob/main/CODE_OF_CONDUCT.md
|
58
|
+
[code-of-conduct]: https://github.com/lostisland/faraday-net_http/blob/main/CODE_OF_CONDUCT.md
|
@@ -210,7 +210,7 @@ module Faraday
|
|
210
210
|
def encoded_body(http_response)
|
211
211
|
body = http_response.body || +''
|
212
212
|
/\bcharset=\s*(.+?)\s*(;|$)/.match(http_response['Content-Type']) do |match|
|
213
|
-
content_charset = Encoding.find(match.captures.first)
|
213
|
+
content_charset = ::Encoding.find(match.captures.first)
|
214
214
|
body = body.dup if body.frozen?
|
215
215
|
body.force_encoding(content_charset)
|
216
216
|
rescue ArgumentError
|
data/lib/faraday/net_http.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faraday-net_http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
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:
|
11
|
+
date: 2022-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
20
|
-
type: :
|
19
|
+
version: '1.0'
|
20
|
+
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: '1.0'
|
27
27
|
description: Faraday adapter for Net::HTTP
|
28
28
|
email:
|
29
29
|
- janvanderpas@gmail.com
|
@@ -42,7 +42,7 @@ licenses:
|
|
42
42
|
metadata:
|
43
43
|
homepage_uri: https://github.com/lostisland/faraday-net_http
|
44
44
|
source_code_uri: https://github.com/lostisland/faraday-net_http
|
45
|
-
changelog_uri: https://github.com/lostisland/faraday-net_http/releases/tag/v2.0.
|
45
|
+
changelog_uri: https://github.com/lostisland/faraday-net_http/releases/tag/v2.0.2
|
46
46
|
post_install_message:
|
47
47
|
rdoc_options: []
|
48
48
|
require_paths:
|
@@ -54,9 +54,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
54
54
|
version: 2.4.0
|
55
55
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
56
56
|
requirements:
|
57
|
-
- - "
|
57
|
+
- - ">="
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version:
|
59
|
+
version: '0'
|
60
60
|
requirements: []
|
61
61
|
rubygems_version: 3.1.6
|
62
62
|
signing_key:
|