spix_parser 1.8.1 → 1.8.2

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.
@@ -21,10 +21,10 @@ class RedirectFollower
21
21
  end
22
22
 
23
23
  protected
24
- def self.redirect_url(response)
24
+ def self.redirect_url(response, url = "")
25
25
  case response['location'].strip
26
26
  when nil then response.body.match(/<a href=\"([^>]+)\">/i)[1]
27
- when %r{^/} then URI::Generic.build(Hash[[:scheme, :host, :path].zip(URI.parse(response['location']).select(:scheme, :host) << "/")]).to_s
27
+ when %r{^/} then URI::Generic.build(Hash[[:scheme, :host, :path].zip(URI.parse(url).select(:scheme, :host) << "/")]).to_s
28
28
  else response['location']
29
29
  end
30
30
  end
@@ -4,7 +4,7 @@ module Spix
4
4
  module Version
5
5
  MAJOR = 1
6
6
  MINOR = 8
7
- TINY = 1
7
+ TINY = 2
8
8
 
9
9
  def self.current_version
10
10
  "#{MAJOR}.#{MINOR}.#{TINY}"
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: spix_parser
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.8.1
5
+ version: 1.8.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Marcio Lopes de Faria