rubyzip 3.0.0 → 3.0.1

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: 85e587f39028c9a48d66047083046fee73e8ef3c88d9748ce5b8088044e81037
4
- data.tar.gz: abfced9c6032e1d153739f18edb891a0087d8832b1e39ea33bc39c9f0c540777
3
+ metadata.gz: 7c2bb6e50eaebd7d5142317949277bb4ff7f38248d87ff16856b5afd428a886c
4
+ data.tar.gz: e2e5ce63d0e2bb370723d4eb642502b8574af322326a971e1222c8e3b696c061
5
5
  SHA512:
6
- metadata.gz: bd01df0aba8c04064474e5b4a91253af88d2d5c826d7722c1ab8b266e98e6fff9d6d7cb233029715d0f7408ff30f14d5f1a2ce0477305a447833938bff7705cd
7
- data.tar.gz: 6f107c538e0e28a1a52bb410b9f25f0d21b6bd0257537af3590b3102998114123bd29372107cdc04be620d4b6f586fa7f21f28b8775d110d0240059b1a455c62
6
+ metadata.gz: eebc2d4fb0fe6bd3632a49f489cb0fc1e9d727cd8867162b419a9851a3d4f95db7614bb171f6bad2418be69ee353c26180b3c7b202602a436e2a20f80eecb613
7
+ data.tar.gz: 4df75a096e8b9e3dfe67e35d6418a4c9cb06945d224d9e09b4082baabfbc01b3a698e737a306c539b29b449a970c290379275b4db95a08fd62cf9a177c616c29
data/Changelog.md CHANGED
@@ -1,3 +1,10 @@
1
+ # 3.0.1 (2025-08-08)
2
+
3
+ - Restore `Zip::File`'s `Enumerable` status. [#641](https://github.com/rubyzip/rubyzip/issues/641)
4
+ - Escape filename pattern when matching in `Entry#name_safe?`. [#639](https://github.com/rubyzip/rubyzip/pull/639)
5
+ - Eagerly require gem version. [#637](https://github.com/rubyzip/rubyzip/pull/637)
6
+ - Fix direct `require` of `Entry` by requiring `constants`. [#636](https://github.com/rubyzip/rubyzip/pull/636)
7
+
1
8
  # 3.0.0 (2025-07-28)
2
9
 
3
10
  - Fix de facto regression for input streams.
data/README.md CHANGED
@@ -386,11 +386,11 @@ You can set multiple settings at the same time by using a block:
386
386
 
387
387
  Rubyzip is known to run on a number of platforms and under a number of different Ruby versions.
388
388
 
389
- ### Version 2.3.x
389
+ ### Version 2.4.x
390
390
 
391
- Rubyzip 2.3 is known to work on MRI 2.4 to 3.4 on Linux and Mac, and JRuby and Truffleruby on Linux. There are known issues with Windows which have been fixed on the development branch. Please [let us know](https://github.com/rubyzip/rubyzip/pulls) if you know Rubyzip 2.3 works on a platform/Ruby combination not listed here, or [raise an issue](https://github.com/rubyzip/rubyzip/issues) if you see a failure where we think it should work.
391
+ Rubyzip 2.4 is known to work on MRI 2.4 to 3.4 on Linux and Mac, and JRuby and Truffleruby on Linux. There are known issues with Windows which have been fixed on the development branch. Please [let us know](https://github.com/rubyzip/rubyzip/pulls) if you know Rubyzip 2.4 works on a platform/Ruby combination not listed here, or [raise an issue](https://github.com/rubyzip/rubyzip/issues) if you see a failure where we think it should work.
392
392
 
393
- ### Next (version 3.0.0)
393
+ ### Version 3.x
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
 
data/lib/zip/entry.rb CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  require 'pathname'
4
4
 
5
+ require_relative 'constants'
5
6
  require_relative 'dirtyable'
6
7
 
7
8
  module Zip
@@ -229,7 +230,7 @@ module Zip
229
230
  return false unless cleanpath.relative?
230
231
 
231
232
  root = ::File::SEPARATOR
232
- naive = ::File.join(root, cleanpath.to_s)
233
+ naive = Regexp.escape(::File.join(root, cleanpath.to_s))
233
234
  # Allow for Windows drive mappings at the root.
234
235
  ::File.absolute_path(cleanpath.to_s, root).match?(/([A-Z]:)?#{naive}/i)
235
236
  end
data/lib/zip/file.rb CHANGED
@@ -49,6 +49,7 @@ module Zip
49
49
  # Zip::FileSystem offers an alternative API that emulates ruby's
50
50
  # interface for accessing the filesystem, ie. the ::File and ::Dir classes.
51
51
  class File
52
+ include Enumerable
52
53
  extend Forwardable
53
54
  extend FileSplit
54
55
 
data/lib/zip/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Zip
4
- VERSION = '3.0.0' # :nodoc:
4
+ VERSION = '3.0.1'
5
5
  end
data/lib/zip.rb CHANGED
@@ -7,6 +7,7 @@ require 'tempfile'
7
7
  require 'fileutils'
8
8
  require 'stringio'
9
9
  require 'zlib'
10
+ require 'zip/version'
10
11
  require 'zip/constants'
11
12
  require 'zip/dos_time'
12
13
  require 'zip/ioextras'
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.1
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-07-28 00:00:00.000000000 Z
13
+ date: 2025-08-08 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/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
198
+ changelog_uri: https://github.com/rubyzip/rubyzip/blob/v3.0.1/Changelog.md
199
+ documentation_uri: https://www.rubydoc.info/gems/rubyzip/3.0.1
200
+ source_code_uri: https://github.com/rubyzip/rubyzip/tree/v3.0.1
201
201
  wiki_uri: https://github.com/rubyzip/rubyzip/wiki
202
202
  rubygems_mfa_required: 'true'
203
203
  post_install_message: