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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b817672135a701f0f20b0fdfdb59404e7328eb20f2d7bc2177fedc02c23905e
4
- data.tar.gz: 50cb1d70a9a08d9fad93e08283706419bd6c1b372eb65fc9820d5d30cf3eec07
3
+ metadata.gz: 2a6443ee4c55b4c4d623364d8042bb47f8bdea691f23fb2d5261784826e69ec6
4
+ data.tar.gz: 0d82621fb810a72c1c4ebb8bb8f0bd7b1cebd3d237a8809068d16f2b3ee8eb63
5
5
  SHA512:
6
- metadata.gz: 18943a6b1515d8747dbb7a748963645655c3fb260b6b45e387938eb4e3c7619a73afd0563fd695060d60986f2e8a7ae09b0195791be3354e5e5ad07a0acc4124
7
- data.tar.gz: f27c6da446d0d0fe8ce3386a2a6bc53a23c5444c77fa3e2e64dadfada172b277af156719d6031774812573056e69b7bfa4133d11a3f7bcf46e73caa737afda6c
6
+ metadata.gz: 3c5d8ba560e1d17db8207c1e99a5fefa31c59254cc3e55cb876c92a9685ebe9f9351b42c8ee815580bd9dc9e8a18c2c4fd0f5959caacda1450e7a830e3e35060
7
+ data.tar.gz: b075c04c1f16663dd3e71d650cdd1866cb588f2c88eb25319f79872845fb31fc99055bed1be5a6bc59a7412e21d99a1cee1bb8da40aa8d12376b8c45903c27d9
@@ -1,3 +1,3 @@
1
1
  module Zipline
2
- VERSION = "1.3.2"
2
+ VERSION = "1.4.0"
3
3
  end
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zipline
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ram Dobson