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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 50f1e65c56e527b724b107dbf1f4580f4de9e7d102d4617ed3c5bceecd4a1b07
4
- data.tar.gz: f6ad202b18f54eaa665b3407bc0297c41e6ba41259220b21e186493c45019c16
3
+ metadata.gz: dd81d4fd0efd54bc9645740c95d58d1da812ea43be13b265f2a6031136b7d5d6
4
+ data.tar.gz: 6b53df4188f50693d8f4c7ebb2fea9ae9a5f8277e0894ba49be7f2ceb90f95e0
5
5
  SHA512:
6
- metadata.gz: 00e25dfdbdafe00431648975d8a31ba2ea53e4c74d688e937a0a4e87524a6987370fd99a81a22eb2548e587d138822e0984f698315c223a4baeb5f0aed8b0815
7
- data.tar.gz: f470b1b56a0a40a590cf492c85f53e089c64ec95ff55f52a1c579b18fa304ba3c80dbf01c0e2d403a341f416cf7eb5dba953cf37c07f33a3db58a0d66d9bf088
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
- connection = Faraday.new(url, conn_options) do |conn|
27
- conn.adapter(:net_http)
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Faraday
4
4
  module NetHttp
5
- VERSION = '2.0.0.alpha-2'
5
+ VERSION = '2.0.2'
6
6
  end
7
7
  end
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'faraday'
4
3
  require 'faraday/adapter/net_http'
5
4
  require 'faraday/net_http/version'
6
5
 
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.0.alpha.pre.2
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: 2021-12-02 00:00:00.000000000 Z
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: 2.0.0.alpha.pre.2
20
- type: :runtime
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: 2.0.0.alpha.pre.2
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.0.alpha.pre.2
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: 1.3.1
59
+ version: '0'
60
60
  requirements: []
61
61
  rubygems_version: 3.1.6
62
62
  signing_key: