From 91642caed645d92318256b5f78ce3c28043cc2f5 Mon Sep 17 00:00:00 2001 From: thomas Date: Sat, 25 Feb 2006 11:04:44 +0000 Subject: [PATCH] Did away with ZipStreamableFile. --- lib/zip/zip.rb | 10 ---------- test/ziptest.rb | 21 --------------------- 2 files changed, 31 deletions(-) diff --git a/lib/zip/zip.rb b/lib/zip/zip.rb index 276dd9f..545b322 100755 --- a/lib/zip/zip.rb +++ b/lib/zip/zip.rb @@ -1500,16 +1500,6 @@ module Zip end - class ZipStreamableFile < ZipEntry - def initialize(zipfile, entry, srcPath = nil, permissionInt = nil) - super(zipfile, entry) - - @ftype = :file - entry.get_extra_attributes_from_path(srcPath) if (srcPath) - @unix_perms = permissionInt if (permissionInt) - end - end - class ZipStreamableDirectory < ZipEntry def initialize(zipfile, entry, srcPath = nil, permissionInt = nil) super(zipfile, entry) diff --git a/test/ziptest.rb b/test/ziptest.rb index 04fe228..7e04722 100755 --- a/test/ziptest.rb +++ b/test/ziptest.rb @@ -94,8 +94,6 @@ class ZipEntryTest < Test::Unit::TestCase assert(entry7 != "hello") assert(entry7 != 12) - - assert(entry7 != ZipStreamableFile.new(entry7, "aPath")) end def test_compare @@ -1502,25 +1500,6 @@ class ZipFileExtractDirectoryTest < Test::Unit::TestCase end end -class ZipStreamableFileTest < Test::Unit::TestCase - def test_equality - zipEntry1 = ZipEntry.new("zf.zip", "entryname1", "comment") - zipEntry2 = ZipEntry.new("zf.zip", "entryname2", "comment") - - zipStreamableFile1 = ZipStreamableFile.new(zipEntry1, "path") - zipStreamableFile2 = ZipStreamableFile.new(zipEntry1, "path") - zipStreamableFile3 = ZipStreamableFile.new(zipEntry1, "anotherPath") - zipStreamableFile4 = ZipStreamableFile.new(zipEntry2, "path") - - assert_equal(zipStreamableFile1, zipStreamableFile1) - assert_equal(zipStreamableFile1, zipStreamableFile2) - assert(zipStreamableFile1 != zipStreamableFile3) - assert(zipStreamableFile1 != zipStreamableFile4) - assert(zipStreamableFile1 != zipEntry1) - assert(zipStreamableFile1 != "hej") - end -end - class ZipExtraFieldTest < Test::Unit::TestCase def test_new extra_pure = ZipExtraField.new("")