rubyzip 2.4.rc1 → 2.4.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: 49b133beda4cc25cd86964b3d7ffdd774583a75889508916ea4dab892ea9275d
4
- data.tar.gz: 85c81018a61dd9592e8c7081b4c1b1d07c8f40ccea75b2466be8509925abfad6
3
+ metadata.gz: 2d59784cc9a5e884c6537a896b30b1a18206c7a97a0f74e37bd58769f0700497
4
+ data.tar.gz: 7e4bf8643b179bb0e5415b0f6aa7e92ce4786ed734cf23b902ea9739d5c46bb9
5
5
  SHA512:
6
- metadata.gz: e6b95ffa49797be6cf36f0063a2013c994e6c7332fa29742d9991d35473e48dc22db94c2840de36012040790c2cd68ca49cfaedda99f3a7c921b42480d91ab94
7
- data.tar.gz: 800b81d0d1797060e6a04a87aa1cc792fa53cfa9744d6a97d77b5890d9fbe58a1b98e6fa038bb400e30b85d2d9fc0dfd115debb8c221d4c94944639b5a1271a1
6
+ metadata.gz: c65346fc54aa6e931f8975a8e98212323a597583523a251d2d88184971a9469a549e9cd967c2d6015002f07fe8c19b13d96261781131b9bd7a0b099da1c04fe2
7
+ data.tar.gz: b397b12e1bef39a1cd4ade2698756f3194ed75504fb15ea5494dc26189be4a8d66af1a2411e827b660f67044ef4ee207c3d951d190886912079ce8ffcbf19bac
data/lib/zip/entry.rb CHANGED
@@ -571,7 +571,7 @@ module Zip
571
571
  raise "unknown @file_type #{@ftype}"
572
572
  end
573
573
  else
574
- zis = ::Zip::InputStream.new(@zipfile, local_header_offset)
574
+ zis = ::Zip::InputStream.new(@zipfile, offset: local_header_offset)
575
575
  zis.instance_variable_set(:@complete_entry, self)
576
576
  zis.get_next_entry
577
577
  if block_given?
@@ -51,7 +51,7 @@ module Zip
51
51
  # reserved 0 and tag 1
52
52
  s = [0, 1].pack('Vv')
53
53
 
54
- tag1 = ''.force_encoding(Encoding::BINARY)
54
+ tag1 = ''.b
55
55
  if @mtime
56
56
  tag1 << [to_ntfs_time(@mtime)].pack('Q<')
57
57
  if @atime
data/lib/zip/file.rb CHANGED
@@ -412,7 +412,7 @@ module Zip
412
412
 
413
413
  # Write buffer write changes to buffer and return
414
414
  def write_buffer(io = ::StringIO.new)
415
- return unless commit_required?
415
+ return io unless commit_required?
416
416
 
417
417
  ::Zip::OutputStream.write_buffer(io) do |zos|
418
418
  @entry_set.each { |e| e.write_to_zip_output_stream(zos) }
data/lib/zip/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Zip
2
- VERSION = '2.4.rc1'
2
+ VERSION = '2.4.1'
3
3
  end
data/lib/zip.rb CHANGED
@@ -35,18 +35,22 @@ require 'zip/errors'
35
35
 
36
36
  module Zip
37
37
  V3_API_WARNING_MSG = <<~END_MSG
38
- You have called '%s' which is changing or deprecated
39
- in version 3.0.0. Please see
38
+ You have called '%s' (from %s).
39
+ This method is changing or deprecated in version 3.0.0. Please see
40
40
  https://github.com/rubyzip/rubyzip/wiki/Updating-to-version-3.x
41
41
  for more information.
42
42
  END_MSG
43
43
 
44
44
  def self.warn_about_v3_api(method)
45
- warn V3_API_WARNING_MSG % method if ENV['RUBYZIP_V3_API_WARN']
45
+ return unless ENV['RUBYZIP_V3_API_WARN']
46
+
47
+ loc = caller_locations(2, 1)[0]
48
+ from = "#{loc.path.split('/').last}:#{loc.lineno}"
49
+ warn format(V3_API_WARNING_MSG, method, from)
46
50
  end
47
51
 
48
- if RUBY_VERSION < '3.0'
49
- warn 'RubyZip 3.0 will require Ruby 3.0 or later.' if ENV['RUBYZIP_V3_API_WARN']
52
+ if ENV['RUBYZIP_V3_API_WARN'] && RUBY_VERSION < '3.0'
53
+ warn 'RubyZip 3.0 will require Ruby 3.0 or later.'
50
54
  end
51
55
 
52
56
  extend self
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: 2.4.rc1
4
+ version: 2.4.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: 2024-04-08 00:00:00.000000000 Z
13
+ date: 2025-01-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: minitest
@@ -136,10 +136,11 @@ licenses:
136
136
  - BSD 2-Clause
137
137
  metadata:
138
138
  bug_tracker_uri: https://github.com/rubyzip/rubyzip/issues
139
- changelog_uri: https://github.com/rubyzip/rubyzip/blob/v2.4.rc1/Changelog.md
140
- documentation_uri: https://www.rubydoc.info/gems/rubyzip/2.4.rc1
141
- source_code_uri: https://github.com/rubyzip/rubyzip/tree/v2.4.rc1
139
+ changelog_uri: https://github.com/rubyzip/rubyzip/blob/v2.4.1/Changelog.md
140
+ documentation_uri: https://www.rubydoc.info/gems/rubyzip/2.4.1
141
+ source_code_uri: https://github.com/rubyzip/rubyzip/tree/v2.4.1
142
142
  wiki_uri: https://github.com/rubyzip/rubyzip/wiki
143
+ rubygems_mfa_required: 'true'
143
144
  post_install_message: |
144
145
  RubyZip 3.0 is coming!
145
146
  **********************
@@ -174,11 +175,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
174
175
  version: '2.4'
175
176
  required_rubygems_version: !ruby/object:Gem::Requirement
176
177
  requirements:
177
- - - ">"
178
+ - - ">="
178
179
  - !ruby/object:Gem::Version
179
- version: 1.3.1
180
+ version: '0'
180
181
  requirements: []
181
- rubygems_version: 3.3.23
182
+ rubygems_version: 3.1.6
182
183
  signing_key:
183
184
  specification_version: 4
184
185
  summary: rubyzip is a ruby module for reading and writing zip files