lutaml-model 0.8.160 → 0.8.162
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 333f71c814c51af046e9e0cfa68eb93dabe046153a74a94ff586ccea9696afae
|
|
4
|
+
data.tar.gz: 52e12f6ec98df9bc559029651bf83334297010a2cd772a1cb4611576bb78ba39
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3b2dc878baca82c5de267022e628297de2148bbf5546c9c377ab102d2f31c412f44c688096e4799acaf731a15ef1af4418edb3cfb7ae50d4797d62331eb7ffa8
|
|
7
|
+
data.tar.gz: a172603c20219fa5db6c5c5ed54088a4dd9903143d00e9ab8a58a24b806cafbf271f504d286c4db1690a66d11418b2c0e81f283e982ee3e17e41306b09a231be
|
|
@@ -416,23 +416,35 @@ module Lutaml
|
|
|
416
416
|
end
|
|
417
417
|
|
|
418
418
|
# Native key-value engine preference: yeptris (libyeptris C11)
|
|
419
|
-
# when
|
|
420
|
-
#
|
|
421
|
-
#
|
|
422
|
-
#
|
|
423
|
-
#
|
|
424
|
-
#
|
|
425
|
-
#
|
|
426
|
-
#
|
|
427
|
-
#
|
|
419
|
+
# when the host explicitly opts in with FONTIST_YAML=yeptris
|
|
420
|
+
# (the switch fontist and lutaml-store share) and the native
|
|
421
|
+
# engine answers a probe, else the format's standard adapter.
|
|
422
|
+
# Detection used to flip the lane for any process whose bundle
|
|
423
|
+
# merely contained yeptris — typically through a transitive
|
|
424
|
+
# dependency — which silently switched YAML parsing and dumping
|
|
425
|
+
# (including line-wrap behavior) for hosts that never chose the
|
|
426
|
+
# engine, and the yeptris YAML build still mis-parses some plain
|
|
427
|
+
# scalars as single-element Arrays on several platforms
|
|
428
|
+
# (leptris/yeptris#863), so bundle-presence selection is not a
|
|
429
|
+
# safe default. The probe matters because a half-initialized
|
|
430
|
+
# Yeptris constant (the poison-process state the gem documents)
|
|
431
|
+
# passes const_defined? and require while every parse fails;
|
|
432
|
+
# without it the lane selection flips with process load order
|
|
433
|
+
# and the failure surfaces as a native parse error on valid
|
|
434
|
+
# input instead of a clean standard-lane parse (#978).
|
|
428
435
|
def detect_yeptris_kv_adapter(format)
|
|
429
436
|
default = metadata.dig(format, :default)
|
|
430
437
|
return default if Lutaml::Model.opal?
|
|
438
|
+
return default unless yeptris_opted_in?
|
|
431
439
|
return default unless Utils.safe_load("yeptris", :Yeptris)
|
|
432
440
|
|
|
433
441
|
load_adapter(format, :yeptris).available? ? :yeptris : default
|
|
434
442
|
end
|
|
435
443
|
|
|
444
|
+
def yeptris_opted_in?
|
|
445
|
+
ENV["FONTIST_YAML"] == "yeptris"
|
|
446
|
+
end
|
|
447
|
+
|
|
436
448
|
# Detect available XML adapter.
|
|
437
449
|
#
|
|
438
450
|
# Delegates to moxml which is the authority on XML adapter
|
data/lib/lutaml/model/version.rb
CHANGED
|
@@ -24,7 +24,7 @@ RSpec.describe "yeptris adapter error parity" do
|
|
|
24
24
|
nil
|
|
25
25
|
end
|
|
26
26
|
args = libs.flat_map { |l| ["-I", l] } + ["-e", probe]
|
|
27
|
-
Open3.capture2e(Gem.ruby, *args).first
|
|
27
|
+
Open3.capture2e({ "FONTIST_YAML" => "yeptris" }, Gem.ruby, *args).first
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
def yeptris_installed?
|
|
@@ -47,7 +47,9 @@ RSpec.describe Lutaml::Model::AdapterResolver, ".adapter_for yeptris native dete
|
|
|
47
47
|
it "resolves the yeptris lane when the native engine answers a probe" do
|
|
48
48
|
skip "optional yeptris engine not resolvable outside the bundle" unless subprocess_yeptris_capable?
|
|
49
49
|
|
|
50
|
-
stdout, stderr, status = Open3.capture3(
|
|
50
|
+
stdout, stderr, status = Open3.capture3({ "FONTIST_YAML" => "yeptris" },
|
|
51
|
+
RbConfig.ruby, "-I", "lib", "-e",
|
|
52
|
+
parse_probe)
|
|
51
53
|
expect(status).to be_success, stderr
|
|
52
54
|
expect(stdout).to include("ADAPTER=YeptrisAdapter")
|
|
53
55
|
expect(stdout).to include("PARSED=scalar")
|
|
@@ -69,7 +71,9 @@ RSpec.describe Lutaml::Model::AdapterResolver, ".adapter_for yeptris native dete
|
|
|
69
71
|
#{parse_probe}
|
|
70
72
|
RUBY
|
|
71
73
|
|
|
72
|
-
stdout, stderr, status = Open3.capture3(
|
|
74
|
+
stdout, stderr, status = Open3.capture3({ "FONTIST_YAML" => "yeptris" },
|
|
75
|
+
RbConfig.ruby, "-I", "lib", "-e",
|
|
76
|
+
poison)
|
|
73
77
|
expect(status).to be_success, stderr
|
|
74
78
|
expect(stdout).to include("ADAPTER=StandardAdapter")
|
|
75
79
|
expect(stdout).to include("PARSED=scalar")
|