zip-container 5.0.0.rc1 → 5.0.0
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 +4 -4
- data/CHANGES.md +8 -0
- data/CITATION.cff +54 -0
- data/Gemfile +3 -1
- data/README.md +5 -1
- data/Rakefile +4 -1
- data/examples/create-zip-container +3 -1
- data/examples/verify-zip-container +3 -1
- data/examples/zip-container-info +3 -1
- data/lib/zip-container/container.rb +4 -2
- data/lib/zip-container/dir.rb +3 -1
- data/lib/zip-container/errors.rb +3 -1
- data/lib/zip-container/file.rb +3 -1
- data/lib/zip-container/managed_directory.rb +3 -1
- data/lib/zip-container/managed_entries.rb +3 -1
- data/lib/zip-container/managed_entry.rb +3 -1
- data/lib/zip-container/managed_file.rb +3 -1
- data/lib/zip-container/reserved_names.rb +3 -1
- data/lib/zip-container/util.rb +4 -4
- data/lib/zip-container/version.rb +3 -1
- data/lib/zip-container.rb +6 -3
- data/zip-container.gemspec +4 -2
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a530c28c4a1a55dd29e2f84a8ebafef6549271353f62f915625ae9756afbaf1
|
4
|
+
data.tar.gz: c26a6e991c7ddf7f1ef86542addd4a44d2ea68a3abac69b049ca21718f20ac71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5ccf5519877655da4060b48b3084b830897c5aa51b739cf5e340a3c46c355d0bbf84adc84e638979c303d39081047b12a6dc8015c9233fb6eecabd60b63afd7
|
7
|
+
data.tar.gz: 04ac82e77f79d02ad2445fa92095a89eaf642f6b713f84cfc0eddcb73f0ef716663bd234afd9ac586daccfa5f5d0d347a81687d26fd85607766b3e91008fef71
|
data/CHANGES.md
CHANGED
@@ -9,6 +9,11 @@
|
|
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.
|
15
|
+
* Update OCF references in README and gemspec.
|
16
|
+
* Add a CITATION.cff file.
|
12
17
|
|
13
18
|
### Internal/tooling:
|
14
19
|
|
@@ -22,6 +27,9 @@
|
|
22
27
|
* Update Rubocop.
|
23
28
|
* Skip certain tests in non-POSIX environments.
|
24
29
|
* Fix managed directory test on Windows.
|
30
|
+
* Ensure simplecov is required first with MiniTest.
|
31
|
+
* Add an Action to build the latest documentation.
|
32
|
+
* Set Rubocop output to use GitHub format.
|
25
33
|
|
26
34
|
## Version 4.0.2
|
27
35
|
|
data/CITATION.cff
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
# This CITATION.cff file was created by ruby-cff (v 1.3.0).
|
2
|
+
# Gem: https://rubygems.org/gems/cff
|
3
|
+
# CFF: https://citation-file-format.github.io/
|
4
|
+
|
5
|
+
cff-version: 1.2.0
|
6
|
+
title: Ruby Zip Container
|
7
|
+
message: If you use Ruby Zip Container in your work, please cite it using the following metadata
|
8
|
+
type: software
|
9
|
+
authors:
|
10
|
+
- given-names: Robert
|
11
|
+
family-names: Haines
|
12
|
+
affiliation: The University of Manchester
|
13
|
+
orcid: https://orcid.org/0000-0002-9538-7919
|
14
|
+
- given-names: Finn
|
15
|
+
family-names: Bacall
|
16
|
+
affiliation: The University of Manchester
|
17
|
+
repository-code: https://github.com/hainesr/ruby-zip-container
|
18
|
+
url: https://hainesr.github.io/ruby-zip-container/
|
19
|
+
repository-artifact: https://rubygems.org/gems/zip-container
|
20
|
+
abstract: A Ruby library for working with ZIP Container Format files.
|
21
|
+
keywords:
|
22
|
+
- ruby
|
23
|
+
- zip
|
24
|
+
- EPUB
|
25
|
+
- OCF
|
26
|
+
- zip-container
|
27
|
+
license: BSD-3-Clause
|
28
|
+
references:
|
29
|
+
- title: EPUB Open Container Format (OCF) 3.0
|
30
|
+
authors:
|
31
|
+
- name: International Digital Publishing Forum (IDPF)
|
32
|
+
editors:
|
33
|
+
- given-names: James
|
34
|
+
family-names: Pritchett
|
35
|
+
- given-names: Markus
|
36
|
+
family-names: Gylling
|
37
|
+
affiliation: DAISY Consortium
|
38
|
+
type: standard
|
39
|
+
url: https://idpf.org/epub/30/spec/epub30-ocf.html
|
40
|
+
- title: EPUB 3.3 - Open Container Format (OCF)
|
41
|
+
authors:
|
42
|
+
- name: W3C
|
43
|
+
editors:
|
44
|
+
- given-names: Matt
|
45
|
+
family-names: Garrish
|
46
|
+
affiliation: DAISY Consortium
|
47
|
+
- given-names: Ivan
|
48
|
+
family-names: Herman
|
49
|
+
affiliation: W3C
|
50
|
+
orcid: https://orcid.org/0000-0003-0782-2704
|
51
|
+
- given-names: Dave
|
52
|
+
family-names: Cramer
|
53
|
+
type: standard
|
54
|
+
url: https://www.w3.org/TR/epub-33/#sec-ocf
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -12,7 +12,7 @@ A Ruby library for creating, editing and validating ZIP Container files.
|
|
12
12
|
|
13
13
|
### Synopsis
|
14
14
|
|
15
|
-
This is a Ruby library for working with ZIP Container files. See the [
|
15
|
+
This is a Ruby library for working with ZIP Container files. See the OCF [[1](http://www.idpf.org/epub/30/spec/epub30-ocf.html), [2](https://www.w3.org/TR/epub-33/#sec-ocf)] and UCF [[3](https://learn.adobe.com/wiki/display/PDFNAV/Universal+Container+Format)] specifications for more details.
|
16
16
|
|
17
17
|
If you are wanting to work with UCF files in particular, there is a Ruby Gem that builds on this one specifically for that. Please see:
|
18
18
|
* [GitHub](https://github.com/hainesr/ruby-ucf)
|
@@ -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
|
-
#
|
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
|
|
data/examples/zip-container-info
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
#
|
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'
|
55
|
+
MIMETYPE_FILE = 'mimetype'
|
54
56
|
|
55
57
|
def initialize(location)
|
56
58
|
@container = open_container(location)
|
data/lib/zip-container/dir.rb
CHANGED
data/lib/zip-container/errors.rb
CHANGED
data/lib/zip-container/file.rb
CHANGED
data/lib/zip-container/util.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
#
|
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
|
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
|
36
|
+
VERSION = '5.0.0' # :nodoc:
|
35
37
|
end
|
data/lib/zip-container.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
#
|
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
|
-
|
34
|
-
|
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.
|
data/zip-container.gemspec
CHANGED
@@ -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.
|
@@ -42,8 +44,8 @@ Gem::Specification.new do |s|
|
|
42
44
|
s.summary = 'A ZIP Container for use by OCF and UCF implementations'
|
43
45
|
s.description =
|
44
46
|
'A Ruby library for working with ZIP Container ' \
|
45
|
-
'Format files. See http://www.idpf.org/epub/30/spec/epub30-ocf.html
|
46
|
-
'the OCF specification and ' \
|
47
|
+
'Format files. See http://www.idpf.org/epub/30/spec/epub30-ocf.html and ' \
|
48
|
+
'https://www.w3.org/TR/epub-33/#sec-ocf for the OCF specification and ' \
|
47
49
|
'https://learn.adobe.com/wiki/display/PDFNAV/Universal+Container+Format ' \
|
48
50
|
'for the UCF specification.'
|
49
51
|
s.license = 'BSD'
|
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
|
4
|
+
version: 5.0.0
|
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-
|
12
|
+
date: 2025-08-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rubyzip
|
@@ -166,7 +166,7 @@ dependencies:
|
|
166
166
|
- !ruby/object:Gem::Version
|
167
167
|
version: '0.8'
|
168
168
|
description: A Ruby library for working with ZIP Container Format files. See http://www.idpf.org/epub/30/spec/epub30-ocf.html
|
169
|
-
for the OCF specification and https://learn.adobe.com/wiki/display/PDFNAV/Universal+Container+Format
|
169
|
+
and https://www.w3.org/TR/epub-33/#sec-ocf for the OCF specification and https://learn.adobe.com/wiki/display/PDFNAV/Universal+Container+Format
|
170
170
|
for the UCF specification.
|
171
171
|
email:
|
172
172
|
- robert.haines@manchester.ac.uk
|
@@ -175,6 +175,7 @@ extensions: []
|
|
175
175
|
extra_rdoc_files: []
|
176
176
|
files:
|
177
177
|
- CHANGES.md
|
178
|
+
- CITATION.cff
|
178
179
|
- CODE_OF_CONDUCT.md
|
179
180
|
- CONTRIBUTING.md
|
180
181
|
- Gemfile
|
@@ -204,9 +205,9 @@ licenses:
|
|
204
205
|
- BSD
|
205
206
|
metadata:
|
206
207
|
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
|
208
|
+
changelog_uri: https://github.com/hainesr/ruby-zip-container/blob/v5.0.0/CHANGES.md
|
208
209
|
documentation_uri: https://hainesr.github.io/ruby-zip-container
|
209
|
-
source_code_uri: https://github.com/hainesr/ruby-zip-container/tree/v5.0.0
|
210
|
+
source_code_uri: https://github.com/hainesr/ruby-zip-container/tree/v5.0.0
|
210
211
|
rubygems_mfa_required: 'true'
|
211
212
|
post_install_message:
|
212
213
|
rdoc_options: []
|
@@ -219,9 +220,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
219
220
|
version: '2.7'
|
220
221
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
221
222
|
requirements:
|
222
|
-
- - "
|
223
|
+
- - ">="
|
223
224
|
- !ruby/object:Gem::Version
|
224
|
-
version:
|
225
|
+
version: '0'
|
225
226
|
requirements: []
|
226
227
|
rubygems_version: 3.4.1
|
227
228
|
signing_key:
|