kabosu 0.6.11.3 → 0.6.11.4

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: ab7b76c6ec8d607faa407a7c2b8a803ea1835e99f00fcac4f657e1f29305c409
4
- data.tar.gz: 80c80b241e18ee83cd4c88b9572d8da3189c6312dd537d2837a9c2121f341fbb
3
+ metadata.gz: 0cbde067dd87473e8d0526d3ceedc5f3ee53632baeef69fd0590d66472cb917c
4
+ data.tar.gz: 6870b870af4882efd7a781d1d71e7b108a336d4f9e8af694a6cec0b83904ea73
5
5
  SHA512:
6
- metadata.gz: 85956d6876d3e3884f5f68bff7661306d9cf9ae109fb26b6a3241c1ecbd9c4f2220e95adfdb77d5642a9ae8607b903c4206c20db772cd274056fbca90a8f2769
7
- data.tar.gz: 36c5772e7c17991e2b55125df66dfece3b06c5b4f93044a690c867d9321d97f4e73ad8088e9bc9e276416f9bd58cd19bead5ce6dc67eecf6c47072e07ab49d5e
6
+ metadata.gz: e52d39934b001d31e4957d0399ea73fe3459b6f63358a03d1bf699aa1345cfc302ee58d5f1fccefa2eb8b3482f1b9e9d64717f95232113660fea98764115b3bf
7
+ data.tar.gz: 31813b1a826f62a26a19d668690712b06067d67a9a409aa343b07c6b0e17340a06aff9e1f81ca5c76708ab7e909b44825d259d40ddd505212c0fa9bdccc00ab1
@@ -370,7 +370,11 @@ impl RbMorpheme {
370
370
  // morpheme on a real workload, so five of every six Strings this built were
371
371
  // a copy of one it had already built.
372
372
  pub(crate) fn dictionary_form(ruby: &Ruby, rb_self: &Self) -> RString {
373
- frozen_string(ruby, &rb_self.dictionary_form_cache, &rb_self.data.dictionary_form)
373
+ frozen_string(
374
+ ruby,
375
+ &rb_self.dictionary_form_cache,
376
+ &rb_self.data.dictionary_form,
377
+ )
374
378
  }
375
379
 
376
380
  pub(crate) fn normalized_form(&self) -> &str {
@@ -58,19 +58,17 @@ module Kabosu
58
58
  raise DownloadError, "No downloadable assets for #{version}/#{edition}" if sources.empty?
59
59
 
60
60
  sources.each do |source|
61
- begin
62
- download(source.fetch(:url), source.fetch(:archive_path))
63
- extract(source.fetch(:archive_path), dest_dir, edition: edition)
64
- FileUtils.rm_f(source.fetch(:archive_path))
65
- break
66
- rescue DownloadError => e
67
- FileUtils.rm_f(source.fetch(:archive_path)) if File.exist?(source.fetch(:archive_path))
68
- # Try the next candidate (e.g. wheel if the zip 404s). If this was
69
- # the last one, surface the original error.
70
- raise if sources.last.equal?(source)
71
-
72
- warn " falling back: #{e.message}"
73
- end
61
+ download(source.fetch(:url), source.fetch(:archive_path))
62
+ extract(source.fetch(:archive_path), dest_dir, edition: edition)
63
+ FileUtils.rm_f(source.fetch(:archive_path))
64
+ break
65
+ rescue DownloadError => e
66
+ FileUtils.rm_f(source.fetch(:archive_path))
67
+ # Try the next candidate (e.g. wheel if the zip 404s). If this was
68
+ # the last one, surface the original error.
69
+ raise if sources.last.equal?(source)
70
+
71
+ warn " falling back: #{e.message}"
74
72
  end
75
73
 
76
74
  raise DownloadError, "Expected #{dic_path} after extraction, but file not found" unless File.exist?(dic_path)
@@ -214,7 +212,8 @@ module Kabosu
214
212
  def pick_release_sources(version, edition)
215
213
  candidates = []
216
214
  zip = release_asset_url(version, edition)
217
- candidates << { url: zip, archive_path: File.join(@dir, "sudachi-dictionary-#{version}-#{edition}.zip"), format: :zip }
215
+ candidates << { url: zip, archive_path: File.join(@dir, "sudachi-dictionary-#{version}-#{edition}.zip"),
216
+ format: :zip }
218
217
 
219
218
  begin
220
219
  release = fetch_release(version)
@@ -337,14 +336,8 @@ module Kabosu
337
336
 
338
337
  next if entry.directory?
339
338
 
340
- target = File.join(dest_dir, target_name)
341
- # Guard against zip-slip — refuse entries that escape dest_dir.
342
- unless File.expand_path(target).start_with?(File.expand_path(dest_dir) + File::SEPARATOR)
343
- raise DownloadError, "Refusing to extract entry outside dest_dir: #{entry.name}"
344
- end
345
-
346
339
  FileUtils.mkdir_p(dest_dir)
347
- entry.extract(target) { true } # overwrite existing
340
+ entry.extract(target_name, destination_directory: dest_dir) { true }
348
341
  end
349
342
  end
350
343
  rescue Zip::Error => e
@@ -1,3 +1,3 @@
1
1
  module Kabosu
2
- VERSION = "0.6.11.3".freeze
2
+ VERSION = "0.6.11.4".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kabosu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.11.3
4
+ version: 0.6.11.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - davafons
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-08-20 00:00:00.000000000 Z
11
+ date: 2026-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rb_sys
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '2.3'
33
+ version: '3.4'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '2.3'
40
+ version: '3.4'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: benchmark
43
43
  requirement: !ruby/object:Gem::Requirement