2013-08-22 05:45:29 +08:00
|
|
|
require 'bundler/gem_tasks'
|
2005-02-14 05:44:15 +08:00
|
|
|
require 'rake/testtask'
|
2009-12-31 23:25:47 +08:00
|
|
|
|
2015-03-25 00:10:04 +08:00
|
|
|
task default: :test
|
2005-02-14 05:44:15 +08:00
|
|
|
|
2010-11-27 15:15:18 +08:00
|
|
|
Rake::TestTask.new(:test) do |test|
|
2014-01-21 05:31:06 +08:00
|
|
|
test.libs << 'lib'
|
|
|
|
test.libs << 'test'
|
|
|
|
test.pattern = 'test/**/*_test.rb'
|
2010-11-27 15:15:18 +08:00
|
|
|
test.verbose = true
|
Add read/write support for zip64 extensions
This commit adds the capability of creating archives larger than
4GB via zip64 extensions. It also fixes bugs reading archives of
this size (specifically, the 64-bit offset of the local file
header was not being read from the central directory entry).
To maximize compatibility, zip64 extensions are used only when
required. Unfortunately, at the time we write a local file header,
we don't know the size of the file and thus whether a Zip64
Extended Information Extra Field will be required. Therefore
this commit writes a 'placeholder' extra field to reserve space
for the zip64 entry, which will be written if necessary when
we update the local entry with the final sizes and CRC. I use
the signature "\x99\x99" for this field, following the example
of DotNetZip which does the same.
This commit also adds a rake task, zip64_full_test, which
fully tests zip64 by actually creating and verifying a 4GB zip
file. Please note, however, that this test requires UnZip
version 6.00 or newer, which may not be supplied by your OS.
This test doesn't run along with the main unit tests because
it takes a few minutes to complete.
2013-09-28 10:41:00 +08:00
|
|
|
end
|
2013-08-27 04:26:14 +08:00
|
|
|
|
2015-03-24 00:06:01 +08:00
|
|
|
# Rake::TestTask.new(:zip64_full_test) do |test|
|
2014-01-21 05:31:06 +08:00
|
|
|
# test.libs << File.join(File.dirname(__FILE__), 'lib')
|
|
|
|
# test.libs << File.join(File.dirname(__FILE__), 'test')
|
|
|
|
# test.pattern = File.join(File.dirname(__FILE__), 'test/zip64_full_test.rb')
|
|
|
|
# test.verbose = true
|
2015-03-24 00:06:01 +08:00
|
|
|
# end
|