zipline 1.3.1 → 1.4.1

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: 235a7a580ab0b56077afa5988027ff16a1aa35d2ea786bd4898667be9a8e1fbf
4
- data.tar.gz: e47202054d22fb3ee17f5654b96f3c57459a3d74d5909054a33daf04d81daff5
3
+ metadata.gz: b56c703c9733a9c781d4d81eb83826a8de4a647238a83d9ade835fa034c8a84c
4
+ data.tar.gz: 0f1cd2b80086cb0a3fcd572aa18d03f03228820870f93b8ec9da7cb6591c165c
5
5
  SHA512:
6
- metadata.gz: 7aa960fbfb21cae472a07be2526723c8e2a65b36b58f3f058155284a7fc05447af5bba1e9fa4ea07e1a782c87cc66e264822b20d2b1ec810df90826435935d7d
7
- data.tar.gz: f0847312034235655413363adbb8f7547c32040df71cf61a10bbed8977c215c38d40652552ca0ab0887e4f2c87df7528fb3f38f6783defd631d19d30f5e70572
6
+ metadata.gz: 0b97a0e674b144d21eeacf5ed955dcf1e62639479f63e73c988d405d3ed707c8d45e64f33bf3bb98eeebc4fabeacf991f2e60c5c23367152a677e2a9e616e43c
7
+ data.tar.gz: e54fb0c40ad64959b1c1965a45312aafa5fe0fa6547d626f54795dab8027c0208a4550589fb933266620c0e00d98eb1685daede1b3395539da81f2bf24887a85
@@ -0,0 +1,27 @@
1
+ name: Tests
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ test:
7
+ name: Test (${{ matrix.ruby-version }})
8
+ runs-on: ubuntu-latest
9
+
10
+ strategy:
11
+ fail-fast: false
12
+ matrix:
13
+ ruby-version:
14
+ - head
15
+ - '3.1'
16
+ - '3.0'
17
+ - '2.7'
18
+
19
+ steps:
20
+ - uses: actions/checkout@v2
21
+ - name: Set up Ruby ${{ matrix.ruby-version }}
22
+ uses: ruby/setup-ruby@v1
23
+ with:
24
+ ruby-version: ${{ matrix.ruby-version }}
25
+ bundler-cache: true # 'bundle install' and cache
26
+ - name: Run tests
27
+ run: bundle exec rake
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Zipline
2
- [![Build Status](https://travis-ci.org/fringd/zipline.svg?branch=master)](https://travis-ci.org/fringd/zipline)
2
+ [![Tests](https://github.com/fringd/zipline/actions/workflows/ci.yml/badge.svg)](https://github.com/fringd/zipline/actions/workflows/ci.yml)
3
3
  [![Gem Version](https://badge.fury.io/rb/zipline.svg)](https://badge.fury.io/rb/zipline)
4
4
 
5
5
  A gem to stream dynamically generated zip files from a rails application. Unlike other solutions that generate zips for user download, zipline does not wait for the entire zip file to be created (or even for the entire input file in the cloud to be downloaded) before it begins sending the zip file to the user. It does this by never seeking backwards during zip creation, and streaming the zip file over http as it is constructed. The advantages of this are:
@@ -1,3 +1,3 @@
1
1
  module Zipline
2
- VERSION = "1.3.1"
2
+ VERSION = "1.4.1"
3
3
  end
data/lib/zipline.rb CHANGED
@@ -1,3 +1,4 @@
1
+ require 'content_disposition'
1
2
  require "zipline/version"
2
3
  require 'zip_tricks'
3
4
  require "zipline/zip_generator"
@@ -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'] = ContentDisposition.format(disposition: 'attachment', filename: 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
data/zipline.gemspec CHANGED
@@ -16,6 +16,12 @@ Gem::Specification.new do |gem|
16
16
  gem.version = Zipline::VERSION
17
17
  gem.licenses = ['MIT']
18
18
 
19
- gem.add_dependency 'actionpack', ['>= 3.2.1', '< 7.0']
19
+ gem.required_ruby_version = ">= 2.7"
20
+
21
+ gem.add_dependency 'actionpack', ['>= 6.0', '< 8.0']
22
+ gem.add_dependency 'content_disposition', '~> 1.0'
20
23
  gem.add_dependency 'zip_tricks', ['>= 4.2.1', '< 6.0']
24
+
25
+ # https://github.com/rspec/rspec-mocks/issues/1457
26
+ gem.add_development_dependency 'rspec-mocks', ['~> 3.10', '!= 3.10.3']
21
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zipline
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ram Dobson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-29 00:00:00.000000000 Z
11
+ date: 2022-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
@@ -16,20 +16,34 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 3.2.1
19
+ version: '6.0'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '7.0'
22
+ version: '8.0'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 3.2.1
29
+ version: '6.0'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '7.0'
32
+ version: '8.0'
33
+ - !ruby/object:Gem::Dependency
34
+ name: content_disposition
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '1.0'
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '1.0'
33
47
  - !ruby/object:Gem::Dependency
34
48
  name: zip_tricks
35
49
  requirement: !ruby/object:Gem::Requirement
@@ -50,6 +64,26 @@ dependencies:
50
64
  - - "<"
51
65
  - !ruby/object:Gem::Version
52
66
  version: '6.0'
67
+ - !ruby/object:Gem::Dependency
68
+ name: rspec-mocks
69
+ requirement: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - "~>"
72
+ - !ruby/object:Gem::Version
73
+ version: '3.10'
74
+ - - "!="
75
+ - !ruby/object:Gem::Version
76
+ version: 3.10.3
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: '3.10'
84
+ - - "!="
85
+ - !ruby/object:Gem::Version
86
+ version: 3.10.3
53
87
  description: a module for streaming dynamically generated zip files
54
88
  email:
55
89
  - ram.dobson@solsystemscompany.com
@@ -57,7 +91,7 @@ executables: []
57
91
  extensions: []
58
92
  extra_rdoc_files: []
59
93
  files:
60
- - ".travis.yml"
94
+ - ".github/workflows/ci.yml"
61
95
  - Gemfile
62
96
  - LICENSE
63
97
  - README.md
@@ -81,7 +115,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
81
115
  requirements:
82
116
  - - ">="
83
117
  - !ruby/object:Gem::Version
84
- version: '0'
118
+ version: '2.7'
85
119
  required_rubygems_version: !ruby/object:Gem::Requirement
86
120
  requirements:
87
121
  - - ">="
data/.travis.yml DELETED
@@ -1,8 +0,0 @@
1
- language: ruby
2
- cache: bundler
3
- rvm:
4
- - 2.4
5
- - 2.5
6
- - 2.6
7
- - 2.7
8
- - 3.0