rfcxml 0.4.5 → 0.4.6

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: a53d83dede12affcc88ca0ae6c147041be6991d34e9591cc917de1f7d8b57882
4
- data.tar.gz: 225b1a13f2f9da13b602b16537df6ab89209c2cf5221258b2c3921e3d9a5a00a
3
+ metadata.gz: c963e8a379d3d91c5ee904fdfc3f53d775f5c54cf932d6f400146a0a91438cde
4
+ data.tar.gz: b029ef75688affe88ae1b7ad0e5ef1fe66f0e1ac078523177b9b2dd55e00eea1
5
5
  SHA512:
6
- metadata.gz: a4dfd64fb22e1c8e3aa6fbf9828f9b5d124f1e4395fc63813c512aef8ce5dd585f5f46df5c4da998e2ab646b8d60eaf56deb99e24b54e426b84b0170c1599e9e
7
- data.tar.gz: 519531aabb6b89471c657395ac10c673d608f46f0c9d3235e4e1f31f083391a9e13ecc4cda469a22b9627397f47413751dac3f93de9f79d945a6d2b736adb781
6
+ metadata.gz: 474d5409190c7143552d4ca545829f9f08b6d64ed87aa40fca048764b876fbb7e1cedaa0dce892c442da5f5eec343be4b8d340da204a9fd99ef40fea0319a8a8
7
+ data.tar.gz: 39e07277f42cb9a355f006f0d50c9e3d55584887a05194bf0a0d8e010f32e0795a0e8dfb3443bad53bdc463294707fda3a5683d019d2169271ac9c0361303bb0
@@ -13,12 +13,21 @@ on:
13
13
  default: 'skip'
14
14
  repository_dispatch:
15
15
  types: [ do-release ]
16
+ # The publish leg: when the release PR (head branch `release/v*`) merges,
17
+ # the reusable tags the merge commit and publishes (ci#515). Ordinary PR
18
+ # closes are skipped inside the reusable — no noise on regular merges.
19
+ pull_request:
20
+ types:
21
+ - closed
16
22
 
17
23
  # Least-privilege ceiling for the called rubygems-release.yml: its release job
18
- # needs contents:write (git tag push) and id-token:write (OIDC Trusted Publishing).
24
+ # needs contents:write (git tag push), id-token:write (OIDC Trusted Publishing),
25
+ # and pull-requests:write (the release-PR leg opens and auto-merges the release
26
+ # PR — ci#515; reusable workflows are capped by the caller's permissions).
19
27
  permissions:
20
28
  contents: write
21
29
  id-token: write
30
+ pull-requests: write
22
31
 
23
32
  jobs:
24
33
  release:
@@ -26,6 +35,9 @@ jobs:
26
35
  with:
27
36
  next_version: ${{ github.event.inputs.next_version }}
28
37
  secrets:
29
- rubygems-api-key: ${{ secrets.METANORMA_CI_RUBYGEMS_API_KEY }}
38
+ # Trusted Publishing (OIDC) is the only publish path: the org
39
+ # METANORMA_CI_RUBYGEMS_API_KEY secret was deleted (metanorma/ci#373),
40
+ # and rubygems-release.yml falls through to the OIDC/TP flow when the
41
+ # rubygems-api-key secret is absent (metanorma/ci#416).
30
42
  pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
31
43
 
@@ -39,7 +39,7 @@ jobs:
39
39
  - name: Set up Ruby
40
40
  uses: ruby/setup-ruby@v1
41
41
  with:
42
- ruby-version: '3.2'
42
+ ruby-version: '3.4'
43
43
  bundler-cache: true
44
44
 
45
45
  - name: Download RFC XML files
data/Gemfile CHANGED
@@ -6,8 +6,7 @@ source "https://rubygems.org"
6
6
  gemspec
7
7
 
8
8
  gem "canon"
9
- gem "lutaml-model", github: "lutaml/lutaml-model", ref: "main"
10
- gem "nokogiri"
9
+ gem "lutaml-model", "~> 0.8.164"
11
10
  gem "rake", "~> 13.0"
12
11
  gem "rspec", "~> 3.0"
13
12
  gem "rubocop"
data/lib/rfcxml/v3/rfc.rb CHANGED
@@ -85,37 +85,10 @@ module Rfcxml
85
85
  map_processing_instruction "rfc", to: :pi_settings
86
86
  end
87
87
 
88
- # Override to_xml to fix SVG elements
89
- # SVG elements need xmlns="http://www.w3.org/2000/svg" attribute
90
- # lutaml-model doesn't properly output xmlns when serializing SVG
91
- # and it incorrectly handles <text> elements (treats them as text content)
92
- def to_xml(options = {})
93
- xml = super
94
- return xml unless xml
95
-
96
- # Post-process to ensure SVG elements have xmlns attribute
97
- doc = Nokogiri::XML(xml)
98
- svg_needs_fix = doc.xpath("//svg[not(@xmlns)]").any? ||
99
- doc.xpath("//svg//*[@xmlns='http://www.w3.org/2000/svg']").any?
100
-
101
- return xml unless svg_needs_fix
102
-
103
- doc.xpath("//svg[not(@xmlns)]").each do |svg_elem|
104
- svg_elem["xmlns"] = "http://www.w3.org/2000/svg"
105
- end
106
-
107
- # Remove redundant xmlns from child elements within SVG
108
- doc.xpath("//svg//*[@xmlns='http://www.w3.org/2000/svg']").each do |child|
109
- child.delete("xmlns")
110
- end
111
-
112
- # Preserve XML declaration if it was in the original output
113
- if xml.start_with?("<?xml")
114
- doc.to_xml
115
- else
116
- doc.root.to_xml
117
- end
118
- end
88
+ # SVG xmlns serialization is model-driven now: lutaml-model
89
+ # 0.8.186+ round-trips the raw-subtree declarations verbatim
90
+ # (lutaml/lutaml-model#1214 triage), so the models carry the
91
+ # namespace mappings and no output surgery happens here.
119
92
  end
120
93
  end
121
94
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rfcxml
4
- VERSION = "0.4.5"
4
+ VERSION = "0.4.6"
5
5
  end
data/rfcxml.gemspec CHANGED
@@ -30,5 +30,4 @@ Gem::Specification.new do |spec|
30
30
  spec.required_ruby_version = Gem::Requirement.new(">= 3.3.0")
31
31
 
32
32
  spec.add_dependency "lutaml-model", "~> 0.8.0"
33
- spec.add_dependency "nokogiri"
34
33
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rfcxml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
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-26 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: lutaml-model
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.8.0
27
- - !ruby/object:Gem::Dependency
28
- name: nokogiri
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
27
  description: IETF RFC XML parser and generator
42
28
  email:
43
29
  - open.source@ribose.com'