metanorma-iso 1.6.1 → 1.7.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +11 -41
  3. data/.gitignore +2 -0
  4. data/.rubocop.yml +6 -2
  5. data/lib/asciidoctor/iso/base.rb +13 -13
  6. data/lib/asciidoctor/iso/basicdoc.rng +5 -3
  7. data/lib/asciidoctor/iso/biblio.rng +4 -6
  8. data/lib/asciidoctor/iso/cleanup.rb +1 -1
  9. data/lib/asciidoctor/iso/front.rb +6 -6
  10. data/lib/asciidoctor/iso/front_id.rb +30 -25
  11. data/lib/asciidoctor/iso/isodoc.rng +108 -2
  12. data/lib/asciidoctor/iso/isostandard-amd.rng +3 -0
  13. data/lib/asciidoctor/iso/isostandard.rng +17 -97
  14. data/lib/asciidoctor/iso/validate.rb +68 -1
  15. data/lib/asciidoctor/iso/validate_title.rb +21 -13
  16. data/lib/isodoc/iso/base_convert.rb +11 -0
  17. data/lib/isodoc/iso/html/header.html +12 -12
  18. data/lib/isodoc/iso/html/html_iso_intro.html +1 -1
  19. data/lib/isodoc/iso/html/html_iso_titlepage.html +1 -1
  20. data/lib/isodoc/iso/html/word_iso_intro.html +1 -1
  21. data/lib/isodoc/iso/html/word_iso_titlepage.html +1 -1
  22. data/lib/isodoc/iso/html_convert.rb +2 -2
  23. data/lib/isodoc/iso/i18n-en.yaml +6 -0
  24. data/lib/isodoc/iso/i18n-fr.yaml +4 -0
  25. data/lib/isodoc/iso/i18n-zh-Hans.yaml +4 -0
  26. data/lib/isodoc/iso/index.rb +140 -0
  27. data/lib/isodoc/iso/iso.amendment.xsl +1009 -321
  28. data/lib/isodoc/iso/iso.international-standard.xsl +1009 -321
  29. data/lib/isodoc/iso/presentation_xml_convert.rb +1 -4
  30. data/lib/isodoc/iso/word_convert.rb +2 -2
  31. data/lib/isodoc/iso/xref.rb +5 -0
  32. data/lib/metanorma/iso/version.rb +1 -1
  33. data/metanorma-iso.gemspec +4 -4
  34. data/spec/asciidoctor/amd_spec.rb +696 -0
  35. data/spec/asciidoctor/base_spec.rb +704 -0
  36. data/spec/asciidoctor/blocks_spec.rb +527 -0
  37. data/spec/asciidoctor/cleanup_spec.rb +1134 -0
  38. data/spec/asciidoctor/inline_spec.rb +195 -0
  39. data/spec/asciidoctor/lists_spec.rb +197 -0
  40. data/spec/asciidoctor/refs_spec.rb +375 -0
  41. data/spec/asciidoctor/section_spec.rb +393 -0
  42. data/spec/asciidoctor/table_spec.rb +329 -0
  43. data/spec/asciidoctor/validate_spec.rb +1572 -0
  44. data/spec/isodoc/amd_spec.rb +967 -946
  45. data/spec/isodoc/blocks_spec.rb +530 -507
  46. data/spec/isodoc/i18n_spec.rb +953 -911
  47. data/spec/isodoc/inline_spec.rb +355 -293
  48. data/spec/isodoc/iso_spec.rb +340 -316
  49. data/spec/isodoc/metadata_spec.rb +392 -382
  50. data/spec/isodoc/postproc_spec.rb +834 -656
  51. data/spec/isodoc/ref_spec.rb +374 -331
  52. data/spec/isodoc/section_spec.rb +821 -519
  53. data/spec/isodoc/table_spec.rb +472 -411
  54. data/spec/isodoc/terms_spec.rb +209 -185
  55. data/spec/isodoc/xref_spec.rb +1370 -1236
  56. data/spec/metanorma/processor_spec.rb +28 -26
  57. data/spec/spec_helper.rb +186 -189
  58. metadata +26 -27
  59. data/.rubocop.ribose.yml +0 -66
  60. data/spec/asciidoctor-iso/amd_spec.rb +0 -694
  61. data/spec/asciidoctor-iso/base_spec.rb +0 -713
  62. data/spec/asciidoctor-iso/blocks_spec.rb +0 -482
  63. data/spec/asciidoctor-iso/cleanup_spec.rb +0 -1025
  64. data/spec/asciidoctor-iso/inline_spec.rb +0 -170
  65. data/spec/asciidoctor-iso/lists_spec.rb +0 -190
  66. data/spec/asciidoctor-iso/refs_spec.rb +0 -317
  67. data/spec/asciidoctor-iso/section_spec.rb +0 -362
  68. data/spec/asciidoctor-iso/table_spec.rb +0 -313
  69. data/spec/asciidoctor-iso/validate_spec.rb +0 -1550
  70. data/spec/assets/xref_error.adoc +0 -7
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iso
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.1
4
+ version: 1.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-11 00:00:00.000000000 Z
11
+ date: 2021-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-jing
@@ -30,28 +30,28 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.4.2
33
+ version: 1.5.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.4.2
40
+ version: 1.5.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: metanorma-standoc
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.7.0
47
+ version: 1.8.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: 1.7.0
54
+ version: 1.8.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: tokenizer
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -168,16 +168,16 @@ dependencies:
168
168
  name: rake
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - ">="
171
+ - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: '0'
173
+ version: '13.0'
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - ">="
178
+ - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: '0'
180
+ version: '13.0'
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: rspec
183
183
  requirement: !ruby/object:Gem::Requirement
@@ -196,16 +196,16 @@ dependencies:
196
196
  name: rubocop
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
- - - '='
199
+ - - "~>"
200
200
  - !ruby/object:Gem::Version
201
- version: 0.54.0
201
+ version: 1.5.2
202
202
  type: :development
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
- - - '='
206
+ - - "~>"
207
207
  - !ruby/object:Gem::Version
208
- version: 0.54.0
208
+ version: 1.5.2
209
209
  - !ruby/object:Gem::Dependency
210
210
  name: simplecov
211
211
  requirement: !ruby/object:Gem::Requirement
@@ -265,7 +265,6 @@ files:
265
265
  - ".gitignore"
266
266
  - ".hound.yml"
267
267
  - ".oss-guides.rubocop.yml"
268
- - ".rubocop.ribose.yml"
269
268
  - ".rubocop.tb.yml"
270
269
  - ".rubocop.yml"
271
270
  - CODE_OF_CONDUCT.md
@@ -321,6 +320,7 @@ files:
321
320
  - lib/isodoc/iso/i18n-fr.yaml
322
321
  - lib/isodoc/iso/i18n-zh-Hans.yaml
323
322
  - lib/isodoc/iso/i18n.rb
323
+ - lib/isodoc/iso/index.rb
324
324
  - lib/isodoc/iso/init.rb
325
325
  - lib/isodoc/iso/iso.amendment.xsl
326
326
  - lib/isodoc/iso/iso.international-standard.xsl
@@ -337,16 +337,16 @@ files:
337
337
  - lib/metanorma/iso/processor.rb
338
338
  - lib/metanorma/iso/version.rb
339
339
  - metanorma-iso.gemspec
340
- - spec/asciidoctor-iso/amd_spec.rb
341
- - spec/asciidoctor-iso/base_spec.rb
342
- - spec/asciidoctor-iso/blocks_spec.rb
343
- - spec/asciidoctor-iso/cleanup_spec.rb
344
- - spec/asciidoctor-iso/inline_spec.rb
345
- - spec/asciidoctor-iso/lists_spec.rb
346
- - spec/asciidoctor-iso/refs_spec.rb
347
- - spec/asciidoctor-iso/section_spec.rb
348
- - spec/asciidoctor-iso/table_spec.rb
349
- - spec/asciidoctor-iso/validate_spec.rb
340
+ - spec/asciidoctor/amd_spec.rb
341
+ - spec/asciidoctor/base_spec.rb
342
+ - spec/asciidoctor/blocks_spec.rb
343
+ - spec/asciidoctor/cleanup_spec.rb
344
+ - spec/asciidoctor/inline_spec.rb
345
+ - spec/asciidoctor/lists_spec.rb
346
+ - spec/asciidoctor/refs_spec.rb
347
+ - spec/asciidoctor/section_spec.rb
348
+ - spec/asciidoctor/table_spec.rb
349
+ - spec/asciidoctor/validate_spec.rb
350
350
  - spec/assets/header.html
351
351
  - spec/assets/html.css
352
352
  - spec/assets/htmlcover.html
@@ -360,7 +360,6 @@ files:
360
360
  - spec/assets/word.css
361
361
  - spec/assets/wordcover.html
362
362
  - spec/assets/wordintro.html
363
- - spec/assets/xref_error.adoc
364
363
  - spec/examples/103_01_02.html
365
364
  - spec/examples/english.yaml
366
365
  - spec/examples/iso_123_.xml
@@ -410,7 +409,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
410
409
  - !ruby/object:Gem::Version
411
410
  version: '0'
412
411
  requirements: []
413
- rubygems_version: 3.0.3
412
+ rubygems_version: 3.1.4
414
413
  signing_key:
415
414
  specification_version: 4
416
415
  summary: metanorma-iso lets you write ISO standards in AsciiDoc.
data/.rubocop.ribose.yml DELETED
@@ -1,66 +0,0 @@
1
- AllCops:
2
- Include:
3
- - "**/*.rake"
4
- - "**/Gemfile"
5
- - "**/*.gemfile"
6
- - "**/Rakefile"
7
- - "**/*.rb"
8
- Exclude:
9
- - "vendor/**/*"
10
- - "db/**/*"
11
- - "tmp/**/*"
12
- DisplayCopNames: false
13
- StyleGuideCopsOnly: false
14
- Rails:
15
- Enabled: true
16
- Metrics/AbcSize:
17
- Description: A calculated magnitude based on number of assignments, branches, and
18
- conditions.
19
- Enabled: true
20
- Max: 15
21
- Metrics/BlockLength:
22
- Exclude:
23
- - "spec/**/*"
24
- Metrics/BlockNesting:
25
- Description: Avoid excessive block nesting
26
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count
27
- Enabled: true
28
- Max: 3
29
- Metrics/ClassLength:
30
- Description: Avoid classes longer than 100 lines of code.
31
- Enabled: false
32
- CountComments: false
33
- Max: 100
34
- Metrics/CyclomaticComplexity:
35
- Description: A complexity metric that is strongly correlated to the number of test
36
- cases needed to validate a method.
37
- Enabled: true
38
- Max: 6
39
- Metrics/LineLength:
40
- Description: Limit lines to 80 characters.
41
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#80-character-limits
42
- Enabled: true
43
- Max: 80
44
- AllowURI: true
45
- URISchemes:
46
- - http
47
- - https
48
- Metrics/MethodLength:
49
- Description: Avoid methods longer than 10 lines of code.
50
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
51
- Enabled: true
52
- CountComments: true
53
- Max: 10
54
- Exclude:
55
- - "spec/**/*"
56
- Metrics/ParameterLists:
57
- Description: Avoid long parameter lists.
58
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
59
- Enabled: true
60
- Max: 5
61
- CountKeywordArgs: true
62
- Metrics/PerceivedComplexity:
63
- Description: A complexity metric geared towards measuring complexity for a human
64
- reader.
65
- Enabled: true
66
- Max: 7
@@ -1,694 +0,0 @@
1
- require "spec_helper"
2
- require "fileutils"
3
-
4
- RSpec.describe Asciidoctor::ISO do
5
- it "processes amendment sections" do
6
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
7
- #{AMD_BLANK_HDR}
8
- == Foreword
9
-
10
- Text
11
-
12
- == Introduction
13
-
14
- === Introduction Subsection
15
-
16
- == Scope
17
-
18
- Text
19
-
20
- == Acknowledgements
21
-
22
- == Normative References
23
-
24
- == Terms and Definitions
25
-
26
- === Term1
27
-
28
- == Terms, Definitions, Symbols and Abbreviated Terms
29
-
30
- === Normal Terms
31
-
32
- ==== Term2
33
-
34
- === Symbols and Abbreviated Terms
35
-
36
- == Symbols and Abbreviated Terms
37
-
38
- == Clause 4
39
-
40
- === Introduction
41
-
42
- === Clause 4.2
43
-
44
- == Terms and Definitions
45
-
46
- [appendix]
47
- == Annex
48
-
49
- === Annex A.1
50
-
51
- [%appendix]
52
- === Appendix 1
53
-
54
- == Bibliography
55
-
56
- === Bibliography Subsection
57
- INPUT
58
- #{BLANK_HDR.sub(%r{<doctype>article</doctype>}, "<doctype>amendment</doctype>")}
59
- <sections>
60
- <clause id='_' obligation='normative'>
61
- <title>Foreword</title>
62
- <p id='_'>Text</p>
63
- </clause>
64
- <clause id='_' obligation='normative'>
65
- <title>Introduction</title>
66
- <clause id='_' obligation='normative'>
67
- <title>Introduction Subsection</title>
68
- </clause>
69
- </clause>
70
- <clause id='_' obligation='normative'>
71
- <title>Scope</title>
72
- <p id='_'>Text</p>
73
- </clause>
74
- <clause id='_' obligation='normative'>
75
- <title>Acknowledgements</title>
76
- </clause>
77
- <clause id='_' obligation='normative'>
78
- <title>Normative References</title>
79
- </clause>
80
- <clause id='_' obligation='normative'>
81
- <title>Terms and Definitions</title>
82
- <clause id='_' obligation='normative'>
83
- <title>Term1</title>
84
- </clause>
85
- </clause>
86
- <clause id='_' obligation='normative'>
87
- <title>Terms, Definitions, Symbols and Abbreviated Terms</title>
88
- <clause id='_' obligation='normative'>
89
- <title>Normal Terms</title>
90
- <clause id='_' obligation='normative'>
91
- <title>Term2</title>
92
- </clause>
93
- </clause>
94
- <clause id='_' obligation='normative'>
95
- <title>Symbols and Abbreviated Terms</title>
96
- </clause>
97
- </clause>
98
- <clause id='_' obligation='normative'>
99
- <title>Symbols and Abbreviated Terms</title>
100
- </clause>
101
- <clause id='_' obligation='normative'>
102
- <title>Clause 4</title>
103
- <clause id='_' obligation='normative'>
104
- <title>Introduction</title>
105
- </clause>
106
- <clause id='_' obligation='normative'>
107
- <title>Clause 4.2</title>
108
- </clause>
109
- </clause>
110
- <clause id='_' obligation='normative'>
111
- <title>Terms and Definitions</title>
112
- </clause>
113
- <clause id='_' obligation='normative'>
114
- <title>Bibliography</title>
115
- <clause id='_' obligation='normative'>
116
- <title>Bibliography Subsection</title>
117
- </clause>
118
- </clause>
119
- </sections>
120
- <annex id='_' obligation='normative'>
121
- <title>Annex</title>
122
- <clause id='_' obligation='normative'>
123
- <title>Annex A.1</title>
124
- </clause>
125
- <appendix id='_' obligation='normative'>
126
- <title>Appendix 1</title>
127
- </appendix>
128
- </annex>
129
- </iso-standard>
130
-
131
- OUTPUT
132
- end
133
-
134
- it "processes default metadata, amendment" do
135
- expect(xmlpp(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true).sub(%r{<boilerplate>.*</boilerplate>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
136
- = Document title
137
- Author
138
- :docfile: test.adoc
139
- :nodoc:
140
- :novalid:
141
- :no-isobib:
142
- :docnumber: 17301
143
- :partnumber: 1
144
- :edition: 2
145
- :revdate: 2000-01-01
146
- :draft: 0.3.4
147
- :technical-committee: TC
148
- :technical-committee-number: 1
149
- :technical-committee-type: A
150
- :subcommittee: SC
151
- :subcommittee-number: 2
152
- :subcommittee-type: B
153
- :workgroup: WG
154
- :workgroup-number: 3
155
- :workgroup-type: C
156
- :technical-committee_2: TC1
157
- :technical-committee-number_2: 11
158
- :technical-committee-type_2: A1
159
- :subcommittee_2: SC1
160
- :subcommittee-number_2: 21
161
- :subcommittee-type_2: B1
162
- :workgroup_2: WG1
163
- :workgroup-number_2: 31
164
- :workgroup-type_2: C1
165
- :secretariat: SECRETARIAT
166
- :docstage: 10
167
- :docsubstage: 20
168
- :iteration: 3
169
- :language: en
170
- :title-intro-en: Introduction
171
- :title-main-en: Main Title -- Title
172
- :title-part-en: Title Part
173
- :title-intro-fr: Introduction Française
174
- :title-main-fr: Titre Principal
175
- :title-part-fr: Part du Titre
176
- :library-ics: 1,2,3
177
- :copyright-year: 2017
178
- :updates: ISO 17301-1:2016
179
- :created-date: 2016-05-01
180
- :amendment-number: 1
181
- :title-amendment-en: Mass fraction of extraneous matter, milled rice (nonglutinous), sample dividers and recommendations relating to storage and transport conditions
182
- :title-amendment-fr: Fraction massique de matière étrangère, riz usiné (non gluant), diviseurs d’échantillon et recommandations relatives aux conditions d’entreposage et de transport
183
- :doctype: amendment
184
- :updates-document-type: international-standard
185
- INPUT
186
- <iso-standard xmlns='https://www.metanorma.org/ns/iso' type="semantic" version="#{Metanorma::ISO::VERSION}">
187
- <bibdata type='standard'>
188
- <title language='en' format='text/plain' type='main'>Introduction — Main Title — Title — Title Part — Mass fraction of
189
- extraneous matter, milled rice (nonglutinous), sample dividers and
190
- recommendations relating to storage and transport conditions</title>
191
- <title language='en' format='text/plain' type='title-intro'>Introduction</title>
192
- <title language='en' format='text/plain' type='title-main'>Main Title — Title</title>
193
- <title language='en' format='text/plain' type='title-part'>Title Part</title>
194
- <title language='en' format='text/plain' type='title-amd'>
195
- Mass fraction of extraneous matter, milled rice (nonglutinous), sample
196
- dividers and recommendations relating to storage and transport conditions
197
- </title>
198
- <title language='fr' format='text/plain' type='main'>
199
- Introduction Française — Titre Principal — Part du Titre — Fraction
200
- massique de matière étrangère, riz usiné (non gluant), diviseurs
201
- d’échantillon et recommandations relatives aux conditions d’entreposage et
202
- de transport
203
- </title>
204
- <title language='fr' format='text/plain' type='title-intro'>Introduction Française</title>
205
- <title language='fr' format='text/plain' type='title-main'>Titre Principal</title>
206
- <title language='fr' format='text/plain' type='title-part'>Part du Titre</title>
207
- <title language='fr' format='text/plain' type='title-amd'>
208
- Fraction massique de matière étrangère, riz usiné (non gluant), diviseurs
209
- d’échantillon et recommandations relatives aux conditions d’entreposage et
210
- de transport
211
- </title>
212
- <docidentifier type='ISO'>ISO 17301-1:2016/PreNP Amd 1</docidentifier>
213
- <docidentifier type='iso-with-lang'>ISO 17301-1:2016/PreNP Amd 1(E)</docidentifier>
214
- <docidentifier type='iso-reference'>ISO 17301-1:2016/PreNP Amd 1:2017(E)</docidentifier>
215
- <docnumber>17301</docnumber>
216
- <date type='created'>
217
- <on>2016-05-01</on>
218
- </date>
219
- <contributor>
220
- <role type='author'/>
221
- <organization>
222
- <name>International Organization for Standardization</name>
223
- <abbreviation>ISO</abbreviation>
224
- </organization>
225
- </contributor>
226
- <contributor>
227
- <role type='publisher'/>
228
- <organization>
229
- <name>International Organization for Standardization</name>
230
- <abbreviation>ISO</abbreviation>
231
- </organization>
232
- </contributor>
233
- <edition>2</edition>
234
- <version>
235
- <revision-date>2000-01-01</revision-date>
236
- <draft>0.3.4</draft>
237
- </version>
238
- <language>en</language>
239
- <script>Latn</script>
240
- <status>
241
- <stage abbreviation='NP'>10</stage>
242
- <substage>20</substage>
243
- <iteration>3</iteration>
244
- </status>
245
- <copyright>
246
- <from>2017</from>
247
- <owner>
248
- <organization>
249
- <name>International Organization for Standardization</name>
250
- <abbreviation>ISO</abbreviation>
251
- </organization>
252
- </owner>
253
- </copyright>
254
- <ext>
255
- <doctype>amendment</doctype>
256
- <editorialgroup>
257
- <technical-committee number='1' type='A'>TC</technical-committee>
258
- <technical-committee number='11' type='A1'>TC1</technical-committee>
259
- <subcommittee number='2' type='B'>SC</subcommittee>
260
- <subcommittee number='21' type='B1'>SC1</subcommittee>
261
- <workgroup number='3' type='C'>WG</workgroup>
262
- <workgroup number='31' type='C1'>WG1</workgroup>
263
- <secretariat>SECRETARIAT</secretariat>
264
- </editorialgroup>
265
- <ics>
266
- <code>1</code>
267
- </ics>
268
- <ics>
269
- <code>2</code>
270
- </ics>
271
- <ics>
272
- <code>3</code>
273
- </ics>
274
- <structuredidentifier>
275
- <project-number part='1' amendment='1' origyr='2016-05-01'>17301</project-number>
276
- </structuredidentifier>
277
- <stagename>New work item proposal</stagename>
278
- <updates-document-type>international-standard</updates-document-type>
279
- </ext>
280
- </bibdata>
281
- <sections/>
282
- </iso-standard>
283
- OUTPUT
284
- end
285
-
286
- it "processes metadata, amendment" do
287
- expect(xmlpp(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true).sub(%r{<boilerplate>.*</boilerplate>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
288
- = Document title
289
- Author
290
- :docfile: test.adoc
291
- :nodoc:
292
- :novalid:
293
- :no-isobib:
294
- :docnumber: 17301
295
- :partnumber: 1
296
- :doctype: amendment
297
- :docstage: 30
298
- :updates: ISO 17301-1:2030
299
- :amendment-number: 1
300
- INPUT
301
- <iso-standard xmlns='https://www.metanorma.org/ns/iso' type="semantic" version="#{Metanorma::ISO::VERSION}">
302
- <bibdata type='standard'>
303
- <docidentifier type='ISO'>ISO 17301-1:2030/CD Amd 1</docidentifier>
304
- <docidentifier type='iso-with-lang'>ISO 17301-1:2030/CD Amd 1(E)</docidentifier>
305
- <docidentifier type='iso-reference'>ISO 17301-1:2030/CD Amd 1(E)</docidentifier>
306
- <docnumber>17301</docnumber>
307
- <contributor>
308
- <role type='author'/>
309
- <organization>
310
- <name>International Organization for Standardization</name>
311
- <abbreviation>ISO</abbreviation>
312
- </organization>
313
- </contributor>
314
- <contributor>
315
- <role type='publisher'/>
316
- <organization>
317
- <name>International Organization for Standardization</name>
318
- <abbreviation>ISO</abbreviation>
319
- </organization>
320
- </contributor>
321
- <language>en</language>
322
- <script>Latn</script>
323
- <status>
324
- <stage abbreviation='CD'>30</stage>
325
- <substage>00</substage>
326
- </status>
327
- <copyright>
328
- <from>#{Time.now.year}</from>
329
- <owner>
330
- <organization>
331
- <name>International Organization for Standardization</name>
332
- <abbreviation>ISO</abbreviation>
333
- </organization>
334
- </owner>
335
- </copyright>
336
- <ext>
337
- <doctype>amendment</doctype>
338
- <editorialgroup>
339
- <technical-committee/>
340
- <subcommittee/>
341
- <workgroup/>
342
- </editorialgroup>
343
- <structuredidentifier>
344
- <project-number part='1' amendment='1'>17301</project-number>
345
- </structuredidentifier>
346
- <stagename>Committee draft</stagename>
347
- </ext>
348
- </bibdata>
349
- <sections/>
350
- </iso-standard>
351
- OUTPUT
352
- end
353
-
354
- it "processes metadata, amendment" do
355
- expect(xmlpp(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true).sub(%r{<boilerplate>.*</boilerplate>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
356
- = Document title
357
- Author
358
- :docfile: test.adoc
359
- :nodoc:
360
- :novalid:
361
- :no-isobib:
362
- :docnumber: 17301
363
- :partnumber: 1
364
- :doctype: amendment
365
- :docstage: 40
366
- :updates: ISO 17301-1:2030
367
- :amendment-number: 1
368
- INPUT
369
- <iso-standard xmlns='https://www.metanorma.org/ns/iso' type="semantic" version="#{Metanorma::ISO::VERSION}">
370
- <bibdata type='standard'>
371
- <docidentifier type='ISO'>ISO 17301-1:2030/DAmd 1</docidentifier>
372
- <docidentifier type='iso-with-lang'>ISO 17301-1:2030/DAmd 1(E)</docidentifier>
373
- <docidentifier type='iso-reference'>ISO 17301-1:2030/DAmd 1(E)</docidentifier>
374
- <docnumber>17301</docnumber>
375
- <contributor>
376
- <role type='author'/>
377
- <organization>
378
- <name>International Organization for Standardization</name>
379
- <abbreviation>ISO</abbreviation>
380
- </organization>
381
- </contributor>
382
- <contributor>
383
- <role type='publisher'/>
384
- <organization>
385
- <name>International Organization for Standardization</name>
386
- <abbreviation>ISO</abbreviation>
387
- </organization>
388
- </contributor>
389
- <language>en</language>
390
- <script>Latn</script>
391
- <status>
392
- <stage abbreviation='D'>40</stage>
393
- <substage>00</substage>
394
- </status>
395
- <copyright>
396
- <from>#{Time.now.year}</from>
397
- <owner>
398
- <organization>
399
- <name>International Organization for Standardization</name>
400
- <abbreviation>ISO</abbreviation>
401
- </organization>
402
- </owner>
403
- </copyright>
404
- <ext>
405
- <doctype>amendment</doctype>
406
- <editorialgroup>
407
- <technical-committee/>
408
- <subcommittee/>
409
- <workgroup/>
410
- </editorialgroup>
411
- <structuredidentifier>
412
- <project-number part='1' amendment='1'>17301</project-number>
413
- </structuredidentifier>
414
- <stagename>Draft</stagename>
415
- </ext>
416
- </bibdata>
417
- <sections/>
418
- </iso-standard>
419
- OUTPUT
420
- end
421
-
422
- it "processes metadata, amendment" do
423
- expect(xmlpp(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true).sub(%r{<boilerplate>.*</boilerplate>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
424
- = Document title
425
- Author
426
- :docfile: test.adoc
427
- :nodoc:
428
- :novalid:
429
- :no-isobib:
430
- :docnumber: 17301
431
- :partnumber: 1
432
- :doctype: amendment
433
- :updates: ISO 17301-1:2030
434
- :amendment-number: 1
435
- INPUT
436
- <iso-standard xmlns='https://www.metanorma.org/ns/iso' type="semantic" version="#{Metanorma::ISO::VERSION}">
437
- <bibdata type='standard'>
438
- <docidentifier type='ISO'>ISO 17301-1:2030/Amd 1</docidentifier>
439
- <docidentifier type='iso-with-lang'>ISO 17301-1:2030/Amd 1(E)</docidentifier>
440
- <docidentifier type='iso-reference'>ISO 17301-1:2030/Amd 1(E)</docidentifier>
441
- <docnumber>17301</docnumber>
442
- <contributor>
443
- <role type='author'/>
444
- <organization>
445
- <name>International Organization for Standardization</name>
446
- <abbreviation>ISO</abbreviation>
447
- </organization>
448
- </contributor>
449
- <contributor>
450
- <role type='publisher'/>
451
- <organization>
452
- <name>International Organization for Standardization</name>
453
- <abbreviation>ISO</abbreviation>
454
- </organization>
455
- </contributor>
456
- <language>en</language>
457
- <script>Latn</script>
458
- <status>
459
- <stage abbreviation='IS'>60</stage>
460
- <substage>60</substage>
461
- </status>
462
- <copyright>
463
- <from>#{Time.now.year}</from>
464
- <owner>
465
- <organization>
466
- <name>International Organization for Standardization</name>
467
- <abbreviation>ISO</abbreviation>
468
- </organization>
469
- </owner>
470
- </copyright>
471
- <ext>
472
- <doctype>amendment</doctype>
473
- <editorialgroup>
474
- <technical-committee/>
475
- <subcommittee/>
476
- <workgroup/>
477
- </editorialgroup>
478
- <structuredidentifier>
479
- <project-number part='1' amendment='1'>17301</project-number>
480
- </structuredidentifier>
481
- <stagename>International standard</stagename>
482
- </ext>
483
- </bibdata>
484
- <sections/>
485
- </iso-standard>
486
- OUTPUT
487
- end
488
-
489
- it "processes metadata, corrigendum" do
490
- expect(xmlpp(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true).sub(%r{<boilerplate>.*</boilerplate>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
491
- = Document title
492
- Author
493
- :docfile: test.adoc
494
- :nodoc:
495
- :novalid:
496
- :no-isobib:
497
- :docnumber: 17301
498
- :partnumber: 1
499
- :doctype: technical-corrigendum
500
- :docstage: 30
501
- :updates: ISO 17301-1:2030
502
- :corrigendum-number: 3
503
- INPUT
504
- <iso-standard xmlns='https://www.metanorma.org/ns/iso' type="semantic" version="#{Metanorma::ISO::VERSION}">
505
- <bibdata type='standard'>
506
- <docidentifier type='ISO'>ISO 17301-1:2030/CD Cor.3</docidentifier>
507
- <docidentifier type='iso-with-lang'>ISO 17301-1:2030/CD Cor.3(E)</docidentifier>
508
- <docidentifier type='iso-reference'>ISO 17301-1:2030/CD Cor.3(E)</docidentifier>
509
- <docnumber>17301</docnumber>
510
- <contributor>
511
- <role type='author'/>
512
- <organization>
513
- <name>International Organization for Standardization</name>
514
- <abbreviation>ISO</abbreviation>
515
- </organization>
516
- </contributor>
517
- <contributor>
518
- <role type='publisher'/>
519
- <organization>
520
- <name>International Organization for Standardization</name>
521
- <abbreviation>ISO</abbreviation>
522
- </organization>
523
- </contributor>
524
- <language>en</language>
525
- <script>Latn</script>
526
- <status>
527
- <stage abbreviation='CD'>30</stage>
528
- <substage>00</substage>
529
- </status>
530
- <copyright>
531
- <from>#{Time.now.year}</from>
532
- <owner>
533
- <organization>
534
- <name>International Organization for Standardization</name>
535
- <abbreviation>ISO</abbreviation>
536
- </organization>
537
- </owner>
538
- </copyright>
539
- <ext>
540
- <doctype>technical-corrigendum</doctype>
541
- <editorialgroup>
542
- <technical-committee/>
543
- <subcommittee/>
544
- <workgroup/>
545
- </editorialgroup>
546
- <structuredidentifier>
547
- <project-number part='1' corrigendum='3'>17301</project-number>
548
- </structuredidentifier>
549
- <stagename>Committee draft</stagename>
550
- </ext>
551
- </bibdata>
552
- <sections/>
553
- </iso-standard>
554
- OUTPUT
555
- end
556
-
557
- it "processes metadata, corrigendum" do
558
- expect(xmlpp(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true).sub(%r{<boilerplate>.*</boilerplate>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
559
- = Document title
560
- Author
561
- :docfile: test.adoc
562
- :nodoc:
563
- :novalid:
564
- :no-isobib:
565
- :docnumber: 17301
566
- :partnumber: 1
567
- :doctype: technical-corrigendum
568
- :docstage: 50
569
- :updates: ISO 17301-1:2030
570
- :corrigendum-number: 3
571
- INPUT
572
- <iso-standard xmlns='https://www.metanorma.org/ns/iso' type="semantic" version="#{Metanorma::ISO::VERSION}">
573
- <bibdata type='standard'>
574
- <docidentifier type='ISO'>ISO 17301-1:2030/FDCor.3</docidentifier>
575
- <docidentifier type='iso-with-lang'>ISO 17301-1:2030/FDCor.3(E)</docidentifier>
576
- <docidentifier type='iso-reference'>ISO 17301-1:2030/FDCor.3(E)</docidentifier>
577
- <docnumber>17301</docnumber>
578
- <contributor>
579
- <role type='author'/>
580
- <organization>
581
- <name>International Organization for Standardization</name>
582
- <abbreviation>ISO</abbreviation>
583
- </organization>
584
- </contributor>
585
- <contributor>
586
- <role type='publisher'/>
587
- <organization>
588
- <name>International Organization for Standardization</name>
589
- <abbreviation>ISO</abbreviation>
590
- </organization>
591
- </contributor>
592
- <language>en</language>
593
- <script>Latn</script>
594
- <status>
595
- <stage abbreviation='FD'>50</stage>
596
- <substage>00</substage>
597
- </status>
598
- <copyright>
599
- <from>#{Time.now.year}</from>
600
- <owner>
601
- <organization>
602
- <name>International Organization for Standardization</name>
603
- <abbreviation>ISO</abbreviation>
604
- </organization>
605
- </owner>
606
- </copyright>
607
- <ext>
608
- <doctype>technical-corrigendum</doctype>
609
- <editorialgroup>
610
- <technical-committee/>
611
- <subcommittee/>
612
- <workgroup/>
613
- </editorialgroup>
614
- <structuredidentifier>
615
- <project-number part='1' corrigendum='3'>17301</project-number>
616
- </structuredidentifier>
617
- <stagename>Final draft</stagename>
618
- </ext>
619
- </bibdata>
620
- <sections/>
621
- </iso-standard>
622
- OUTPUT
623
- end
624
-
625
- it "processes metadata, corrigendum" do
626
- expect(xmlpp(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true).sub(%r{<boilerplate>.*</boilerplate>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
627
- = Document title
628
- Author
629
- :docfile: test.adoc
630
- :nodoc:
631
- :novalid:
632
- :no-isobib:
633
- :docnumber: 17301
634
- :partnumber: 1
635
- :doctype: technical-corrigendum
636
- :updates: ISO 17301-1:2030
637
- :corrigendum-number: 3
638
- INPUT
639
- <iso-standard xmlns='https://www.metanorma.org/ns/iso' type="semantic" version="#{Metanorma::ISO::VERSION}">
640
- <bibdata type='standard'>
641
- <docidentifier type='ISO'>ISO 17301-1:2030/Cor.3</docidentifier>
642
- <docidentifier type='iso-with-lang'>ISO 17301-1:2030/Cor.3(E)</docidentifier>
643
- <docidentifier type='iso-reference'>ISO 17301-1:2030/Cor.3(E)</docidentifier>
644
- <docnumber>17301</docnumber>
645
- <contributor>
646
- <role type='author'/>
647
- <organization>
648
- <name>International Organization for Standardization</name>
649
- <abbreviation>ISO</abbreviation>
650
- </organization>
651
- </contributor>
652
- <contributor>
653
- <role type='publisher'/>
654
- <organization>
655
- <name>International Organization for Standardization</name>
656
- <abbreviation>ISO</abbreviation>
657
- </organization>
658
- </contributor>
659
- <language>en</language>
660
- <script>Latn</script>
661
- <status>
662
- <stage abbreviation='IS'>60</stage>
663
- <substage>60</substage>
664
- </status>
665
- <copyright>
666
- <from>#{Time.now.year}</from>
667
- <owner>
668
- <organization>
669
- <name>International Organization for Standardization</name>
670
- <abbreviation>ISO</abbreviation>
671
- </organization>
672
- </owner>
673
- </copyright>
674
- <ext>
675
- <doctype>technical-corrigendum</doctype>
676
- <editorialgroup>
677
- <technical-committee/>
678
- <subcommittee/>
679
- <workgroup/>
680
- </editorialgroup>
681
- <structuredidentifier>
682
- <project-number part='1' corrigendum='3'>17301</project-number>
683
- </structuredidentifier>
684
- <stagename>International standard</stagename>
685
- </ext>
686
- </bibdata>
687
- <sections/>
688
- </iso-standard>
689
- OUTPUT
690
- end
691
-
692
-
693
-
694
- end