omnizip 0.3.35 → 0.3.36

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: e76fab599398d72d3eb4999e7d516dabb26e1ca625dbc75afb35d48b7d037dcf
4
- data.tar.gz: 6afeb78f1f806ba12a7577bfe8c6fd2f6ba127047ec8546b0513be5516a7420a
3
+ metadata.gz: 53eb9dfabf6b8f299e86de445f0b2e487dcb12531ad6c901d35f89b306e53e97
4
+ data.tar.gz: 2df326cef1acba3e9de77ee349c4714ba3ba20c559beab62637dd70b2d55c1d8
5
5
  SHA512:
6
- metadata.gz: 7a46395d5faa8ed51438bb680839490c99dd15c01f2409b60a8cf9241af8269150b0fb98694fc176c330af90ded71bea99e64f0c11770f0c9d8259abf1719b8f
7
- data.tar.gz: bec34c361902bc7954b98d4d9d1f50e53cdac36bb9b800b3d6d0109a1ffc9e36e5211fba84cb38f829ef54c27a3eba79f03b0df8be39af0026c378f5feeee773
6
+ metadata.gz: 182da8c8f1f5ccf84552f1bb7741f00340165d90bf8a19edcb3299dcdff02d99644b98b87fa13969dd62090c70f9973c97950267b816a3cceda988c53df2430b
7
+ data.tar.gz: e8745b56c4aded2fa04e81d0dd0ec011360f4593d590b4127aa284fac62b42766c39e26ce53f67b9f77e6e7cbe024345465a89af544b4594213e5d8811d297a2
data/CHANGELOG.md CHANGED
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ### Fixed
11
+ - `add_to_archive`/`remove_from_archive` errors name the resolved
12
+ format (`Format :seven_zip does not support adding entries`)
13
+ instead of always blaming `:zip`, the default parameter the caller
14
+ never passed.
15
+
16
+ ## [0.3.35] - 2026-08-28
17
+
10
18
  ### Fixed
11
19
  - `Omnizip.list_archive` on `.7z` returned raw Reader objects (the
12
20
  SevenZip.open facade discards block return values) and
@@ -131,13 +131,14 @@ module Omnizip
131
131
  raise Errno::ENOENT, "Source file not found: #{source_path}"
132
132
  end
133
133
 
134
- handler = Omnizip::ArchiveHandler.for(resolve_archive_format(archive_path, format))
134
+ resolved = resolve_archive_format(archive_path, format)
135
+ handler = Omnizip::ArchiveHandler.for(resolved)
135
136
  # allowed: handler is a registered duck; missing add_entry raises below
136
137
  if handler.respond_to?(:add_entry)
137
138
  handler.add_entry(archive_path, entry_name, source_path)
138
139
  else
139
140
  raise Omnizip::UnsupportedFormatError,
140
- "Format #{format.inspect} does not support adding entries"
141
+ "Format #{resolved.inspect} does not support adding entries"
141
142
  end
142
143
 
143
144
  archive_path
@@ -151,11 +152,12 @@ module Omnizip
151
152
  # @return [String] +archive_path+
152
153
  def remove_from_archive(archive_path, entry_name, format: DEFAULT_FORMAT)
153
154
  require_archive!(archive_path)
154
- handler = Omnizip::ArchiveHandler.for(resolve_archive_format(archive_path, format))
155
+ resolved = resolve_archive_format(archive_path, format)
156
+ handler = Omnizip::ArchiveHandler.for(resolved)
155
157
  # allowed: handler is a registered duck; missing remove_entry raises below
156
158
  unless handler.respond_to?(:remove_entry)
157
159
  raise Omnizip::UnsupportedFormatError,
158
- "Format #{format.inspect} does not support removing entries"
160
+ "Format #{resolved.inspect} does not support removing entries"
159
161
  end
160
162
 
161
163
  handler.remove_entry(archive_path, entry_name)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Omnizip
4
- VERSION = "0.3.35"
4
+ VERSION = "0.3.36"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omnizip
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.35
4
+ version: 0.3.36
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-08-27 00:00:00.000000000 Z
11
+ date: 2026-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: base64