metanorma-ieee 0.0.4 → 0.0.6.1

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.
@@ -14,14 +14,18 @@
14
14
  <value>guide</value>
15
15
  <value>recommended-practice</value>
16
16
  <value>standard</value>
17
+ <value>whitepaper</value>
18
+ <value>redline</value>
19
+ <value>other</value>
17
20
  </choice>
18
21
  </define>
19
22
  <define name="stage">
20
23
  <element name="stage">
21
24
  <choice>
22
- <value>developing</value>
23
- <value>active</value>
24
- <value>inactive</value>
25
+ <value>draft</value>
26
+ <value>approved</value>
27
+ <value>superseded</value>
28
+ <value>withdrawn</value>
25
29
  </choice>
26
30
  </element>
27
31
  </define>
@@ -64,10 +68,59 @@
64
68
  <zeroOrMore>
65
69
  <ref name="ics"/>
66
70
  </zeroOrMore>
71
+ <optional>
72
+ <ref name="standard_status"/>
73
+ </optional>
74
+ <optional>
75
+ <ref name="standard_modified"/>
76
+ </optional>
77
+ <optional>
78
+ <ref name="pubstatus"/>
79
+ </optional>
80
+ <optional>
81
+ <ref name="holdstatus"/>
82
+ </optional>
67
83
  </define>
68
84
  </include>
85
+ <define name="standard_status">
86
+ <element name="standard_status">
87
+ <choice>
88
+ <value>Inactive</value>
89
+ <value>Active</value>
90
+ <value>Superseded</value>
91
+ </choice>
92
+ </element>
93
+ </define>
94
+ <define name="standard_modified">
95
+ <element name="standard_modified">
96
+ <choice>
97
+ <value>Draft</value>
98
+ <value>Withdrawn</value>
99
+ <value>Superseded</value>
100
+ <value>Approved</value>
101
+ <value>Reserved</value>
102
+ <value>Redline</value>
103
+ </choice>
104
+ </element>
105
+ </define>
106
+ <define name="pubstatus">
107
+ <element name="pubstatus">
108
+ <choice>
109
+ <value>Active</value>
110
+ <value>Inactive</value>
111
+ </choice>
112
+ </element>
113
+ </define>
114
+ <define name="holdstatus">
115
+ <element name="holdstatus">
116
+ <choice>
117
+ <value>Hold</value>
118
+ <value>Publish</value>
119
+ </choice>
120
+ </element>
121
+ </define>
69
122
  <define name="BibliographicDateType" combine="choice">
70
- <value>feecback-ended</value>
123
+ <value>feedback-ended</value>
71
124
  </define>
72
125
  <define name="trialuse">
73
126
  <element name="trial-use">
@@ -29,7 +29,8 @@ module Metanorma
29
29
 
30
30
  def doctype_validate(xmldoc)
31
31
  doctype = xmldoc&.at("//bibdata/ext/doctype")&.text
32
- %w(standard recommended-practice guide).include? doctype or
32
+ %w(standard recommended-practice guide whitepaper redline other)
33
+ .include? doctype or
33
34
  @log.add("Document Attributes", nil,
34
35
  "#{doctype} is not a recognised document type")
35
36
  docsubtype = xmldoc&.at("//bibdata/ext/subdoctype")&.text or return
@@ -40,7 +41,7 @@ module Metanorma
40
41
 
41
42
  def stage_validate(xmldoc)
42
43
  stage = xmldoc&.at("//bibdata/status/stage")&.text
43
- %w(active inactive developing).include? stage or
44
+ %w(draft approved superseded withdrawn).include? stage or
44
45
  @log.add("Document Attributes", nil,
45
46
  "#{stage} is not a recognised stage")
46
47
  end
@@ -148,13 +149,13 @@ module Metanorma
148
149
  pref = image_name_prefix(xmldoc)
149
150
  (xmldoc.xpath("//figure") - xmldoc.xpath("//table//figure"))
150
151
  .each do |f|
151
- i = f.at("./image") or next
152
- next if i["src"].start_with?("data:")
152
+ (i = f.at("./image") and !i["src"]&.start_with?("data:")) or next
153
153
 
154
154
  num = xrefs.anchor(f["id"], :label)
155
- File.basename(i["src"], ".*") == "#{pref}_fig#{num}" or
155
+ base = File.basename(i["src"], ".*")
156
+ base == "#{pref}_fig#{num}" or
156
157
  @log.add("Style", i,
157
- "Image name #{i['src']} is expected to be #{pref}_fig#{num}")
158
+ "Image name #{base} is expected to be #{pref}_fig#{num}")
158
159
  end
159
160
  end
160
161
 
@@ -169,13 +170,13 @@ module Metanorma
169
170
  def table_figure_name_validate(xmldoc, xrefs)
170
171
  xmldoc.xpath("//table[.//figure]").each do |t|
171
172
  xmldoc.xpath(".//figure").each do |f|
172
- i = f.at("./image") or next
173
- next if i["src"].start_with?("data:")
173
+ (i = f.at("./image") and !i["src"]&.start_with?("data:")) or next
174
174
 
175
175
  num = tablefigurenumber(t, f, xrefs)
176
- File.basename(i["src"]) == num or
176
+ base = File.basename(i["src"])
177
+ base == num or
177
178
  @log.add("Style", i,
178
- "Image name #{i['src']} is expected to be #{num}")
179
+ "Image name #{base} is expected to be #{num}")
179
180
  end
180
181
  end
181
182
  end
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module IEEE
3
- VERSION = "0.0.4".freeze
3
+ VERSION = "0.0.6.1".freeze
4
4
  end
5
5
  end
@@ -3,6 +3,6 @@ require "asciidoctor"
3
3
  require "isodoc/ieee"
4
4
  require "html2doc/ieee"
5
5
 
6
- if defined? Metanorma
6
+ if defined? Metanorma::Registry
7
7
  Metanorma::Registry.instance.register(Metanorma::IEEE::Processor)
8
8
  end
@@ -1,5 +1,5 @@
1
1
  nametemplate:
2
- one: "{% if nonpersonal[0] %}{{ nonpersonal[0] }}{% else %}{{surname[0] }} ,_{{initials[0] | join: '. '}}.{% endif %}"
2
+ one: "{% if nonpersonal[0] %}{{ nonpersonal[0] }}{% else %}{{surname[0] }} ,_{{initials[0] | join: '. '}} {% endif %}"
3
3
  two: "{% if nonpersonal[0] %}{{ nonpersonal[0] }}{% else %}{{surname[0] }} ,_{{initials[0] | join: '. '}}.{% endif %} , {{ labels['and'] }} {% if nonpersonal[1] %}{{ nonpersonal[1] }}{% else %}{{initials[1] | join: '. '}}. {{surname[1] }}{% endif %}"
4
4
  more: "{% if nonpersonal[0] %}{{ nonpersonal[0] }}{% else %}{{surname[0] }} ,_{{initials[0] | join: '. '}}.{% endif %} , {% if nonpersonal[1] %}{{ nonpersonal[1] }}{% else %}{{initials[1] | join: '. '}}. {{surname[1] }}{% endif %} , {{ labels['and'] }} {% if nonpersonal[2] %}{{ nonpersonal[2] }}{% else %}{{initials[2] | join: '. '}}. {{surname[2] }}{% endif %}"
5
5
  extenttemplate:
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-ieee
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.6.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-08-08 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: metanorma-standoc
@@ -202,6 +202,8 @@ extensions: []
202
202
  extra_rdoc_files: []
203
203
  files:
204
204
  - ".github/workflows/rake.yml"
205
+ - ".github/workflows/release.yml"
206
+ - ".hound.yml"
205
207
  - ".rubocop.yml"
206
208
  - CODE_OF_CONDUCT.md
207
209
  - Gemfile
@@ -266,12 +268,12 @@ files:
266
268
  - lib/metanorma/ieee/version.rb
267
269
  - lib/relaton/render/config.yml
268
270
  - lib/relaton/render/general.rb
269
- - metanorma-itu.gemspec
271
+ - metanorma-ieee.gemspec
270
272
  homepage: https://github.com/metanorma/metanorma-ieee
271
273
  licenses:
272
274
  - BSD-2-Clause
273
275
  metadata: {}
274
- post_install_message:
276
+ post_install_message:
275
277
  rdoc_options: []
276
278
  require_paths:
277
279
  - lib
@@ -286,8 +288,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
286
288
  - !ruby/object:Gem::Version
287
289
  version: '0'
288
290
  requirements: []
289
- rubygems_version: 3.3.16
290
- signing_key:
291
+ rubygems_version: 3.1.6
292
+ signing_key:
291
293
  specification_version: 4
292
294
  summary: Metanorma for the IEEE
293
295
  test_files: []