From fa8ec939b5fd7865c173871f9182097bc12aad40 Mon Sep 17 00:00:00 2001 From: Finn Bacall Date: Thu, 21 Sep 2023 12:44:38 +0100 Subject: [PATCH] Test with `rubyzip` `v3.0.0.alpha`. #30 --- Gemfile | 2 ++ lib/ro_crate/writer.rb | 2 +- ro_crate.gemspec | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index fa75df1..fb348d7 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,5 @@ source 'https://rubygems.org' gemspec + +gem 'rubyzip', git: 'https://github.com/rubyzip/rubyzip.git', branch: 'v3.0.0.alpha' \ No newline at end of file diff --git a/lib/ro_crate/writer.rb b/lib/ro_crate/writer.rb index 619680a..31a806e 100644 --- a/lib/ro_crate/writer.rb +++ b/lib/ro_crate/writer.rb @@ -41,7 +41,7 @@ def write(dir, overwrite: true) # # @param destination [String, ::File] The destination where to write the RO-Crate zip. def write_zip(destination) - Zip::File.open(destination, Zip::File::CREATE) do |zip| + Zip::File.open(destination, create: true) do |zip| @crate.payload.each do |path, entry| next if entry.directory? if entry.symlink? diff --git a/ro_crate.gemspec b/ro_crate.gemspec index 56039eb..8d419b7 100644 --- a/ro_crate.gemspec +++ b/ro_crate.gemspec @@ -9,7 +9,7 @@ Gem::Specification.new do |s| s.require_paths = ['lib'] s.licenses = ['MIT'] s.add_runtime_dependency 'addressable', '>= 2.7', '< 2.9' - s.add_runtime_dependency 'rubyzip', '~> 2.0.0' + # s.add_runtime_dependency 'rubyzip', '~> 2.0.0' s.add_development_dependency 'rake', '~> 13.0.0' s.add_development_dependency 'test-unit', '~> 3.5.3' s.add_development_dependency 'simplecov', '~> 0.21.2'