metanorma-standoc 2.2.5 → 2.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/html/htmlstyle.css +1 -1
- data/lib/metanorma/standoc/base.rb +4 -5
- data/lib/metanorma/standoc/basicdoc.rng +0 -27
- data/lib/metanorma/standoc/biblio-standoc.rng +164 -0
- data/lib/metanorma/standoc/biblio.rng +50 -18
- data/lib/metanorma/standoc/cleanup.rb +18 -17
- data/lib/metanorma/standoc/cleanup_amend.rb +2 -2
- data/lib/metanorma/standoc/cleanup_asciibib.rb +110 -0
- data/lib/metanorma/standoc/cleanup_biblio.rb +7 -112
- data/lib/metanorma/standoc/cleanup_block.rb +7 -6
- data/lib/metanorma/standoc/cleanup_boilerplate.rb +6 -6
- data/lib/metanorma/standoc/cleanup_inline.rb +2 -2
- data/lib/metanorma/standoc/cleanup_maths.rb +12 -4
- data/lib/metanorma/standoc/cleanup_section.rb +19 -9
- data/lib/metanorma/standoc/cleanup_symbols.rb +14 -7
- data/lib/metanorma/standoc/cleanup_text.rb +19 -6
- data/lib/metanorma/standoc/cleanup_toc.rb +1 -2
- data/lib/metanorma/standoc/cleanup_xref.rb +55 -14
- data/lib/metanorma/standoc/inline.rb +29 -12
- data/lib/metanorma/standoc/isodoc-compile.rng +7 -0
- data/lib/metanorma/standoc/isodoc.rng +69 -207
- data/lib/metanorma/standoc/ref_utility.rb +1 -0
- data/lib/metanorma/standoc/render.rb +10 -1
- data/lib/metanorma/standoc/section.rb +10 -3
- data/lib/metanorma/standoc/utils.rb +6 -1
- data/lib/metanorma/standoc/validate.rb +9 -9
- data/lib/metanorma/standoc/version.rb +1 -1
- data/metanorma-standoc.gemspec +5 -3
- metadata +7 -141
- data/.github/workflows/rake.yml +0 -15
- data/.github/workflows/release.yml +0 -24
- data/Rakefile +0 -8
- data/bin/rspec +0 -18
- data/spec/assets/a1.adoc +0 -8
- data/spec/assets/a2.adoc +0 -10
- data/spec/assets/a3.adoc +0 -9
- data/spec/assets/a3a.adoc +0 -7
- data/spec/assets/a4.adoc +0 -4
- data/spec/assets/boilerplate.xml +0 -4
- data/spec/assets/codes.yml +0 -695
- data/spec/assets/correct.png +0 -0
- data/spec/assets/corrupt.png +0 -0
- data/spec/assets/header.html +0 -7
- data/spec/assets/html-override.css +0 -1
- data/spec/assets/html.scss +0 -13
- data/spec/assets/htmlcover.html +0 -4
- data/spec/assets/htmlintro.html +0 -5
- data/spec/assets/i18n.yaml +0 -17
- data/spec/assets/iso.adoc +0 -10
- data/spec/assets/iso.headless.html +0 -33
- data/spec/assets/iso.xml +0 -8
- data/spec/assets/iso123.rxl +0 -107
- data/spec/assets/rice_image1.png +0 -0
- data/spec/assets/scripts.html +0 -3
- data/spec/assets/std.css +0 -2
- data/spec/assets/word-override.css +0 -1
- data/spec/assets/word.scss +0 -13
- data/spec/assets/wordcover.html +0 -3
- data/spec/assets/wordintro.html +0 -4
- data/spec/assets/xref_error.adoc +0 -8
- data/spec/examples/103_01_02.html +0 -247
- data/spec/examples/codes_table.html +0 -3174
- data/spec/examples/datamodel/address_class_profile.adoc +0 -5
- data/spec/examples/datamodel/address_class_profile.presentation.xml +0 -14
- data/spec/examples/datamodel/address_component_profile.adoc +0 -5
- data/spec/examples/datamodel/blank_definition_profile.adoc +0 -5
- data/spec/examples/datamodel/common_models_diagram.adoc +0 -5
- data/spec/examples/datamodel/models/models/AddressClassProfile.yml +0 -90
- data/spec/examples/datamodel/models/models/AddressComponentProfile.yml +0 -63
- data/spec/examples/datamodel/models/models/AddressComponentSpecification.yml +0 -15
- data/spec/examples/datamodel/models/models/AddressProfile.yml +0 -36
- data/spec/examples/datamodel/models/models/AttributeProfile.yml +0 -32
- data/spec/examples/datamodel/models/models/InterchangeAddressClassProfile.yml +0 -79
- data/spec/examples/datamodel/models/models/Localization copy.yml +0 -23
- data/spec/examples/datamodel/models/models/Localization.yml +0 -23
- data/spec/examples/datamodel/models/models/ProfileCompliantAddress.yml +0 -36
- data/spec/examples/datamodel/models/models/ProfileCompliantAddressComponent.yml +0 -15
- data/spec/examples/datamodel/models/models/Signature.yml +0 -20
- data/spec/examples/datamodel/models/models/SignatureBlankDefinition.yml +0 -20
- data/spec/examples/datamodel/models/models/TextDirectionCode copy.yml +0 -16
- data/spec/examples/datamodel/models/models/TextDirectionCode.yml +0 -16
- data/spec/examples/datamodel/models/models/Validity.yml +0 -14
- data/spec/examples/datamodel/models/models/iso19160-1/Address.yml +0 -22
- data/spec/examples/datamodel/models/models/iso19160-1/AddressComponent.yml +0 -2
- data/spec/examples/datamodel/models/style.uml.inc +0 -37
- data/spec/examples/datamodel/models/views/CommonModels.yml +0 -9
- data/spec/examples/datamodel/models/views/TopDown.yml +0 -62
- data/spec/examples/datamodel/top_down_diagram.adoc +0 -5
- data/spec/examples/english.yaml +0 -69
- data/spec/examples/iso_123_.xml +0 -46
- data/spec/examples/iso_123_all_parts.xml +0 -46
- data/spec/examples/iso_123_no_year_note.xml +0 -47
- data/spec/examples/iso_124_.xml +0 -42
- data/spec/examples/iso_216_.xml +0 -48
- data/spec/examples/iso_iec_12382_.xml +0 -49
- data/spec/examples/rice.adoc +0 -715
- data/spec/examples/rice.preview.html +0 -1877
- data/spec/examples/rice.sh +0 -4
- data/spec/examples/rice_images/rice_image1.png +0 -0
- data/spec/examples/rice_images/rice_image2.png +0 -0
- data/spec/examples/rice_images/rice_image3_1.png +0 -0
- data/spec/examples/rice_images/rice_image3_2.png +0 -0
- data/spec/examples/rice_images/rice_image3_3.png +0 -0
- data/spec/fixtures/action_schemaexpg1.svg +0 -122
- data/spec/fixtures/datamodel_description_sections_tree.xml +0 -327
- data/spec/fixtures/diagram_definitions.lutaml +0 -22
- data/spec/fixtures/macros_datamodel/address_class_profile.xml +0 -149
- data/spec/fixtures/macros_datamodel/address_component_profile.xml +0 -71
- data/spec/fixtures/macros_datamodel/blank_definition_profile.xml +0 -51
- data/spec/fixtures/macros_datamodel/common_models_diagram.xml +0 -7
- data/spec/fixtures/macros_datamodel/top_down_diagram.xml +0 -7
- data/spec/fixtures/test.exp +0 -121
- data/spec/fixtures/test.xmi +0 -9250
- data/spec/metanorma/base_spec.rb +0 -1125
- data/spec/metanorma/biblio_spec.rb +0 -1004
- data/spec/metanorma/blank_spec.rb +0 -37
- data/spec/metanorma/blocks_spec.rb +0 -1784
- data/spec/metanorma/cleanup_blocks_spec.rb +0 -1099
- data/spec/metanorma/cleanup_sections_spec.rb +0 -1850
- data/spec/metanorma/cleanup_spec.rb +0 -1920
- data/spec/metanorma/cleanup_terms_spec.rb +0 -1543
- data/spec/metanorma/datamodel/attributes_table_preprocessor_spec.rb +0 -111
- data/spec/metanorma/datamodel/diagram_preprocessor_spec.rb +0 -72
- data/spec/metanorma/inline_spec.rb +0 -724
- data/spec/metanorma/isobib_cache_spec.rb +0 -742
- data/spec/metanorma/lists_spec.rb +0 -232
- data/spec/metanorma/macros_concept_spec.rb +0 -1052
- data/spec/metanorma/macros_json2text_spec.rb +0 -10
- data/spec/metanorma/macros_plantuml_spec.rb +0 -402
- data/spec/metanorma/macros_spec.rb +0 -1183
- data/spec/metanorma/macros_yaml2text_spec.rb +0 -10
- data/spec/metanorma/processor_spec.rb +0 -96
- data/spec/metanorma/refs_spec.rb +0 -2807
- data/spec/metanorma/reqt_spec.rb +0 -130
- data/spec/metanorma/section_spec.rb +0 -1325
- data/spec/metanorma/table_spec.rb +0 -474
- data/spec/metanorma/validate_spec.rb +0 -886
- data/spec/spec_helper.rb +0 -290
- data/spec/support/shared_examples/structured_data_2_text_preprocessor.rb +0 -781
- data/spec/vcr_cassettes/bsi16341.yml +0 -488
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +0 -611
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec1.yml +0 -149
- data/spec/vcr_cassettes/hide_refs.yml +0 -587
- data/spec/vcr_cassettes/isobib_get_123.yml +0 -149
- data/spec/vcr_cassettes/isobib_get_123_1.yml +0 -295
- data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +0 -385
- data/spec/vcr_cassettes/isobib_get_123_2.yml +0 -295
- data/spec/vcr_cassettes/isobib_get_123_2001.yml +0 -149
- data/spec/vcr_cassettes/isobib_get_124.yml +0 -149
- data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +0 -351
- data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +0 -560
- data/spec/vcr_cassettes/std-link.yml +0 -149
@@ -1,37 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
require "fileutils"
|
3
|
-
|
4
|
-
RSpec.describe Metanorma::Standoc do
|
5
|
-
it "processes a blank document" do
|
6
|
-
input = <<~INPUT
|
7
|
-
#{ASCIIDOC_BLANK_HDR}
|
8
|
-
INPUT
|
9
|
-
output = <<~OUTPUT
|
10
|
-
#{BLANK_HDR}
|
11
|
-
<sections/>
|
12
|
-
</standard-document>
|
13
|
-
OUTPUT
|
14
|
-
expect(xmlpp(Asciidoctor.convert(input, *OPTIONS)))
|
15
|
-
.to be_equivalent_to xmlpp(output)
|
16
|
-
end
|
17
|
-
|
18
|
-
it "converts a blank document" do
|
19
|
-
FileUtils.rm_f "test.doc"
|
20
|
-
input = <<~INPUT
|
21
|
-
= Document title
|
22
|
-
Author
|
23
|
-
:docfile: test.adoc
|
24
|
-
:novalid:
|
25
|
-
INPUT
|
26
|
-
output = <<~OUTPUT
|
27
|
-
#{BLANK_HDR}
|
28
|
-
<sections/>
|
29
|
-
</standard-document>
|
30
|
-
OUTPUT
|
31
|
-
expect(xmlpp(Asciidoctor.convert(input, *OPTIONS)))
|
32
|
-
.to be_equivalent_to xmlpp(output)
|
33
|
-
expect(File.exist?("test.doc")).to be true
|
34
|
-
expect(File.exist?("test.pdf")).to be true
|
35
|
-
expect(File.exist?("htmlstyle.css")).to be false
|
36
|
-
end
|
37
|
-
end
|