metanorma-ietf 2.0.10 → 2.0.11
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 +4 -4
- data/.github/workflows/macos.yml +8 -0
- data/.github/workflows/ubuntu.yml +8 -1
- data/.github/workflows/windows.yml +8 -0
- data/lib/asciidoctor/ietf/biblio.rng +22 -2
- data/lib/isodoc/ietf/references.rb +3 -11
- data/lib/isodoc/ietf/rfc_convert.rb +6 -1
- data/lib/metanorma/ietf/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0cdde2dd756f4b98e9e1ad918916b0fc983ced8c3917f5c365394d03b2e5510b
|
4
|
+
data.tar.gz: d53d5c9fadfd23fa1d9f5c400c66ecc003643e519937063180cd9574daa5cd76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76de6e92a10f1a8789557d2543eda42acda12f0002e48738a7b38502eb21ec7e3927aa2a2acbc536ac5b2353ce62b32817b30ca0588c880bf72a8248c7df8076
|
7
|
+
data.tar.gz: 4141c256ce2b15729296f48852d42a8b0194f58b83978bb1cb2c72c2c04613ed07a9c6d1346999e96e86a99ba120ef029b85b62ae4c8e268bbadf5bd022c9afe
|
data/.github/workflows/macos.yml
CHANGED
@@ -6,15 +6,23 @@ on:
|
|
6
6
|
push:
|
7
7
|
branches: [ master ]
|
8
8
|
pull_request:
|
9
|
+
paths-ignore:
|
10
|
+
- .github/workflows/ubuntu.yml
|
11
|
+
- .github/workflows/windows.yml
|
9
12
|
|
10
13
|
jobs:
|
11
14
|
test-macos:
|
12
15
|
name: Test on Ruby ${{ matrix.ruby }} macOS
|
13
16
|
runs-on: macos-latest
|
17
|
+
continue-on-error: ${{ matrix.experimental }}
|
14
18
|
strategy:
|
15
19
|
fail-fast: false
|
16
20
|
matrix:
|
17
21
|
ruby: [ '2.6', '2.5', '2.4' ]
|
22
|
+
experimental: [false]
|
23
|
+
include:
|
24
|
+
- ruby: '2.7'
|
25
|
+
experimental: true
|
18
26
|
steps:
|
19
27
|
- uses: actions/checkout@master
|
20
28
|
- name: Cache xml2rfc
|
@@ -6,15 +6,22 @@ on:
|
|
6
6
|
push:
|
7
7
|
branches: [ master ]
|
8
8
|
pull_request:
|
9
|
-
|
9
|
+
paths-ignore:
|
10
|
+
- .github/workflows/macos.yml
|
11
|
+
- .github/workflows/windows.yml
|
10
12
|
jobs:
|
11
13
|
test-linux:
|
12
14
|
name: Test on Ruby ${{ matrix.ruby }} Ubuntu
|
13
15
|
runs-on: ubuntu-latest
|
16
|
+
continue-on-error: ${{ matrix.experimental }}
|
14
17
|
strategy:
|
15
18
|
fail-fast: false
|
16
19
|
matrix:
|
17
20
|
ruby: [ '2.6', '2.5', '2.4' ]
|
21
|
+
experimental: [false]
|
22
|
+
include:
|
23
|
+
- ruby: '2.7'
|
24
|
+
experimental: true
|
18
25
|
steps:
|
19
26
|
- uses: actions/checkout@master
|
20
27
|
- name: Cache xml2rfc
|
@@ -6,15 +6,23 @@ on:
|
|
6
6
|
push:
|
7
7
|
branches: [ master ]
|
8
8
|
pull_request:
|
9
|
+
paths-ignore:
|
10
|
+
- .github/workflows/macos.yml
|
11
|
+
- .github/workflows/ubuntu.yml
|
9
12
|
|
10
13
|
jobs:
|
11
14
|
test-windows:
|
12
15
|
name: Test on Ruby ${{ matrix.ruby }} Windows
|
13
16
|
runs-on: windows-latest
|
17
|
+
continue-on-error: ${{ matrix.experimental }}
|
14
18
|
strategy:
|
15
19
|
fail-fast: false
|
16
20
|
matrix:
|
17
21
|
ruby: [ '2.6', '2.5', '2.4' ]
|
22
|
+
experimental: [false]
|
23
|
+
include:
|
24
|
+
- ruby: '2.7'
|
25
|
+
experimental: true
|
18
26
|
steps:
|
19
27
|
- uses: actions/checkout@master
|
20
28
|
- name: Cache xml2rfc
|
@@ -88,7 +88,7 @@
|
|
88
88
|
<text/>
|
89
89
|
</element>
|
90
90
|
</define>
|
91
|
-
<define name="
|
91
|
+
<define name="LocalizedString1">
|
92
92
|
<optional>
|
93
93
|
<!-- multiple languages and scripts possible: comma delimit them if so -->
|
94
94
|
<attribute name="language"/>
|
@@ -98,6 +98,16 @@
|
|
98
98
|
</optional>
|
99
99
|
<text/>
|
100
100
|
</define>
|
101
|
+
<define name="LocalizedString">
|
102
|
+
<choice>
|
103
|
+
<ref name="LocalizedString1"/>
|
104
|
+
<oneOrMore>
|
105
|
+
<element name="variant">
|
106
|
+
<ref name="LocalizedString1"/>
|
107
|
+
</element>
|
108
|
+
</oneOrMore>
|
109
|
+
</choice>
|
110
|
+
</define>
|
101
111
|
<!--
|
102
112
|
Unlike UML, change type to format: type is overloaded
|
103
113
|
Would be need if plain were default value and could omit the attribute
|
@@ -121,7 +131,7 @@
|
|
121
131
|
</optional>
|
122
132
|
<ref name="LocalizedStringOrXsAny"/>
|
123
133
|
</define>
|
124
|
-
<define name="
|
134
|
+
<define name="LocalizedStringOrXsAny1">
|
125
135
|
<optional>
|
126
136
|
<!-- multiple languages and scripts possible: comma delimit them if so -->
|
127
137
|
<attribute name="language"/>
|
@@ -136,6 +146,16 @@
|
|
136
146
|
</choice>
|
137
147
|
</oneOrMore>
|
138
148
|
</define>
|
149
|
+
<define name="LocalizedStringOrXsAny">
|
150
|
+
<choice>
|
151
|
+
<ref name="LocalizedStringOrXsAny1"/>
|
152
|
+
<oneOrMore>
|
153
|
+
<element name="variant">
|
154
|
+
<ref name="LocalizedStringOrXsAny1"/>
|
155
|
+
</element>
|
156
|
+
</oneOrMore>
|
157
|
+
</choice>
|
158
|
+
</define>
|
139
159
|
<define name="contributor">
|
140
160
|
<element name="contributor">
|
141
161
|
<zeroOrMore>
|
@@ -50,8 +50,9 @@ module IsoDoc::Ietf
|
|
50
50
|
r.format nil, **attr_code(target: u.text, type: u["type"])
|
51
51
|
end
|
52
52
|
docidentifiers = b.xpath(ns("./docidentifier"))
|
53
|
-
id = bibitem_ref_code(b)
|
54
|
-
|
53
|
+
id = render_identifier(bibitem_ref_code(b))
|
54
|
+
!id[1].nil? and id[1] != "(NO ID)" and
|
55
|
+
r.refcontent id[1]
|
55
56
|
docidentifiers&.each do |u|
|
56
57
|
if %w(DOI IETF).include? u["type"]
|
57
58
|
r.seriesInfo nil, **attr_code(value: u.text, name: u["type"])
|
@@ -67,15 +68,6 @@ module IsoDoc::Ietf
|
|
67
68
|
end
|
68
69
|
end
|
69
70
|
|
70
|
-
def bibitem_ref_code(b)
|
71
|
-
id = b.at(ns("./docidentifier[not(@type = 'DOI' or @type = 'metanorma' "\
|
72
|
-
"or @type = 'ISSN' or @type = 'ISBN' or @type = 'IETF')]"))
|
73
|
-
return id if id
|
74
|
-
id = Nokogiri::XML::Node.new("docidentifier", b.document)
|
75
|
-
id << "(NO ID)"
|
76
|
-
id
|
77
|
-
end
|
78
|
-
|
79
71
|
def relaton_to_author(b, f)
|
80
72
|
auths = b.xpath(ns("./contributor[xmlns:role/@type = 'author' or "\
|
81
73
|
"xmlns:role/@type = 'editor']"))
|
@@ -50,8 +50,13 @@ module IsoDoc::Ietf
|
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
53
|
+
def textcleanup(docxml)
|
54
|
+
passthrough_cleanup(docxml)
|
55
|
+
end
|
56
|
+
|
53
57
|
def postprocess(result, filename, dir)
|
54
|
-
result = from_xhtml(cleanup(to_xhtml(result)))
|
58
|
+
result = from_xhtml(cleanup(to_xhtml(textcleanup(result)))).
|
59
|
+
sub(/<!DOCTYPE[^>]+>\n/, "").
|
55
60
|
sub(/(<rfc[^<]+? )lang="[^"]+"/, "\\1")
|
56
61
|
File.open("#{filename}.rfc.xml", "w:UTF-8") { |f| f.write(result) }
|
57
62
|
@files_to_delete.each { |f| FileUtils.rm_rf f }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-ietf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-standoc
|