down 2.4.0 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/down.rb +3 -2
- data/lib/down/version.rb +1 -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: 5d380969c82066f3432f7d4cfa57f14f6e5beceb
|
|
4
|
+
data.tar.gz: 81b21c1c687cc822c783672a59c2865bfec121a1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0ac4b0b07f2b5c2cae6d23ac5cb03d11ebd4876d7b4cba042cdef5d74d74731ce41d47b83645c462c348a0e8b031f4e56b7ffba77198dc52ff65aaa258c0e816
|
|
7
|
+
data.tar.gz: 1365d6e74dfc0679fa131b50418f92676144512d10a6552bfffdd5f3633e4a2ca08539c865ee3d55fe28870dc39005d960e33bd65affcaa378695726d445118f
|
data/lib/down.rb
CHANGED
|
@@ -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="([^"]
|
|
171
|
-
filename
|
|
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
|
data/lib/down/version.rb
CHANGED
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.
|
|
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-
|
|
11
|
+
date: 2017-03-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|