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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/url_fetcher.rb +3 -2
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c794bbb0e5f14e745c068206d4bd5048d74639d3
4
- data.tar.gz: e4c54f1ab416f770ab2ad05a03d1c550cbd8f515
3
+ metadata.gz: 32494b5b29e118d6dffacb4b123e90aa1da50795
4
+ data.tar.gz: 19981639b3c1206540c1f584d3e34537e64d5170
5
5
  SHA512:
6
- metadata.gz: da2341763cf4dd5330d82e8fb51c3a7e3bf085d300a3fd8ca5e25b22d87755a8abda96d681af1cc1721dabea2ec451512fcd228c20018fae750ab72b0711c0e0
7
- data.tar.gz: 46e0a977894500b1247913fe65a3acffb04cf9587fac64fa5005f0ee0fc34192a235bc88afec157d0a6af8a81295e4c2ad12b8717d32e586a484a7589a4dd520
6
+ metadata.gz: 15b7108d62ece1765797169e2aa776c7fbbe0656b9ef693a1579dc7b8979e29d3b4375e0d56b9b1407d4a3fa9cd55cc66d138a173a192be7e7f8501aa04bb02a
7
+ data.tar.gz: 28a1b5adc3962cd66b1b5e4b39f6c96513f4ad7d01fc814777a1567023daab9ee8fdd16365041e7bb357a2e128a41347132e2e1fed7b33198a72af43becedd1b
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.4
1
+ 1.1.5
@@ -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
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-03-30 00:00:00.000000000 Z
11
+ date: 2016-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable