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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/url_fetcher.rb +2 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2dbde7a27d7e7441e8d696b19abd92a5620d16b5
4
- data.tar.gz: c529f146d8d639c192628be85e572483101e74be
3
+ metadata.gz: dc714df3af393f211fd3e12077866febbf042207
4
+ data.tar.gz: ba8d4c2950a2e578337f9b39e816c16638078bf1
5
5
  SHA512:
6
- metadata.gz: 73b5811701f57cb071bfca879d84f5fcf04f55033133bf9080312127648dc6c6b3c4ee118ef1dbfffe411644a80a518d33fedceb2bdbe9708ca771513e53790c
7
- data.tar.gz: 09f1118945a849e0fda4e58bd1946fa70546e6bba8af63d4e51ab7e3419ff5a6b7aa47080adef7c5631c09edb72685bbdf2199beb7a507375e12d174a29b7dee
6
+ metadata.gz: 3c6ab837a920bf0e01b637e07c2e8b08ae35db374649e1d0743afdd2e82981eb1c2b300c31e6cec6e9bc53197d9d49a853de366e40a1c19a23152b995c2bcdfe
7
+ data.tar.gz: 1edfda68b43d76138e98d37ea4715077f374c95f042f025706181f60e0b250ac3932b3936b9c7262e7281c16cfa9929c423e9e138375eb69db26f0575d665923
data/VERSION CHANGED
@@ -1 +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
- tempfile = Tempfile.new("url_fetcher", :encoding => 'ascii-8bit')
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.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-09-15 00:00:00.000000000 Z
11
+ date: 2015-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable