spix_parser 1.7.9 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -22,10 +22,10 @@ class RedirectFollower
|
|
22
22
|
|
23
23
|
protected
|
24
24
|
def self.redirect_url(response)
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
25
|
+
case response['location'].strip
|
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) << "/")])
|
28
|
+
else response['location']
|
29
29
|
end
|
30
30
|
end
|
31
|
-
end
|
31
|
+
end
|
data/lib/spix_parser/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: spix_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.
|
5
|
+
version: 1.8.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Marcio Lopes de Faria
|
@@ -11,7 +11,7 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date:
|
14
|
+
date: 2012-01-19 00:00:00 -02:00
|
15
15
|
default_executable:
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|