metanorma-iso 2.1.2 → 2.1.3

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.
@@ -193,13 +193,16 @@ RSpec.describe Metanorma::ISO do
193
193
  :docsubstage:
194
194
  :technical-committee: TC
195
195
  :technical-committee-number: 1
196
- :technical-committee-type: A
197
196
  :subcommittee: SC
198
197
  :subcommittee-number: 2
199
- :subcommittee-type: B
200
198
  :workgroup: WG
201
199
  :workgroup-number: 3
202
- :workgroup-type: C
200
+ :approval-technical-committee: TC
201
+ :approval-technical-committee-number: 1
202
+ :approval-subcommittee: SC
203
+ :approval-subcommittee-number: 2
204
+ :approval-workgroup: WG
205
+ :approval-workgroup-number: 3
203
206
  INPUT
204
207
  expect(xmlpp(output.sub(%r{<boilerplate>.*</boilerplate>}m, "")))
205
208
  .to be_equivalent_to xmlpp(<<~"OUTPUT")
@@ -317,15 +320,15 @@ RSpec.describe Metanorma::ISO do
317
320
  <agency>IEC</agency>
318
321
  <agency>IETF</agency>
319
322
  <agency>ISO</agency>
320
- <technical-committee number='1' type='A'>TC</technical-committee>
321
- <subcommittee number='2' type='B'>SC</subcommittee>
322
- <workgroup number='3' type='C'>WG</workgroup>
323
+ <technical-committee number='1' type='TC'>TC</technical-committee>
324
+ <subcommittee number='2' type='SC'>SC</subcommittee>
325
+ <workgroup number='3' type='WG'>WG</workgroup>
323
326
  </editorialgroup>
324
327
  <approvalgroup>
325
328
  <agency>ISO</agency>
326
- <technical-committee number='1' type='A'>TC</technical-committee>
327
- <subcommittee number='2' type='B'>SC</subcommittee>
328
- <workgroup number='3' type='C'>WG</workgroup>
329
+ <technical-committee number='1' type='TC'>TC</technical-committee>
330
+ <subcommittee number='2' type='SC'>SC</subcommittee>
331
+ <workgroup number='3' type='WG'>WG</workgroup>
329
332
  </approvalgroup>
330
333
  <structuredidentifier>
331
334
  <project-number part="1" subpart="1">IEC/IETF/ISO 1000</project-number>
@@ -393,18 +396,12 @@ RSpec.describe Metanorma::ISO do
393
396
  </copyright>
394
397
  <ext>
395
398
  <doctype>technical-specification</doctype>
396
- <editorialgroup>
397
- <agency>ISO</agency>
398
- <technical-committee/>
399
- <subcommittee/>
400
- <workgroup/>
401
- </editorialgroup>
402
- <approvalgroup>
403
- <agency>ISO</agency>
404
- <technical-committee/>
405
- <subcommittee/>
406
- <workgroup/>
407
- </approvalgroup>
399
+ <editorialgroup>
400
+ <agency>ISO</agency>
401
+ </editorialgroup>
402
+ <approvalgroup>
403
+ <agency>ISO</agency>
404
+ </approvalgroup>
408
405
  <structuredidentifier>
409
406
  <project-number part='1' subpart='1'>ISO 1000</project-number>
410
407
  </structuredidentifier>
@@ -509,18 +506,12 @@ RSpec.describe Metanorma::ISO do
509
506
  <ext>
510
507
  <doctype>standard</doctype>
511
508
  <horizontal>true</horizontal>
512
- <editorialgroup>
513
- <agency>ISO</agency>
514
- <technical-committee/>
515
- <subcommittee/>
516
- <workgroup/>
517
- </editorialgroup>
518
- <approvalgroup>
519
- <agency>ISO</agency>
520
- <technical-committee/>
521
- <subcommittee/>
522
- <workgroup/>
523
- </approvalgroup>
509
+ <editorialgroup>
510
+ <agency>ISO</agency>
511
+ </editorialgroup>
512
+ <approvalgroup>
513
+ <agency>ISO</agency>
514
+ </approvalgroup>
524
515
  <structuredidentifier>
525
516
  <project-number part='1'>ISO 1000</project-number>
526
517
  </structuredidentifier>
@@ -623,18 +614,12 @@ RSpec.describe Metanorma::ISO do
623
614
  </copyright>
624
615
  <ext>
625
616
  <doctype>this-is-a-doctype</doctype>
626
- <editorialgroup>
627
- <agency>SD</agency>
628
- <technical-committee/>
629
- <subcommittee/>
630
- <workgroup/>
631
- </editorialgroup>
632
- <approvalgroup>
633
- <agency>ISO</agency>
634
- <technical-committee/>
635
- <subcommittee/>
636
- <workgroup/>
637
- </approvalgroup>
617
+ <editorialgroup>
618
+ <agency>SD</agency>
619
+ </editorialgroup>
620
+ <approvalgroup>
621
+ <agency>ISO</agency>
622
+ </approvalgroup>
638
623
  <structuredidentifier>
639
624
  <project-number part="1" subpart="1">SD 1000</project-number>
640
625
  </structuredidentifier>
@@ -701,18 +686,12 @@ RSpec.describe Metanorma::ISO do
701
686
  </copyright>
702
687
  <ext>
703
688
  <doctype>international-standard</doctype>
704
- <editorialgroup>
705
- <agency>ISO</agency>
706
- <technical-committee/>
707
- <subcommittee/>
708
- <workgroup/>
709
- </editorialgroup>
710
- <approvalgroup>
711
- <agency>ISO</agency>
712
- <technical-committee/>
713
- <subcommittee/>
714
- <workgroup/>
715
- </approvalgroup>
689
+ <editorialgroup>
690
+ <agency>ISO</agency>
691
+ </editorialgroup>
692
+ <approvalgroup>
693
+ <agency>ISO</agency>
694
+ </approvalgroup>
716
695
  <structuredidentifier>
717
696
  <project-number>ISO 1000</project-number>
718
697
  </structuredidentifier>
@@ -777,17 +756,11 @@ RSpec.describe Metanorma::ISO do
777
756
  </copyright>
778
757
  <ext>
779
758
  <doctype>standard</doctype>
780
- <editorialgroup>
759
+ <editorialgroup>
781
760
  <agency>ISO</agency>
782
- <technical-committee/>
783
- <subcommittee/>
784
- <workgroup/>
785
761
  </editorialgroup>
786
762
  <approvalgroup>
787
763
  <agency>ISO</agency>
788
- <technical-committee/>
789
- <subcommittee/>
790
- <workgroup/>
791
764
  </approvalgroup>
792
765
  <structuredidentifier>
793
766
  <project-number>ISO 1000</project-number>
@@ -853,18 +826,12 @@ RSpec.describe Metanorma::ISO do
853
826
  </copyright>
854
827
  <ext>
855
828
  <doctype>standard</doctype>
856
- <editorialgroup>
857
- <agency>ISO</agency>
858
- <technical-committee/>
859
- <subcommittee/>
860
- <workgroup/>
861
- </editorialgroup>
862
- <approvalgroup>
863
- <agency>ISO</agency>
864
- <technical-committee/>
865
- <subcommittee/>
866
- <workgroup/>
867
- </approvalgroup>
829
+ <editorialgroup>
830
+ <agency>ISO</agency>
831
+ </editorialgroup>
832
+ <approvalgroup>
833
+ <agency>ISO</agency>
834
+ </approvalgroup>
868
835
  <structuredidentifier>
869
836
  <project-number>ISO 1000</project-number>
870
837
  </structuredidentifier>
@@ -928,18 +895,12 @@ RSpec.describe Metanorma::ISO do
928
895
  </copyright>
929
896
  <ext>
930
897
  <doctype>directive</doctype>
931
- <editorialgroup>
932
- <agency>ISO</agency>
933
- <technical-committee/>
934
- <subcommittee/>
935
- <workgroup/>
936
- </editorialgroup>
937
- <approvalgroup>
938
- <agency>ISO</agency>
939
- <technical-committee/>
940
- <subcommittee/>
941
- <workgroup/>
942
- </approvalgroup>
898
+ <editorialgroup>
899
+ <agency>ISO</agency>
900
+ </editorialgroup>
901
+ <approvalgroup>
902
+ <agency>ISO</agency>
903
+ </approvalgroup>
943
904
  <structuredidentifier>
944
905
  <project-number>ISO 1000</project-number>
945
906
  </structuredidentifier>
@@ -1311,18 +1272,12 @@ RSpec.describe Metanorma::ISO do
1311
1272
  </relation>
1312
1273
  <ext>
1313
1274
  <doctype>standard</doctype>
1314
- <editorialgroup>
1315
- <agency>ISO</agency>
1316
- <technical-committee/>
1317
- <subcommittee/>
1318
- <workgroup/>
1319
- </editorialgroup>
1320
- <approvalgroup>
1321
- <agency>ISO</agency>
1322
- <technical-committee/>
1323
- <subcommittee/>
1324
- <workgroup/>
1325
- </approvalgroup>
1275
+ <editorialgroup>
1276
+ <agency>ISO</agency>
1277
+ </editorialgroup>
1278
+ <approvalgroup>
1279
+ <agency>ISO</agency>
1280
+ </approvalgroup>
1326
1281
  <stagename>International standard</stagename>
1327
1282
  </ext>
1328
1283
  </bibdata>
@@ -150,7 +150,7 @@ RSpec.describe Metanorma::ISO do
150
150
  expect(File.read("test.err")).to include "Scope clause missing"
151
151
  end
152
152
 
153
- it "Scope clause not missing 1" do
153
+ it "Scope clause not missing if supplied" do
154
154
  Asciidoctor.convert(<<~"INPUT", *OPTIONS)
155
155
  = Document title
156
156
  Author
@@ -164,7 +164,7 @@ RSpec.describe Metanorma::ISO do
164
164
  expect(File.read("test.err")).not_to include "Scope clause missing"
165
165
  end
166
166
 
167
- it "Scope clause not missing 2" do
167
+ it "Scope clause not missing in amendments" do
168
168
  FileUtils.rm_f "test.err"
169
169
  Asciidoctor.convert(<<~"INPUT", *OPTIONS)
170
170
  = Document title
@@ -196,7 +196,7 @@ RSpec.describe Metanorma::ISO do
196
196
  expect(File.read("test.err")).to include "Normative references missing"
197
197
  end
198
198
 
199
- it "Normative references not missing 1" do
199
+ it "Normative references not missing if supplied" do
200
200
  Asciidoctor.convert(<<~"INPUT", *OPTIONS)
201
201
  = Document title
202
202
  Author
@@ -212,7 +212,7 @@ RSpec.describe Metanorma::ISO do
212
212
  .not_to include "Normative references missing"
213
213
  end
214
214
 
215
- it "Normative references not missing 2" do
215
+ it "Normative references not missing in amendments" do
216
216
  Asciidoctor.convert(<<~"INPUT", *OPTIONS)
217
217
  = Document title
218
218
  Author
@@ -243,7 +243,7 @@ RSpec.describe Metanorma::ISO do
243
243
  expect(File.read("test.err")).to include "Terms & definitions missing"
244
244
  end
245
245
 
246
- it "Terms & definitions not missing 1" do
246
+ it "Terms & definitions not missing if supplied" do
247
247
  Asciidoctor.convert(<<~"INPUT", *OPTIONS)
248
248
  = Document title
249
249
  Author
@@ -258,7 +258,7 @@ RSpec.describe Metanorma::ISO do
258
258
  expect(File.read("test.err")).not_to include "Terms & definitions missing"
259
259
  end
260
260
 
261
- it "Terms & definitions not missing 2" do
261
+ it "Terms & definitions not missing in amendment" do
262
262
  Asciidoctor.convert(<<~"INPUT", *OPTIONS)
263
263
  = Document title
264
264
  Author
@@ -1699,6 +1699,7 @@ RSpec.describe Metanorma::ISO do
1699
1699
  :docfile: test.adoc
1700
1700
  :nodoc:
1701
1701
  :technical-committee-type: X
1702
+ :technical-committee-number: X
1702
1703
  :no-isobib:
1703
1704
 
1704
1705
  INPUT
@@ -1712,19 +1713,7 @@ RSpec.describe Metanorma::ISO do
1712
1713
  :docfile: test.adoc
1713
1714
  :nodoc:
1714
1715
  :subcommittee-type: X
1715
- :no-isobib:
1716
-
1717
- INPUT
1718
- expect(File.read("test.err")).to include "invalid subcommittee type"
1719
- end
1720
-
1721
- it "Warning if invalid subcommittee type" do
1722
- Asciidoctor.convert(<<~"INPUT", *OPTIONS)
1723
- = Document title
1724
- Author
1725
- :docfile: test.adoc
1726
- :nodoc:
1727
- :subcommittee-type: X
1716
+ :subcommittee-number: X
1728
1717
  :no-isobib:
1729
1718
 
1730
1719
  INPUT
data/spec/spec_helper.rb CHANGED
@@ -203,15 +203,9 @@ BLANK_HDR1 = <<~"HDR".freeze
203
203
  <doctype>standard</doctype>
204
204
  <editorialgroup>
205
205
  <agency>ISO</agency>
206
- <technical-committee/>
207
- <subcommittee/>
208
- <workgroup/>
209
206
  </editorialgroup>
210
207
  <approvalgroup>
211
208
  <agency>ISO</agency>
212
- <technical-committee/>
213
- <subcommittee/>
214
- <workgroup/>
215
209
  </approvalgroup>
216
210
  <stagename>International standard</stagename>
217
211
  </ext>