metanorma-standoc 2.2.0.1 → 2.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +1 -1
- data/.github/workflows/release.yml +24 -0
- data/lib/metanorma/standoc/base.rb +16 -0
- data/lib/metanorma/standoc/biblio.rng +8 -5
- data/lib/metanorma/standoc/blocks.rb +26 -13
- data/lib/metanorma/standoc/cleanup_biblio.rb +16 -10
- data/lib/metanorma/standoc/cleanup_reqt.rb +3 -136
- data/lib/metanorma/standoc/converter.rb +0 -7
- data/lib/metanorma/standoc/front.rb +6 -1
- data/lib/metanorma/standoc/front_contributor.rb +0 -10
- data/lib/metanorma/standoc/macros_terms.rb +5 -4
- data/lib/metanorma/standoc/reqt.rb +24 -73
- data/lib/metanorma/standoc/section.rb +35 -3
- data/lib/metanorma/standoc/terms.rb +13 -7
- data/lib/metanorma/standoc/utils.rb +9 -43
- data/lib/metanorma/standoc/validate.rb +18 -0
- data/lib/metanorma/standoc/version.rb +1 -1
- data/lib/metanorma-standoc.rb +1 -1
- data/metanorma-standoc.gemspec +5 -4
- data/spec/assets/correct.png +0 -0
- data/spec/assets/corrupt.png +0 -0
- data/spec/metanorma/base_spec.rb +6 -7
- data/spec/metanorma/biblio_spec.rb +8 -8
- data/spec/metanorma/blocks_spec.rb +20 -266
- data/spec/metanorma/cleanup_blocks_spec.rb +0 -168
- data/spec/metanorma/macros_concept_spec.rb +1052 -0
- data/spec/metanorma/macros_spec.rb +0 -1126
- data/spec/metanorma/reqt_spec.rb +130 -0
- data/spec/metanorma/section_spec.rb +5 -0
- data/spec/metanorma/validate_spec.rb +49 -0
- data/spec/requirements/default/blocks_spec.rb +250 -0
- data/spec/requirements/default/cleanup_spec.rb +173 -0
- data/spec/requirements/modspec/cleanup_spec.rb +333 -0
- data/spec/requirements/modspec/validate_spec.rb +330 -0
- data/spec/vcr_cassettes/bsi16341.yml +52 -36
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +88 -88
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec1.yml +10 -10
- data/spec/vcr_cassettes/hide_refs.yml +65 -65
- data/spec/vcr_cassettes/isobib_get_123.yml +12 -12
- data/spec/vcr_cassettes/isobib_get_123_1.yml +22 -22
- data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +30 -30
- data/spec/vcr_cassettes/isobib_get_123_2.yml +21 -21
- data/spec/vcr_cassettes/isobib_get_123_2001.yml +11 -11
- data/spec/vcr_cassettes/isobib_get_124.yml +11 -11
- data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +34 -58
- data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +45 -45
- data/spec/vcr_cassettes/std-link.yml +11 -11
- metadata +50 -28
- data/lib/isodoc/html/htmlstyle.css +0 -998
@@ -792,174 +792,6 @@ RSpec.describe Metanorma::Standoc do
|
|
792
792
|
.to be_equivalent_to xmlpp(output)
|
793
793
|
end
|
794
794
|
|
795
|
-
it "moves metadata deflist to correct location" do
|
796
|
-
input = <<~INPUT
|
797
|
-
#{ASCIIDOC_BLANK_HDR}
|
798
|
-
|
799
|
-
== Clause
|
800
|
-
|
801
|
-
[.requirement,subsequence="A",inherit="/ss/584/2015/level/1 & /ss/584/2015/level/2"]
|
802
|
-
====
|
803
|
-
[%metadata]
|
804
|
-
model:: ogc
|
805
|
-
type:: class
|
806
|
-
identifier:: http://www.opengis.net/spec/waterml/2.0/req/xsd-xml-rules[*req/core*]
|
807
|
-
subject:: Encoding of logical models
|
808
|
-
inherit:: urn:iso:dis:iso:19156:clause:7.2.2
|
809
|
-
inherit:: urn:iso:dis:iso:19156:clause:8
|
810
|
-
inherit:: http://www.opengis.net/doc/IS/GML/3.2/clause/2.4
|
811
|
-
inherit:: O&M Abstract model, OGC 10-004r3, clause D.3.4
|
812
|
-
inherit:: http://www.opengis.net/spec/SWE/2.0/req/core/core-concepts-used
|
813
|
-
inherit:: <<ref2>>
|
814
|
-
inherit:: <<ref3>>
|
815
|
-
target:: http://www.example.com
|
816
|
-
classification:: priority:P0
|
817
|
-
classification:: domain:Hydrology,Groundwater
|
818
|
-
classification:: control-class:Technical
|
819
|
-
obligation:: recommendation,requirement
|
820
|
-
|
821
|
-
I recommend this
|
822
|
-
====
|
823
|
-
INPUT
|
824
|
-
output = <<~OUTPUT
|
825
|
-
#{BLANK_HDR}
|
826
|
-
<sections>
|
827
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
828
|
-
<title>Clause</title>
|
829
|
-
<requirement id='_' subsequence='A' obligation='recommendation,requirement' model='ogc' type='class'>
|
830
|
-
<identifier>http://www.opengis.net/spec/waterml/2.0/req/xsd-xml-rules</identifier>
|
831
|
-
<subject>Encoding of logical models</subject>
|
832
|
-
<inherit>/ss/584/2015/level/1 & /ss/584/2015/level/2</inherit>
|
833
|
-
<inherit>urn:iso:dis:iso:19156:clause:7.2.2</inherit>
|
834
|
-
<inherit>urn:iso:dis:iso:19156:clause:8</inherit>
|
835
|
-
<inherit>http://www.opengis.net/doc/IS/GML/3.2/clause/2.4</inherit>
|
836
|
-
<inherit>O&M Abstract model, OGC 10-004r3, clause D.3.4</inherit>
|
837
|
-
<inherit>http://www.opengis.net/spec/SWE/2.0/req/core/core-concepts-used</inherit>
|
838
|
-
<inherit>
|
839
|
-
<xref target='ref2'/>
|
840
|
-
</inherit>
|
841
|
-
<inherit>
|
842
|
-
<xref target='ref3'/>
|
843
|
-
</inherit>
|
844
|
-
<classification>
|
845
|
-
<tag>priority</tag>
|
846
|
-
<value>P0</value>
|
847
|
-
</classification>
|
848
|
-
<classification>
|
849
|
-
<tag>domain</tag>
|
850
|
-
<value>Hydrology</value>
|
851
|
-
</classification>
|
852
|
-
<classification>
|
853
|
-
<tag>domain</tag>
|
854
|
-
<value>Groundwater</value>
|
855
|
-
</classification>
|
856
|
-
<classification>
|
857
|
-
<tag>control-class</tag>
|
858
|
-
<value>Technical</value>
|
859
|
-
</classification>
|
860
|
-
<classification>
|
861
|
-
<tag>target</tag>
|
862
|
-
<value><link target='http://www.example.com'/></value>
|
863
|
-
</classification>
|
864
|
-
<description>
|
865
|
-
<p id='_'>I recommend this</p>
|
866
|
-
</description>
|
867
|
-
</requirement>
|
868
|
-
</clause>
|
869
|
-
</sections>
|
870
|
-
</standard-document>
|
871
|
-
OUTPUT
|
872
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
873
|
-
.to be_equivalent_to xmlpp(output)
|
874
|
-
end
|
875
|
-
|
876
|
-
it "moves inherit macros to correct location" do
|
877
|
-
input = <<~INPUT
|
878
|
-
#{ASCIIDOC_BLANK_HDR}
|
879
|
-
|
880
|
-
== Clause
|
881
|
-
|
882
|
-
[.requirement,subsequence="A",inherit="/ss/584/2015/level/1 & /ss/584/2015/level/2"]
|
883
|
-
.Title
|
884
|
-
====
|
885
|
-
inherit:[A]
|
886
|
-
inherit:[B]
|
887
|
-
I recommend this
|
888
|
-
====
|
889
|
-
|
890
|
-
[.requirement,subsequence="A",classification="X:Y"]
|
891
|
-
.Title
|
892
|
-
====
|
893
|
-
inherit:[A]
|
894
|
-
I recommend this
|
895
|
-
====
|
896
|
-
|
897
|
-
[.requirement,subsequence="A"]
|
898
|
-
.Title
|
899
|
-
====
|
900
|
-
inherit:[A]
|
901
|
-
I recommend this
|
902
|
-
====
|
903
|
-
|
904
|
-
[.requirement,subsequence="A"]
|
905
|
-
.Title
|
906
|
-
====
|
907
|
-
inherit:[A]
|
908
|
-
====
|
909
|
-
|
910
|
-
[.requirement,subsequence="A"]
|
911
|
-
====
|
912
|
-
inherit:[A]
|
913
|
-
====
|
914
|
-
|
915
|
-
INPUT
|
916
|
-
output = <<~OUTPUT
|
917
|
-
#{BLANK_HDR}
|
918
|
-
<sections>
|
919
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
920
|
-
<title>Clause</title>
|
921
|
-
<requirement id='_' subsequence='A'>
|
922
|
-
<title>Title</title>
|
923
|
-
<inherit>A</inherit>
|
924
|
-
<inherit>B</inherit>
|
925
|
-
<inherit>/ss/584/2015/level/1 & /ss/584/2015/level/2</inherit>
|
926
|
-
<description>
|
927
|
-
<p id='_'> I recommend this</p>
|
928
|
-
</description>
|
929
|
-
</requirement>
|
930
|
-
<requirement id='_' subsequence='A'>
|
931
|
-
<title>Title</title>
|
932
|
-
<inherit>A</inherit>
|
933
|
-
<classification>
|
934
|
-
<tag>X</tag>
|
935
|
-
<value>Y</value>
|
936
|
-
</classification>
|
937
|
-
<description>
|
938
|
-
<p id='_'> I recommend this</p>
|
939
|
-
</description>
|
940
|
-
</requirement>
|
941
|
-
<requirement id='_' subsequence='A'>
|
942
|
-
<title>Title</title>
|
943
|
-
<inherit>A</inherit>
|
944
|
-
<description>
|
945
|
-
<p id='_'> I recommend this</p>
|
946
|
-
</description>
|
947
|
-
</requirement>
|
948
|
-
<requirement id='_' subsequence='A'>
|
949
|
-
<title>Title</title>
|
950
|
-
<inherit>A</inherit>
|
951
|
-
</requirement>
|
952
|
-
<requirement id='_' subsequence='A'>
|
953
|
-
<inherit>A</inherit>
|
954
|
-
</requirement>
|
955
|
-
</clause>
|
956
|
-
</sections>
|
957
|
-
</standard-document>
|
958
|
-
OUTPUT
|
959
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
960
|
-
.to be_equivalent_to xmlpp(output)
|
961
|
-
end
|
962
|
-
|
963
795
|
it "moves %beforeclause admonitions to right position" do
|
964
796
|
input = <<~INPUT
|
965
797
|
#{ASCIIDOC_BLANK_HDR}
|