metanorma-ietf 2.3.6 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/ietf/cleanup.rb +0 -4
- data/lib/asciidoctor/ietf/front.rb +1 -1
- data/lib/asciidoctor/ietf/ietf.rng +1 -1
- data/lib/asciidoctor/ietf/isodoc.rng +12 -0
- data/lib/asciidoctor/ietf/validate.rb +3 -54
- data/lib/isodoc/ietf/section.rb +1 -1
- data/lib/metanorma/ietf/version.rb +1 -1
- data/metanorma-ietf.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a0a93b0a29195d775f23e2ba37414870b8e708a006bba0498b3113aebe787c9
|
4
|
+
data.tar.gz: 53a29d58e5c0c601c29de23d0515d43e690458b8b848f67cacf5064403c3b834
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e89e41ec81886905668543d6f24ad31ef6ea9cf0a38551f56f1fa3e8007bb6068421b221d0d835951054894146d218b47ae0fe9d1cc1a621f7df6f85a7442e3d
|
7
|
+
data.tar.gz: 11d9d25373f48d7fb3197e5107168c64b8230d519f1e45b410dec5403aab6158f81c8f0e34c2553aff7fa1f32f5974d7a8d7a77a6e5233fb0ef65aa1a300a2c6
|
@@ -8,10 +8,6 @@ module Asciidoctor
|
|
8
8
|
rfc_anchor_cleanup(xmldoc)
|
9
9
|
end
|
10
10
|
|
11
|
-
BCP_KEYWORDS =
|
12
|
-
["MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
|
13
|
-
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", "OPTIONAL"].freeze
|
14
|
-
|
15
11
|
def abstract_cleanup(xmldoc)
|
16
12
|
xmldoc.xpath("//abstract[not(text())]").each do |x|
|
17
13
|
x.remove
|
@@ -119,7 +119,7 @@ module Asciidoctor
|
|
119
119
|
strict: node.attr("strict"),
|
120
120
|
compact: node.attr("compact"),
|
121
121
|
subcompact: node.attr("subcompact"),
|
122
|
-
|
122
|
+
tocinclude: node.attr("toc-include") == "false" ? "no" : "yes",
|
123
123
|
tocdepth: node.attr("toc-depth"),
|
124
124
|
symrefs: node.attr("sym-refs"),
|
125
125
|
sortrefs: node.attr("sort-refs"),
|
@@ -1011,8 +1011,14 @@
|
|
1011
1011
|
<ref name="imagemap"/>
|
1012
1012
|
<ref name="svgmap"/>
|
1013
1013
|
<ref name="inputform"/>
|
1014
|
+
<ref name="toc"/>
|
1014
1015
|
</choice>
|
1015
1016
|
</define>
|
1017
|
+
<define name="toc">
|
1018
|
+
<element name="toc">
|
1019
|
+
<ref name="ul"/>
|
1020
|
+
</element>
|
1021
|
+
</define>
|
1016
1022
|
<define name="inputform">
|
1017
1023
|
<element name="form">
|
1018
1024
|
<attribute name="id">
|
@@ -1254,6 +1260,12 @@
|
|
1254
1260
|
<optional>
|
1255
1261
|
<attribute name="type"/>
|
1256
1262
|
</optional>
|
1263
|
+
<optional>
|
1264
|
+
<attribute name="identifier"/>
|
1265
|
+
</optional>
|
1266
|
+
<optional>
|
1267
|
+
<attribute name="prefix"/>
|
1268
|
+
</optional>
|
1257
1269
|
<text/>
|
1258
1270
|
</define>
|
1259
1271
|
<define name="ics">
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require "
|
1
|
+
require "metanorma/ietf/data/workgroups"
|
2
2
|
|
3
3
|
module Asciidoctor
|
4
4
|
module Ietf
|
@@ -34,59 +34,8 @@ module Asciidoctor
|
|
34
34
|
File.join(File.dirname(__FILE__), "ietf.rng"))
|
35
35
|
end
|
36
36
|
|
37
|
-
def
|
38
|
-
|
39
|
-
end
|
40
|
-
|
41
|
-
def open_wg_cache(node)
|
42
|
-
node.attr("flush-caches") == "true" and
|
43
|
-
FileUtils.rm wgcache_name, force: true
|
44
|
-
wg = []
|
45
|
-
if Pathname.new(wgcache_name).file?
|
46
|
-
begin
|
47
|
-
File.open(wgcache_name, "r") { |f| wg = JSON.parse(f.read) }
|
48
|
-
rescue Exception => e
|
49
|
-
warn "Cache #{wgcache_name} is invalid, drop it"
|
50
|
-
end
|
51
|
-
end
|
52
|
-
[wg, wgcache_name]
|
53
|
-
end
|
54
|
-
|
55
|
-
def cache_workgroup_ietf(wg, _b)
|
56
|
-
warn "Reading workgroups from https://tools.ietf.org/wg/..."
|
57
|
-
URI.open("https://tools.ietf.org/wg/") do |f|
|
58
|
-
f.each_line do |l|
|
59
|
-
l.scan(%r{<td width="50%" style='padding: 0 1ex'>([^<]+)</td>}) do |w|
|
60
|
-
wg << w[0].gsub(/\s+$/, "").gsub(/ Working Group$/, "")
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
64
|
-
wg
|
65
|
-
end
|
66
|
-
|
67
|
-
def cache_workgroup_irtf(wg, _b)
|
68
|
-
warn "Reading workgroups from https://irtf.org/groups..."
|
69
|
-
URI.open("https://irtf.org/groups", ssl_verify_mode: OpenSSL::SSL::VERIFY_NONE) do |f|
|
70
|
-
f.each_line do |l|
|
71
|
-
l.scan(%r{<a title="([^"]+) Research Group"[^>]+>([^<]+)<}) do |w|
|
72
|
-
wg << w[0].gsub(/\s+$/, "")
|
73
|
-
wg << w[1].gsub(/\s+$/, "") # abbrev
|
74
|
-
end
|
75
|
-
end
|
76
|
-
end
|
77
|
-
wg
|
78
|
-
end
|
79
|
-
|
80
|
-
def cache_workgroup(node)
|
81
|
-
wg, wgcache_name = open_wg_cache(node)
|
82
|
-
if wg.empty?
|
83
|
-
File.open(wgcache_name, "w") do |b|
|
84
|
-
wg = cache_workgroup_ietf(wg, b)
|
85
|
-
wg = cache_workgroup_irtf(wg, b)
|
86
|
-
b << wg.to_json
|
87
|
-
end
|
88
|
-
end
|
89
|
-
wg
|
37
|
+
def cache_workgroup(_node)
|
38
|
+
Metanorma::Ietf::Data::WORKGROUPS
|
90
39
|
end
|
91
40
|
end
|
92
41
|
end
|
data/lib/isodoc/ietf/section.rb
CHANGED
@@ -33,7 +33,7 @@ module IsoDoc::Ietf
|
|
33
33
|
strict: node&.at(ns("//pi/strict"))&.text || "yes",
|
34
34
|
compact: node&.at(ns("//pi/compact"))&.text || "yes",
|
35
35
|
subcompact: node&.at(ns("//pi/subcompact"))&.text || "no",
|
36
|
-
toc: node&.at(ns("//pi/
|
36
|
+
toc: node&.at(ns("//pi/tocinclude"))&.text,
|
37
37
|
tocdepth: node&.at(ns("//pi/toc-depth"))&.text || "4",
|
38
38
|
symrefs: node&.at(ns("//pi/sym-refs"))&.text || "yes",
|
39
39
|
sortrefs: node&.at(ns("//pi/sort-refs"))&.text || "yes",
|
data/metanorma-ietf.gemspec
CHANGED
@@ -38,6 +38,7 @@ Gem::Specification.new do |spec|
|
|
38
38
|
spec.add_dependency "isodoc", "~> 1.7.0"
|
39
39
|
spec.add_dependency "mathml2asciimath"
|
40
40
|
spec.add_dependency "metanorma-standoc", "~> 1.10.0"
|
41
|
+
spec.add_dependency "metanorma-ietf-data"
|
41
42
|
spec.add_dependency "nokogiri", "~> 1.11.6"
|
42
43
|
spec.add_dependency "open-uri"
|
43
44
|
|
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.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: isodoc
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 1.10.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: metanorma-ietf-data
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: nokogiri
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|