rubyzip 1.3.0 → 3.0.0.alpha
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/Changelog.md +368 -0
- data/README.md +123 -46
- data/Rakefile +13 -6
- data/lib/zip/central_directory.rb +166 -116
- data/lib/zip/compressor.rb +3 -1
- data/lib/zip/constants.rb +77 -21
- data/lib/zip/crypto/decrypted_io.rb +42 -0
- data/lib/zip/crypto/encryption.rb +4 -2
- data/lib/zip/crypto/null_encryption.rb +5 -3
- data/lib/zip/crypto/traditional_encryption.rb +14 -12
- data/lib/zip/decompressor.rb +21 -2
- data/lib/zip/deflater.rb +10 -8
- data/lib/zip/dirtyable.rb +32 -0
- data/lib/zip/dos_time.rb +53 -12
- data/lib/zip/entry.rb +306 -184
- data/lib/zip/entry_set.rb +11 -7
- data/lib/zip/errors.rb +115 -15
- data/lib/zip/extra_field/generic.rb +11 -17
- data/lib/zip/extra_field/ntfs.rb +8 -2
- data/lib/zip/extra_field/old_unix.rb +6 -2
- data/lib/zip/extra_field/universal_time.rb +45 -13
- data/lib/zip/extra_field/unix.rb +7 -3
- data/lib/zip/extra_field/unknown.rb +33 -0
- data/lib/zip/extra_field/zip64.rb +16 -7
- data/lib/zip/extra_field.rb +22 -26
- data/lib/zip/file.rb +196 -240
- data/lib/zip/file_split.rb +97 -0
- data/lib/zip/filesystem/dir.rb +86 -0
- data/lib/zip/filesystem/directory_iterator.rb +48 -0
- data/lib/zip/filesystem/file.rb +262 -0
- data/lib/zip/filesystem/file_stat.rb +110 -0
- data/lib/zip/filesystem/zip_file_name_mapper.rb +81 -0
- data/lib/zip/filesystem.rb +31 -584
- data/lib/zip/inflater.rb +27 -37
- data/lib/zip/input_stream.rb +67 -42
- data/lib/zip/ioextras/abstract_input_stream.rb +32 -16
- data/lib/zip/ioextras/abstract_output_stream.rb +5 -3
- data/lib/zip/ioextras.rb +7 -7
- data/lib/zip/null_compressor.rb +3 -1
- data/lib/zip/null_decompressor.rb +4 -10
- data/lib/zip/null_input_stream.rb +3 -1
- data/lib/zip/output_stream.rb +58 -43
- data/lib/zip/pass_thru_compressor.rb +5 -3
- data/lib/zip/pass_thru_decompressor.rb +16 -23
- data/lib/zip/streamable_directory.rb +6 -4
- data/lib/zip/streamable_stream.rb +9 -10
- data/lib/zip/version.rb +3 -1
- data/lib/zip.rb +19 -4
- data/rubyzip.gemspec +38 -0
- data/samples/example.rb +9 -4
- data/samples/example_filesystem.rb +3 -2
- data/samples/example_recursive.rb +3 -1
- data/samples/gtk_ruby_zip.rb +22 -20
- data/samples/qtzip.rb +12 -11
- data/samples/write_simple.rb +3 -4
- data/samples/zipfind.rb +24 -22
- metadata +86 -179
- data/TODO +0 -15
- data/lib/zip/extra_field/zip64_placeholder.rb +0 -15
- data/test/basic_zip_file_test.rb +0 -60
- data/test/case_sensitivity_test.rb +0 -69
- data/test/central_directory_entry_test.rb +0 -69
- data/test/central_directory_test.rb +0 -100
- data/test/crypto/null_encryption_test.rb +0 -57
- data/test/crypto/traditional_encryption_test.rb +0 -80
- data/test/data/WarnInvalidDate.zip +0 -0
- data/test/data/file1.txt +0 -46
- data/test/data/file1.txt.deflatedData +0 -0
- data/test/data/file2.txt +0 -1504
- data/test/data/globTest/foo/bar/baz/foo.txt +0 -0
- data/test/data/globTest/foo.txt +0 -0
- data/test/data/globTest/food.txt +0 -0
- data/test/data/globTest.zip +0 -0
- data/test/data/gpbit3stored.zip +0 -0
- data/test/data/mimetype +0 -1
- data/test/data/notzippedruby.rb +0 -7
- data/test/data/ntfs.zip +0 -0
- data/test/data/oddExtraField.zip +0 -0
- data/test/data/path_traversal/Makefile +0 -10
- data/test/data/path_traversal/jwilk/README.md +0 -5
- data/test/data/path_traversal/jwilk/absolute1.zip +0 -0
- data/test/data/path_traversal/jwilk/absolute2.zip +0 -0
- data/test/data/path_traversal/jwilk/dirsymlink.zip +0 -0
- data/test/data/path_traversal/jwilk/dirsymlink2a.zip +0 -0
- data/test/data/path_traversal/jwilk/dirsymlink2b.zip +0 -0
- data/test/data/path_traversal/jwilk/relative0.zip +0 -0
- data/test/data/path_traversal/jwilk/relative2.zip +0 -0
- data/test/data/path_traversal/jwilk/symlink.zip +0 -0
- data/test/data/path_traversal/relative1.zip +0 -0
- data/test/data/path_traversal/tilde.zip +0 -0
- data/test/data/path_traversal/tuzovakaoff/README.md +0 -3
- data/test/data/path_traversal/tuzovakaoff/absolutepath.zip +0 -0
- data/test/data/path_traversal/tuzovakaoff/symlink.zip +0 -0
- data/test/data/rubycode.zip +0 -0
- data/test/data/rubycode2.zip +0 -0
- data/test/data/test.xls +0 -0
- data/test/data/testDirectory.bin +0 -0
- data/test/data/zip64-sample.zip +0 -0
- data/test/data/zipWithDirs.zip +0 -0
- data/test/data/zipWithEncryption.zip +0 -0
- data/test/deflater_test.rb +0 -65
- data/test/encryption_test.rb +0 -42
- data/test/entry_set_test.rb +0 -163
- data/test/entry_test.rb +0 -154
- data/test/errors_test.rb +0 -35
- data/test/extra_field_test.rb +0 -76
- data/test/file_extract_directory_test.rb +0 -54
- data/test/file_extract_test.rb +0 -145
- data/test/file_permissions_test.rb +0 -65
- data/test/file_split_test.rb +0 -57
- data/test/file_test.rb +0 -666
- data/test/filesystem/dir_iterator_test.rb +0 -58
- data/test/filesystem/directory_test.rb +0 -139
- data/test/filesystem/file_mutating_test.rb +0 -87
- data/test/filesystem/file_nonmutating_test.rb +0 -508
- data/test/filesystem/file_stat_test.rb +0 -64
- data/test/gentestfiles.rb +0 -126
- data/test/inflater_test.rb +0 -14
- data/test/input_stream_test.rb +0 -182
- data/test/ioextras/abstract_input_stream_test.rb +0 -102
- data/test/ioextras/abstract_output_stream_test.rb +0 -106
- data/test/ioextras/fake_io_test.rb +0 -18
- data/test/local_entry_test.rb +0 -154
- data/test/output_stream_test.rb +0 -128
- data/test/pass_thru_compressor_test.rb +0 -30
- data/test/pass_thru_decompressor_test.rb +0 -14
- data/test/path_traversal_test.rb +0 -141
- data/test/samples/example_recursive_test.rb +0 -37
- data/test/settings_test.rb +0 -95
- data/test/test_helper.rb +0 -234
- data/test/unicode_file_names_and_comments_test.rb +0 -62
- data/test/zip64_full_test.rb +0 -51
- data/test/zip64_support_test.rb +0 -14
data/README.md
CHANGED
@@ -1,26 +1,32 @@
|
|
1
1
|
# rubyzip
|
2
2
|
|
3
3
|
[](http://badge.fury.io/rb/rubyzip)
|
4
|
-
[](https://github.com/rubyzip/rubyzip/actions/workflows/tests.yml)
|
5
|
+
[](https://github.com/rubyzip/rubyzip/actions/workflows/lint.yml)
|
5
6
|
[](https://codeclimate.com/github/rubyzip/rubyzip)
|
6
7
|
[](https://coveralls.io/r/rubyzip/rubyzip?branch=master)
|
7
8
|
|
8
9
|
Rubyzip is a ruby library for reading and writing zip files.
|
9
10
|
|
10
|
-
## Important
|
11
|
+
## Important notes
|
11
12
|
|
12
|
-
|
13
|
+
### Updating to version 3.0
|
13
14
|
|
14
|
-
|
15
|
+
The public API of some classes has been modernized to use named parameters for optional arguments. Please check your usage of the following Rubyzip classes:
|
16
|
+
* `File`
|
17
|
+
* `Entry`
|
18
|
+
* `InputStream`
|
19
|
+
* `OutputStream`
|
15
20
|
|
16
|
-
|
17
|
-
gem 'rubyzip', '>= 1.0.0' # will load new rubyzip version
|
18
|
-
gem 'zip-zip' # will load compatibility for old rubyzip API.
|
19
|
-
```
|
21
|
+
**Please see [Updating to version 3.x](https://github.com/rubyzip/rubyzip/wiki/Updating-to-version-3.x) in the wiki for details.**
|
20
22
|
|
21
23
|
## Requirements
|
22
24
|
|
23
|
-
|
25
|
+
Version 3.x requires at least Ruby 2.5.
|
26
|
+
|
27
|
+
Version 2.x requires at least Ruby 2.4, and is known to work on Ruby 3.1.
|
28
|
+
|
29
|
+
It is not recommended to use any versions of Rubyzip earlier than 2.3 due to security issues.
|
24
30
|
|
25
31
|
## Installation
|
26
32
|
|
@@ -49,7 +55,7 @@ input_filenames = ['image.jpg', 'description.txt', 'stats.csv']
|
|
49
55
|
|
50
56
|
zipfile_name = "/Users/me/Desktop/archive.zip"
|
51
57
|
|
52
|
-
Zip::File.open(zipfile_name,
|
58
|
+
Zip::File.open(zipfile_name, create: true) do |zipfile|
|
53
59
|
input_filenames.each do |filename|
|
54
60
|
# Two arguments:
|
55
61
|
# - The name of the file as it will appear in the archive
|
@@ -88,7 +94,7 @@ class ZipFileGenerator
|
|
88
94
|
def write
|
89
95
|
entries = Dir.entries(@input_dir) - %w[. ..]
|
90
96
|
|
91
|
-
::Zip::File.open(@output_file,
|
97
|
+
::Zip::File.open(@output_file, create: true) do |zipfile|
|
92
98
|
write_entries entries, '', zipfile
|
93
99
|
end
|
94
100
|
end
|
@@ -121,9 +127,9 @@ class ZipFileGenerator
|
|
121
127
|
end
|
122
128
|
```
|
123
129
|
|
124
|
-
### Save zip archive entries
|
130
|
+
### Save zip archive entries sorted by name
|
125
131
|
|
126
|
-
To save zip archives
|
132
|
+
To save zip archives with their entries sorted by name (see below), set `::Zip.sort_entries` to `true`
|
127
133
|
|
128
134
|
```
|
129
135
|
Vegetable/
|
@@ -137,7 +143,7 @@ fruit/mango
|
|
137
143
|
fruit/orange
|
138
144
|
```
|
139
145
|
|
140
|
-
|
146
|
+
Opening an existing zip file with this option set will not change the order of the entries automatically. Altering the zip file - adding an entry, renaming an entry, adding or changing the archive comment, etc - will cause the ordering to be applied when closing the file.
|
141
147
|
|
142
148
|
### Default permissions of zip archives
|
143
149
|
|
@@ -173,28 +179,50 @@ Zip::File.open('foo.zip') do |zip_file|
|
|
173
179
|
end
|
174
180
|
```
|
175
181
|
|
176
|
-
|
182
|
+
### Notes on `Zip::InputStream`
|
183
|
+
|
184
|
+
`Zip::InputStream` can be used for faster reading of zip file content because it does not read the Central directory up front.
|
185
|
+
|
186
|
+
There is one exception where it can not work however, and this is if the file does not contain enough information in the local entry headers to extract an entry. This is indicated in an entry by the General Purpose Flag bit 3 being set.
|
177
187
|
|
178
|
-
|
188
|
+
> If bit 3 (0x08) of the general-purpose flags field is set, then the CRC-32 and file sizes are not known when the header is written. The fields in the local header are filled with zero, and the CRC-32 and size are appended in a 12-byte structure (optionally preceded by a 4-byte signature) immediately after the compressed data.
|
179
189
|
|
180
|
-
|
190
|
+
If `Zip::InputStream` finds such an entry in the zip archive it will raise an exception (`Zip::StreamingError`).
|
181
191
|
|
182
|
-
|
192
|
+
`Zip::InputStream` is not designed to be used for random access in a zip file. When performing any operations on an entry that you are accessing via `Zip::InputStream.get_next_entry` then you should complete any such operations before the next call to `get_next_entry`.
|
193
|
+
|
194
|
+
```ruby
|
195
|
+
zip_stream = Zip::InputStream.new(File.open('file.zip'))
|
196
|
+
|
197
|
+
while entry = zip_stream.get_next_entry
|
198
|
+
# All required operations on `entry` go here.
|
199
|
+
end
|
200
|
+
```
|
183
201
|
|
184
|
-
|
202
|
+
Any attempt to move about in a zip file opened with `Zip::InputStream` could result in the incorrect entry being accessed and/or Zlib buffer errors. If you need random access in a zip file, use `Zip::File`.
|
185
203
|
|
186
204
|
### Password Protection (Experimental)
|
187
205
|
|
188
206
|
Rubyzip supports reading/writing zip files with traditional zip encryption (a.k.a. "ZipCrypto"). AES encryption is not yet supported. It can be used with buffer streams, e.g.:
|
189
207
|
|
190
208
|
```ruby
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
209
|
+
# Writing.
|
210
|
+
enc = Zip::TraditionalEncrypter.new('password')
|
211
|
+
buffer = Zip::OutputStream.write_buffer(encrypter: enc) do |output|
|
212
|
+
output.put_next_entry("my_file.txt")
|
213
|
+
output.write my_data
|
214
|
+
end
|
215
|
+
|
216
|
+
# Reading.
|
217
|
+
dec = Zip::TraditionalDecrypter.new('password')
|
218
|
+
Zip::InputStream.open(buffer, decrypter: dec) do |input|
|
219
|
+
entry = input.get_next_entry
|
220
|
+
puts "Contents of '#{entry.name}':"
|
221
|
+
puts input.read
|
222
|
+
end
|
195
223
|
```
|
196
224
|
|
197
|
-
|
225
|
+
_This is an experimental feature and the interface for encryption may change in future versions._
|
198
226
|
|
199
227
|
## Known issues
|
200
228
|
|
@@ -208,7 +236,7 @@ buffer = Zip::OutputStream.write_buffer do |out|
|
|
208
236
|
unless [DOCUMENT_FILE_PATH, RELS_FILE_PATH].include?(e.name)
|
209
237
|
out.put_next_entry(e.name)
|
210
238
|
out.write e.get_input_stream.read
|
211
|
-
|
239
|
+
end
|
212
240
|
end
|
213
241
|
|
214
242
|
out.put_next_entry(DOCUMENT_FILE_PATH)
|
@@ -265,13 +293,7 @@ Zip.warn_invalid_date = false
|
|
265
293
|
|
266
294
|
### Size Validation
|
267
295
|
|
268
|
-
|
269
|
-
|
270
|
-
If you set
|
271
|
-
```
|
272
|
-
Zip.validate_entry_sizes = true
|
273
|
-
```
|
274
|
-
then `rubyzip`'s `extract` method checks that an entry's reported uncompressed size is not (significantly) smaller than its actual size. This is to help you protect your application against [zip bombs](https://en.wikipedia.org/wiki/Zip_bomb). Before `extract`ing an entry, you should check that its size is in the range you expect. For example, if your application supports processing up to 100 files at once, each up to 10MiB, your zip extraction code might look like:
|
296
|
+
By default (in rubyzip >= 2.0), rubyzip's `extract` method checks that an entry's reported uncompressed size is not (significantly) smaller than its actual size. This is to help you protect your application against [zip bombs](https://en.wikipedia.org/wiki/Zip_bomb). Before `extract`ing an entry, you should check that its size is in the range you expect. For example, if your application supports processing up to 100 files at once, each up to 10MiB, your zip extraction code might look like:
|
275
297
|
|
276
298
|
```ruby
|
277
299
|
MAX_FILE_SIZE = 10 * 1024**2 # 10MiB
|
@@ -294,25 +316,35 @@ Zip.validate_entry_sizes = false
|
|
294
316
|
|
295
317
|
Note that if you use the lower level `Zip::InputStream` interface, `rubyzip` does *not* check the entry `size`s. In this case, the caller is responsible for making sure it does not read more data than expected from the input stream.
|
296
318
|
|
297
|
-
###
|
319
|
+
### Compression level
|
320
|
+
|
321
|
+
When adding entries to a zip archive you can set the compression level to trade-off compressed size against compression speed. By default this is set to the same as the underlying Zlib library's default (`Zlib::DEFAULT_COMPRESSION`), which is somewhere in the middle.
|
298
322
|
|
299
|
-
You can
|
323
|
+
You can configure the default compression level with:
|
300
324
|
|
301
325
|
```ruby
|
302
|
-
Zip.default_compression =
|
326
|
+
Zip.default_compression = X
|
303
327
|
```
|
304
328
|
|
305
|
-
|
329
|
+
Where X is an integer between 0 and 9, inclusive. If this option is set to 0 (`Zlib::NO_COMPRESSION`) then entries will be stored in the zip archive uncompressed. A value of 1 (`Zlib::BEST_SPEED`) gives the fastest compression and 9 (`Zlib::BEST_COMPRESSION`) gives the smallest compressed file size.
|
330
|
+
|
331
|
+
This can also be set for each archive as an option to `Zip::File`:
|
332
|
+
|
333
|
+
```ruby
|
334
|
+
Zip::File.open('foo.zip', create:true, compression_level: 9) do |zip|
|
335
|
+
zip.add ...
|
336
|
+
end
|
337
|
+
```
|
306
338
|
|
307
339
|
### Zip64 Support
|
308
340
|
|
309
|
-
By default, Zip64 support is
|
341
|
+
By default, Zip64 support is enabled for writing. To disable it do this:
|
310
342
|
|
311
343
|
```ruby
|
312
|
-
Zip.write_zip64_support =
|
344
|
+
Zip.write_zip64_support = false
|
313
345
|
```
|
314
346
|
|
315
|
-
_NOTE_: If
|
347
|
+
_NOTE_: If Zip64 write support is enabled then any extractor subsequently used may also require Zip64 support to read from the resultant archive.
|
316
348
|
|
317
349
|
### Block Form
|
318
350
|
|
@@ -327,15 +359,47 @@ You can set multiple settings at the same time by using a block:
|
|
327
359
|
end
|
328
360
|
```
|
329
361
|
|
362
|
+
## Compatibility
|
363
|
+
|
364
|
+
Rubyzip is known to run on a number of platforms and under a number of different Ruby versions.
|
365
|
+
|
366
|
+
### Version 2.3.x
|
367
|
+
|
368
|
+
Rubyzip 2.3 is known to work on MRI 2.4 to 3.1 on Linux and Mac, and JRuby and Truffleruby on Linux. There are known issues with Windows which have been fixed on the development branch. Please [let us know](https://github.com/rubyzip/rubyzip/pulls) if you know Rubyzip 2.3 works on a platform/Ruby combination not listed here, or [raise an issue](https://github.com/rubyzip/rubyzip/issues) if you see a failure where we think it should work.
|
369
|
+
|
370
|
+
### Next (version 3.0.0)
|
371
|
+
|
372
|
+
Please see the table below for what we think the current situation is. Note: an empty cell means "unknown", not "does not work".
|
373
|
+
|
374
|
+
| OS/Ruby | 2.5 | 2.6 | 2.7 | 3.0 | 3.1 | 3.1 +YJIT | Head | Head +YJIT | JRuby 9.3.2.0 | JRuby Head | Truffleruby 21.3.0 | Truffleruby Head |
|
375
|
+
|---------|-----|-----|-----|-----|-----|----------|------|-----------|----------------|------------|--------------------|------------------|
|
376
|
+
|Ubuntu 20.04.3| CI | CI | CI | CI | CI | ci | ci | ci | CI | ci | CI | ci |
|
377
|
+
|Mac OS 11.6.2| CI | x | x | x | x | ci | | ci | x | | x | |
|
378
|
+
|Windows 10| | | x | | | | | | | | | |
|
379
|
+
|Windows Server 2019| CI | | | | | | | | | | | |
|
380
|
+
|
381
|
+
Key: `CI` - tested in CI, should work; `ci` - tested in CI, might fail; `x` - known working; `o` - known failing.
|
382
|
+
|
383
|
+
Please [raise a PR](https://github.com/rubyzip/rubyzip/pulls) if you know Rubyzip works on a platform/Ruby combination not listed here, or [raise an issue](https://github.com/rubyzip/rubyzip/issues) if you see a failure where we think it should work.
|
384
|
+
|
330
385
|
## Developing
|
331
386
|
|
332
|
-
|
387
|
+
Install the dependencies:
|
333
388
|
|
334
|
-
```
|
389
|
+
```shell
|
335
390
|
bundle install
|
391
|
+
```
|
392
|
+
|
393
|
+
Run the tests with `rake`:
|
394
|
+
|
395
|
+
```shell
|
336
396
|
rake
|
337
397
|
```
|
338
398
|
|
399
|
+
Please also run `rubocop` over your changes.
|
400
|
+
|
401
|
+
Our CI runs on [GitHub Actions](https://github.com/rubyzip/rubyzip/actions). Please note that `rubocop` is run as part of the CI configuration and will fail a build if errors are found.
|
402
|
+
|
339
403
|
## Website and Project Home
|
340
404
|
|
341
405
|
http://github.com/rubyzip/rubyzip
|
@@ -344,17 +408,30 @@ http://rdoc.info/github/rubyzip/rubyzip/master/frames
|
|
344
408
|
|
345
409
|
## Authors
|
346
410
|
|
347
|
-
|
411
|
+
See https://github.com/rubyzip/rubyzip/graphs/contributors for a comprehensive list.
|
348
412
|
|
349
|
-
|
413
|
+
### Current maintainers
|
350
414
|
|
351
|
-
|
415
|
+
* Robert Haines (@hainesr)
|
416
|
+
* John Lees-Miller (@jdleesmiller)
|
417
|
+
* Oleksandr Simonov (@simonoff)
|
352
418
|
|
353
|
-
|
419
|
+
### Original author
|
354
420
|
|
355
|
-
|
421
|
+
* Thomas Sondergaard
|
356
422
|
|
357
423
|
## License
|
358
424
|
|
359
425
|
Rubyzip is distributed under the same license as ruby. See
|
360
426
|
http://www.ruby-lang.org/en/LICENSE.txt
|
427
|
+
|
428
|
+
## Research notice
|
429
|
+
Please note that this repository is participating in a study into sustainability
|
430
|
+
of open source projects. Data will be gathered about this repository for
|
431
|
+
approximately the next 12 months, starting from June 2021.
|
432
|
+
|
433
|
+
Data collected will include number of contributors, number of PRs, time taken to
|
434
|
+
close/merge these PRs, and issues closed.
|
435
|
+
|
436
|
+
For more information, please visit
|
437
|
+
[our informational page](https://sustainable-open-science-and-software.github.io/) or download our [participant information sheet](https://sustainable-open-science-and-software.github.io/assets/PIS_sustainable_software.pdf).
|
data/Rakefile
CHANGED
@@ -1,5 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'bundler/gem_tasks'
|
2
4
|
require 'rake/testtask'
|
5
|
+
require 'rdoc/task'
|
6
|
+
require 'rubocop/rake_task'
|
3
7
|
|
4
8
|
task default: :test
|
5
9
|
|
@@ -10,9 +14,12 @@ Rake::TestTask.new(:test) do |test|
|
|
10
14
|
test.verbose = true
|
11
15
|
end
|
12
16
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
#
|
17
|
+
RDoc::Task.new do |rdoc|
|
18
|
+
rdoc.main = 'README.md'
|
19
|
+
rdoc.rdoc_files.include('README.md', 'lib/**/*.rb')
|
20
|
+
rdoc.options << '--markup=markdown'
|
21
|
+
rdoc.options << '--tab-width=2'
|
22
|
+
rdoc.options << "-t Rubyzip version #{::Zip::VERSION}"
|
23
|
+
end
|
24
|
+
|
25
|
+
RuboCop::RakeTask.new
|