fontisan 0.4.55-aarch64-linux → 0.4.56-aarch64-linux

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: 40c179979e14b5d266337fe6ea5fce84d2f6e6ed22f08148c42ff9482fdb5635
4
- data.tar.gz: 951020b13a3231404dbc17ff1fa1fb28b8d6358eb6a185c200560c923ca52ca2
3
+ metadata.gz: dfd817039a05c0827df68eb127e5cee420e182632fb6423e3827efcc797f8fa4
4
+ data.tar.gz: a52ee6cd19095020ea17506f5191f6efa3b4c3092d167998a7dc65710ac119d4
5
5
  SHA512:
6
- metadata.gz: 2bc645007ab4515eb26adb3eccbdb7a44804519a6a5b9b0408d5e6e33f39ec524e4436e94fc8fa6c7d8ef8a3966a0e3712f5ca8ca8fc653d92ea3ff7b666c842
7
- data.tar.gz: 0d8eac48f8236d4610ceb3d46b7b6e7ffa5a0b5ddffc5755ba722748ac4cbb62d7376b1aa14b9c646f01ded1dd3064db348d02e0de42ab87db3b5666b15ba7dc
6
+ metadata.gz: 5ea24f935ff092179246bdc668d1bb67344934a9fe244458369531e5b06ede2379161d82f5661712365ddb6f9621ffed4440e171a964fdab4ee330ff11c1d059
7
+ data.tar.gz: eaa628425e761e897bd061f3953dce88e9cd238e7b8ee9e546f48419896de483601476eb6a3c1f096e2cbb48c7d920cd50bcd7f8f8f074cd698d204e6a6d39a8
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Fontisan
4
- VERSION = "0.4.55"
4
+ VERSION = "0.4.56"
5
5
  end
data/lib/fontisan.rb CHANGED
@@ -35,25 +35,40 @@ require "stringio"
35
35
  require "tmpdir"
36
36
  require "lutaml/model"
37
37
 
38
- # The XML engine behind lutaml-model, chosen by what actually loads on
39
- # this machine: leptris (pure-C99, precompiled everywhere) when its
40
- # library loads, then nokogiri if present, then REXML (stdlib). The
41
- # probe is load-bearing: leptris's precompiled linux builds need
38
+ # The XML engine behind lutaml-model: leptris (pure-C99, precompiled
39
+ # everywhere) when its library loads AND the bundled lutaml-model knows it,
40
+ # then nokogiri if present, then REXML (stdlib). Both probes are
41
+ # load-bearing. The library probe: leptris's precompiled linux builds need
42
42
  # glibc >= 2.34, and forcing the adapter on an older glibc would crash
43
- # every boot — e.g. inside the rake-compiler-dock cross builds.
44
- xml_adapter = begin
45
- require "leptris"
46
- :leptris
43
+ # every boot — e.g. inside the rake-compiler-dock cross builds. The
44
+ # acceptance probe: the leptris adapter exists in lutaml-model only since
45
+ # 0.8.158, and a bundle may legally hold an older one (any 0.8.x satisfies
46
+ # fontisan; a rubyzip 2.3 pin elsewhere resolves lutaml-model to 0.8.14),
47
+ # where lutaml-model raises at configure time and took every boot down.
48
+ loadable = lambda do |library|
49
+ require library
50
+ true
47
51
  rescue LoadError
48
- begin
49
- require "nokogiri"
50
- :nokogiri
51
- rescue LoadError
52
- :rexml
52
+ false
53
+ end
54
+
55
+ accepted = lambda do |adapter|
56
+ Lutaml::Model::Config.configure do |config|
57
+ config.xml_adapter_type = adapter
53
58
  end
59
+ true
60
+ rescue ArgumentError
61
+ false
54
62
  end
55
- Lutaml::Model::Config.configure do |config|
56
- config.xml_adapter_type = xml_adapter
63
+
64
+ # [adapter, library to probe]; rexml is stdlib, so there is nothing to probe.
65
+ xml_adapter = [[:leptris, "leptris"], [:nokogiri, "nokogiri"], [:rexml, nil]].find do |adapter, library|
66
+ (library.nil? || loadable.call(library)) && accepted.call(adapter)
67
+ end
68
+
69
+ unless xml_adapter
70
+ # Nothing was accepted: let lutaml-model's own error surface.
71
+ Lutaml::Model::Config.configure { |config| config.xml_adapter_type = :rexml }
57
72
  end
58
73
 
59
74
  module Fontisan
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fontisan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.55
4
+ version: 0.4.56
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-11-26 00:00:00.000000000 Z
11
+ date: 2026-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: base64