url_fetcher 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/url_fetcher.rb +3 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32494b5b29e118d6dffacb4b123e90aa1da50795
|
4
|
+
data.tar.gz: 19981639b3c1206540c1f584d3e34537e64d5170
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15b7108d62ece1765797169e2aa776c7fbbe0656b9ef693a1579dc7b8979e29d3b4375e0d56b9b1407d4a3fa9cd55cc66d138a173a192be7e7f8501aa04bb02a
|
7
|
+
data.tar.gz: 28a1b5adc3962cd66b1b5e4b39f6c96513f4ad7d01fc814777a1567023daab9ee8fdd16365041e7bb357a2e128a41347132e2e1fed7b33198a72af43becedd1b
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.5
|
data/lib/url_fetcher.rb
CHANGED
@@ -73,10 +73,11 @@ class UrlFetcher
|
|
73
73
|
end
|
74
74
|
|
75
75
|
previous_attempts << url
|
76
|
-
uri = URI(url)
|
76
|
+
uri = Addressable::URI.parse(url)
|
77
|
+
raise Addressable::URI::InvalidURIError.new(url) unless uri
|
77
78
|
@resolved_url = uri.to_s
|
78
79
|
|
79
|
-
http = Net::HTTP.new(uri.host, uri.port)
|
80
|
+
http = Net::HTTP.new(uri.host, uri.port || uri.inferred_port)
|
80
81
|
http.read_timeout = options[:read_timeout] || 20 # This is seconds. Default is 60.
|
81
82
|
http.open_timeout = options[:open_timeout] || 10
|
82
83
|
if uri.scheme == "https"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: url_fetcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- weheartit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|