archive-zip 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/LICENSE +1 -1
- data/NEWS.md +6 -0
- data/README.md +1 -1
- data/lib/archive/zip/version.rb +1 -1
- data/spec/archive/zip/codec/deflate/compress/open_spec.rb +2 -2
- data/spec/archive/zip/codec/deflate/compress/write_spec.rb +2 -0
- data/spec/archive/zip/codec/traditional_encryption/decrypt/read_spec.rb +2 -0
- data/spec/archive/zip/codec/traditional_encryption/encrypt/write_spec.rb +2 -0
- data/spec/zlib/zreader/checksum_spec.rb +2 -2
- data/spec/zlib/zreader/read_spec.rb +9 -0
- data/spec/zlib/zwriter/checksum_spec.rb +2 -2
- metadata +12 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3ed9fe304aaaccf2112d79acd33be3594225385
|
4
|
+
data.tar.gz: c09cbfbc1500cc9788a1f495e5063dcfa3660ea1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da51b451dacabbb6fbcdad58d9fc0851d474e70ba0047df1676f5ecb148e501d82341122ebe533ff67ab2341201ffc6225dc8c0da9350fc197379168605384b1
|
7
|
+
data.tar.gz: 764188649dca68e41c8fd651fd1aba216e257d7856dcb7aa86c5f71d8d5105d185168c4b29c11034f4a1e0ee92b2dab4f1a5c54dcb8c4815eb32f66da7267993
|
data/.yardopts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
--protected --private --
|
1
|
+
--protected --private --main README.md lib/**/*.rb - NEWS.md LICENSE
|
data/LICENSE
CHANGED
data/NEWS.md
CHANGED
@@ -6,6 +6,12 @@ detailed information is available in the rest of the documentation.
|
|
6
6
|
**NOTE:** Date stamps in the following entries are in YYYY/MM/DD format.
|
7
7
|
|
8
8
|
|
9
|
+
## v0.11.0 (2018/01/28)
|
10
|
+
|
11
|
+
### Fixes
|
12
|
+
|
13
|
+
* Upgrade gems required for development.
|
14
|
+
|
9
15
|
## v0.10.0 (2017/09/04)
|
10
16
|
|
11
17
|
### Fixes
|
data/README.md
CHANGED
@@ -229,7 +229,7 @@ be more easily accepted if they are consistent with the rest of the code.
|
|
229
229
|
```
|
230
230
|
(The MIT License)
|
231
231
|
|
232
|
-
Copyright (c)
|
232
|
+
Copyright (c) 2018 Jeremy Bopp
|
233
233
|
|
234
234
|
Permission is hereby granted, free of charge, to any person obtaining
|
235
235
|
a copy of this software and associated documentation files (the
|
data/lib/archive/zip/version.rb
CHANGED
@@ -31,7 +31,7 @@ describe "Archive::Zip::Codec::Deflate::Compress.open" do
|
|
31
31
|
it "allows level to be set" do
|
32
32
|
data = DeflateSpecs.test_data
|
33
33
|
compressed_data = BinaryStringIO.new
|
34
|
-
|
34
|
+
Archive::Zip::Codec::Deflate::Compress.open(
|
35
35
|
compressed_data, Zlib::DEFAULT_COMPRESSION
|
36
36
|
) { |c| c.write(data) }
|
37
37
|
|
@@ -39,7 +39,7 @@ describe "Archive::Zip::Codec::Deflate::Compress.open" do
|
|
39
39
|
|
40
40
|
data = DeflateSpecs.test_data
|
41
41
|
compressed_data = BinaryStringIO.new
|
42
|
-
|
42
|
+
Archive::Zip::Codec::Deflate::Compress.open(
|
43
43
|
compressed_data, Zlib::NO_COMPRESSION
|
44
44
|
) { |c| c.write(data) }
|
45
45
|
|
@@ -56,6 +56,7 @@ describe "Archive::Zip::Codec::Deflate::Compress#write" do
|
|
56
56
|
class << compressed_data
|
57
57
|
alias :write_orig :write
|
58
58
|
def write(buffer)
|
59
|
+
@error_raised ||= false
|
59
60
|
if @error_raised then
|
60
61
|
@error_raised = false
|
61
62
|
write_orig(buffer)
|
@@ -85,6 +86,7 @@ describe "Archive::Zip::Codec::Deflate::Compress#write" do
|
|
85
86
|
class << compressed_data
|
86
87
|
alias :write_orig :write
|
87
88
|
def write(buffer)
|
89
|
+
@error_raised ||= false
|
88
90
|
if @error_raised then
|
89
91
|
@error_raised = false
|
90
92
|
write_orig(buffer)
|
@@ -65,6 +65,7 @@ describe "Archive::Zip::Codec::TraditionalEncryption::Decrypt#read" do
|
|
65
65
|
class << ed
|
66
66
|
alias :read_orig :read
|
67
67
|
def read(length = nil, buffer = nil)
|
68
|
+
@error_raised ||= false
|
68
69
|
if @error_raised then
|
69
70
|
@error_raised = false
|
70
71
|
read_orig(length, buffer)
|
@@ -97,6 +98,7 @@ describe "Archive::Zip::Codec::TraditionalEncryption::Decrypt#read" do
|
|
97
98
|
class << ed
|
98
99
|
alias :read_orig :read
|
99
100
|
def read(length = nil, buffer = nil)
|
101
|
+
@error_raised ||= false
|
100
102
|
if @error_raised then
|
101
103
|
@error_raised = false
|
102
104
|
read_orig(length, buffer)
|
@@ -53,6 +53,7 @@ describe "Archive::Zip::Codec::TraditionalEncryption::Encrypt#write" do
|
|
53
53
|
class << encrypted_data
|
54
54
|
alias :write_orig :write
|
55
55
|
def write(buffer)
|
56
|
+
@error_raised ||= false
|
56
57
|
if @error_raised then
|
57
58
|
@error_raised = false
|
58
59
|
write_orig(buffer)
|
@@ -86,6 +87,7 @@ describe "Archive::Zip::Codec::TraditionalEncryption::Encrypt#write" do
|
|
86
87
|
class << encrypted_data
|
87
88
|
alias :write_orig :write
|
88
89
|
def write(buffer)
|
90
|
+
@error_raised ||= false
|
89
91
|
if @error_raised then
|
90
92
|
@error_raised = false
|
91
93
|
write_orig(buffer)
|
@@ -33,10 +33,10 @@ describe "Zlib::ZReader#checksum" do
|
|
33
33
|
closed_zr = ZlibSpecs.compressed_data_raw do |f|
|
34
34
|
Zlib::ZReader.open(f, -15) do |zr|
|
35
35
|
zr.read
|
36
|
-
zr.checksum.
|
36
|
+
zr.checksum.must_be_nil
|
37
37
|
zr
|
38
38
|
end
|
39
39
|
end
|
40
|
-
closed_zr.checksum.
|
40
|
+
closed_zr.checksum.must_be_nil
|
41
41
|
end
|
42
42
|
end
|
@@ -17,6 +17,9 @@ describe "Zlib::ZReader#read" do
|
|
17
17
|
zr.read
|
18
18
|
rescue Zlib::BufError
|
19
19
|
end
|
20
|
+
|
21
|
+
# Avoid warnings from zlib caused by closing the un-finished inflater.
|
22
|
+
def zr.close; end
|
20
23
|
end
|
21
24
|
end
|
22
25
|
|
@@ -38,12 +41,18 @@ describe "Zlib::ZReader#read" do
|
|
38
41
|
truncated_data = ZlibSpecs.compressed_data { |cd| cd.read(100) }
|
39
42
|
Zlib::ZReader.open(BinaryStringIO.new(truncated_data)) do |zr|
|
40
43
|
lambda { zr.read }.must_raise Zlib::BufError
|
44
|
+
|
45
|
+
# Avoid warnings from zlib caused by closing the un-finished inflater.
|
46
|
+
def zr.close; end
|
41
47
|
end
|
42
48
|
end
|
43
49
|
|
44
50
|
it "raises Zlib::BufError when reading empty data" do
|
45
51
|
Zlib::ZReader.open(BinaryStringIO.new()) do |zr|
|
46
52
|
lambda { zr.read }.must_raise Zlib::BufError
|
53
|
+
|
54
|
+
# Avoid warnings from zlib caused by closing the un-finished inflater.
|
55
|
+
def zr.close; end
|
47
56
|
end
|
48
57
|
end
|
49
58
|
end
|
@@ -35,9 +35,9 @@ describe "Zlib::ZWriter#checksum" do
|
|
35
35
|
closed_zw = Zlib::ZWriter.open(compressed_data, nil, -15) do |zw|
|
36
36
|
zw.write(ZlibSpecs.test_data)
|
37
37
|
zw.flush
|
38
|
-
zw.checksum.
|
38
|
+
zw.checksum.must_be_nil
|
39
39
|
zw
|
40
40
|
end
|
41
|
-
closed_zw.checksum.
|
41
|
+
closed_zw.checksum.must_be_nil
|
42
42
|
end
|
43
43
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: archive-zip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Bopp
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2018-01-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: io-like
|
@@ -32,84 +32,70 @@ dependencies:
|
|
32
32
|
requirements:
|
33
33
|
- - "~>"
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: '
|
35
|
+
version: '12.3'
|
36
36
|
type: :development
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - "~>"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '
|
42
|
+
version: '12.3'
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: minitest
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - "~>"
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: '5.
|
49
|
+
version: '5.11'
|
50
50
|
type: :development
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
54
|
- - "~>"
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: '5.
|
56
|
+
version: '5.11'
|
57
57
|
- !ruby/object:Gem::Dependency
|
58
58
|
name: yard
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
61
|
- - "~>"
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version:
|
63
|
+
version: 0.9.12
|
64
64
|
type: :development
|
65
65
|
prerelease: false
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
68
|
- - "~>"
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version:
|
71
|
-
- !ruby/object:Gem::Dependency
|
72
|
-
name: yard-redcarpet-ext
|
73
|
-
requirement: !ruby/object:Gem::Requirement
|
74
|
-
requirements:
|
75
|
-
- - "~>"
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: '0.0'
|
78
|
-
type: :development
|
79
|
-
prerelease: false
|
80
|
-
version_requirements: !ruby/object:Gem::Requirement
|
81
|
-
requirements:
|
82
|
-
- - "~>"
|
83
|
-
- !ruby/object:Gem::Version
|
84
|
-
version: '0.0'
|
70
|
+
version: 0.9.12
|
85
71
|
- !ruby/object:Gem::Dependency
|
86
72
|
name: github-markup
|
87
73
|
requirement: !ruby/object:Gem::Requirement
|
88
74
|
requirements:
|
89
75
|
- - "~>"
|
90
76
|
- !ruby/object:Gem::Version
|
91
|
-
version: '1.
|
77
|
+
version: '1.6'
|
92
78
|
type: :development
|
93
79
|
prerelease: false
|
94
80
|
version_requirements: !ruby/object:Gem::Requirement
|
95
81
|
requirements:
|
96
82
|
- - "~>"
|
97
83
|
- !ruby/object:Gem::Version
|
98
|
-
version: '1.
|
84
|
+
version: '1.6'
|
99
85
|
- !ruby/object:Gem::Dependency
|
100
86
|
name: redcarpet
|
101
87
|
requirement: !ruby/object:Gem::Requirement
|
102
88
|
requirements:
|
103
89
|
- - "~>"
|
104
90
|
- !ruby/object:Gem::Version
|
105
|
-
version: '3.
|
91
|
+
version: '3.4'
|
106
92
|
type: :development
|
107
93
|
prerelease: false
|
108
94
|
version_requirements: !ruby/object:Gem::Requirement
|
109
95
|
requirements:
|
110
96
|
- - "~>"
|
111
97
|
- !ruby/object:Gem::Version
|
112
|
-
version: '3.
|
98
|
+
version: '3.4'
|
113
99
|
description: |
|
114
100
|
Archive::Zip provides a simple Ruby-esque interface to creating, extracting, and
|
115
101
|
updating ZIP archives. This implementation is 100% Ruby and loosely modeled on
|