down 2.4.0 → 2.4.1

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/lib/down.rb +3 -2
  3. data/lib/down/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b9426b78a8ed3171bfc68908bb38bef667cc33d7
4
- data.tar.gz: 387a0922d85551ca4d9a481fc60a09ae58dde315
3
+ metadata.gz: 5d380969c82066f3432f7d4cfa57f14f6e5beceb
4
+ data.tar.gz: 81b21c1c687cc822c783672a59c2865bfec121a1
5
5
  SHA512:
6
- metadata.gz: 280c33064160408828309a8eb3cc14272ec56806d058f81a4ac8071d04daa9da294162577cffe1e0a3b284a5e32e79d910510fe27060fa3b52cce3ec1e6a1689
7
- data.tar.gz: 64d4a96f1f4e6da517fc8edebcf7f82a856a3778f14904f9b1ffec46a6a0711bdc78a990ae57946b9ed59d102e6870a6f140c001ee40d99f2171bff3ebcf1cb2
6
+ metadata.gz: 0ac4b0b07f2b5c2cae6d23ac5cb03d11ebd4876d7b4cba042cdef5d74d74731ce41d47b83645c462c348a0e8b031f4e56b7ffba77198dc52ff65aaa258c0e816
7
+ data.tar.gz: 1365d6e74dfc0679fa131b50418f92676144512d10a6552bfffdd5f3633e4a2ca08539c865ee3d55fe28870dc39005d960e33bd65affcaa378695726d445118f
@@ -167,8 +167,9 @@ module Down
167
167
 
168
168
  def filename_from_content_disposition
169
169
  content_disposition = meta["content-disposition"].to_s
170
- filename = content_disposition[/filename="([^"]+)"/, 1] || content_disposition[/filename=(.+)/, 1]
171
- filename && CGI.unescape(filename.strip)
170
+ filename = content_disposition[/filename="([^"]*)"/, 1] || content_disposition[/filename=(.+)/, 1]
171
+ filename = CGI.unescape(filename.to_s.strip)
172
+ filename unless filename.empty?
172
173
  end
173
174
 
174
175
  def filename_from_uri
@@ -1,3 +1,3 @@
1
1
  module Down
2
- VERSION = "2.4.0"
2
+ VERSION = "2.4.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: down
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Janko Marohnić
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-19 00:00:00.000000000 Z
11
+ date: 2017-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake