excon-addressable 0.4.0 → 0.4.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
- SHA1:
3
- metadata.gz: ed1374c19ccc1979e364969ea6262bf59deb2846
4
- data.tar.gz: f461e8ba6d7648e9a1cc9d723e84c9a7f87a901e
2
+ SHA256:
3
+ metadata.gz: 7553f94acf861abf6285d55212a513e41bb6ad60cea79058281707d4ccca8416
4
+ data.tar.gz: e33954d373df18e7a0258c8881cb203d9fb036f8d8f43eef1d74f7e2f1bf61fc
5
5
  SHA512:
6
- metadata.gz: 537126c71f20fbbca455843a6ed84d912332af53818214c99edb40659c6d4776ed5aa3639eb935017b816a97ae34e6d074a0febd3e09a104aa40002b44be3086
7
- data.tar.gz: 97d46512f7f90a1805059f60440d8ad7faa15b908501223ac1f5cc4191bda123e925c67d91879f15ce40edf7f5af9dd48932bb40620e523b55ffeffda5e3a0e6
6
+ metadata.gz: 2605f2e146e80cf6be9132ccd0579e9ff2e7680c770ebc8535bd7412e23be17fe06b6652227857e98531e2b0cff5c23ab5342e037ccfd351e1305e5676ed685f
7
+ data.tar.gz: 350fc6b4b93a3be13c881c9b8dc6a7ef2394cade2f7d3f0ab82554f57b911544452aede2df901d1ca6714e81251c8878979351153b080f9383b56ceafa366037
@@ -0,0 +1,16 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6
+ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7
+
8
+ [Unreleased]: https://github.com/blendle/retry_reporting/compare/v0.1.3...HEAD
9
+ ## [Unreleased]
10
+
11
+ [0.4.1]: https://github.com/blendle/retry_reporting/compare/v0.4.0...v0.4.1
12
+ ## [0.4.1] - 2018-06-08
13
+
14
+ ### Changed
15
+
16
+ - Fixed a compatibility issue with Excon version 0.61 and later. [#3](https://github.com/blendle/excon-addressable/pull/3)
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- lib = File.expand_path('../lib', __FILE__)
3
+ lib = File.expand_path('lib', __dir__)
4
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
  require 'excon/addressable/version'
6
6
 
@@ -9,9 +9,9 @@ module Excon
9
9
  # @see : https://github.com/excon/excon/issues/384#issuecomment-42645517
10
10
  # @see : https://github.com/excon/excon/issues/384#issuecomment-362618298
11
11
  #
12
- class Parser
12
+ class Parser < ::Addressable::URI
13
13
  def self.parse(url)
14
- uri = ::Addressable::URI.parse(url)
14
+ uri = super
15
15
  uri.port = uri.inferred_port unless uri.port
16
16
  uri
17
17
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Excon
4
4
  module Addressable
5
- VERSION = '0.4.0'
5
+ VERSION = '0.4.1'
6
6
  end
7
7
  end
@@ -16,6 +16,8 @@ module Excon
16
16
  Excon.stub({ path: '/hello', query: 'message=world' }, body: 'hi!')
17
17
  Excon.stub({ path: '/hello', query: 'a=b&c=d' }, body: 'earth')
18
18
  Excon.stub({ path: '/world' }, body: 'universe')
19
+ Excon.stub({ path: '/foo' }, headers: { 'Location' => '/bar' }, body: 'no', status: 301)
20
+ Excon.stub({ path: '/bar' }, body: 'ok!', status: 200)
19
21
  end
20
22
 
21
23
  def test_expand_templated_uri
@@ -70,6 +72,15 @@ module Excon
70
72
  assert_equal 'earth', response.body
71
73
  end
72
74
 
75
+ def test_uri_with_redirect
76
+ response = Excon.get(
77
+ 'https://www.example.com/foo',
78
+ middlewares: Excon.defaults[:middlewares] + [Excon::Middleware::RedirectFollower]
79
+ )
80
+
81
+ assert_equal 'ok!', response.body
82
+ end
83
+
73
84
  def teardown
74
85
  Excon.stubs.clear
75
86
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
3
+ $LOAD_PATH.unshift File.expand_path('../lib', __dir__)
4
4
  require 'excon/addressable'
5
5
  require 'minitest/autorun'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: excon-addressable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-03-01 00:00:00.000000000 Z
12
+ date: 2018-06-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -119,6 +119,7 @@ files:
119
119
  - ".gitignore"
120
120
  - ".rubocop.yml"
121
121
  - ".wercker.yml"
122
+ - CHANGELOG.md
122
123
  - CODE_OF_CONDUCT.md
123
124
  - Gemfile
124
125
  - LICENSE.txt
@@ -150,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
150
151
  version: '0'
151
152
  requirements: []
152
153
  rubyforge_project:
153
- rubygems_version: 2.6.13
154
+ rubygems_version: 2.7.7
154
155
  signing_key:
155
156
  specification_version: 4
156
157
  summary: Excon, with Addressable baked in.