faraday 1.5.0 → 1.5.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 84198a1e84bf10f350bad8dea5ebd4a866a9dff523d7b84ccad92ef9cb32b366
4
- data.tar.gz: b4d0537c7d4b5a8fba689bd84167246560cf8e2fd9ba492ab6e00b7d1e6f4f40
3
+ metadata.gz: 05b41e618d412fbb6199856f571098ff152bf81b42839139a2f0527d8f54e6d4
4
+ data.tar.gz: 5bf7bfe979404c4b58c6030b2348181bfada78c7eca1e352e1eec271b2c490aa
5
5
  SHA512:
6
- metadata.gz: a6e2b78cfe4ed8c203d87426cf4e2c1a1f1811550f1deeef3fdad7b691ea29a7a23f62b3460b5e701585b1375c4321e573e7f2ac2fd6834eba0b63772a36c858
7
- data.tar.gz: 75e1d9a707a37fd042d599959e62d2b4b679aa66e9194e2199295d6a190acd0a9dc366690c45a60cfb4aa6aa67b6bea7757fd40cb58d2560fe87f8de67271430
6
+ metadata.gz: af7ce1cc0c2a34c6733e2cb655ba2b8fe66729300ee40d9ba0a9161d56ba7e4318ffa4fa754f66d80714732bafe895ec2d2eac717ce62115ee3e3e1979830672
7
+ data.tar.gz: 3b92a28b2c1172da22f5892d2105e266d3873eb48d07a11090b2b52b5e5bb4a7bacfd8cd15e43b1094ea9df373014d9eb8a1a56226c808440c97489974b249b4
data/lib/faraday.rb CHANGED
@@ -27,8 +27,10 @@ require 'faraday/error'
27
27
  require 'faraday/file_part'
28
28
  require 'faraday/param_part'
29
29
 
30
- require 'faraday/em_http'
31
- require 'faraday/em_synchrony'
30
+ unless defined?(JRUBY_VERSION)
31
+ require 'faraday/em_http'
32
+ require 'faraday/em_synchrony'
33
+ end
32
34
  require 'faraday/excon'
33
35
  require 'faraday/httpclient'
34
36
  require 'faraday/net_http'
@@ -26,7 +26,7 @@ module Faraday
26
26
  # Connection. This includes a default host name, scheme, port, and path.
27
27
  attr_reader :url_prefix
28
28
 
29
- # @return [Faraday::Builder] Builder for this Connection.
29
+ # @return [Faraday::RackBuilder] Builder for this Connection.
30
30
  attr_reader :builder
31
31
 
32
32
  # @return [Hash] SSL options.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Faraday
4
- VERSION = '1.5.0'
4
+ VERSION = '1.5.1'
5
5
  end
@@ -1,47 +1,49 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- RSpec.describe Faraday::Adapter::EMHttp, unless: defined?(JRUBY_VERSION) do
4
- features :request_body_on_query_methods, :reason_phrase_parse, :trace_method,
5
- :skip_response_body_on_head, :parallel, :local_socket_binding
3
+ unless defined?(JRUBY_VERSION)
4
+ RSpec.describe Faraday::Adapter::EMHttp do
5
+ features :request_body_on_query_methods, :reason_phrase_parse, :trace_method,
6
+ :skip_response_body_on_head, :parallel, :local_socket_binding
6
7
 
7
- it_behaves_like 'an adapter'
8
+ it_behaves_like 'an adapter'
8
9
 
9
- it 'allows to provide adapter specific configs' do
10
- url = URI('https://example.com:1234')
11
- adapter = described_class.new nil, inactivity_timeout: 20
12
- req = adapter.create_request(url: url, request: {})
10
+ it 'allows to provide adapter specific configs' do
11
+ url = URI('https://example.com:1234')
12
+ adapter = described_class.new nil, inactivity_timeout: 20
13
+ req = adapter.create_request(url: url, request: {})
13
14
 
14
- expect(req.connopts.inactivity_timeout).to eq(20)
15
- end
16
-
17
- context 'Options' do
18
- let(:request) { Faraday::RequestOptions.new }
19
- let(:env) { { request: request } }
20
- let(:options) { {} }
21
- let(:adapter) { Faraday::Adapter::EMHttp.new }
22
-
23
- it 'configures timeout' do
24
- request.timeout = 5
25
- adapter.configure_timeout(options, env)
26
- expect(options[:inactivity_timeout]).to eq(5)
27
- expect(options[:connect_timeout]).to eq(5)
28
- end
29
-
30
- it 'configures timeout and open_timeout' do
31
- request.timeout = 5
32
- request.open_timeout = 1
33
- adapter.configure_timeout(options, env)
34
- expect(options[:inactivity_timeout]).to eq(5)
35
- expect(options[:connect_timeout]).to eq(1)
15
+ expect(req.connopts.inactivity_timeout).to eq(20)
36
16
  end
37
17
 
38
- it 'configures all timeout settings' do
39
- request.timeout = 5
40
- request.read_timeout = 3
41
- request.open_timeout = 1
42
- adapter.configure_timeout(options, env)
43
- expect(options[:inactivity_timeout]).to eq(3)
44
- expect(options[:connect_timeout]).to eq(1)
18
+ context 'Options' do
19
+ let(:request) { Faraday::RequestOptions.new }
20
+ let(:env) { { request: request } }
21
+ let(:options) { {} }
22
+ let(:adapter) { Faraday::Adapter::EMHttp.new }
23
+
24
+ it 'configures timeout' do
25
+ request.timeout = 5
26
+ adapter.configure_timeout(options, env)
27
+ expect(options[:inactivity_timeout]).to eq(5)
28
+ expect(options[:connect_timeout]).to eq(5)
29
+ end
30
+
31
+ it 'configures timeout and open_timeout' do
32
+ request.timeout = 5
33
+ request.open_timeout = 1
34
+ adapter.configure_timeout(options, env)
35
+ expect(options[:inactivity_timeout]).to eq(5)
36
+ expect(options[:connect_timeout]).to eq(1)
37
+ end
38
+
39
+ it 'configures all timeout settings' do
40
+ request.timeout = 5
41
+ request.read_timeout = 3
42
+ request.open_timeout = 1
43
+ adapter.configure_timeout(options, env)
44
+ expect(options[:inactivity_timeout]).to eq(3)
45
+ expect(options[:connect_timeout]).to eq(1)
46
+ end
45
47
  end
46
48
  end
47
49
  end
@@ -1,16 +1,18 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- RSpec.describe Faraday::Adapter::EMSynchrony, unless: defined?(JRUBY_VERSION) do
4
- features :request_body_on_query_methods, :reason_phrase_parse,
5
- :skip_response_body_on_head, :parallel, :local_socket_binding
3
+ unless defined?(JRUBY_VERSION)
4
+ RSpec.describe Faraday::Adapter::EMSynchrony do
5
+ features :request_body_on_query_methods, :reason_phrase_parse,
6
+ :skip_response_body_on_head, :parallel, :local_socket_binding
6
7
 
7
- it_behaves_like 'an adapter'
8
+ it_behaves_like 'an adapter'
8
9
 
9
- it 'allows to provide adapter specific configs' do
10
- url = URI('https://example.com:1234')
11
- adapter = described_class.new nil, inactivity_timeout: 20
12
- req = adapter.create_request(url: url, request: {})
10
+ it 'allows to provide adapter specific configs' do
11
+ url = URI('https://example.com:1234')
12
+ adapter = described_class.new nil, inactivity_timeout: 20
13
+ req = adapter.create_request(url: url, request: {})
13
14
 
14
- expect(req.connopts.inactivity_timeout).to eq(20)
15
+ expect(req.connopts.inactivity_timeout).to eq(20)
16
+ end
15
17
  end
16
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faraday
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - "@technoweenie"
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-07-04 00:00:00.000000000 Z
13
+ date: 2021-07-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: faraday-em_http
@@ -247,7 +247,7 @@ licenses:
247
247
  - MIT
248
248
  metadata:
249
249
  homepage_uri: https://lostisland.github.io/faraday
250
- changelog_uri: https://github.com/lostisland/faraday/releases/tag/v1.5.0
250
+ changelog_uri: https://github.com/lostisland/faraday/releases/tag/v1.5.1
251
251
  source_code_uri: https://github.com/lostisland/faraday
252
252
  bug_tracker_uri: https://github.com/lostisland/faraday/issues
253
253
  post_install_message: