metanorma-ietf 2.3.0 → 2.3.5

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: 762b7326f710d4729e85538a72dcb11fe7f960d995303ef0999c5ff8a665e8d6
4
- data.tar.gz: f22daa0309aa18c071492e8b4f74a0d087835a966581af394cc6eba4be933e79
3
+ metadata.gz: 7629e0ade5cff517d3fdf80296490da26a339654c338d7976d1b7f028aebb147
4
+ data.tar.gz: 3add51632aeb8f9c1f06c96ca276e3bb947d129ce704c902eb918e998331914a
5
5
  SHA512:
6
- metadata.gz: 85bff031c15ec990050395691adbdd51ebd67c0cac1dfdc6746e1a21bf7f4547678d268caceb536b69e9013b681d3082a9dc798107396ce1f1cae4329953502b
7
- data.tar.gz: f0b5cbde4df5519fcbad880e6b2e441523bf6e53bab819f292f6a588b92baff94fd097734f1398920d4fd4a6709f034433e8053f445d1147459744c8f6bca1d9
6
+ metadata.gz: 3519faef8dccfc5c474c0d3e4b12401aad30e98f666c50939aa1abf8736c9dddca67129dd6c50bc2cad77ce9f4589469d6ab93943462866d61d49b17fb888a3b
7
+ data.tar.gz: 490a7fddbb7c158c746445f3607b7fe5225b9e8d082b5e0f529c30b08c7db497bf0826872d904f4c95628e630b35d3048d4f4511602cc06fb3f8169dda5812f1
@@ -16,19 +16,9 @@ jobs:
16
16
  strategy:
17
17
  fail-fast: false
18
18
  matrix:
19
- ruby: [ '2.7', '2.6', '2.5', '2.4' ]
19
+ ruby: [ '3.0', '2.7', '2.6', '2.5' ]
20
20
  os: [ ubuntu-latest, windows-latest, macos-latest ]
21
21
  experimental: [ false ]
22
- include:
23
- - ruby: '3.0'
24
- os: 'ubuntu-latest'
25
- experimental: true
26
- - ruby: '3.0'
27
- os: 'windows-latest'
28
- experimental: true
29
- - ruby: '3.0'
30
- os: 'macos-latest'
31
- experimental: true
32
22
 
33
23
  steps:
34
24
  - uses: actions/checkout@master
@@ -68,7 +58,7 @@ jobs:
68
58
  with:
69
59
  path: ~/.cache/xml2rfc
70
60
  key: xml2rfc
71
- restore-key: xml2rfc
61
+ restore-keys: xml2rfc
72
62
 
73
63
  - if: matrix.os == 'macos-latest'
74
64
  run: brew install libmagic
@@ -88,5 +78,5 @@ jobs:
88
78
  with:
89
79
  token: ${{ secrets.METANORMA_CI_PAT_TOKEN || secrets.GITHUB_TOKEN }}
90
80
  repository: ${{ github.repository }}
91
- event-type: notify
81
+ event-type: tests-passed
92
82
  client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
data/.hound.yml CHANGED
@@ -1,3 +1,5 @@
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
1
3
  ruby:
2
- Enabled: true
4
+ enabled: true
3
5
  config_file: .rubocop.yml
data/.rubocop.yml CHANGED
@@ -1,14 +1,10 @@
1
- # This project follows the Ribose OSS style guide.
2
- # https://github.com/riboseinc/oss-guides
3
- # All project-specific additions and overrides should be specified in this file.
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
4
3
  inherit_from:
5
4
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
6
5
 
7
6
  # local repo-specific modifications
7
+ # ...
8
8
 
9
9
  AllCops:
10
- DisplayCopNames: false
11
- StyleGuideCopsOnly: false
12
- TargetRubyVersion: 2.4
13
- Rails:
14
- Enabled: true
10
+ TargetRubyVersion: 2.5
@@ -787,6 +787,7 @@
787
787
  <value>adapted</value>
788
788
  <value>vote-started</value>
789
789
  <value>vote-ended</value>
790
+ <value>announced</value>
790
791
  </choice>
791
792
  </define>
792
793
  <define name="bdate">
@@ -14,7 +14,7 @@ module Asciidoctor
14
14
  csv_split(publishers)&.each do |p|
15
15
  xml.contributor do |c|
16
16
  c.role **{ type: "publisher" }
17
- c.organization { |a| organization(a, p) }
17
+ c.organization { |a| organization(a, p, true) }
18
18
  end
19
19
  end
20
20
  end
@@ -25,7 +25,7 @@ module Asciidoctor
25
25
  xml.copyright do |c|
26
26
  c.from (node.attr("copyright-year") || Date.today.year)
27
27
  c.owner do |owner|
28
- owner.organization { |o| organization(o, p) }
28
+ owner.organization { |o| organization(o, p, true) }
29
29
  end
30
30
  end
31
31
  end
@@ -19,6 +19,9 @@
19
19
  <optional>
20
20
  <ref name="doctype"/>
21
21
  </optional>
22
+ <optional>
23
+ <ref name="docsubtype"/>
24
+ </optional>
22
25
  <zeroOrMore>
23
26
  <ref name="editorialgroup"/>
24
27
  </zeroOrMore>
@@ -45,6 +45,11 @@
45
45
  <optional>
46
46
  <attribute name="alt"/>
47
47
  </optional>
48
+ <optional>
49
+ <attribute name="updatetype">
50
+ <data type="boolean"/>
51
+ </attribute>
52
+ </optional>
48
53
  <text/>
49
54
  </element>
50
55
  </define>
@@ -543,6 +548,9 @@
543
548
  </define>
544
549
  <define name="BibDataExtensionType">
545
550
  <ref name="doctype"/>
551
+ <optional>
552
+ <ref name="docsubtype"/>
553
+ </optional>
546
554
  <optional>
547
555
  <ref name="editorialgroup"/>
548
556
  </optional>
@@ -876,8 +884,28 @@
876
884
  </zeroOrMore>
877
885
  </element>
878
886
  </define>
887
+ <define name="pagebreak">
888
+ <element name="pagebreak">
889
+ <optional>
890
+ <attribute name="orientation">
891
+ <choice>
892
+ <value>landscape</value>
893
+ <value>portrait</value>
894
+ </choice>
895
+ </attribute>
896
+ </optional>
897
+ </element>
898
+ </define>
879
899
  </include>
880
900
  <!-- end overrides -->
901
+ <define name="docsubtype">
902
+ <element name="docsubtype">
903
+ <ref name="DocumentSubtype"/>
904
+ </element>
905
+ </define>
906
+ <define name="DocumentSubtype">
907
+ <text/>
908
+ </define>
881
909
  <define name="colgroup">
882
910
  <element name="colgroup">
883
911
  <oneOrMore>
@@ -927,7 +955,24 @@
927
955
  <define name="concept">
928
956
  <element name="concept">
929
957
  <optional>
930
- <attribute name="term"/>
958
+ <element name="refterm">
959
+ <zeroOrMore>
960
+ <choice>
961
+ <ref name="PureTextElement"/>
962
+ <ref name="stem"/>
963
+ </choice>
964
+ </zeroOrMore>
965
+ </element>
966
+ </optional>
967
+ <optional>
968
+ <element name="renderterm">
969
+ <zeroOrMore>
970
+ <choice>
971
+ <ref name="PureTextElement"/>
972
+ <ref name="stem"/>
973
+ </choice>
974
+ </zeroOrMore>
975
+ </element>
931
976
  </optional>
932
977
  <choice>
933
978
  <ref name="eref"/>
@@ -943,8 +988,170 @@
943
988
  <ref name="permission"/>
944
989
  <ref name="imagemap"/>
945
990
  <ref name="svgmap"/>
991
+ <ref name="inputform"/>
992
+ </choice>
993
+ </define>
994
+ <define name="inputform">
995
+ <element name="form">
996
+ <attribute name="id">
997
+ <data type="ID"/>
998
+ </attribute>
999
+ <attribute name="name"/>
1000
+ <attribute name="action"/>
1001
+ <zeroOrMore>
1002
+ <choice>
1003
+ <ref name="TextElement"/>
1004
+ <ref name="FormInput"/>
1005
+ </choice>
1006
+ </zeroOrMore>
1007
+ </element>
1008
+ </define>
1009
+ <define name="FormInput">
1010
+ <choice>
1011
+ <ref name="input"/>
1012
+ <ref name="formlabel"/>
1013
+ <ref name="select"/>
1014
+ <ref name="textarea"/>
946
1015
  </choice>
947
1016
  </define>
1017
+ <define name="InputType">
1018
+ <choice>
1019
+ <value>button</value>
1020
+ <value>checkbox</value>
1021
+ <value>date</value>
1022
+ <value>file</value>
1023
+ <value>password</value>
1024
+ <value>radio</value>
1025
+ <value>submit</value>
1026
+ <value>text</value>
1027
+ </choice>
1028
+ </define>
1029
+ <define name="input">
1030
+ <element name="input">
1031
+ <attribute name="type">
1032
+ <ref name="InputType"/>
1033
+ </attribute>
1034
+ <optional>
1035
+ <attribute name="checked">
1036
+ <data type="boolean"/>
1037
+ </attribute>
1038
+ </optional>
1039
+ <optional>
1040
+ <attribute name="disabled">
1041
+ <data type="boolean"/>
1042
+ </attribute>
1043
+ </optional>
1044
+ <optional>
1045
+ <attribute name="readonly">
1046
+ <data type="boolean"/>
1047
+ </attribute>
1048
+ </optional>
1049
+ <optional>
1050
+ <attribute name="maxlength">
1051
+ <data type="int"/>
1052
+ </attribute>
1053
+ </optional>
1054
+ <optional>
1055
+ <attribute name="minlength">
1056
+ <data type="int"/>
1057
+ </attribute>
1058
+ </optional>
1059
+ <optional>
1060
+ <attribute name="name"/>
1061
+ </optional>
1062
+ <optional>
1063
+ <attribute name="value"/>
1064
+ </optional>
1065
+ <optional>
1066
+ <attribute name="id">
1067
+ <data type="ID"/>
1068
+ </attribute>
1069
+ </optional>
1070
+ </element>
1071
+ </define>
1072
+ <define name="formlabel">
1073
+ <element name="label">
1074
+ <attribute name="for">
1075
+ <data type="IDREF"/>
1076
+ </attribute>
1077
+ <zeroOrMore>
1078
+ <ref name="PureTextElement"/>
1079
+ </zeroOrMore>
1080
+ </element>
1081
+ </define>
1082
+ <define name="select">
1083
+ <element name="select">
1084
+ <optional>
1085
+ <attribute name="name"/>
1086
+ </optional>
1087
+ <optional>
1088
+ <attribute name="value"/>
1089
+ </optional>
1090
+ <optional>
1091
+ <attribute name="id">
1092
+ <data type="ID"/>
1093
+ </attribute>
1094
+ </optional>
1095
+ <optional>
1096
+ <attribute name="disabled">
1097
+ <data type="boolean"/>
1098
+ </attribute>
1099
+ </optional>
1100
+ <optional>
1101
+ <attribute name="multiple">
1102
+ <data type="boolean"/>
1103
+ </attribute>
1104
+ </optional>
1105
+ <optional>
1106
+ <attribute name="size">
1107
+ <data type="int"/>
1108
+ </attribute>
1109
+ </optional>
1110
+ <oneOrMore>
1111
+ <ref name="option"/>
1112
+ </oneOrMore>
1113
+ </element>
1114
+ </define>
1115
+ <define name="option">
1116
+ <element name="option">
1117
+ <optional>
1118
+ <attribute name="disabled">
1119
+ <data type="boolean"/>
1120
+ </attribute>
1121
+ </optional>
1122
+ <optional>
1123
+ <attribute name="value"/>
1124
+ </optional>
1125
+ <zeroOrMore>
1126
+ <ref name="PureTextElement"/>
1127
+ </zeroOrMore>
1128
+ </element>
1129
+ </define>
1130
+ <define name="textarea">
1131
+ <element name="textarea">
1132
+ <optional>
1133
+ <attribute name="name"/>
1134
+ </optional>
1135
+ <optional>
1136
+ <attribute name="value"/>
1137
+ </optional>
1138
+ <optional>
1139
+ <attribute name="id">
1140
+ <data type="ID"/>
1141
+ </attribute>
1142
+ </optional>
1143
+ <optional>
1144
+ <attribute name="rows">
1145
+ <data type="int"/>
1146
+ </attribute>
1147
+ </optional>
1148
+ <optional>
1149
+ <attribute name="cols">
1150
+ <data type="int"/>
1151
+ </attribute>
1152
+ </optional>
1153
+ </element>
1154
+ </define>
948
1155
  <define name="bibliography">
949
1156
  <element name="bibliography">
950
1157
  <oneOrMore>
@@ -1017,9 +1224,7 @@
1017
1224
  </define>
1018
1225
  <define name="IsoWorkgroup">
1019
1226
  <optional>
1020
- <attribute name="number">
1021
- <data type="int"/>
1022
- </attribute>
1227
+ <attribute name="number"/>
1023
1228
  </optional>
1024
1229
  <optional>
1025
1230
  <attribute name="type"/>
@@ -1,3 +1,5 @@
1
+ require "open-uri"
2
+
1
3
  module Asciidoctor
2
4
  module Ietf
3
5
  class Converter < ::Asciidoctor::Standoc::Converter
@@ -10,15 +12,18 @@ module Asciidoctor
10
12
  def image_validate(doc)
11
13
  doc.xpath("//image").each do |i|
12
14
  next if i["mimetype"] == "image/svg+xml"
15
+
13
16
  @log.add("MIME", i, "image #{i['src'][0, 40]} is not SVG!")
14
17
  end
15
18
  end
16
19
 
17
20
  def workgroup_validate(doc)
18
21
  return if @workgroups.empty?
22
+
19
23
  doc.xpath("//bibdata/ext/editorialgroup/workgroup").each do |wg|
20
24
  wg_norm = wg.text.sub(/ (Working|Research) Group$/, "")
21
25
  next if @workgroups.include?(wg_norm)
26
+
22
27
  @log.add("Document Attributes", nil, "IETF: unrecognised working group #{wg.text}")
23
28
  end
24
29
  end
@@ -29,25 +34,29 @@ module Asciidoctor
29
34
  File.join(File.dirname(__FILE__), "ietf.rng"))
30
35
  end
31
36
 
37
+ def wgcache_name
38
+ "#{Dir.home}/.metanorma-ietf-workgroup-cache.json"
39
+ end
40
+
32
41
  def open_wg_cache(node)
33
- wgcache_name = "#{Dir.home}/.metanorma-ietf-workgroup-cache.json"
34
- node.attr("flush-caches") == "true" and FileUtils.rm wgcache_name, :force => true
42
+ node.attr("flush-caches") == "true" and
43
+ FileUtils.rm wgcache_name, force: true
35
44
  wg = []
36
45
  if Pathname.new(wgcache_name).file?
37
46
  begin
38
47
  File.open(wgcache_name, "r") { |f| wg = JSON.parse(f.read) }
39
48
  rescue Exception => e
40
- STDERR.puts "Cache #{wgcache_name} is invalid, drop it"
49
+ warn "Cache #{wgcache_name} is invalid, drop it"
41
50
  end
42
51
  end
43
52
  [wg, wgcache_name]
44
53
  end
45
54
 
46
- def cache_workgroup_ietf(wg, b)
47
- STDERR.puts "Reading workgroups from https://tools.ietf.org/wg/..."
48
- Kernel.open("https://tools.ietf.org/wg/") do |f|
49
- f.each_line do |line|
50
- line.scan(%r{<td width="50%" style='padding: 0 1ex'>([^<]+)</td>}) do |w|
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|
51
60
  wg << w[0].gsub(/\s+$/, "").gsub(/ Working Group$/, "")
52
61
  end
53
62
  end
@@ -55,11 +64,11 @@ module Asciidoctor
55
64
  wg
56
65
  end
57
66
 
58
- def cache_workgroup_irtf(wg, b)
59
- STDERR.puts "Reading workgroups from https://irtf.org/groups..."
60
- Kernel.open("https://irtf.org/groups", ssl_verify_mode: OpenSSL::SSL::VERIFY_NONE) do |f|
61
- f.each_line do |line|
62
- line.scan(%r{<a title="([^"]+) Research Group"[^>]+>([^<]+)<}) do |w|
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|
63
72
  wg << w[0].gsub(/\s+$/, "")
64
73
  wg << w[1].gsub(/\s+$/, "") # abbrev
65
74
  end