zip_tricks 4.5.2 → 4.6.0
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/.rubocop.yml +6 -78
- data/.travis.yml +8 -4
- data/CHANGELOG.md +14 -2
- data/CODE_OF_CONDUCT.md +46 -0
- data/CONTRIBUTING.md +151 -0
- data/README.md +1 -1
- data/bench/buffered_crc32_bench.rb +111 -0
- data/examples/rack_application.rb +1 -1
- data/lib/zip_tricks/file_reader.rb +104 -126
- data/lib/zip_tricks/remote_io.rb +2 -6
- data/lib/zip_tricks/stream_crc32.rb +2 -16
- data/lib/zip_tricks/streamer.rb +29 -16
- data/lib/zip_tricks/streamer/deflated_writer.rb +34 -11
- data/lib/zip_tricks/streamer/entry.rb +0 -1
- data/lib/zip_tricks/streamer/stored_writer.rb +21 -8
- data/lib/zip_tricks/version.rb +1 -1
- data/lib/zip_tricks/write_buffer.rb +49 -0
- data/lib/zip_tricks/zip_writer.rb +138 -132
- data/qa/README_QA.md +16 -0
- data/{testing → qa}/generate_test_files.rb +0 -0
- data/{testing → qa}/in/VTYL8830.jpg +0 -0
- data/{testing → qa}/in/war-and-peace.txt +0 -0
- data/{testing → qa}/support.rb +3 -3
- data/{testing → qa}/test-report-2016-07-28.txt +0 -0
- data/{testing → qa}/test-report-2016-12-12.txt +0 -0
- data/{testing → qa}/test-report-2017-04-2.txt +0 -0
- data/{testing → qa}/test-report.txt +0 -0
- data/zip_tricks.gemspec +2 -3
- metadata +33 -16
- data/.rubocop_todo.yml +0 -43
- data/testing/README_TESTING.md +0 -12
data/qa/README_QA.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
## Manual testing harness for ZipTricks
|
2
|
+
|
3
|
+
These tests will generate **very large** files that test various edge cases of ZIP generation. The idea is to generate
|
4
|
+
these files and to then try to open them with the unarchiver applications we support. The workflow is as follows:
|
5
|
+
|
6
|
+
|
7
|
+
1. Configure your storage to have `zip_tricks` directory linked into your virtual machines and to be on a fast volume (SSD RAID0 is recommended)
|
8
|
+
2. Run `generate_test_files.rb`. This will take some time and produce a number of large ZIP files.
|
9
|
+
3. Open them with the following ZIP unarchivers:
|
10
|
+
* A recent version of `zipinfo` with the `-tlhvz` flags - to see the information about the file
|
11
|
+
* ArchiveUtility on OSX
|
12
|
+
* The Unarchiver on OSX
|
13
|
+
* Built-in Explorer on Windows 7
|
14
|
+
* 7Zip 9.20 on Windows 7
|
15
|
+
* Any other unarchivers you consider necessary
|
16
|
+
* Write down your observations in `test-report.txt` and, when cutting a release, timestamp a copy of that file.
|
File without changes
|
File without changes
|
File without changes
|
data/{testing → qa}/support.rb
RENAMED
@@ -40,9 +40,9 @@ def build_test(test_description)
|
|
40
40
|
$tests_performed += 1
|
41
41
|
|
42
42
|
test_file_base = test_description.downcase.delete('-').gsub(/[\s\:]+/, '_')
|
43
|
-
filename =
|
43
|
+
filename = '%<tests_performed>02d-%<test_file>s.zip' % {tests_number: $tests_performed, test_file: test_file_base}
|
44
44
|
|
45
|
-
puts
|
45
|
+
puts 'Test %<tests_number>02d: %<description>s' % {tests_number: $tests_performed, description: test_description}
|
46
46
|
puts filename
|
47
47
|
puts ''
|
48
48
|
|
@@ -75,7 +75,7 @@ def prepare_test_protocol
|
|
75
75
|
f.puts ''
|
76
76
|
table = Terminal::Table.new title: platform_name, headings: %w[Test Outcome]
|
77
77
|
$test_descs.each_with_index do |desc, i|
|
78
|
-
test_name = [desc.filename,
|
78
|
+
test_name = [desc.filename, '%<title>s' % {title: desc.title}].join("\n")
|
79
79
|
outcome = ' ' * 64
|
80
80
|
table << [test_name, outcome]
|
81
81
|
table << :separator if i < ($test_descs.length - 1)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/zip_tricks.gemspec
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
1
|
lib = File.expand_path('../lib', __FILE__)
|
4
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
3
|
require 'zip_tricks/version'
|
@@ -41,6 +39,7 @@ Gem::Specification.new do |spec|
|
|
41
39
|
spec.add_development_dependency 'rspec', '~> 3'
|
42
40
|
spec.add_development_dependency 'complexity_assert'
|
43
41
|
spec.add_development_dependency 'coderay'
|
42
|
+
spec.add_development_dependency 'benchmark-ips'
|
44
43
|
spec.add_development_dependency 'yard', '~> 0.9'
|
45
|
-
spec.add_development_dependency '
|
44
|
+
spec.add_development_dependency 'wetransfer_style', '0.5.0'
|
46
45
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zip_tricks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julik Tarkhanov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -136,6 +136,20 @@ dependencies:
|
|
136
136
|
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: benchmark-ips
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
name: yard
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -151,19 +165,19 @@ dependencies:
|
|
151
165
|
- !ruby/object:Gem::Version
|
152
166
|
version: '0.9'
|
153
167
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
168
|
+
name: wetransfer_style
|
155
169
|
requirement: !ruby/object:Gem::Requirement
|
156
170
|
requirements:
|
157
171
|
- - '='
|
158
172
|
- !ruby/object:Gem::Version
|
159
|
-
version: 0.
|
173
|
+
version: 0.5.0
|
160
174
|
type: :development
|
161
175
|
prerelease: false
|
162
176
|
version_requirements: !ruby/object:Gem::Requirement
|
163
177
|
requirements:
|
164
178
|
- - '='
|
165
179
|
- !ruby/object:Gem::Version
|
166
|
-
version: 0.
|
180
|
+
version: 0.5.0
|
167
181
|
description: Stream out ZIP files from Ruby
|
168
182
|
email:
|
169
183
|
- me@julik.nl
|
@@ -176,15 +190,17 @@ files:
|
|
176
190
|
- ".gitignore"
|
177
191
|
- ".rspec"
|
178
192
|
- ".rubocop.yml"
|
179
|
-
- ".rubocop_todo.yml"
|
180
193
|
- ".travis.yml"
|
181
194
|
- ".yardopts"
|
182
195
|
- CHANGELOG.md
|
196
|
+
- CODE_OF_CONDUCT.md
|
197
|
+
- CONTRIBUTING.md
|
183
198
|
- Gemfile
|
184
199
|
- IMPLEMENTATION_DETAILS.md
|
185
200
|
- LICENSE.txt
|
186
201
|
- README.md
|
187
202
|
- Rakefile
|
203
|
+
- bench/buffered_crc32_bench.rb
|
188
204
|
- examples/archive_size_estimate.rb
|
189
205
|
- examples/config.ru
|
190
206
|
- examples/parallel_compression_with_block_deflate.rb
|
@@ -209,16 +225,17 @@ files:
|
|
209
225
|
- lib/zip_tricks/streamer/writable.rb
|
210
226
|
- lib/zip_tricks/version.rb
|
211
227
|
- lib/zip_tricks/write_and_tell.rb
|
228
|
+
- lib/zip_tricks/write_buffer.rb
|
212
229
|
- lib/zip_tricks/zip_writer.rb
|
213
|
-
-
|
214
|
-
-
|
215
|
-
-
|
216
|
-
-
|
217
|
-
-
|
218
|
-
-
|
219
|
-
-
|
220
|
-
-
|
221
|
-
-
|
230
|
+
- qa/README_QA.md
|
231
|
+
- qa/generate_test_files.rb
|
232
|
+
- qa/in/VTYL8830.jpg
|
233
|
+
- qa/in/war-and-peace.txt
|
234
|
+
- qa/support.rb
|
235
|
+
- qa/test-report-2016-07-28.txt
|
236
|
+
- qa/test-report-2016-12-12.txt
|
237
|
+
- qa/test-report-2017-04-2.txt
|
238
|
+
- qa/test-report.txt
|
222
239
|
- zip_tricks.gemspec
|
223
240
|
homepage: http://github.com/wetransfer/zip_tricks
|
224
241
|
licenses: []
|
@@ -240,7 +257,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
240
257
|
version: '0'
|
241
258
|
requirements: []
|
242
259
|
rubyforge_project:
|
243
|
-
rubygems_version: 2.
|
260
|
+
rubygems_version: 2.4.5.1
|
244
261
|
signing_key:
|
245
262
|
specification_version: 4
|
246
263
|
summary: Stream out ZIP files from Ruby
|
data/.rubocop_todo.yml
DELETED
@@ -1,43 +0,0 @@
|
|
1
|
-
# This configuration was generated by
|
2
|
-
# `rubocop --auto-gen-config`
|
3
|
-
# on 2017-09-11 13:38:55 +0200 using RuboCop version 0.49.1.
|
4
|
-
# The point is for the user to remove these configuration records
|
5
|
-
# one by one as the offenses are removed from the code base.
|
6
|
-
# Note that changes in the inspected code, or installation of new
|
7
|
-
# versions of RuboCop, may require this file to be generated again.
|
8
|
-
|
9
|
-
# Offense count: 6
|
10
|
-
Lint/UselessAssignment:
|
11
|
-
Exclude:
|
12
|
-
- 'lib/zip_tricks/streamer.rb'
|
13
|
-
- 'spec/zip_tricks/block_deflate_spec.rb'
|
14
|
-
- 'spec/zip_tricks/file_reader_spec.rb'
|
15
|
-
- 'spec/zip_tricks/remote_uncap_spec.rb'
|
16
|
-
- 'spec/zip_tricks/stream_crc32_spec.rb'
|
17
|
-
- 'spec/zip_tricks/streamer_spec.rb'
|
18
|
-
|
19
|
-
# Offense count: 1
|
20
|
-
Metrics/PerceivedComplexity:
|
21
|
-
Max: 8
|
22
|
-
|
23
|
-
# Offense count: 4
|
24
|
-
Style/Documentation:
|
25
|
-
Exclude:
|
26
|
-
- 'spec/**/*'
|
27
|
-
- 'test/**/*'
|
28
|
-
- 'lib/zip_tricks/block_deflate.rb'
|
29
|
-
- 'lib/zip_tricks/block_write.rb'
|
30
|
-
- 'lib/zip_tricks/file_reader.rb'
|
31
|
-
- 'lib/zip_tricks/streamer/deflated_writer.rb'
|
32
|
-
|
33
|
-
# Offense count: 1
|
34
|
-
# Configuration parameters: MinBodyLength.
|
35
|
-
Style/GuardClause:
|
36
|
-
Exclude:
|
37
|
-
- 'lib/zip_tricks/file_reader.rb'
|
38
|
-
|
39
|
-
# Offense count: 2
|
40
|
-
Style/StructInheritance:
|
41
|
-
Exclude:
|
42
|
-
- 'lib/zip_tricks/streamer/entry.rb'
|
43
|
-
- 'spec/zip_tricks/zip_writer_spec.rb'
|
data/testing/README_TESTING.md
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
## The _actual_ testing for ZipTricks
|
2
|
-
|
3
|
-
Consists of a fairly straightforward procedure.
|
4
|
-
|
5
|
-
1. Run `generate_test_files.rb`. This will take some time and produce a number of ZIP files.
|
6
|
-
2. Open them with the following ZIP unarchivers:
|
7
|
-
* A recent version of `zipinfo` with the `-tlhvz` flags - to see the information about the file
|
8
|
-
* ArchiveUtility on OSX
|
9
|
-
* The Unarchiver on OSX
|
10
|
-
* Built-in Explorer on Windows 7
|
11
|
-
* 7Zip 9.20 on Windows 7
|
12
|
-
* Write down your observations in `test-report.txt` and, when cutting a release, timestamp a copy of that file.
|