metanorma-ietf 3.0.8 → 3.0.10.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 71679f9a6d5e530d891b8c56b4353846fd3be9fff356e2aeb9efee7ab21b5b68
4
- data.tar.gz: 801f308896032b32cc194292ab0c44b9b624ce616e1155b5957bc83fa9bbb217
3
+ metadata.gz: 30a82e668dc96f4e303356f3f04bedcada52d358a35e2d7b28000402cbc1696a
4
+ data.tar.gz: fee5dd82281153cb759cb087519880bd7374460c09927abadeadf84d09de2d39
5
5
  SHA512:
6
- metadata.gz: c406406aa3a034082595dcea77a43ddf55e55a7463033180216d3820b31449182af81e9c1dede1cc99ee944c27ad33359a7feb0df9170793e186af157cbaa640
7
- data.tar.gz: 2439758d94f9966ced0e48a5970ec68e6083afc9f308832cc2529d86b555d84595f86b64569a233ebe8b3487ca98f59bfa0b76842b538b6dfafc1cebeaab12c9
6
+ metadata.gz: 7db6cc698dce0d1fd826e724b6e1ee68d9e9cce5a0f52492cdddc0853fbfe204c2a4b67d6d9a96b1087e8fb560693fcf197cb169dff6cb2d304472854df21b8b
7
+ data.tar.gz: fef70127a965f3a628d824ccdf4819a160866801eab03e9919072383c62c20599715f283dbec55e467f817ec99979509b58f4620cae3bdc7f54b623eaccff5a0
@@ -11,6 +11,6 @@ on:
11
11
 
12
12
  jobs:
13
13
  rake:
14
- uses: metanorma/metanorma-build-scripts/.github/workflows/xml2rfc-rake.yml@main
14
+ uses: metanorma/ci/.github/workflows/xml2rfc-rake.yml@main
15
15
  secrets:
16
16
  pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
@@ -0,0 +1,24 @@
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
3
+ name: release
4
+
5
+ on:
6
+ workflow_dispatch:
7
+ inputs:
8
+ next_version:
9
+ description: |
10
+ Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
11
+ required: true
12
+ default: 'skip'
13
+ push:
14
+ tags: [ v* ]
15
+
16
+ jobs:
17
+ release:
18
+ uses: metanorma/ci/.github/workflows/rubygems-release.yml@main
19
+ with:
20
+ next_version: ${{ github.event.inputs.next_version }}
21
+ secrets:
22
+ rubygems-api-key: ${{ secrets.METANORMA_CI_RUBYGEMS_API_KEY }}
23
+ pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
24
+
@@ -1,81 +1,34 @@
1
1
  module IsoDoc
2
2
  module Ietf
3
3
  class RfcConvert < ::IsoDoc::Convert
4
- def recommendation_labels(node)
5
- [node.at(ns("./label")), node.at(ns("./title")),
6
- @xrefs.anchor(node["id"], :label, false)]
7
- end
8
-
9
- def recommendation_name(node, out, type)
10
- label, title, lbl = recommendation_labels(node)
11
- out.t **{ keepWithNext: "true" } do |b|
12
- b << (lbl.nil? ? l10n("#{type}:") : l10n("#{type} #{lbl}:"))
13
- end
14
- if label || title
15
- out.t **{ keepWithNext: "true" } do |b|
16
- label and label.children.each { |n| parse(n, b) }
17
- b << "#{clausedelim} " if label && title
18
- title and title.children.each { |n| parse(n, b) }
19
- end
4
+ def recommendation_name(node, out)
5
+ out.t **{ keepWithNext: "true" } do |p|
6
+ node.children.each { |n| parse(n, p) }
20
7
  end
21
8
  end
22
9
 
23
- def recommendation_attributes(node, out)
24
- ret = recommendation_attributes1(node)
25
- return if ret.empty?
26
-
27
- out.ul do |p|
28
- ret.each do |l|
29
- p.li do |i|
30
- i.em { |_e| i << l }
31
- end
32
- end
33
- end
10
+ def recommendation_parse(node, out)
11
+ recommendation_parse1(node, out)
34
12
  end
35
13
 
36
- def recommendation_parse(node, out)
37
- recommendation_name(node, out, @i18n.recommendation)
38
- recommendation_attributes(node, out)
14
+ def recommendation_parse1(node, out)
15
+ recommendation_name(node.at(ns("./name")), out)
39
16
  node.children.each do |n|
40
- parse(n, out) unless %w(label title).include? n.name
17
+ parse(n, out) unless n.name == "name"
41
18
  end
42
19
  end
43
20
 
44
21
  def requirement_parse(node, out)
45
- recommendation_name(node, out, @i18n.requirement)
46
- recommendation_attributes(node, out)
47
- node.children.each do |n|
48
- parse(n, out) unless %w(label title).include? n.name
49
- end
22
+ recommendation_parse1(node, out)
50
23
  end
51
24
 
52
25
  def permission_parse(node, out)
53
- recommendation_name(node, out, @i18n.permission)
54
- recommendation_attributes(node, out)
55
- node.children.each do |n|
56
- parse(n, out) unless %w(label title).include? n.name
57
- end
58
- end
59
-
60
- def inline?(node)
61
- return true if node.first_element_child.nil?
62
-
63
- %w(em link eref xref strong tt sup sub strike keyword smallcap
64
- br hr bookmark pagebreak stem origin term preferred admitted
65
- deprecates domain termsource modification)
66
- .include? node.first_element_child.name
26
+ recommendation_parse1(node, out)
67
27
  end
68
28
 
69
- def requirement_component_parse(node, out)
70
- return if node["exclude"] == "true"
71
-
72
- if inline?(node)
73
- out.t do |p|
74
- p << "INHERIT: " if node.name == "inherit"
75
- node.children.each { |n| parse(n, p) }
76
- end
77
- else
78
- node.children.each { |n| parse(n, out) }
29
+ def div_parse(node, out)
30
+ node.children.each do |n|
31
+ parse(n, out)
79
32
  end
80
33
  end
81
34
  end
@@ -17,8 +17,7 @@ module IsoDoc
17
17
  module Ietf
18
18
  class RfcConvert < ::IsoDoc::Convert
19
19
  def convert1(docxml, _filename, _dir)
20
- @xrefs.parse docxml
21
- info docxml, nil
20
+ document_preprocess(docxml)
22
21
  ret = noko do |xml|
23
22
  xml.rfc **attr_code(rfc_attributes(docxml)) do |html|
24
23
  make_link(html, docxml)
@@ -30,6 +29,20 @@ module IsoDoc
30
29
  set_pis(docxml, Nokogiri::XML(ret))
31
30
  end
32
31
 
32
+ def document_preprocess(docxml)
33
+ @isodoc.reqt_models = Metanorma::Requirements
34
+ .new({ default: "default", lang: @lang, script: @script,
35
+ labels: @i18n.get })
36
+ info docxml, nil
37
+ @xrefs.parse docxml
38
+ @isodoc.xrefs = @xrefs
39
+ @isodoc.permission(docxml)
40
+ @isodoc.requirement(docxml)
41
+ @isodoc.recommendation(docxml)
42
+ @isodoc.requirement_render(docxml)
43
+ @xrefs.parse docxml
44
+ end
45
+
33
46
  def metadata_init(lang, script, i18n)
34
47
  @meta = Metadata.new(lang, script, i18n)
35
48
  end
@@ -225,9 +225,9 @@
225
225
  <zeroOrMore>
226
226
  <ref name="forename"/>
227
227
  </zeroOrMore>
228
- <zeroOrMore>
229
- <ref name="initial"/>
230
- </zeroOrMore>
228
+ <optional>
229
+ <ref name="formatted-initials"/>
230
+ </optional>
231
231
  <ref name="surname"/>
232
232
  <zeroOrMore>
233
233
  <ref name="addition"/>
@@ -247,8 +247,8 @@
247
247
  <ref name="LocalizedString"/>
248
248
  </element>
249
249
  </define>
250
- <define name="initial">
251
- <element name="initial">
250
+ <define name="formatted-initials">
251
+ <element name="formatted-initials">
252
252
  <ref name="LocalizedString"/>
253
253
  </element>
254
254
  </define>
@@ -264,6 +264,9 @@
264
264
  </define>
265
265
  <define name="forename">
266
266
  <element name="forename">
267
+ <optional>
268
+ <attribute name="initial"/>
269
+ </optional>
267
270
  <ref name="LocalizedString"/>
268
271
  </element>
269
272
  </define>
@@ -69,6 +69,17 @@
69
69
  </zeroOrMore>
70
70
  </element>
71
71
  </define>
72
+ <define name="AdmonitionType">
73
+ <choice>
74
+ <value>warning</value>
75
+ <value>note</value>
76
+ <value>tip</value>
77
+ <value>important</value>
78
+ <value>caution</value>
79
+ <value>statement</value>
80
+ <value>editorial</value>
81
+ </choice>
82
+ </define>
72
83
  <define name="index">
73
84
  <element name="index">
74
85
  <optional>
@@ -116,6 +127,11 @@
116
127
  <data type="boolean"/>
117
128
  </attribute>
118
129
  </optional>
130
+ <optional>
131
+ <attribute name="suppress_identifier">
132
+ <data type="boolean"/>
133
+ </attribute>
134
+ </optional>
119
135
  <ref name="BibliographicItem"/>
120
136
  </element>
121
137
  </define>
@@ -1269,7 +1285,12 @@
1269
1285
  </define>
1270
1286
  <define name="span">
1271
1287
  <element name="span">
1272
- <attribute name="class"/>
1288
+ <optional>
1289
+ <attribute name="class"/>
1290
+ </optional>
1291
+ <optional>
1292
+ <attribute name="style"/>
1293
+ </optional>
1273
1294
  <oneOrMore>
1274
1295
  <ref name="TextElement"/>
1275
1296
  </oneOrMore>
@@ -2488,6 +2509,16 @@
2488
2509
  <text/>
2489
2510
  </element>
2490
2511
  </optional>
2512
+ <optional>
2513
+ <element name="amendment">
2514
+ <text/>
2515
+ </element>
2516
+ </optional>
2517
+ <optional>
2518
+ <element name="corrigendum">
2519
+ <text/>
2520
+ </element>
2521
+ </optional>
2491
2522
  <optional>
2492
2523
  <element name="language">
2493
2524
  <text/>
@@ -108,7 +108,7 @@
108
108
  </element>
109
109
  </define>
110
110
  <define name="label">
111
- <element name="label">
111
+ <element name="identifier">
112
112
  <oneOrMore>
113
113
  <ref name="TextElement"/>
114
114
  </oneOrMore>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ietf
3
- VERSION = "3.0.8".freeze
3
+ VERSION = "3.0.10.1".freeze
4
4
  end
5
5
  end
@@ -37,7 +37,7 @@ Gem::Specification.new do |spec|
37
37
 
38
38
  spec.add_dependency "mathml2asciimath"
39
39
  spec.add_dependency "metanorma-ietf-data"
40
- spec.add_dependency "metanorma-standoc", "~> 2.1.0"
40
+ spec.add_dependency "metanorma-standoc", "~> 2.2.0"
41
41
 
42
42
  spec.add_development_dependency "debug"
43
43
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
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: 3.0.8
4
+ version: 3.0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-06-21 00:00:00.000000000 Z
11
+ date: 2022-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mathml2asciimath
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 2.1.0
47
+ version: 2.2.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 2.1.0
54
+ version: 2.2.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: debug
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -224,6 +224,7 @@ extensions: []
224
224
  extra_rdoc_files: []
225
225
  files:
226
226
  - ".github/workflows/rake.yml"
227
+ - ".github/workflows/release.yml"
227
228
  - ".gitignore"
228
229
  - ".hound.yml"
229
230
  - ".oss-guides.rubocop.yml"
@@ -278,7 +279,7 @@ homepage: https://github.com/metanorma/metanorma-ietf
278
279
  licenses:
279
280
  - BSD-2-Clause
280
281
  metadata: {}
281
- post_install_message:
282
+ post_install_message:
282
283
  rdoc_options: []
283
284
  require_paths:
284
285
  - lib
@@ -293,8 +294,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
293
294
  - !ruby/object:Gem::Version
294
295
  version: '0'
295
296
  requirements: []
296
- rubygems_version: 3.3.16
297
- signing_key:
297
+ rubygems_version: 3.1.6
298
+ signing_key:
298
299
  specification_version: 4
299
300
  summary: metanorma-ietf lets you write IETF documents, such as Internet-Drafts and
300
301
  RFCs, in AsciiDoc.