zip-container 5.0.0.rc1 → 5.0.0.rc2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e3202589c6171c22a5a5ada78a4288c54b26df4af389370057ea91ad4cc67de9
4
- data.tar.gz: 5e89d3760a90c36cf7ce9d18a9065bf6194eddfe8b07b4604b20362155d158a7
3
+ metadata.gz: d56e4e0c34e786a2c40592c5162bd45ca4cb642e43a78af15d06a8ce0c6aa827
4
+ data.tar.gz: 67fe6c6ad79a1d462ad54496c27f80607d0eb5e92f31a8468a01129ced633d58
5
5
  SHA512:
6
- metadata.gz: 271646c409d64c6b6286f79c00fae83ff354025d475f90f362365b6d862e204113a23f75a01d5a28e87ffc0938870af95c3868a013abee80bb5b79bf3957e5d2
7
- data.tar.gz: 6cfb0c5f7a97f9b19a6f5e88c53de07dacbbe2facd1144b530c337e4eb360468cb2b8198d59850637974de9de37388d9d013a76df4f6661ae8f9fc22e075182f
6
+ metadata.gz: 64bd83f999efa1b885b99d3a29f01aea5cf078cf4d5ce3d232cf0dbe342e61602c5fb8339af87e9f57d41c4e7e13bf64359889389cbc38a87d3d242f67079f28
7
+ data.tar.gz: e70fb9bfb934c24148b3ec88b1c6a9665ed760e2f5bfc6325c6231704e4538ce4214f9fa85ceb32515b6f9ddbb0e40a787cdda7f2a127c123d11b1ace3d55376
data/CHANGES.md CHANGED
@@ -9,6 +9,9 @@
9
9
  * Move to README.md (and update).
10
10
  * Update minimum ruby version required to 2.7.
11
11
  * Update RubyZip version to v2.4.
12
+ * Ensure 'managed_directory' is required at the top-level.
13
+ * Add note README about ruby and RubyZip versions.
14
+ * Apply frozen_string_literal magic comment to all files.
12
15
 
13
16
  ### Internal/tooling:
14
17
 
@@ -22,6 +25,7 @@
22
25
  * Update Rubocop.
23
26
  * Skip certain tests in non-POSIX environments.
24
27
  * Fix managed directory test on Windows.
28
+ * Ensure simplecov is required first with MiniTest.
25
29
 
26
30
  ## Version 4.0.2
27
31
 
data/Gemfile CHANGED
@@ -1,4 +1,6 @@
1
- # Copyright (c) 2014 The University of Manchester, UK.
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2014-2025 The University of Manchester, UK.
2
4
  #
3
5
  # All rights reserved.
4
6
  #
data/README.md CHANGED
@@ -28,6 +28,10 @@ The `ZipContainer::Dir` class mimics, where possible, the core ruby [`Dir` API](
28
28
 
29
29
  There are some examples of how to use the library provided in the examples directory. See the contents of the tests directory for even more.
30
30
 
31
+ #### Versions
32
+
33
+ Version 5 of this library will be the last to support Ruby 2.7 and the last to support RubyZip 2.4. Version 6 will require at least Ruby 3.0 and RubyZip 3.0.
34
+
31
35
  ### What this library can not do yet
32
36
 
33
37
  The basic requirements of a ZIP Container are all implemented but memory resident ZIP Container files are not yet supported. Presently all operations are performed on files that are resident on disk.
data/Rakefile CHANGED
@@ -1,4 +1,6 @@
1
- # Copyright (c) 2013-2024 The University of Manchester, UK.
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2013-2025 The University of Manchester, UK.
2
4
  #
3
5
  # All rights reserved.
4
6
  #
@@ -38,6 +40,7 @@ require 'rubocop/rake_task'
38
40
  task default: :test
39
41
 
40
42
  Minitest::TestTask.create do |test|
43
+ test.framework = 'require "simplecov"'
41
44
  test.test_globs = 'test/**/*_test.rb'
42
45
  end
43
46
 
@@ -1,5 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
- # Copyright (c) 2013 The University of Manchester, UK.
2
+ # frozen_string_literal: true
3
+
4
+ # Copyright (c) 2013-2025 The University of Manchester, UK.
3
5
  #
4
6
  # All rights reserved.
5
7
  #
@@ -1,5 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
- # Copyright (c) 2013 The University of Manchester, UK.
2
+ # frozen_string_literal: true
3
+
4
+ # Copyright (c) 2013-2025 The University of Manchester, UK.
3
5
  #
4
6
  # All rights reserved.
5
7
  #
@@ -1,5 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
- # Copyright (c) 2013 The University of Manchester, UK.
2
+ # frozen_string_literal: true
3
+
4
+ # Copyright (c) 2013-2025 The University of Manchester, UK.
3
5
  #
4
6
  # All rights reserved.
5
7
  #
@@ -1,4 +1,6 @@
1
- # Copyright (c) 2014-2024 The University of Manchester, UK.
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2014-2025 The University of Manchester, UK.
2
4
  #
3
5
  # All rights reserved.
4
6
  #
@@ -50,7 +52,7 @@ module ZipContainer
50
52
 
51
53
  # :stopdoc:
52
54
  # The reserved mimetype file name for standard ZipContainers.
53
- MIMETYPE_FILE = 'mimetype'.freeze
55
+ MIMETYPE_FILE = 'mimetype'
54
56
 
55
57
  def initialize(location)
56
58
  @container = open_container(location)
@@ -1,4 +1,6 @@
1
- # Copyright (c) 2014-2024 The University of Manchester, UK.
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2014-2025 The University of Manchester, UK.
2
4
  #
3
5
  # All rights reserved.
4
6
  #
@@ -1,4 +1,6 @@
1
- # Copyright (c) 2013-2024 The University of Manchester, UK.
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2013-2025 The University of Manchester, UK.
2
4
  #
3
5
  # All rights reserved.
4
6
  #
@@ -1,4 +1,6 @@
1
- # Copyright (c) 2013-2024 The University of Manchester, UK.
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2013-2025 The University of Manchester, UK.
2
4
  #
3
5
  # All rights reserved.
4
6
  #
@@ -1,4 +1,6 @@
1
- # Copyright (c) 2013-2024 The University of Manchester, UK.
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2013-2025 The University of Manchester, UK.
2
4
  #
3
5
  # All rights reserved.
4
6
  #
@@ -1,4 +1,6 @@
1
- # Copyright (c) 2013-2024 The University of Manchester, UK.
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2013-2025 The University of Manchester, UK.
2
4
  #
3
5
  # All rights reserved.
4
6
  #
@@ -1,4 +1,6 @@
1
- # Copyright (c) 2013-2024 The University of Manchester, UK.
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2013-2025 The University of Manchester, UK.
2
4
  #
3
5
  # All rights reserved.
4
6
  #
@@ -1,4 +1,6 @@
1
- # Copyright (c) 2013-2024 The University of Manchester, UK.
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2013-2025 The University of Manchester, UK.
2
4
  #
3
5
  # All rights reserved.
4
6
  #
@@ -1,4 +1,6 @@
1
- # Copyright (c) 2013-2024 The University of Manchester, UK.
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2013-2025 The University of Manchester, UK.
2
4
  #
3
5
  # All rights reserved.
4
6
  #
@@ -1,4 +1,6 @@
1
- # Copyright (c) 2014-2024 The University of Manchester, UK.
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2014-2025 The University of Manchester, UK.
2
4
  #
3
5
  # All rights reserved.
4
6
  #
@@ -51,9 +53,7 @@ module ZipContainer
51
53
  def entry_name(entry)
52
54
  name = entry.is_a?(::Zip::Entry) ? entry.name : entry
53
55
 
54
- name.chomp!('/') if name.respond_to?(:chomp!)
55
-
56
- name
56
+ name.respond_to?(:chomp) ? name.chomp('/') : name
57
57
  end
58
58
  end
59
59
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright (c) 2014-2025 The University of Manchester, UK.
2
4
  #
3
5
  # All rights reserved.
@@ -31,5 +33,5 @@
31
33
  # Author: Robert Haines
32
34
 
33
35
  module ZipContainer
34
- VERSION = '5.0.0.rc1' # :nodoc:
36
+ VERSION = '5.0.0.rc2' # :nodoc:
35
37
  end
data/lib/zip-container.rb CHANGED
@@ -1,4 +1,6 @@
1
- # Copyright (c) 2013-2024 The University of Manchester, UK.
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2013-2025 The University of Manchester, UK.
2
4
  #
3
5
  # All rights reserved.
4
6
  #
@@ -30,8 +32,9 @@
30
32
  #
31
33
  # Author: Robert Haines
32
34
 
33
- require 'zip-container/file'
34
- require 'zip-container/dir'
35
+ require_relative 'zip-container/file'
36
+ require_relative 'zip-container/dir'
37
+ require_relative 'zip-container/managed_directory'
35
38
 
36
39
  # This is a ruby library to read and write ZIP Container Format files. See the
37
40
  # ZipContainer::Container class for more information.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright (c) 2013-2025 The University of Manchester, UK.
2
4
  #
3
5
  # All rights reserved.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zip-container
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0.rc1
4
+ version: 5.0.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Haines
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2025-02-14 00:00:00.000000000 Z
12
+ date: 2025-02-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rubyzip
@@ -204,9 +204,9 @@ licenses:
204
204
  - BSD
205
205
  metadata:
206
206
  bug_tracker_uri: https://github.com/hainesr/ruby-zip-container/issues
207
- changelog_uri: https://github.com/hainesr/ruby-zip-container/blob/v5.0.0.rc1/CHANGES.md
207
+ changelog_uri: https://github.com/hainesr/ruby-zip-container/blob/v5.0.0.rc2/CHANGES.md
208
208
  documentation_uri: https://hainesr.github.io/ruby-zip-container
209
- source_code_uri: https://github.com/hainesr/ruby-zip-container/tree/v5.0.0.rc1
209
+ source_code_uri: https://github.com/hainesr/ruby-zip-container/tree/v5.0.0.rc2
210
210
  rubygems_mfa_required: 'true'
211
211
  post_install_message:
212
212
  rdoc_options: []