faraday 1.3.0 → 1.3.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: f907e999805c78e8c2e77cb4d6b29a0a6f8fd8fe1a7df9930f02be7ec113a630
4
- data.tar.gz: 1ceac7f2b44d41d11d1ad3f7642daea9198ba3ac2f71a4932cf7d6b7b867f704
3
+ metadata.gz: f9d5c03389960019760f7f65d5546b799c93d2fcc810ed26c3c6a859a0716586
4
+ data.tar.gz: faf33941683ee46c907dad01243f5be4ca60fe46336bbfcf9e534afa7bfc74e3
5
5
  SHA512:
6
- metadata.gz: 2eaf54d743ed3d7554fb2be17003e81b08c060582f140b06fb55e8aceb7dfcf2428e898f47f3760eddcdb4ad64aeaacc93916672b9ed10fa4a004d0ea1a20e1a
7
- data.tar.gz: a700f0bc8999e9a0152843bbfbd23001fa23931614ae9573b13ff839e7af01f38ca2adbb01c82e4b387688496b3caff87357e3946d7500595a2f807313e177d7
6
+ metadata.gz: 67bea3c978d5e531a47513b81f56f144ccd696ee0adf67ea14b2198ed29ea809cf0dd1223c400feef67688af10db8b9a8abd239cb284c111300a420190aef9a4
7
+ data.tar.gz: a520bc7078beb472b43f963921040230ab29d14b7df138a85bc3fce77f1cbfc5c74f2d41a380ad9821b7d0cffa9f3d3c03448a258ecaa7c6dfbb993df02ac3e9
data/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # Faraday Changelog
2
2
 
3
+ ## [v1.3.0](https://github.com/lostisland/faraday/releases/tag/v1.3.0) (2020-12-31)
4
+
5
+ ### Highlights
6
+ Faraday v1.3.0 is the first release to officially support Ruby 3.0 in the CI pipeline 🎉 🍾!
7
+
8
+ This is also the first release with a previously "included" adapter (Net::HTTP) being isolated into a [separate gem](https://github.com/lostisland/faraday-net_http) 🎊!
9
+ The new adapter is added to Faraday as a dependency for now, so that means full backwards-compatibility, but just to be safe be careful when upgrading!
10
+
11
+ This is a huge step towards are Faraday v2.0 objective of pushing adapters and middleware into separate gems.
12
+ Many thanks to the Faraday Team, @JanDintel and everyone who attended the [ROSS Conf remote event](https://www.rossconf.io/event/remote/)
13
+
14
+ ### Features
15
+
16
+ * Improves consistency with Faraday::Error and Faraday::RaiseError (#1229, @qsona, @iMacTia)
17
+
18
+ ### Fixes
19
+
20
+ * Don't assign to global ::Timer (#1227, @bpo)
21
+
22
+ ### Documentation
23
+
24
+ * CHANGELOG: add releases after 1.0 (#1225, @olleolleolle)
25
+ * Improves retry middleware documentation. (#1228, @iMacTia)
26
+
27
+ ### Misc
28
+
29
+ * Move out Net::HTTP adapter (#1222, @JanDintel, @iMacTia)
30
+ * Adds Ruby 3.0 to CI Matrix (#1226, @iMacTia)
31
+
32
+
3
33
  ## [v1.2.0](https://github.com/lostisland/faraday/releases/tag/v1.2.0) (2020-12-23)
4
34
 
5
35
  ### Features
data/README.md CHANGED
@@ -47,7 +47,7 @@ But before you start coding, please read our [Contributing Guide][contributing]
47
47
  [website]: https://lostisland.github.io/faraday
48
48
  [faraday_team]: https://lostisland.github.io/faraday/team
49
49
  [contributing]: https://github.com/lostisland/faraday/blob/master/.github/CONTRIBUTING.md
50
- [apidoc]: http://www.rubydoc.info/gems/faraday
50
+ [apidoc]: https://www.rubydoc.info/github/lostisland/faraday
51
51
  [actions]: https://github.com/lostisland/faraday/actions
52
52
  [jruby]: http://jruby.org/
53
53
  [rubinius]: http://rubini.us/
@@ -522,6 +522,7 @@ module Faraday
522
522
  base = base.dup
523
523
  base.path = "#{base.path}/" # ensure trailing slash
524
524
  end
525
+ url = url && URI.parse(url.to_s).opaque ? url.to_s.gsub(':', '%3A') : url
525
526
  uri = url ? base + url : base
526
527
  if params
527
528
  uri.query = params.to_query(params_encoder || options.params_encoder)
@@ -576,7 +577,7 @@ module Faraday
576
577
  case url
577
578
  when String
578
579
  uri = Utils.URI(url)
579
- uri = URI.parse("#{uri.scheme}://#{uri.hostname}").find_proxy
580
+ uri = URI.parse("#{uri.scheme}://#{uri.host}").find_proxy
580
581
  when URI
581
582
  uri = url.find_proxy
582
583
  when nil
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Faraday
4
- VERSION = '1.3.0'
4
+ VERSION = '1.3.1'
5
5
  end
@@ -18,6 +18,13 @@ shared_examples 'initializer with url' do
18
18
  it { expect(subject.path_prefix).to eq('/fish') }
19
19
  it { expect(subject.params).to eq('a' => '1') }
20
20
  end
21
+
22
+ context 'with IPv6 address' do
23
+ let(:address) { 'http://[::1]:85/' }
24
+
25
+ it { expect(subject.host).to eq('[::1]') }
26
+ it { expect(subject.port).to eq(85) }
27
+ end
21
28
  end
22
29
 
23
30
  shared_examples 'default connection options' do
@@ -270,6 +277,29 @@ RSpec.describe Faraday::Connection do
270
277
  expect(uri.to_s).to eq('http://sushi.com/sake/')
271
278
  end
272
279
  end
280
+
281
+ context 'with colon in path' do
282
+ let(:url) { 'http://service.com' }
283
+
284
+ it 'joins url to base when used absolute path' do
285
+ conn = Faraday.new(url: url)
286
+ uri = conn.build_exclusive_url('/service:search?limit=400')
287
+ expect(uri.to_s).to eq('http://service.com/service:search?limit=400')
288
+ end
289
+
290
+ it 'joins url to base when used relative path' do
291
+ conn = Faraday.new(url: url)
292
+ uri = conn.build_exclusive_url('service:search?limit=400')
293
+ expect(uri.to_s).to eq('http://service.com/service%3Asearch?limit=400')
294
+ end
295
+
296
+ it 'joins url to base when used with path prefix' do
297
+ conn = Faraday.new(url: url)
298
+ conn.path_prefix = '/api'
299
+ uri = conn.build_exclusive_url('service:search?limit=400')
300
+ expect(uri.to_s).to eq('http://service.com/api/service%3Asearch?limit=400')
301
+ end
302
+ end
273
303
  end
274
304
 
275
305
  describe '#build_url' do
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.3.0
4
+ version: 1.3.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: 2020-12-31 00:00:00.000000000 Z
13
+ date: 2021-04-16 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: faraday-net_http
@@ -52,14 +52,14 @@ dependencies:
52
52
  requirements:
53
53
  - - ">="
54
54
  - !ruby/object:Gem::Version
55
- version: '0'
55
+ version: 0.0.4
56
56
  type: :runtime
57
57
  prerelease: false
58
58
  version_requirements: !ruby/object:Gem::Requirement
59
59
  requirements:
60
60
  - - ">="
61
61
  - !ruby/object:Gem::Version
62
- version: '0'
62
+ version: 0.0.4
63
63
  description:
64
64
  email: technoweenie@gmail.com
65
65
  executables: []
@@ -172,7 +172,7 @@ licenses:
172
172
  - MIT
173
173
  metadata:
174
174
  homepage_uri: https://lostisland.github.io/faraday
175
- changelog_uri: https://github.com/lostisland/faraday/releases/tag/v1.3.0
175
+ changelog_uri: https://github.com/lostisland/faraday/releases/tag/v1.3.1
176
176
  source_code_uri: https://github.com/lostisland/faraday
177
177
  bug_tracker_uri: https://github.com/lostisland/faraday/issues
178
178
  post_install_message:
@@ -191,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
191
191
  - !ruby/object:Gem::Version
192
192
  version: '0'
193
193
  requirements: []
194
- rubygems_version: 3.0.3
194
+ rubygems_version: 3.0.3.1
195
195
  signing_key:
196
196
  specification_version: 4
197
197
  summary: HTTP/REST API client library.