rubyzip 3.0.0.rc1 → 3.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/Changelog.md +4 -1
- data/README.md +3 -14
- data/lib/zip/entry.rb +23 -12
- data/lib/zip/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85e587f39028c9a48d66047083046fee73e8ef3c88d9748ce5b8088044e81037
|
4
|
+
data.tar.gz: abfced9c6032e1d153739f18edb891a0087d8832b1e39ea33bc39c9f0c540777
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd01df0aba8c04064474e5b4a91253af88d2d5c826d7722c1ab8b266e98e6fff9d6d7cb233029715d0f7408ff30f14d5f1a2ce0477305a447833938bff7705cd
|
7
|
+
data.tar.gz: 6f107c538e0e28a1a52bb410b9f25f0d21b6bd0257537af3590b3102998114123bd29372107cdc04be620d4b6f586fa7f21f28b8775d110d0240059b1a455c62
|
data/Changelog.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
-
# 3.0.0 (
|
1
|
+
# 3.0.0 (2025-07-28)
|
2
2
|
|
3
|
+
- Fix de facto regression for input streams.
|
3
4
|
- Fix `File#write_buffer` to always return the given `io`.
|
4
5
|
- Add `Entry#absolute_time?` and `DOSTime#absolute_time?` methods.
|
5
6
|
- Use explicit named parameters for `File` methods.
|
@@ -39,6 +40,8 @@
|
|
39
40
|
|
40
41
|
Tooling/internal:
|
41
42
|
|
43
|
+
- No longer test setting `$\` in tests.
|
44
|
+
- Add a test to ensure correct version number format.
|
42
45
|
- Update the README with new Ruby version compatability information.
|
43
46
|
- Fix various issues with JRuby tests.
|
44
47
|
- Update gem dependency versions.
|
data/README.md
CHANGED
@@ -394,10 +394,10 @@ Rubyzip 2.3 is known to work on MRI 2.4 to 3.4 on Linux and Mac, and JRuby and T
|
|
394
394
|
|
395
395
|
Please see the table below for what we think the current situation is. Note: an empty cell means "unknown", not "does not work".
|
396
396
|
|
397
|
-
| OS/Ruby | 3.0 | 3.1 | 3.2 | 3.3 | 3.4 | Head | JRuby
|
397
|
+
| OS/Ruby | 3.0 | 3.1 | 3.2 | 3.3 | 3.4 | Head | JRuby 10.0.1.0 | JRuby Head | Truffleruby 24.2.1 | Truffleruby Head |
|
398
398
|
|---------|-----|-----|-----|-----|-----|------|---------------|------------|--------------------|------------------|
|
399
|
-
|Ubuntu
|
400
|
-
|Mac OS 14.7.
|
399
|
+
|Ubuntu 24.04| CI | CI | CI | CI | CI | ci | CI | ci | CI | ci |
|
400
|
+
|Mac OS 14.7.6| CI | CI | CI | CI | CI | ci | x | | x | |
|
401
401
|
|Windows Server 2022| CI | | | | CI mswin</br>CI ucrt | | | | | |
|
402
402
|
|
403
403
|
Key: `CI` - tested in CI, should work; `ci` - tested in CI, might fail; `x` - known working; `o` - known failing.
|
@@ -449,14 +449,3 @@ See https://github.com/rubyzip/rubyzip/graphs/contributors for a comprehensive l
|
|
449
449
|
## License
|
450
450
|
|
451
451
|
Rubyzip is distributed under the same license as Ruby. In practice this means you can use it under the terms of the Ruby License or the 2-Clause BSD License. See https://www.ruby-lang.org/en/about/license.txt and LICENSE.md for details.
|
452
|
-
|
453
|
-
## Research notice
|
454
|
-
Please note that this repository is participating in a study into sustainability
|
455
|
-
of open source projects. Data will be gathered about this repository for
|
456
|
-
approximately the next 12 months, starting from June 2021.
|
457
|
-
|
458
|
-
Data collected will include number of contributors, number of PRs, time taken to
|
459
|
-
close/merge these PRs, and issues closed.
|
460
|
-
|
461
|
-
For more information, please visit
|
462
|
-
[our informational page](https://sustainable-open-science-and-software.github.io/) or download our [participant information sheet](https://sustainable-open-science-and-software.github.io/assets/PIS_sustainable_software.pdf).
|
data/lib/zip/entry.rb
CHANGED
@@ -113,7 +113,7 @@ module Zip
|
|
113
113
|
end
|
114
114
|
|
115
115
|
def incomplete? # :nodoc:
|
116
|
-
gp_flags & 8 == 8
|
116
|
+
(gp_flags & 8 == 8) && (crc == 0 || size == 0 || compressed_size == 0)
|
117
117
|
end
|
118
118
|
|
119
119
|
# The uncompressed size of the entry.
|
@@ -343,24 +343,25 @@ module Zip
|
|
343
343
|
|
344
344
|
def read_local_entry(io) # :nodoc:
|
345
345
|
@dirty = false # No changes at this point.
|
346
|
-
|
346
|
+
current_offset = io.tell
|
347
347
|
|
348
|
-
|
348
|
+
read_local_header_fields(io)
|
349
349
|
|
350
|
-
|
351
|
-
raise
|
352
|
-
end
|
350
|
+
if @header_signature == SPLIT_FILE_SIGNATURE
|
351
|
+
raise SplitArchiveError if current_offset.zero?
|
353
352
|
|
354
|
-
|
353
|
+
# Rewind, skipping the data descriptor, then try to read the local header again.
|
354
|
+
current_offset += 16
|
355
|
+
io.seek(current_offset)
|
356
|
+
read_local_header_fields(io)
|
357
|
+
end
|
355
358
|
|
356
359
|
unless @header_signature == LOCAL_ENTRY_SIGNATURE
|
357
|
-
|
358
|
-
raise SplitArchiveError
|
359
|
-
end
|
360
|
-
|
361
|
-
raise Error, "Zip local header magic not found at location '#{local_header_offset}'"
|
360
|
+
raise Error, "Zip local header magic not found at location '#{current_offset}'"
|
362
361
|
end
|
363
362
|
|
363
|
+
@local_header_offset = current_offset
|
364
|
+
|
364
365
|
set_time(@last_mod_date, @last_mod_time)
|
365
366
|
|
366
367
|
@name = io.read(@name_length)
|
@@ -721,6 +722,16 @@ module Zip
|
|
721
722
|
|
722
723
|
private
|
723
724
|
|
725
|
+
def read_local_header_fields(io) # :nodoc:
|
726
|
+
static_sized_fields_buf = io.read(::Zip::LOCAL_ENTRY_STATIC_HEADER_LENGTH) || ''
|
727
|
+
|
728
|
+
unless static_sized_fields_buf.bytesize == ::Zip::LOCAL_ENTRY_STATIC_HEADER_LENGTH
|
729
|
+
raise Error, 'Premature end of file. Not enough data for zip entry local header'
|
730
|
+
end
|
731
|
+
|
732
|
+
unpack_local_entry(static_sized_fields_buf)
|
733
|
+
end
|
734
|
+
|
724
735
|
def set_time(binary_dos_date, binary_dos_time)
|
725
736
|
@time = ::Zip::DOSTime.parse_binary_dos_format(binary_dos_date, binary_dos_time)
|
726
737
|
rescue ArgumentError
|
data/lib/zip/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubyzip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.0
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Haines
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2025-
|
13
|
+
date: 2025-07-28 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: minitest
|
@@ -195,9 +195,9 @@ licenses:
|
|
195
195
|
- BSD-2-Clause
|
196
196
|
metadata:
|
197
197
|
bug_tracker_uri: https://github.com/rubyzip/rubyzip/issues
|
198
|
-
changelog_uri: https://github.com/rubyzip/rubyzip/blob/v3.0.0
|
199
|
-
documentation_uri: https://www.rubydoc.info/gems/rubyzip/3.0.0
|
200
|
-
source_code_uri: https://github.com/rubyzip/rubyzip/tree/v3.0.0
|
198
|
+
changelog_uri: https://github.com/rubyzip/rubyzip/blob/v3.0.0/Changelog.md
|
199
|
+
documentation_uri: https://www.rubydoc.info/gems/rubyzip/3.0.0
|
200
|
+
source_code_uri: https://github.com/rubyzip/rubyzip/tree/v3.0.0
|
201
201
|
wiki_uri: https://github.com/rubyzip/rubyzip/wiki
|
202
202
|
rubygems_mfa_required: 'true'
|
203
203
|
post_install_message:
|
@@ -211,9 +211,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
211
211
|
version: '3.0'
|
212
212
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
213
213
|
requirements:
|
214
|
-
- - "
|
214
|
+
- - ">="
|
215
215
|
- !ruby/object:Gem::Version
|
216
|
-
version:
|
216
|
+
version: '0'
|
217
217
|
requirements: []
|
218
218
|
rubygems_version: 3.4.1
|
219
219
|
signing_key:
|