url_fetcher 1.1.1 → 1.1.2
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 +2 -1
- 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: dc714df3af393f211fd3e12077866febbf042207
|
4
|
+
data.tar.gz: ba8d4c2950a2e578337f9b39e816c16638078bf1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c6ab837a920bf0e01b637e07c2e8b08ae35db374649e1d0743afdd2e82981eb1c2b300c31e6cec6e9bc53197d9d49a853de366e40a1c19a23152b995c2bcdfe
|
7
|
+
data.tar.gz: 1edfda68b43d76138e98d37ea4715077f374c95f042f025706181f60e0b250ac3932b3936b9c7262e7281c16cfa9929c423e9e138375eb69db26f0575d665923
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.2
|
data/lib/url_fetcher.rb
CHANGED
@@ -99,7 +99,8 @@ class UrlFetcher
|
|
99
99
|
if resp.is_a?(Net::HTTPSuccess) && resp.class.body_permitted?
|
100
100
|
content_length = resp["Content-Length"].to_i
|
101
101
|
raise FileTooBig.new(content_length) if content_length > (options[:max_size] || 10 * MEGABYTE)
|
102
|
-
|
102
|
+
ext = File.extname(url)
|
103
|
+
tempfile = Tempfile.new(["url_fetcher", ext], :encoding => 'ascii-8bit')
|
103
104
|
resp.read_body(tempfile)
|
104
105
|
tempfile.rewind
|
105
106
|
end
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- weheartit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|