rubyzip 2.4.rc1 → 2.4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rubyzip might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 49b133beda4cc25cd86964b3d7ffdd774583a75889508916ea4dab892ea9275d
4
- data.tar.gz: 85c81018a61dd9592e8c7081b4c1b1d07c8f40ccea75b2466be8509925abfad6
3
+ metadata.gz: '0859155944c517ceb4b1163c5797e3ce2533df3000ac883cee34eeaa14399bf1'
4
+ data.tar.gz: 50086e2910ca2d47b00c15de3bbece2a382d61898f7218f14e11b3cdf908950a
5
5
  SHA512:
6
- metadata.gz: e6b95ffa49797be6cf36f0063a2013c994e6c7332fa29742d9991d35473e48dc22db94c2840de36012040790c2cd68ca49cfaedda99f3a7c921b42480d91ab94
7
- data.tar.gz: 800b81d0d1797060e6a04a87aa1cc792fa53cfa9744d6a97d77b5890d9fbe58a1b98e6fa038bb400e30b85d2d9fc0dfd115debb8c221d4c94944639b5a1271a1
6
+ metadata.gz: 42fd3094f54057b7a9e0b290dc2d49595238579d033d4072c9c268c35ee3063cefc70cce9b3fe657c52b471b595d1ca2fd318c9d5aa2c51ac7fd87efb99540f4
7
+ data.tar.gz: b83584c7e207c9253525f2c888f5e9950e068277ce003c06c71dd4b4c86e2737463da511ceb1234df91bd8d36f461259e40817fcbf9e67a2e363ced0f92fd7ba
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'
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'
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-04 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: minitest
@@ -136,9 +136,9 @@ 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/Changelog.md
140
+ documentation_uri: https://www.rubydoc.info/gems/rubyzip/2.4
141
+ source_code_uri: https://github.com/rubyzip/rubyzip/tree/v2.4
142
142
  wiki_uri: https://github.com/rubyzip/rubyzip/wiki
143
143
  post_install_message: |
144
144
  RubyZip 3.0 is coming!
@@ -174,11 +174,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
174
174
  version: '2.4'
175
175
  required_rubygems_version: !ruby/object:Gem::Requirement
176
176
  requirements:
177
- - - ">"
177
+ - - ">="
178
178
  - !ruby/object:Gem::Version
179
- version: 1.3.1
179
+ version: '0'
180
180
  requirements: []
181
- rubygems_version: 3.3.23
181
+ rubygems_version: 3.1.6
182
182
  signing_key:
183
183
  specification_version: 4
184
184
  summary: rubyzip is a ruby module for reading and writing zip files