diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9f42181..bc446f0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -5,7 +5,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby: ['2.6', '2.7', '3.0', '3.1', '3.2', '3.3'] + ruby: ['2.7', '3.0', '3.1', '3.2', '3.3'] fail-fast: false steps: - name: Checkout diff --git a/lib/ro_crate/writer.rb b/lib/ro_crate/writer.rb index e53c829..c1c3576 100644 --- a/lib/ro_crate/writer.rb +++ b/lib/ro_crate/writer.rb @@ -44,7 +44,7 @@ def write(dir, overwrite: true, skip_preview: false) # @param destination [String, ::File] The destination where to write the RO-Crate zip. # @param skip_preview [Boolean] Whether or not to skip generation of the RO-Crate preview HTML file. def write_zip(destination, skip_preview: false) - 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? next if skip_preview && entry&.source.is_a?(ROCrate::PreviewGenerator) diff --git a/ro_crate.gemspec b/ro_crate.gemspec index 051ec94..8d0ab70 100644 --- a/ro_crate.gemspec +++ b/ro_crate.gemspec @@ -8,8 +8,8 @@ Gem::Specification.new do |s| s.homepage = 'https://github.com/ResearchObject/ro-crate-ruby' 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 'addressable', '>= 2.7', '< 3' + s.add_runtime_dependency 'rubyzip', '>= 2.3', '< 4' 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'