omnizip 0.3.55 → 0.3.56

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: 7de280d85fcea7072c88798c925b5aa3e03bcff124c1294e72abeb6f976cc5e8
4
- data.tar.gz: 579759d99f27af57c070e5e1b6a6d6b121651932b10681da88e96331adb36bee
3
+ metadata.gz: 3a34ac63f49299330b590a1f9010940af988984f875f7ea101f44c126d90f5d6
4
+ data.tar.gz: 5a7940049434d24a4f61d073db07133b6645133dd79783462e864856e3302d24
5
5
  SHA512:
6
- metadata.gz: a08a53e33284555a3fe7493834f522e0bf00a8609705e06d6c05578bb342bb3db4e4ba1c3c0793f18a001ef55305fd3396a7300b6c7f1c82196a9702931fc374
7
- data.tar.gz: 7b0550e981ff0cb317beffdcb7eff7b233a7fff0bc4812eae01a566f1a0d255de8896e217d1d1ce62618b56bb5ea284dc414c98b53c171fa4af0b54a1a048b86
6
+ metadata.gz: 8ad6baae78797134776df430810dc67b5fae438d702aa4613d02468fae496134d1e53d2d4c8c857ee51311fe1a72de463529ae0dc553bf9fc8a792be9a3a0718
7
+ data.tar.gz: 385b3cec020df42f2532944a287467bd63cb155212278b0164c2e61e7db5c262e2858a306c4cccfaf949dbd0f61b5c2a013a72586166fbfca0a4323a5e46b65a
data/CHANGELOG.md CHANGED
@@ -7,6 +7,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.3.55] - 2026-09-01
11
+
12
+ ### Changed
13
+ - 36 codec-internal bare `raise "string"` sites become typed errors:
14
+ `DecompressionError` for corrupt LZMA/LZMA2 streams and headers
15
+ (dictionary overreads, bad property bytes, rep-distance faults),
16
+ `CompressionError` for range-encoder state misuse. These files
17
+ carry no class-scoped rescues, so error routing is unchanged.
18
+ - `MetadataRegistry` becomes load-bearing: the `:seven_zip`
19
+ registration lists the handler detail contract's real fields
20
+ (name/size/directory/compressed_size/mtime/crc), and the metadata
21
+ command's 7z view gates its display on the registry instead of
22
+ bypassing it.
23
+
24
+ ### Fixed
25
+ - The lzma compatibility specs no longer swallow regressions: their
26
+ "not yet implemented (expected)" skips lived in
27
+ `rescue StandardError` arms, so any future decode breakage would
28
+ have been silently skipped. All four tool round-trips pass today;
29
+ the failure paths now fail loudly with the tool's stderr attached.
30
+
10
31
  ## [0.3.54] - 2026-09-01
11
32
 
12
33
  ### Changed
@@ -82,15 +82,17 @@ module Omnizip
82
82
  private
83
83
 
84
84
  def entry_for(name)
85
+ # Reads hold the same mutex register writes under. The lazy
86
+ # trigger runs OUTSIDE the lock — it re-enters through
87
+ # register's own synchronize.
85
88
  normalized = normalize_key(name)
86
- entry = storage[normalized]
89
+ entry = synchronize { storage[normalized] }
87
90
  return entry if entry
88
91
 
89
- trigger = lazy_triggers[normalized]
92
+ trigger = synchronize { lazy_triggers[normalized] }
90
93
  if trigger
91
- trigger.call
92
- entry = storage[normalized]
93
- return entry if entry
94
+ trigger.call # outside the lock — it re-enters via register
95
+ return synchronize { storage[normalized] }
94
96
  end
95
97
 
96
98
  nil
@@ -35,6 +35,34 @@ module Omnizip
35
35
  @mutex = Mutex.new # Thread safety
36
36
  end
37
37
 
38
+ # Announce the operation to every reporter (#start hooks).
39
+ # Call once before the first #update.
40
+ #
41
+ # @return [self]
42
+ def start
43
+ @mutex.synchronize { @started = true }
44
+ reporters.each { |reporter| reporter.start(self) }
45
+ self
46
+ end
47
+
48
+ # Complete the operation: fire a final report and the #finish
49
+ # hooks. Idempotent — a second call is a no-op.
50
+ #
51
+ # @return [self]
52
+ def finish
53
+ @mutex.synchronize do
54
+ return self if @finished
55
+
56
+ @finished = true
57
+ end
58
+
59
+ reporters.each do |reporter|
60
+ reporter.report(self)
61
+ reporter.finish(self)
62
+ end
63
+ self
64
+ end
65
+
38
66
  # Update progress with new values
39
67
  #
40
68
  # @param files [Integer] Number of files completed
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Omnizip
4
- VERSION = "0.3.55"
4
+ VERSION = "0.3.56"
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.55
4
+ version: 0.3.56
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-09-01 00:00:00.000000000 Z
11
+ date: 2026-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: base64