zipline 1.3.2 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zipline/version.rb +1 -1
- data/lib/zipline.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a6443ee4c55b4c4d623364d8042bb47f8bdea691f23fb2d5261784826e69ec6
|
4
|
+
data.tar.gz: 0d82621fb810a72c1c4ebb8bb8f0bd7b1cebd3d237a8809068d16f2b3ee8eb63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c5d8ba560e1d17db8207c1e99a5fefa31c59254cc3e55cb876c92a9685ebe9f9351b42c8ee815580bd9dc9e8a18c2c4fd0f5959caacda1450e7a830e3e35060
|
7
|
+
data.tar.gz: b075c04c1f16663dd3e71d650cdd1866cb588f2c88eb25319f79872845fb31fc99055bed1be5a6bc59a7412e21d99a1cee1bb8da40aa8d12376b8c45903c27d9
|
data/lib/zipline/version.rb
CHANGED
data/lib/zipline.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require "zipline/version"
|
2
2
|
require 'zip_tricks'
|
3
3
|
require "zipline/zip_generator"
|
4
|
+
require 'uri'
|
4
5
|
|
5
6
|
# class MyController < ApplicationController
|
6
7
|
# include Zipline
|
@@ -13,7 +14,7 @@ require "zipline/zip_generator"
|
|
13
14
|
module Zipline
|
14
15
|
def zipline(files, zipname = 'zipline.zip')
|
15
16
|
zip_generator = ZipGenerator.new(files)
|
16
|
-
headers['Content-Disposition'] = "attachment; filename=\"#{zipname.gsub '"', '\"'}\""
|
17
|
+
headers['Content-Disposition'] = "attachment; filename=\"#{zipname.gsub '"', '\"'}\"; filename*=UTF-8''#{URI.encode_www_form_component(zipname)}"
|
17
18
|
headers['Content-Type'] = Mime::Type.lookup_by_extension('zip').to_s
|
18
19
|
response.sending_file = true
|
19
20
|
response.cache_control[:public] ||= false
|