lutaml-model 0.8.189 → 0.8.190

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: 9ed52d827fd7fca7dafb9bd7c00a5d4adddee322cf878a8129a5131341273eb5
4
- data.tar.gz: ef350764122a25d3edbfd1f4ffab1bef0ced5752889fddcd5d8521c637cba5e8
3
+ metadata.gz: a4bf537581002dd396b97a11220752f0600bb80a58dc343320b8394385a1f265
4
+ data.tar.gz: 12623cab236b0591a57cdb37a4f76fdab54e3c3758f207ffb348076b6882cd6a
5
5
  SHA512:
6
- metadata.gz: 2a73d59d088991a2a54cf72294900b37c0132202add09d92a5ee7dc31c0c30448b201d7326ed1b36df37e4d4498f90bc5d1a29d167ea8b8841532ad8f3da8776
7
- data.tar.gz: a0e142d241acf509858db6e988ffef80752fff2d9bb5458694a19d28339ee797d23275876b5e5005b9f58f57bb99c60148ebd84bfbb69c194d6cec6829c19ccc
6
+ metadata.gz: deb150dd1560a00f96c4de1818344360705bf1e6528fdaa950a022e1d47ca8efdd294b06af707843d672b8b91bc984f59917e25c9346b1ff8054aa1206477732
7
+ data.tar.gz: 4bfe54a99e7d0fbd34368328ee991a570bd6a7bde3657bf2ddc143b7cde6b0e2d5f59babd4c5667e0aa2bff77f02bac411516cde1f81edecbb31b5169a447c55
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Lutaml
4
4
  module Model
5
- VERSION = "0.8.189"
5
+ VERSION = "0.8.190"
6
6
  end
7
7
  end
data/lutaml-model.gemspec CHANGED
@@ -50,7 +50,12 @@ Gem::Specification.new do |spec|
50
50
  # workspace-local 0.5.x pin is retired with this floor — it cannot
51
51
  # resolve against it — and the boot's lib/compat/opal append is
52
52
  # directory-guarded in the Rakefile for both lines.
53
- spec.add_dependency "moxml", "~> 0.6.1"
53
+ # 0.6.23: preprocess_entities stopped rewriting the declared
54
+ # encoding of text payloads beginning with an XML declaration
55
+ # (lutaml/moxml#604) — the text-emission verbatim contract
56
+ # (lutaml-model#1249, rfc8794's embedded-XML sourcecode). The floor
57
+ # is the fix version.
58
+ spec.add_dependency "moxml", "~> 0.6.23"
54
59
  spec.add_dependency "ostruct"
55
60
  # LML grammar machinery (subsumed language core)
56
61
  spec.add_dependency "parsanol", "~> 1.5.0"
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "spec_helper"
4
+
5
+ # lutaml-model#1249: text content emission must pass verbatim payloads
6
+ # through — a value that begins with an embedded XML declaration keeps
7
+ # its original declaration spelling (rfc8794's <sourcecode> carries an
8
+ # escaped XML example). moxml 0.6.23 fixed preprocess_entities to skip
9
+ # the declared-encoding rewrite outside document-parse entry
10
+ # (lutaml/moxml#604); the gemspec floors moxml at that version.
11
+ RSpec.describe "verbatim text content emission (#1249)" do
12
+ let(:embedded_declaration) do
13
+ %(<?xml version="1.0" encoding="utf-8"?>\n<EBMLSchema xmlns="urn:ietf:rfc:8794" version="1">\n</EBMLSchema>)
14
+ end
15
+
16
+ let(:model_class) do
17
+ Class.new(Lutaml::Model::Serializable) do
18
+ attribute :content, :string, collection: true
19
+
20
+ xml do
21
+ element "sourcecode"
22
+ mixed_content
23
+ map_content to: :content
24
+ end
25
+ end
26
+ end
27
+
28
+ it "keeps the declared encoding of an embedded declaration verbatim" do
29
+ instance = model_class.new(content: [embedded_declaration])
30
+ output = instance.to_xml
31
+
32
+ aggregate_failures do
33
+ expect(output).to include('encoding="utf-8"')
34
+ expect(output).not_to include('encoding="UTF-8"')
35
+ end
36
+ end
37
+
38
+ it "round-trips the payload through parse and serialize unchanged" do
39
+ source = <<~XML
40
+ <sourcecode>#{embedded_declaration.gsub('<', '&lt;').gsub('>', '&gt;')}</sourcecode>
41
+ XML
42
+
43
+ parsed = model_class.from_xml(source)
44
+ output = parsed.to_xml
45
+
46
+ aggregate_failures do
47
+ expect(parsed.content.first).to eq(embedded_declaration)
48
+ expect(output).to include('encoding="utf-8"')
49
+ end
50
+ end
51
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lutaml-model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.189
4
+ version: 0.8.190
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-11-27 00:00:00.000000000 Z
11
+ date: 2026-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: base64
@@ -92,14 +92,14 @@ dependencies:
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: 0.6.1
95
+ version: 0.6.23
96
96
  type: :runtime
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: 0.6.1
102
+ version: 0.6.23
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: ostruct
105
105
  requirement: !ruby/object:Gem::Requirement
@@ -2423,6 +2423,7 @@ files:
2423
2423
  - spec/lutaml/xml/schema_primer_spec.rb
2424
2424
  - spec/lutaml/xml/serializable_namespace_spec.rb
2425
2425
  - spec/lutaml/xml/shared_element_rules_spec.rb
2426
+ - spec/lutaml/xml/text_content_verbatim_spec.rb
2426
2427
  - spec/lutaml/xml/transformation/custom_method_wrapper_spec.rb
2427
2428
  - spec/lutaml/xml/transformation_spec.rb
2428
2429
  - spec/lutaml/xml/type_namespace/collector_spec.rb