rubyzip 1.2.0 → 2.3.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 +5 -5
- data/README.md +89 -43
- data/Rakefile +3 -0
- data/lib/zip.rb +14 -3
- data/lib/zip/central_directory.rb +12 -8
- data/lib/zip/compressor.rb +1 -2
- data/lib/zip/constants.rb +55 -3
- data/lib/zip/crypto/decrypted_io.rb +40 -0
- data/lib/zip/crypto/null_encryption.rb +2 -4
- data/lib/zip/crypto/traditional_encryption.rb +9 -9
- data/lib/zip/decompressor.rb +20 -2
- data/lib/zip/dos_time.rb +13 -8
- data/lib/zip/entry.rb +115 -80
- data/lib/zip/entry_set.rb +6 -4
- data/lib/zip/errors.rb +2 -0
- data/lib/zip/extra_field.rb +12 -10
- data/lib/zip/extra_field/generic.rb +10 -9
- data/lib/zip/extra_field/ntfs.rb +4 -0
- data/lib/zip/extra_field/old_unix.rb +3 -1
- data/lib/zip/extra_field/universal_time.rb +42 -12
- data/lib/zip/extra_field/unix.rb +3 -1
- data/lib/zip/extra_field/zip64.rb +4 -2
- data/lib/zip/extra_field/zip64_placeholder.rb +1 -2
- data/lib/zip/file.rb +136 -100
- data/lib/zip/filesystem.rb +199 -179
- data/lib/zip/inflater.rb +24 -36
- data/lib/zip/input_stream.rb +37 -27
- data/lib/zip/ioextras.rb +1 -1
- data/lib/zip/ioextras/abstract_input_stream.rb +20 -9
- data/lib/zip/ioextras/abstract_output_stream.rb +4 -4
- data/lib/zip/null_decompressor.rb +1 -9
- data/lib/zip/output_stream.rb +19 -10
- data/lib/zip/pass_thru_compressor.rb +2 -2
- data/lib/zip/pass_thru_decompressor.rb +14 -23
- data/lib/zip/streamable_directory.rb +3 -3
- data/lib/zip/streamable_stream.rb +6 -10
- data/lib/zip/version.rb +1 -1
- data/samples/example.rb +2 -2
- data/samples/example_filesystem.rb +1 -1
- data/samples/example_recursive.rb +15 -18
- data/samples/gtk_ruby_zip.rb +20 -20
- data/samples/qtzip.rb +7 -7
- data/samples/write_simple.rb +2 -4
- data/samples/zipfind.rb +23 -22
- metadata +41 -130
- 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 -53
- 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.zip +0 -0
- data/test/data/globTest/foo.txt +0 -0
- data/test/data/globTest/foo/bar/baz/foo.txt +0 -0
- data/test/data/globTest/food.txt +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/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 -152
- data/test/entry_test.rb +0 -163
- data/test/errors_test.rb +0 -34
- data/test/extra_field_test.rb +0 -76
- data/test/file_extract_directory_test.rb +0 -54
- data/test/file_extract_test.rb +0 -83
- data/test/file_permissions_test.rb +0 -69
- data/test/file_split_test.rb +0 -57
- data/test/file_test.rb +0 -563
- data/test/filesystem/dir_iterator_test.rb +0 -58
- data/test/filesystem/directory_test.rb +0 -121
- data/test/filesystem/file_mutating_test.rb +0 -88
- data/test/filesystem/file_nonmutating_test.rb +0 -508
- data/test/filesystem/file_stat_test.rb +0 -64
- data/test/gentestfiles.rb +0 -122
- 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/samples/example_recursive_test.rb +0 -37
- data/test/settings_test.rb +0 -95
- data/test/test_helper.rb +0 -221
- data/test/unicode_file_names_and_comments_test.rb +0 -50
- data/test/zip64_full_test.rb +0 -51
- data/test/zip64_support_test.rb +0 -14
@@ -1,38 +1,29 @@
|
|
1
1
|
module Zip
|
2
|
-
class PassThruDecompressor < Decompressor
|
3
|
-
def initialize(
|
4
|
-
super
|
5
|
-
@chars_to_read = chars_to_read
|
2
|
+
class PassThruDecompressor < Decompressor #:nodoc:all
|
3
|
+
def initialize(*args)
|
4
|
+
super
|
6
5
|
@read_so_far = 0
|
7
|
-
@has_returned_empty_string = false
|
8
6
|
end
|
9
7
|
|
10
|
-
def
|
11
|
-
if
|
12
|
-
has_returned_empty_string_val = @has_returned_empty_string
|
13
|
-
@has_returned_empty_string = true
|
14
|
-
return '' unless has_returned_empty_string_val
|
15
|
-
return
|
16
|
-
end
|
8
|
+
def read(length = nil, outbuf = '')
|
9
|
+
return (length.nil? || length.zero? ? '' : nil) if eof
|
17
10
|
|
18
|
-
if
|
19
|
-
|
11
|
+
if length.nil? || (@read_so_far + length) > decompressed_size
|
12
|
+
length = decompressed_size - @read_so_far
|
20
13
|
end
|
21
|
-
@read_so_far += number_of_bytes
|
22
|
-
@input_stream.read(number_of_bytes, buf)
|
23
|
-
end
|
24
14
|
|
25
|
-
|
26
|
-
|
15
|
+
@read_so_far += length
|
16
|
+
input_stream.read(length, outbuf)
|
27
17
|
end
|
28
18
|
|
29
|
-
def
|
30
|
-
@read_so_far >=
|
19
|
+
def eof
|
20
|
+
@read_so_far >= decompressed_size
|
31
21
|
end
|
32
22
|
|
33
|
-
alias eof
|
34
|
-
alias eof? input_finished?
|
23
|
+
alias eof? eof
|
35
24
|
end
|
25
|
+
|
26
|
+
::Zip::Decompressor.register(::Zip::COMPRESSION_METHOD_STORE, ::Zip::PassThruDecompressor)
|
36
27
|
end
|
37
28
|
|
38
29
|
# Copyright (C) 2002, 2003 Thomas Sondergaard
|
@@ -1,11 +1,11 @@
|
|
1
1
|
module Zip
|
2
2
|
class StreamableDirectory < Entry
|
3
|
-
def initialize(zipfile, entry,
|
3
|
+
def initialize(zipfile, entry, src_path = nil, permission = nil)
|
4
4
|
super(zipfile, entry)
|
5
5
|
|
6
6
|
@ftype = :directory
|
7
|
-
entry.get_extra_attributes_from_path(
|
8
|
-
@unix_perms =
|
7
|
+
entry.get_extra_attributes_from_path(src_path) if src_path
|
8
|
+
@unix_perms = permission if permission
|
9
9
|
end
|
10
10
|
end
|
11
11
|
end
|
@@ -1,13 +1,8 @@
|
|
1
1
|
module Zip
|
2
|
-
class StreamableStream < DelegateClass(Entry) # nodoc:all
|
2
|
+
class StreamableStream < DelegateClass(Entry) # :nodoc:all
|
3
3
|
def initialize(entry)
|
4
4
|
super(entry)
|
5
|
-
|
6
|
-
::File.dirname(zipfile)
|
7
|
-
else
|
8
|
-
'.'
|
9
|
-
end
|
10
|
-
@temp_file = Tempfile.new(::File.basename(name), dirname)
|
5
|
+
@temp_file = Tempfile.new(::File.basename(name))
|
11
6
|
@temp_file.binmode
|
12
7
|
end
|
13
8
|
|
@@ -27,6 +22,7 @@ module Zip
|
|
27
22
|
unless @temp_file.closed?
|
28
23
|
raise StandardError, "cannot open entry for reading while its open for writing - #{name}"
|
29
24
|
end
|
25
|
+
|
30
26
|
@temp_file.open # reopens tempfile from top
|
31
27
|
@temp_file.binmode
|
32
28
|
if block_given?
|
@@ -40,9 +36,9 @@ module Zip
|
|
40
36
|
end
|
41
37
|
end
|
42
38
|
|
43
|
-
def write_to_zip_output_stream(
|
44
|
-
|
45
|
-
get_input_stream { |is| ::Zip::IOExtras.copy_stream(
|
39
|
+
def write_to_zip_output_stream(output_stream)
|
40
|
+
output_stream.put_next_entry(self)
|
41
|
+
get_input_stream { |is| ::Zip::IOExtras.copy_stream(output_stream, is) }
|
46
42
|
end
|
47
43
|
|
48
44
|
def clean_up
|
data/lib/zip/version.rb
CHANGED
data/samples/example.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
|
3
|
+
$LOAD_PATH << '../lib'
|
4
4
|
system('zip example.zip example.rb gtk_ruby_zip.rb')
|
5
5
|
|
6
6
|
require 'zip'
|
@@ -71,7 +71,7 @@ puts "Zip file splitted in #{part_zips_count} parts"
|
|
71
71
|
|
72
72
|
# Track splitting an archive
|
73
73
|
Zip::File.split('large_zip_file.zip', 1_048_576, true, 'part_zip_file') do |part_count, part_index, chunk_bytes, segment_bytes|
|
74
|
-
puts "#{part_index} of #{part_count} part splitting: #{(chunk_bytes.to_f / segment_bytes
|
74
|
+
puts "#{part_index} of #{part_count} part splitting: #{(chunk_bytes.to_f / segment_bytes * 100).to_i}%"
|
75
75
|
end
|
76
76
|
|
77
77
|
# For other examples, look at zip.rb and ziptest.rb
|
@@ -6,7 +6,7 @@ require 'zip'
|
|
6
6
|
# included in the archive, rather just its contents.
|
7
7
|
#
|
8
8
|
# Usage:
|
9
|
-
#
|
9
|
+
# directory_to_zip = "/tmp/input"
|
10
10
|
# output_file = "/tmp/out.zip"
|
11
11
|
# zf = ZipFileGenerator.new(directory_to_zip, output_file)
|
12
12
|
# zf.write()
|
@@ -19,39 +19,36 @@ class ZipFileGenerator
|
|
19
19
|
|
20
20
|
# Zip the input directory.
|
21
21
|
def write
|
22
|
-
entries = Dir.entries(@input_dir) - %w
|
22
|
+
entries = Dir.entries(@input_dir) - %w[. ..]
|
23
23
|
|
24
|
-
::Zip::File.open(@output_file, ::Zip::File::CREATE) do |
|
25
|
-
write_entries entries, '',
|
24
|
+
::Zip::File.open(@output_file, ::Zip::File::CREATE) do |zipfile|
|
25
|
+
write_entries entries, '', zipfile
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
29
|
private
|
30
30
|
|
31
31
|
# A helper method to make the recursion work.
|
32
|
-
def write_entries(entries, path,
|
32
|
+
def write_entries(entries, path, zipfile)
|
33
33
|
entries.each do |e|
|
34
|
-
|
35
|
-
disk_file_path = File.join(@input_dir,
|
36
|
-
puts "Deflating #{disk_file_path}"
|
34
|
+
zipfile_path = path == '' ? e : File.join(path, e)
|
35
|
+
disk_file_path = File.join(@input_dir, zipfile_path)
|
37
36
|
|
38
37
|
if File.directory? disk_file_path
|
39
|
-
recursively_deflate_directory(disk_file_path,
|
38
|
+
recursively_deflate_directory(disk_file_path, zipfile, zipfile_path)
|
40
39
|
else
|
41
|
-
put_into_archive(disk_file_path,
|
40
|
+
put_into_archive(disk_file_path, zipfile, zipfile_path)
|
42
41
|
end
|
43
42
|
end
|
44
43
|
end
|
45
44
|
|
46
|
-
def recursively_deflate_directory(disk_file_path,
|
47
|
-
|
48
|
-
subdir = Dir.entries(disk_file_path) - %w
|
49
|
-
write_entries subdir,
|
45
|
+
def recursively_deflate_directory(disk_file_path, zipfile, zipfile_path)
|
46
|
+
zipfile.mkdir zipfile_path
|
47
|
+
subdir = Dir.entries(disk_file_path) - %w[. ..]
|
48
|
+
write_entries subdir, zipfile_path, zipfile
|
50
49
|
end
|
51
50
|
|
52
|
-
def put_into_archive(disk_file_path,
|
53
|
-
|
54
|
-
f.write(File.open(disk_file_path, 'rb').read)
|
55
|
-
end
|
51
|
+
def put_into_archive(disk_file_path, zipfile, zipfile_path)
|
52
|
+
zipfile.add(zipfile_path, disk_file_path)
|
56
53
|
end
|
57
54
|
end
|
data/samples/gtk_ruby_zip.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
|
3
|
+
$LOAD_PATH << '../lib'
|
4
4
|
|
5
5
|
$VERBOSE = true
|
6
6
|
|
@@ -18,20 +18,20 @@ class MainApp < Gtk::Window
|
|
18
18
|
add(box)
|
19
19
|
|
20
20
|
@zipfile = nil
|
21
|
-
@
|
22
|
-
@
|
21
|
+
@button_panel = ButtonPanel.new
|
22
|
+
@button_panel.open_button.signal_connect(Gtk::Button::SIGNAL_CLICKED) do
|
23
23
|
show_file_selector
|
24
24
|
end
|
25
|
-
@
|
25
|
+
@button_panel.extract_button.signal_connect(Gtk::Button::SIGNAL_CLICKED) do
|
26
26
|
puts 'Not implemented!'
|
27
27
|
end
|
28
|
-
box.pack_start(@
|
28
|
+
box.pack_start(@button_panel, false, false, 0)
|
29
29
|
|
30
30
|
sw = Gtk::ScrolledWindow.new
|
31
31
|
sw.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC)
|
32
32
|
box.pack_start(sw, true, true, 0)
|
33
33
|
|
34
|
-
@clist = Gtk::CList.new(%w
|
34
|
+
@clist = Gtk::CList.new(%w[Name Size Compression])
|
35
35
|
@clist.set_selection_mode(Gtk::SELECTION_BROWSE)
|
36
36
|
@clist.set_column_width(0, 120)
|
37
37
|
@clist.set_column_width(1, 120)
|
@@ -42,27 +42,27 @@ class MainApp < Gtk::Window
|
|
42
42
|
end
|
43
43
|
|
44
44
|
class ButtonPanel < Gtk::HButtonBox
|
45
|
-
attr_reader :
|
45
|
+
attr_reader :open_button, :extract_button
|
46
46
|
def initialize
|
47
47
|
super
|
48
48
|
set_layout(Gtk::BUTTONBOX_START)
|
49
49
|
set_spacing(0)
|
50
|
-
@
|
51
|
-
@
|
52
|
-
pack_start(@
|
53
|
-
pack_start(@
|
50
|
+
@open_button = Gtk::Button.new('Open archive')
|
51
|
+
@extract_button = Gtk::Button.new('Extract entry')
|
52
|
+
pack_start(@open_button)
|
53
|
+
pack_start(@extract_button)
|
54
54
|
end
|
55
55
|
end
|
56
56
|
|
57
57
|
def show_file_selector
|
58
|
-
@
|
59
|
-
@
|
60
|
-
@
|
61
|
-
open_zip(@
|
62
|
-
@
|
58
|
+
@file_selector = Gtk::FileSelection.new('Open zip file')
|
59
|
+
@file_selector.show
|
60
|
+
@file_selector.ok_button.signal_connect(Gtk::Button::SIGNAL_CLICKED) do
|
61
|
+
open_zip(@file_selector.filename)
|
62
|
+
@file_selector.destroy
|
63
63
|
end
|
64
|
-
@
|
65
|
-
@
|
64
|
+
@file_selector.cancel_button.signal_connect(Gtk::Button::SIGNAL_CLICKED) do
|
65
|
+
@file_selector.destroy
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
@@ -77,8 +77,8 @@ class MainApp < Gtk::Window
|
|
77
77
|
end
|
78
78
|
end
|
79
79
|
|
80
|
-
|
80
|
+
main_app = MainApp.new
|
81
81
|
|
82
|
-
|
82
|
+
main_app.show_all
|
83
83
|
|
84
84
|
Gtk.main
|
data/samples/qtzip.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
$VERBOSE = true
|
4
4
|
|
5
|
-
|
5
|
+
$LOAD_PATH << '../lib'
|
6
6
|
|
7
7
|
require 'Qt'
|
8
8
|
system('rbuic -o zipdialogui.rb zipdialogui.ui')
|
@@ -20,12 +20,12 @@ class ZipDialog < ZipDialogUI
|
|
20
20
|
self, SLOT('extract_files()'))
|
21
21
|
end
|
22
22
|
|
23
|
-
def zipfile(&
|
24
|
-
Zip::File.open(@zip_filename, &
|
23
|
+
def zipfile(&a_proc)
|
24
|
+
Zip::File.open(@zip_filename, &a_proc)
|
25
25
|
end
|
26
26
|
|
27
|
-
def each(&
|
28
|
-
Zip::File.foreach(@zip_filename, &
|
27
|
+
def each(&a_proc)
|
28
|
+
Zip::File.foreach(@zip_filename, &a_proc)
|
29
29
|
end
|
30
30
|
|
31
31
|
def refresh
|
@@ -65,7 +65,7 @@ class ZipDialog < ZipDialogUI
|
|
65
65
|
end
|
66
66
|
puts "selected_items.size = #{selected_items.size}"
|
67
67
|
puts "unselected_items.size = #{unselected_items.size}"
|
68
|
-
items = selected_items.
|
68
|
+
items = !selected_items.empty? ? selected_items : unselected_items
|
69
69
|
puts "items.size = #{items.size}"
|
70
70
|
|
71
71
|
d = Qt::FileDialog.get_existing_directory(nil, self)
|
@@ -80,7 +80,7 @@ class ZipDialog < ZipDialogUI
|
|
80
80
|
end
|
81
81
|
|
82
82
|
unless ARGV[0]
|
83
|
-
puts "usage: #{$
|
83
|
+
puts "usage: #{$PROGRAM_NAME} zipname"
|
84
84
|
exit
|
85
85
|
end
|
86
86
|
|
data/samples/write_simple.rb
CHANGED
@@ -1,12 +1,10 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
|
3
|
+
$LOAD_PATH << '../lib'
|
4
4
|
|
5
5
|
require 'zip'
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
OutputStream.open('simple.zip') do |zos|
|
7
|
+
::Zip::OutputStream.open('simple.zip') do |zos|
|
10
8
|
zos.put_next_entry 'entry.txt'
|
11
9
|
zos.puts 'Hello world'
|
12
10
|
end
|
data/samples/zipfind.rb
CHANGED
@@ -2,36 +2,37 @@
|
|
2
2
|
|
3
3
|
$VERBOSE = true
|
4
4
|
|
5
|
-
|
5
|
+
$LOAD_PATH << '../lib'
|
6
6
|
|
7
7
|
require 'zip'
|
8
8
|
require 'find'
|
9
9
|
|
10
10
|
module Zip
|
11
11
|
module ZipFind
|
12
|
-
def self.find(path,
|
13
|
-
Find.find(path) do |
|
14
|
-
yield(
|
15
|
-
next unless
|
12
|
+
def self.find(path, zip_file_pattern = /\.zip$/i)
|
13
|
+
Find.find(path) do |filename|
|
14
|
+
yield(filename)
|
15
|
+
next unless zip_file_pattern.match(filename) && File.file?(filename)
|
16
|
+
|
16
17
|
begin
|
17
|
-
Zip::File.foreach(
|
18
|
-
yield(
|
18
|
+
Zip::File.foreach(filename) do |entry|
|
19
|
+
yield(filename + File::SEPARATOR + entry.to_s)
|
19
20
|
end
|
20
|
-
rescue Errno::EACCES =>
|
21
|
-
puts
|
21
|
+
rescue Errno::EACCES => e
|
22
|
+
puts e
|
22
23
|
end
|
23
24
|
end
|
24
25
|
end
|
25
26
|
|
26
|
-
def self.find_file(path,
|
27
|
-
find(path,
|
28
|
-
yield(
|
27
|
+
def self.find_file(path, filename_pattern, zip_file_pattern = /\.zip$/i)
|
28
|
+
find(path, zip_file_pattern) do |filename|
|
29
|
+
yield(filename) if filename_pattern.match(filename)
|
29
30
|
end
|
30
31
|
end
|
31
32
|
end
|
32
33
|
end
|
33
34
|
|
34
|
-
if
|
35
|
+
if $PROGRAM_NAME == __FILE__
|
35
36
|
module ZipFindConsoleRunner
|
36
37
|
PATH_ARG_INDEX = 0
|
37
38
|
FILENAME_PATTERN_ARG_INDEX = 1
|
@@ -41,24 +42,24 @@ if __FILE__ == $0
|
|
41
42
|
check_args(args)
|
42
43
|
Zip::ZipFind.find_file(args[PATH_ARG_INDEX],
|
43
44
|
args[FILENAME_PATTERN_ARG_INDEX],
|
44
|
-
args[ZIPFILE_PATTERN_ARG_INDEX]) do |
|
45
|
-
report_entry_found
|
45
|
+
args[ZIPFILE_PATTERN_ARG_INDEX]) do |filename|
|
46
|
+
report_entry_found filename
|
46
47
|
end
|
47
48
|
end
|
48
49
|
|
49
50
|
def self.check_args(args)
|
50
|
-
if
|
51
|
-
|
52
|
-
|
53
|
-
|
51
|
+
return if args.size == 3
|
52
|
+
|
53
|
+
usage
|
54
|
+
exit
|
54
55
|
end
|
55
56
|
|
56
57
|
def self.usage
|
57
|
-
puts "Usage: #{$
|
58
|
+
puts "Usage: #{$PROGRAM_NAME} PATH ZIPFILENAME_PATTERN FILNAME_PATTERN"
|
58
59
|
end
|
59
60
|
|
60
|
-
def self.report_entry_found(
|
61
|
-
puts
|
61
|
+
def self.report_entry_found(filename)
|
62
|
+
puts filename
|
62
63
|
end
|
63
64
|
end
|
64
65
|
|
metadata
CHANGED
@@ -1,29 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubyzip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Simonov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: coveralls
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0.7'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0.7'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: minitest
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '5.4'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '5.4'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: pry
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -39,33 +53,39 @@ dependencies:
|
|
39
53
|
- !ruby/object:Gem::Version
|
40
54
|
version: '0.10'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
56
|
+
name: rake
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
59
|
- - "~>"
|
46
60
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
61
|
+
version: '12.3'
|
62
|
+
- - ">="
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: 12.3.3
|
48
65
|
type: :development
|
49
66
|
prerelease: false
|
50
67
|
version_requirements: !ruby/object:Gem::Requirement
|
51
68
|
requirements:
|
52
69
|
- - "~>"
|
53
70
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
71
|
+
version: '12.3'
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: 12.3.3
|
55
75
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
76
|
+
name: rubocop
|
57
77
|
requirement: !ruby/object:Gem::Requirement
|
58
78
|
requirements:
|
59
79
|
- - "~>"
|
60
80
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0.
|
81
|
+
version: '0.79'
|
62
82
|
type: :development
|
63
83
|
prerelease: false
|
64
84
|
version_requirements: !ruby/object:Gem::Requirement
|
65
85
|
requirements:
|
66
86
|
- - "~>"
|
67
87
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0.
|
88
|
+
version: '0.79'
|
69
89
|
description:
|
70
90
|
email:
|
71
91
|
- alex@simonov.me
|
@@ -80,6 +100,7 @@ files:
|
|
80
100
|
- lib/zip/central_directory.rb
|
81
101
|
- lib/zip/compressor.rb
|
82
102
|
- lib/zip/constants.rb
|
103
|
+
- lib/zip/crypto/decrypted_io.rb
|
83
104
|
- lib/zip/crypto/encryption.rb
|
84
105
|
- lib/zip/crypto/null_encryption.rb
|
85
106
|
- lib/zip/crypto/traditional_encryption.rb
|
@@ -120,67 +141,15 @@ files:
|
|
120
141
|
- samples/qtzip.rb
|
121
142
|
- samples/write_simple.rb
|
122
143
|
- samples/zipfind.rb
|
123
|
-
- test/basic_zip_file_test.rb
|
124
|
-
- test/case_sensitivity_test.rb
|
125
|
-
- test/central_directory_entry_test.rb
|
126
|
-
- test/central_directory_test.rb
|
127
|
-
- test/crypto/null_encryption_test.rb
|
128
|
-
- test/crypto/traditional_encryption_test.rb
|
129
|
-
- test/data/WarnInvalidDate.zip
|
130
|
-
- test/data/file1.txt
|
131
|
-
- test/data/file1.txt.deflatedData
|
132
|
-
- test/data/file2.txt
|
133
|
-
- test/data/globTest.zip
|
134
|
-
- test/data/globTest/foo.txt
|
135
|
-
- test/data/globTest/foo/bar/baz/foo.txt
|
136
|
-
- test/data/globTest/food.txt
|
137
|
-
- test/data/mimetype
|
138
|
-
- test/data/notzippedruby.rb
|
139
|
-
- test/data/ntfs.zip
|
140
|
-
- test/data/oddExtraField.zip
|
141
|
-
- test/data/rubycode.zip
|
142
|
-
- test/data/rubycode2.zip
|
143
|
-
- test/data/test.xls
|
144
|
-
- test/data/testDirectory.bin
|
145
|
-
- test/data/zip64-sample.zip
|
146
|
-
- test/data/zipWithDirs.zip
|
147
|
-
- test/data/zipWithEncryption.zip
|
148
|
-
- test/deflater_test.rb
|
149
|
-
- test/encryption_test.rb
|
150
|
-
- test/entry_set_test.rb
|
151
|
-
- test/entry_test.rb
|
152
|
-
- test/errors_test.rb
|
153
|
-
- test/extra_field_test.rb
|
154
|
-
- test/file_extract_directory_test.rb
|
155
|
-
- test/file_extract_test.rb
|
156
|
-
- test/file_permissions_test.rb
|
157
|
-
- test/file_split_test.rb
|
158
|
-
- test/file_test.rb
|
159
|
-
- test/filesystem/dir_iterator_test.rb
|
160
|
-
- test/filesystem/directory_test.rb
|
161
|
-
- test/filesystem/file_mutating_test.rb
|
162
|
-
- test/filesystem/file_nonmutating_test.rb
|
163
|
-
- test/filesystem/file_stat_test.rb
|
164
|
-
- test/gentestfiles.rb
|
165
|
-
- test/inflater_test.rb
|
166
|
-
- test/input_stream_test.rb
|
167
|
-
- test/ioextras/abstract_input_stream_test.rb
|
168
|
-
- test/ioextras/abstract_output_stream_test.rb
|
169
|
-
- test/ioextras/fake_io_test.rb
|
170
|
-
- test/local_entry_test.rb
|
171
|
-
- test/output_stream_test.rb
|
172
|
-
- test/pass_thru_compressor_test.rb
|
173
|
-
- test/pass_thru_decompressor_test.rb
|
174
|
-
- test/samples/example_recursive_test.rb
|
175
|
-
- test/settings_test.rb
|
176
|
-
- test/test_helper.rb
|
177
|
-
- test/unicode_file_names_and_comments_test.rb
|
178
|
-
- test/zip64_full_test.rb
|
179
|
-
- test/zip64_support_test.rb
|
180
144
|
homepage: http://github.com/rubyzip/rubyzip
|
181
145
|
licenses:
|
182
146
|
- BSD 2-Clause
|
183
|
-
metadata:
|
147
|
+
metadata:
|
148
|
+
bug_tracker_uri: https://github.com/rubyzip/rubyzip/issues
|
149
|
+
changelog_uri: https://github.com/rubyzip/rubyzip/blob/v2.3.0/Changelog.md
|
150
|
+
documentation_uri: https://www.rubydoc.info/gems/rubyzip/2.3.0
|
151
|
+
source_code_uri: https://github.com/rubyzip/rubyzip/tree/v2.3.0
|
152
|
+
wiki_uri: https://github.com/rubyzip/rubyzip/wiki
|
184
153
|
post_install_message:
|
185
154
|
rdoc_options: []
|
186
155
|
require_paths:
|
@@ -189,73 +158,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
189
158
|
requirements:
|
190
159
|
- - ">="
|
191
160
|
- !ruby/object:Gem::Version
|
192
|
-
version:
|
161
|
+
version: '2.4'
|
193
162
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
194
163
|
requirements:
|
195
164
|
- - ">="
|
196
165
|
- !ruby/object:Gem::Version
|
197
166
|
version: '0'
|
198
167
|
requirements: []
|
199
|
-
|
200
|
-
rubygems_version: 2.4.8
|
168
|
+
rubygems_version: 3.0.3
|
201
169
|
signing_key:
|
202
170
|
specification_version: 4
|
203
171
|
summary: rubyzip is a ruby module for reading and writing zip files
|
204
|
-
test_files:
|
205
|
-
- test/basic_zip_file_test.rb
|
206
|
-
- test/case_sensitivity_test.rb
|
207
|
-
- test/central_directory_entry_test.rb
|
208
|
-
- test/central_directory_test.rb
|
209
|
-
- test/crypto/null_encryption_test.rb
|
210
|
-
- test/crypto/traditional_encryption_test.rb
|
211
|
-
- test/data/file1.txt
|
212
|
-
- test/data/file1.txt.deflatedData
|
213
|
-
- test/data/file2.txt
|
214
|
-
- test/data/globTest/foo/bar/baz/foo.txt
|
215
|
-
- test/data/globTest/foo.txt
|
216
|
-
- test/data/globTest/food.txt
|
217
|
-
- test/data/globTest.zip
|
218
|
-
- test/data/mimetype
|
219
|
-
- test/data/notzippedruby.rb
|
220
|
-
- test/data/ntfs.zip
|
221
|
-
- test/data/oddExtraField.zip
|
222
|
-
- test/data/rubycode.zip
|
223
|
-
- test/data/rubycode2.zip
|
224
|
-
- test/data/test.xls
|
225
|
-
- test/data/testDirectory.bin
|
226
|
-
- test/data/WarnInvalidDate.zip
|
227
|
-
- test/data/zip64-sample.zip
|
228
|
-
- test/data/zipWithDirs.zip
|
229
|
-
- test/data/zipWithEncryption.zip
|
230
|
-
- test/deflater_test.rb
|
231
|
-
- test/encryption_test.rb
|
232
|
-
- test/entry_set_test.rb
|
233
|
-
- test/entry_test.rb
|
234
|
-
- test/errors_test.rb
|
235
|
-
- test/extra_field_test.rb
|
236
|
-
- test/file_extract_directory_test.rb
|
237
|
-
- test/file_extract_test.rb
|
238
|
-
- test/file_permissions_test.rb
|
239
|
-
- test/file_split_test.rb
|
240
|
-
- test/file_test.rb
|
241
|
-
- test/filesystem/dir_iterator_test.rb
|
242
|
-
- test/filesystem/directory_test.rb
|
243
|
-
- test/filesystem/file_mutating_test.rb
|
244
|
-
- test/filesystem/file_nonmutating_test.rb
|
245
|
-
- test/filesystem/file_stat_test.rb
|
246
|
-
- test/gentestfiles.rb
|
247
|
-
- test/inflater_test.rb
|
248
|
-
- test/input_stream_test.rb
|
249
|
-
- test/ioextras/abstract_input_stream_test.rb
|
250
|
-
- test/ioextras/abstract_output_stream_test.rb
|
251
|
-
- test/ioextras/fake_io_test.rb
|
252
|
-
- test/local_entry_test.rb
|
253
|
-
- test/output_stream_test.rb
|
254
|
-
- test/pass_thru_compressor_test.rb
|
255
|
-
- test/pass_thru_decompressor_test.rb
|
256
|
-
- test/samples/example_recursive_test.rb
|
257
|
-
- test/settings_test.rb
|
258
|
-
- test/test_helper.rb
|
259
|
-
- test/unicode_file_names_and_comments_test.rb
|
260
|
-
- test/zip64_full_test.rb
|
261
|
-
- test/zip64_support_test.rb
|
172
|
+
test_files: []
|