Author: donaldp
Date: Sat May 19 00:17:56 2012
New Revision: 1340316
URL: http://svn.apache.org/viewvc?rev=1340316&view=rev
Log:
The recent version version of the zip library does not support to_s on entries
so do to_s on name field instead
Modified:
buildr/trunk/lib/buildr/packaging/zip.rb
buildr/trunk/spec/packaging/archive_spec.rb
Modified: buildr/trunk/lib/buildr/packaging/zip.rb
URL:
http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/packaging/zip.rb?rev=1340316&r1=1340315&r2=1340316&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/packaging/zip.rb (original)
+++ buildr/trunk/lib/buildr/packaging/zip.rb Sat May 19 00:17:56 2012
@@ -177,7 +177,7 @@ module Zip #:nodoc:
class ZipEntrySet
def <<(entry)
- @entrySet[entry.to_s] = entry if entry != nil
+ @entrySet[entry.name.to_s] = entry if entry != nil
end
end
end
Modified: buildr/trunk/spec/packaging/archive_spec.rb
URL:
http://svn.apache.org/viewvc/buildr/trunk/spec/packaging/archive_spec.rb?rev=1340316&r1=1340315&r2=1340316&view=diff
==============================================================================
--- buildr/trunk/spec/packaging/archive_spec.rb (original)
+++ buildr/trunk/spec/packaging/archive_spec.rb Sat May 19 00:17:56 2012
@@ -474,7 +474,7 @@ describe "ZipTask" do
Zip::ZipFile.open @archive do |zip|
zip.entries.each do |entry|
# Ignore the / directory created for empty ZIPs when using
java.util.zip.
- entries[entry.to_s] = zip.read(entry) unless entry.to_s == '/'
+ entries[entry.name.to_s] = zip.read(entry.name) unless entry.name.to_s
== '/'
end
end
yield entries if block_given?