diff --git a/Gemfile.lock b/Gemfile.lock index cb57a56..40b9b0a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,7 +4,7 @@ PATH iron_worker_ng (1.1.0) bundler iron_core (>= 1.0.0) - rubyzip (= 0.9.9) + rubyzip (>= 1.0.0) GEM remote: https://rubygems.org/ @@ -57,7 +57,7 @@ GEM rest_client (>= 1.7.1) rest_client (1.7.2) netrc (~> 0.7.7) - rubyzip (0.9.9) + rubyzip (1.1.0) simple_oauth (0.2.0) test-unit (2.5.5) thread_safe (0.1.3) diff --git a/iron_worker_ng.gemspec b/iron_worker_ng.gemspec index 3b001ab..db7aad6 100644 --- a/iron_worker_ng.gemspec +++ b/iron_worker_ng.gemspec @@ -18,7 +18,7 @@ Gem::Specification.new do |gem| gem.add_runtime_dependency 'iron_core', '>= 1.0.0' gem.add_runtime_dependency 'bundler' - gem.add_runtime_dependency 'rubyzip', '= 0.9.9' + gem.add_runtime_dependency 'rubyzip', '>= 1.0.0' gem.add_development_dependency 'test-unit' gem.add_development_dependency 'minitest' diff --git a/lib/iron_worker_ng/code/container/zip.rb b/lib/iron_worker_ng/code/container/zip.rb index 757ad3d..5960c33 100644 --- a/lib/iron_worker_ng/code/container/zip.rb +++ b/lib/iron_worker_ng/code/container/zip.rb @@ -1,6 +1,6 @@ -require 'zip/zip' +require 'zip' -Zip.options[:continue_on_exists_proc] = true +Zip.continue_on_exists_proc = true module IronWorkerNG module Code @@ -10,7 +10,7 @@ def initialize super @name = @name + '.zip' - @zip = ::Zip::ZipFile.open(@name, ::Zip::ZipFile::CREATE) + @zip = ::Zip::File.open(@name, ::Zip::File::CREATE) end def add(dest, src) diff --git a/test/helpers.rb b/test/helpers.rb index 0ec895b..202cb1b 100644 --- a/test/helpers.rb +++ b/test/helpers.rb @@ -31,7 +31,7 @@ def worker_code(str) def inspect_zip(code) zip_file = code.create_container - yield Zip::ZipFile.open(zip_file) + yield Zip::File.open(zip_file) File.unlink zip_file end diff --git a/test/test_common_features.rb b/test/test_common_features.rb index 5d018ec..b4cdad4 100644 --- a/test/test_common_features.rb +++ b/test/test_common_features.rb @@ -1,5 +1,5 @@ require_relative 'helpers' -require 'zip/zip' +require 'zip' class CommonFeaturesTest < IWNGTest