rubyzip 0.5.11 → 0.5.12
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rubyzip might be problematic. Click here for more details.
- data/ChangeLog +26 -0
- data/NEWS +4 -0
- data/Rakefile +1 -1
- data/TODO +4 -0
- data/lib/zip/zip.rb +2 -1
- data/test/gentestfiles.rb +1 -1
- data/test/ziptest.rb +8 -3
- metadata +2 -2
data/ChangeLog
CHANGED
@@ -1,3 +1,29 @@
|
|
1
|
+
2005-09-06 21:19 thomas
|
2
|
+
|
3
|
+
* lib/zip/zip.rb: [no log message]
|
4
|
+
|
5
|
+
2005-09-06 21:08 thomas
|
6
|
+
|
7
|
+
* NEWS: [no log message]
|
8
|
+
|
9
|
+
2005-09-06 21:04 thomas
|
10
|
+
|
11
|
+
* lib/zip/zip.rb, test/gentestfiles.rb, test/ziptest.rb: Fixed
|
12
|
+
problem on windows - tempfile has to be set to binmode again when
|
13
|
+
it is reopened
|
14
|
+
|
15
|
+
2005-09-04 16:45 thomas
|
16
|
+
|
17
|
+
* Rakefile: [no log message]
|
18
|
+
|
19
|
+
2005-09-04 16:33 thomas
|
20
|
+
|
21
|
+
* TODO: [no log message]
|
22
|
+
|
23
|
+
2005-09-04 15:43 thomas
|
24
|
+
|
25
|
+
* test/ziptest.rb: [no log message]
|
26
|
+
|
1
27
|
2005-09-03 10:27 thomas
|
2
28
|
|
3
29
|
* NEWS: [no log message]
|
data/NEWS
CHANGED
data/Rakefile
CHANGED
data/TODO
CHANGED
@@ -1,4 +1,8 @@
|
|
1
1
|
|
2
|
+
* Adjust rdoc stylesheet to advertise inherited methods if possible
|
3
|
+
* Suggestion: Add ZipFile/ZipInputStream example that demonstrates extracting all entries.
|
4
|
+
* Suggestion: ZipFile#extract destination should default to "."
|
5
|
+
* Suggestion: ZipEntry should have extract(), get_input_stream() methods etc
|
2
6
|
* rename write to syswrite
|
3
7
|
* provide alias for write -> syswrite in ioextras.rb
|
4
8
|
* (is buffering used anywhere with write?)
|
data/lib/zip/zip.rb
CHANGED
@@ -19,7 +19,7 @@ end
|
|
19
19
|
|
20
20
|
module Zip
|
21
21
|
|
22
|
-
VERSION = '0.5.
|
22
|
+
VERSION = '0.5.12'
|
23
23
|
|
24
24
|
RUBY_MINOR_VERSION = RUBY_VERSION.split(".")[1].to_i
|
25
25
|
|
@@ -1330,6 +1330,7 @@ module Zip
|
|
1330
1330
|
raise StandardError, "cannot open entry for reading while its open for writing - #{name}"
|
1331
1331
|
end
|
1332
1332
|
@tempFile.open # reopens tempfile from top
|
1333
|
+
@tempFile.binmode
|
1333
1334
|
if block_given?
|
1334
1335
|
begin
|
1335
1336
|
yield(@tempFile)
|
data/test/gentestfiles.rb
CHANGED
@@ -113,7 +113,7 @@ class TestZipFile
|
|
113
113
|
File.open("data/generated/longBinary.bin", "wb") {
|
114
114
|
|file|
|
115
115
|
while (file.tell < 3E5)
|
116
|
-
file << testBinaryPattern << rand
|
116
|
+
file << testBinaryPattern << rand << "\0"
|
117
117
|
end
|
118
118
|
}
|
119
119
|
raise "failed to create test zip '#{TEST_ZIP2.zip_name}'" unless
|
data/test/ziptest.rb
CHANGED
@@ -468,8 +468,8 @@ class ZipInputStreamTest < Test::Unit::TestCase
|
|
468
468
|
ZipInputStream.open(TestZipFile::TEST_ZIP2.zip_name) {
|
469
469
|
|zis|
|
470
470
|
e = zis.get_next_entry
|
471
|
-
assert_equal("#!/usr/bin/env ruby
|
472
|
-
assert_equal("
|
471
|
+
assert_equal("#!/usr/bin/env ruby", zis.gets.chomp)
|
472
|
+
assert_equal("", zis.gets.chomp)
|
473
473
|
assert_equal("$VERBOSE =", zis.read(10))
|
474
474
|
}
|
475
475
|
end
|
@@ -1043,13 +1043,18 @@ class ZipFileTest < Test::Unit::TestCase
|
|
1043
1043
|
assert_equal(entryCount+1, zf.size)
|
1044
1044
|
assert_equal("Putting stuff in data/generated/empty.txt", zf.read("data/generated/empty.txt"))
|
1045
1045
|
|
1046
|
+
zf.get_output_stream('entry.bin') {
|
1047
|
+
|os|
|
1048
|
+
os.write(File.open('data/generated/4entry.zip', 'rb').read)
|
1049
|
+
}
|
1046
1050
|
}
|
1047
1051
|
|
1048
1052
|
ZipFile.open(TEST_ZIP.zip_name) {
|
1049
1053
|
|zf|
|
1050
|
-
assert_equal(entryCount+
|
1054
|
+
assert_equal(entryCount+2, zf.size)
|
1051
1055
|
assert_equal("Putting stuff in newEntry.txt", zf.read("newEntry.txt"))
|
1052
1056
|
assert_equal("Putting stuff in data/generated/empty.txt", zf.read("data/generated/empty.txt"))
|
1057
|
+
assert_equal(File.open('data/generated/4entry.zip', 'rb').read, zf.read("entry.bin"))
|
1053
1058
|
}
|
1054
1059
|
end
|
1055
1060
|
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
|
|
3
3
|
specification_version: 1
|
4
4
|
name: rubyzip
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.5.
|
7
|
-
date: 2005-09-
|
6
|
+
version: 0.5.12
|
7
|
+
date: 2005-09-06 00:00:00 +02:00
|
8
8
|
summary: rubyzip is a ruby module for reading and writing zip files
|
9
9
|
require_paths:
|
10
10
|
- lib
|