metanorma-document 0.2.12 → 0.2.13
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.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +21 -0
- data/.github/workflows/release.yml +25 -0
- data/.github/workflows/roundtrip-samples.yml +132 -0
- data/.gitignore +19 -0
- data/.rspec +3 -0
- data/.rubocop.yml +22 -0
- data/.rubocop_todo.yml +66 -164
- data/CHANGELOG.md +1 -0
- data/Gemfile +32 -0
- data/README.adoc +0 -144
- data/Rakefile +2 -14
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/data/javascripts/components/mn-lightbox.js +2 -18
- data/data/javascripts/components/mn-shortcuts.js +0 -2
- data/data/javascripts/core/mn-navigation.js +0 -8
- data/data/javascripts/core/mn-theme.js +9 -9
- data/data/logos/pdfa-logo.svg +94 -31
- data/data/stylesheets/base/_layout.css +0 -3
- data/data/stylesheets/base/_reset.css +3 -3
- data/data/stylesheets/base/_typography.css +5 -0
- data/data/stylesheets/components/bibliography.css +3 -3
- data/data/stylesheets/components/cover.css +1 -3
- data/data/stylesheets/components/figure.css +1 -13
- data/data/stylesheets/components/footnote.css +5 -65
- data/data/stylesheets/components/formula.css +0 -44
- data/data/stylesheets/components/header.css +2 -17
- data/data/stylesheets/components/inline.css +1 -1
- data/data/stylesheets/components/table.css +2 -15
- data/data/stylesheets/components/term.css +1 -0
- data/lib/metanorma/bipm_document/metadata/bipm_bibliographic_item.rb +14 -0
- data/lib/metanorma/bipm_document/metadata.rb +1 -1
- data/lib/metanorma/document/components/ancillary_blocks/sourcecode_block.rb +65 -0
- data/lib/metanorma/document/components/ancillary_blocks.rb +0 -4
- data/lib/metanorma/document/components/bib_data/bib_data.rb +0 -7
- data/lib/metanorma/document/components/blocks/requirement_model.rb +131 -0
- data/lib/metanorma/document/components/blocks.rb +7 -8
- data/lib/metanorma/document/components/id_elements/image.rb +0 -2
- data/lib/metanorma/document/components/inline/asciimath_element.rb +0 -2
- data/lib/metanorma/document/components/inline/attribution_element.rb +0 -2
- data/lib/metanorma/document/components/inline/bcp14_element.rb +0 -2
- data/lib/metanorma/document/components/inline/biblio_tag_element.rb +0 -2
- data/lib/metanorma/document/components/inline/br_element.rb +0 -2
- data/lib/metanorma/document/components/inline/comma_element.rb +0 -2
- data/lib/metanorma/document/components/inline/concept_element.rb +0 -2
- data/lib/metanorma/document/components/inline/display_text_element.rb +0 -2
- data/lib/metanorma/document/components/inline/em_raw_element.rb +0 -2
- data/lib/metanorma/document/components/inline/enum_comma_element.rb +0 -2
- data/lib/metanorma/document/components/inline/eref_element.rb +0 -2
- data/lib/metanorma/document/components/inline/fmt_admitted_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_annotation_body_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_annotation_end_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_annotation_start_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_concept_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_definition_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_fn_body_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_fn_label_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_footnote_container_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_identifier_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_name_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_preferred_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_sourcecode_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_stem_element.rb +0 -10
- data/lib/metanorma/document/components/inline/fmt_termsource_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_title_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_xref_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_xref_label_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fn_element.rb +0 -2
- data/lib/metanorma/document/components/inline/link_element.rb +0 -2
- data/lib/metanorma/document/components/inline/localized_string_element.rb +0 -2
- data/lib/metanorma/document/components/inline/localized_strings_element.rb +0 -2
- data/lib/metanorma/document/components/inline/math_element.rb +0 -2
- data/lib/metanorma/document/components/inline/name_with_id_element.rb +0 -4
- data/lib/metanorma/document/components/inline/semx_child_element.rb +0 -2
- data/lib/metanorma/document/components/inline/semx_element.rb +1 -13
- data/lib/metanorma/document/components/inline/small_cap_element.rb +0 -2
- data/lib/metanorma/document/components/inline/span_element.rb +15 -10
- data/lib/metanorma/document/components/inline/stem_inline_element.rb +1 -7
- data/lib/metanorma/document/components/inline/strong_raw_element.rb +0 -2
- data/lib/metanorma/document/components/inline/sub_element.rb +0 -2
- data/lib/metanorma/document/components/inline/sup_element.rb +0 -2
- data/lib/metanorma/document/components/inline/tab_element.rb +0 -2
- data/lib/metanorma/document/components/inline/title_with_annotation_element.rb +0 -4
- data/lib/metanorma/document/components/inline/tt_element.rb +0 -2
- data/lib/metanorma/document/components/inline/variant_title_element.rb +0 -2
- data/lib/metanorma/document/components/inline/xref_element.rb +0 -10
- data/lib/metanorma/document/components/inline.rb +0 -12
- data/lib/metanorma/document/components/multi_paragraph/quote_block.rb +29 -0
- data/lib/metanorma/document/components/multi_paragraph.rb +0 -2
- data/lib/metanorma/document/components/reference_elements/source_element.rb +31 -0
- data/lib/metanorma/document/components/reference_elements.rb +2 -2
- data/lib/metanorma/document/components/tables/table_block.rb +22 -0
- data/lib/metanorma/document/components/tables/table_section.rb +25 -0
- data/lib/metanorma/document/components/tables.rb +3 -5
- data/lib/metanorma/document/relaton/address.rb +27 -0
- data/lib/metanorma/document/relaton/bib_item_locality.rb +12 -3
- data/lib/metanorma/document/relaton/copyright_association.rb +10 -0
- data/lib/metanorma/document/relaton/edition.rb +7 -4
- data/lib/metanorma/document/relaton/organization.rb +14 -0
- data/lib/metanorma/document/relaton/phone.rb +9 -3
- data/lib/metanorma/document/relaton/place_type.rb +13 -0
- data/lib/metanorma/document/relaton/price_type.rb +9 -3
- data/lib/metanorma/document/relaton.rb +1 -6
- data/lib/metanorma/document/version.rb +1 -1
- data/lib/metanorma/document.rb +0 -2
- data/lib/metanorma/html/asset_pipeline.rb +0 -1
- data/lib/metanorma/html/base_renderer.rb +1008 -261
- data/lib/metanorma/html/bipm_renderer.rb +144 -15
- data/lib/metanorma/html/cc_renderer.rb +45 -1
- data/lib/metanorma/html/component/base.rb +7 -2
- data/lib/metanorma/html/component/index_section.rb +43 -41
- data/lib/metanorma/html/drops/admonition_drop.rb +4 -1
- data/lib/metanorma/html/drops/block_element_drop.rb +2 -7
- data/lib/metanorma/html/drops/example_drop.rb +4 -1
- data/lib/metanorma/html/drops/figure_drop.rb +22 -31
- data/lib/metanorma/html/drops/footnote_drop.rb +1 -1
- data/lib/metanorma/html/drops/formula_drop.rb +16 -45
- data/lib/metanorma/html/drops/note_drop.rb +7 -9
- data/lib/metanorma/html/drops/sourcecode_drop.rb +5 -12
- data/lib/metanorma/html/drops.rb +0 -2
- data/lib/metanorma/html/generator.rb +2 -2
- data/lib/metanorma/html/icc_renderer.rb +39 -0
- data/lib/metanorma/html/iec_renderer.rb +44 -1
- data/lib/metanorma/html/ieee_renderer.rb +45 -1
- data/lib/metanorma/html/ietf_renderer.rb +48 -1
- data/lib/metanorma/html/iho_renderer.rb +46 -1
- data/lib/metanorma/html/iso_renderer.rb +343 -290
- data/lib/metanorma/html/itu_renderer.rb +45 -1
- data/lib/metanorma/html/ogc_renderer.rb +76 -15
- data/lib/metanorma/html/oiml_renderer.rb +38 -18
- data/lib/metanorma/html/pdfa_renderer.rb +39 -0
- data/lib/metanorma/html/ribose_renderer.rb +45 -1
- data/lib/metanorma/html/standard_renderer.rb +229 -341
- data/lib/metanorma/html/templates/_footnotes.html.liquid +6 -6
- data/lib/metanorma/html/templates/_formula.html.liquid +1 -1
- data/lib/metanorma/html/templates/_header.html.liquid +1 -1
- data/lib/metanorma/html/templates/_iso_cover.html.liquid +1 -1
- data/lib/metanorma/html/templates/document.html.liquid +0 -4
- data/lib/metanorma/html/theme.rb +107 -180
- data/lib/metanorma/html.rb +3 -14
- data/lib/metanorma/ietf_document/metadata/ietf_bib_data_extension_type.rb +25 -0
- data/lib/metanorma/ietf_document/metadata.rb +0 -2
- data/lib/metanorma/iso_document/metadata/iso_bib_data_extension_type.rb +48 -0
- data/lib/metanorma/iso_document/metadata/iso_bibliographic_item.rb +72 -0
- data/lib/metanorma/iso_document/metadata/iso_document_status.rb +30 -0
- data/lib/metanorma/iso_document/metadata/iso_localized_title.rb +1 -4
- data/lib/metanorma/iso_document/metadata/structured_identifier.rb +17 -0
- data/lib/metanorma/iso_document/metadata/title_collection.rb +0 -1
- data/lib/metanorma/iso_document/metadata.rb +4 -9
- data/lib/metanorma/iso_document/terms/iso_term.rb +13 -0
- data/lib/metanorma/iso_document/terms.rb +0 -1
- data/lib/metanorma/itu_document/metadata/itu_bib_data_extension_type.rb +37 -0
- data/lib/metanorma/itu_document/metadata.rb +4 -3
- data/lib/metanorma/standard_document/block_attributes.rb +9 -5
- data/lib/metanorma/standard_document/blocks/block_source.rb +23 -0
- data/lib/metanorma/standard_document/blocks.rb +1 -1
- data/lib/metanorma/standard_document/terms/term_expression.rb +31 -0
- data/lib/metanorma/standard_document/terms.rb +0 -1
- data/metanorma-document.gemspec +35 -0
- metadata +13 -262
- data/CLAUDE.md +0 -26
- data/TODO.finalize/01-split-multi-class-files.md +0 -8
- data/TODO.finalize/02-remove-data-dist-iso-document-frontend.md +0 -6
- data/TODO.finalize/03-align-frontend-iife-and-gha-build.md +0 -11
- data/TODO.finalize/04-theme-per-flavor-config-driven.md +0 -9
- data/TODO.finalize/05-migrate-all-html-to-liquid.md +0 -16
- data/TODO.finalize/06-integrate-pubid-library.md +0 -16
- data/TODO.finalize/07-replace-relaton-models-with-relaton-bib.md +0 -39
- data/TODO.finalize/08-refactor-renderer-architecture.md +0 -25
- data/TODO.finalize/09-eliminate-code-smells.md +0 -14
- data/TODO.finalize/10-comprehensive-spec-coverage.md +0 -24
- data/TODO.finalize/11-config-driven-flavor-metadata.md +0 -20
- data/TODO.finalize/12-add-frozen-string-literal.md +0 -6
- data/TODO.finalize/13-extract-composition-from-god-class.md +0 -96
- data/TODO.finalize/14-config-driven-section-ordering.md +0 -31
- data/TODO.finalize/15-theme-directories-per-flavor.md +0 -46
- data/TODO.finalize/16-theme-lutaml-model-schema.md +0 -44
- data/data/javascripts/components/mn-footnotes.js +0 -68
- data/data/logos/oiml-logo-full-dark.svg +0 -1
- data/data/logos/oiml-logo-full-light.svg +0 -1
- data/data/logos/oiml-logo-icon-dark.svg +0 -1
- data/data/logos/oiml-logo-icon-light.svg +0 -1
- data/data/logos/oiml-logo.svg +0 -1
- data/data/themes/bipm.yaml +0 -60
- data/data/themes/cc.yaml +0 -43
- data/data/themes/icc.yaml +0 -39
- data/data/themes/iec.yaml +0 -44
- data/data/themes/ieee.yaml +0 -43
- data/data/themes/ietf.yaml +0 -45
- data/data/themes/iho.yaml +0 -46
- data/data/themes/iso.yaml +0 -40
- data/data/themes/itu.yaml +0 -45
- data/data/themes/ogc.yaml +0 -51
- data/data/themes/oiml.yaml +0 -56
- data/data/themes/pdfa.yaml +0 -44
- data/data/themes/ribose.yaml +0 -43
- data/exe/metanorma-document +0 -11
- data/frontend/e2e/sample-html.test.ts +0 -256
- data/frontend/index.html +0 -12
- data/frontend/package-lock.json +0 -4725
- data/frontend/package.json +0 -32
- data/frontend/postcss.config.js +0 -6
- data/frontend/src/App.vue +0 -79
- data/frontend/src/app.ts +0 -21
- data/frontend/src/components/AppSidebar.vue +0 -77
- data/frontend/src/components/DocumentReader.vue +0 -180
- data/frontend/src/components/MirrorRenderer.vue +0 -23
- data/frontend/src/components/ReadingProgressBar.vue +0 -29
- data/frontend/src/components/TextRenderer.vue +0 -131
- data/frontend/src/components/TocItem.vue +0 -57
- data/frontend/src/components/TopBar.vue +0 -49
- data/frontend/src/components/__tests__/MirrorRenderer.test.ts +0 -178
- data/frontend/src/components/blocks/AdmonitionBlock.vue +0 -74
- data/frontend/src/components/blocks/ClauseBlock.vue +0 -53
- data/frontend/src/components/blocks/ExampleBlock.vue +0 -21
- data/frontend/src/components/blocks/FallbackBlock.vue +0 -18
- data/frontend/src/components/blocks/FigureBlock.vue +0 -26
- data/frontend/src/components/blocks/FootnotesBlock.vue +0 -25
- data/frontend/src/components/blocks/ListBlocks.vue +0 -62
- data/frontend/src/components/blocks/NoteBlock.vue +0 -21
- data/frontend/src/components/blocks/ParagraphBlock.vue +0 -25
- data/frontend/src/components/blocks/QuoteBlock.vue +0 -25
- data/frontend/src/components/blocks/ReviewBlock.vue +0 -39
- data/frontend/src/components/blocks/SourcecodeBlock.vue +0 -52
- data/frontend/src/components/blocks/TableBlock.vue +0 -48
- data/frontend/src/components/blocks/index.ts +0 -36
- data/frontend/src/stores/__tests__/documentStore.fixture.test.ts +0 -272
- data/frontend/src/stores/__tests__/documentStore.test.ts +0 -143
- data/frontend/src/stores/__tests__/ebookStore.test.ts +0 -145
- data/frontend/src/stores/__tests__/uiStore.test.ts +0 -42
- data/frontend/src/stores/documentStore.ts +0 -153
- data/frontend/src/stores/ebookStore.ts +0 -179
- data/frontend/src/stores/uiStore.ts +0 -32
- data/frontend/src/styles.css +0 -156
- data/frontend/src/types/__tests__/rendering-contract.test.ts +0 -172
- data/frontend/src/types/rendering-contract.ts +0 -209
- data/frontend/src/utils/__tests__/typeMetadata.test.ts +0 -102
- data/frontend/src/utils/typeMetadata.ts +0 -121
- data/frontend/tailwind.config.js +0 -18
- data/frontend/test/fixtures/iso-document.json +0 -271
- data/frontend/tmp/debug_e2e.cjs +0 -46
- data/frontend/tsconfig.json +0 -25
- data/frontend/tsconfig.node.json +0 -11
- data/frontend/vite.config.ts +0 -37
- data/frontend/vitest.e2e.config.ts +0 -9
- data/lib/metanorma/bipm_document/metadata/depiction_element.rb +0 -18
- data/lib/metanorma/document/cli.rb +0 -116
- data/lib/metanorma/document/components/ancillary_blocks/callout_annotation.rb +0 -27
- data/lib/metanorma/document/components/ancillary_blocks/sourcecode_body.rb +0 -18
- data/lib/metanorma/document/components/blocks/classification_value.rb +0 -21
- data/lib/metanorma/document/components/blocks/permission_model.rb +0 -28
- data/lib/metanorma/document/components/blocks/recommendation_model.rb +0 -28
- data/lib/metanorma/document/components/blocks/requirement_base.rb +0 -30
- data/lib/metanorma/document/components/blocks/requirement_classification.rb +0 -20
- data/lib/metanorma/document/components/blocks/requirement_description.rb +0 -43
- data/lib/metanorma/document/components/blocks/requirement_inherit.rb +0 -24
- data/lib/metanorma/document/components/inline/location_element.rb +0 -24
- data/lib/metanorma/document/components/inline/rendered_display.rb +0 -23
- data/lib/metanorma/document/components/inline/rendered_math_element.rb +0 -21
- data/lib/metanorma/document/components/inline/semantic_content.rb +0 -51
- data/lib/metanorma/document/components/inline/semantic_math_element.rb +0 -20
- data/lib/metanorma/document/components/inline/vocabulary.rb +0 -184
- data/lib/metanorma/document/components/multi_paragraph/quote_author_element.rb +0 -20
- data/lib/metanorma/document/components/reference_elements/source_modification.rb +0 -21
- data/lib/metanorma/document/components/reference_elements/source_origin.rb +0 -28
- data/lib/metanorma/document/components/tables/col_element.rb +0 -18
- data/lib/metanorma/document/components/tables/col_group_element.rb +0 -18
- data/lib/metanorma/document/components/tables/table_body_section.rb +0 -16
- data/lib/metanorma/document/components/tables/table_foot_section.rb +0 -16
- data/lib/metanorma/document/components/tables/table_head_section.rb +0 -16
- data/lib/metanorma/document/relaton/copyright_owner.rb +0 -16
- data/lib/metanorma/document/relaton/formatted_address.rb +0 -29
- data/lib/metanorma/document/relaton/logo_element.rb +0 -18
- data/lib/metanorma/document/relaton/region_element.rb +0 -18
- data/lib/metanorma/html/drops/biblio_entry_drop.rb +0 -50
- data/lib/metanorma/html/renderers/block_renderer.rb +0 -372
- data/lib/metanorma/html/renderers/inline_renderer.rb +0 -655
- data/lib/metanorma/html/renderers/pubid_renderer.rb +0 -69
- data/lib/metanorma/html/renderers/section_renderer.rb +0 -193
- data/lib/metanorma/html/renderers.rb +0 -8
- data/lib/metanorma/html/templates/_audio.html.liquid +0 -1
- data/lib/metanorma/html/templates/_biblio_entry.html.liquid +0 -1
- data/lib/metanorma/html/templates/_bipm_cover.html.liquid +0 -27
- data/lib/metanorma/html/templates/_boilerplate.html.liquid +0 -1
- data/lib/metanorma/html/templates/_bookmark.html.liquid +0 -1
- data/lib/metanorma/html/templates/_br.html.liquid +0 -1
- data/lib/metanorma/html/templates/_definition_list.html.liquid +0 -6
- data/lib/metanorma/html/templates/_element.html.liquid +0 -1
- data/lib/metanorma/html/templates/_fn_marker.html.liquid +0 -1
- data/lib/metanorma/html/templates/_heading.html.liquid +0 -1
- data/lib/metanorma/html/templates/_image.html.liquid +0 -1
- data/lib/metanorma/html/templates/_inline_span.html.liquid +0 -1
- data/lib/metanorma/html/templates/_link.html.liquid +0 -1
- data/lib/metanorma/html/templates/_list.html.liquid +0 -3
- data/lib/metanorma/html/templates/_list_item.html.liquid +0 -1
- data/lib/metanorma/html/templates/_main_content.html.liquid +0 -1
- data/lib/metanorma/html/templates/_math_container.html.liquid +0 -1
- data/lib/metanorma/html/templates/_paragraph.html.liquid +0 -1
- data/lib/metanorma/html/templates/_prefatory_section.html.liquid +0 -1
- data/lib/metanorma/html/templates/_pubid_identifier.html.liquid +0 -1
- data/lib/metanorma/html/templates/_quote.html.liquid +0 -4
- data/lib/metanorma/html/templates/_ref_date.html.liquid +0 -1
- data/lib/metanorma/html/templates/_ref_title.html.liquid +0 -1
- data/lib/metanorma/html/templates/_section.html.liquid +0 -5
- data/lib/metanorma/html/templates/_standard_cover.html.liquid +0 -31
- data/lib/metanorma/html/templates/_standard_doc_title.html.liquid +0 -3
- data/lib/metanorma/html/templates/_stem_span.html.liquid +0 -1
- data/lib/metanorma/html/templates/_table.html.liquid +0 -9
- data/lib/metanorma/html/templates/_term_domain.html.liquid +0 -1
- data/lib/metanorma/html/templates/_term_example.html.liquid +0 -1
- data/lib/metanorma/html/templates/_term_note.html.liquid +0 -1
- data/lib/metanorma/html/templates/_term_number.html.liquid +0 -1
- data/lib/metanorma/html/templates/_term_source.html.liquid +0 -1
- data/lib/metanorma/html/templates/_term_text_note.html.liquid +0 -1
- data/lib/metanorma/html/templates/_video.html.liquid +0 -1
- data/lib/metanorma/html/templates/_wrapped_preface.html.liquid +0 -1
- data/lib/metanorma/ietf_document/metadata/pi_settings.rb +0 -32
- data/lib/metanorma/iso_document/metadata/doctype_element.rb +0 -20
- data/lib/metanorma/iso_document/metadata/language_element.rb +0 -18
- data/lib/metanorma/iso_document/metadata/project_number.rb +0 -22
- data/lib/metanorma/iso_document/metadata/script_element.rb +0 -18
- data/lib/metanorma/iso_document/metadata/stage_element.rb +0 -26
- data/lib/metanorma/iso_document/metadata/stagename_element.rb +0 -18
- data/lib/metanorma/iso_document/terms/term_domain_element.rb +0 -18
- data/lib/metanorma/itu_document/metadata/meeting_date.rb +0 -18
- data/lib/metanorma/itu_document/metadata/meeting_element.rb +0 -18
- data/lib/metanorma/itu_document/metadata/study_period.rb +0 -18
- data/lib/metanorma/mirror/default_registry.rb +0 -170
- data/lib/metanorma/mirror/handler_registry.rb +0 -60
- data/lib/metanorma/mirror/handler_result.rb +0 -37
- data/lib/metanorma/mirror/handlers/admonition.rb +0 -18
- data/lib/metanorma/mirror/handlers/example.rb +0 -21
- data/lib/metanorma/mirror/handlers/figure.rb +0 -53
- data/lib/metanorma/mirror/handlers/formula.rb +0 -35
- data/lib/metanorma/mirror/handlers/inline/rich_html_renderer.rb +0 -159
- data/lib/metanorma/mirror/handlers/inline/text_extractor.rb +0 -116
- data/lib/metanorma/mirror/handlers/inline.rb +0 -225
- data/lib/metanorma/mirror/handlers/list.rb +0 -110
- data/lib/metanorma/mirror/handlers/note.rb +0 -26
- data/lib/metanorma/mirror/handlers/paragraph.rb +0 -19
- data/lib/metanorma/mirror/handlers/quote.rb +0 -16
- data/lib/metanorma/mirror/handlers/review.rb +0 -19
- data/lib/metanorma/mirror/handlers/section.rb +0 -149
- data/lib/metanorma/mirror/handlers/sourcecode.rb +0 -27
- data/lib/metanorma/mirror/handlers/structural.rb +0 -68
- data/lib/metanorma/mirror/handlers/table.rb +0 -81
- data/lib/metanorma/mirror/handlers/term.rb +0 -100
- data/lib/metanorma/mirror/handlers.rb +0 -60
- data/lib/metanorma/mirror/id_strategy/positional.rb +0 -166
- data/lib/metanorma/mirror/id_strategy/preserve.rb +0 -12
- data/lib/metanorma/mirror/id_strategy.rb +0 -34
- data/lib/metanorma/mirror/math_util.rb +0 -53
- data/lib/metanorma/mirror/metadata.rb +0 -37
- data/lib/metanorma/mirror/metanorma_to_mirror.rb +0 -101
- data/lib/metanorma/mirror/model/container.rb +0 -47
- data/lib/metanorma/mirror/model/factory.rb +0 -52
- data/lib/metanorma/mirror/model/guide.rb +0 -25
- data/lib/metanorma/mirror/model/leaf.rb +0 -17
- data/lib/metanorma/mirror/model/mark.rb +0 -53
- data/lib/metanorma/mirror/model/node.rb +0 -47
- data/lib/metanorma/mirror/model/soft_break.rb +0 -33
- data/lib/metanorma/mirror/model/text.rb +0 -34
- data/lib/metanorma/mirror/model.rb +0 -16
- data/lib/metanorma/mirror/output/builder.rb +0 -39
- data/lib/metanorma/mirror/output/formats/base_format.rb +0 -90
- data/lib/metanorma/mirror/output/formats/inline_format.rb +0 -81
- data/lib/metanorma/mirror/output/formats.rb +0 -53
- data/lib/metanorma/mirror/output/html_renderer.rb +0 -95
- data/lib/metanorma/mirror/output/html_renderers/block_renderers.rb +0 -178
- data/lib/metanorma/mirror/output/html_renderers/inline_renderer.rb +0 -61
- data/lib/metanorma/mirror/output/html_renderers/list_renderers.rb +0 -96
- data/lib/metanorma/mirror/output/html_renderers/mark_renderers.rb +0 -64
- data/lib/metanorma/mirror/output/html_renderers/section_renderers.rb +0 -129
- data/lib/metanorma/mirror/output/html_renderers/structural_renderers.rb +0 -80
- data/lib/metanorma/mirror/output/html_renderers/table_renderers.rb +0 -87
- data/lib/metanorma/mirror/output/html_renderers.rb +0 -76
- data/lib/metanorma/mirror/output/pipeline.rb +0 -92
- data/lib/metanorma/mirror/output/pipeline_context.rb +0 -22
- data/lib/metanorma/mirror/output.rb +0 -14
- data/lib/metanorma/mirror/rewriter.rb +0 -121
- data/lib/metanorma/mirror/safe_attr.rb +0 -16
- data/lib/metanorma/mirror/serialization/json_serializer.rb +0 -25
- data/lib/metanorma/mirror/serialization/yaml_serializer.rb +0 -20
- data/lib/metanorma/mirror/serialization.rb +0 -10
- data/lib/metanorma/mirror/transformer.rb +0 -22
- data/lib/metanorma/mirror.rb +0 -32
- data/lib/metanorma/standard_document/annotation.rb +0 -37
- data/lib/metanorma/standard_document/blocks/source_origin_element.rb +0 -23
- data/lib/metanorma/standard_document/terms/term_name_element.rb +0 -29
- data/script/render_both.rb +0 -18
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b70dbe97dadd0576e3ae226eb4e66ad7112b1e2876b9865ed070035d8d6a89e9
|
|
4
|
+
data.tar.gz: 2a843d047f3cbe4872e3416e7f66cf4d8077295f1016453f409056d6e3c93894
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 737da4c9acc3fcf9be5ea0a02673a9969f481cbad496174334f5ee6360679f0d331d8df7de5a33c9805fd71ba382f3d3a6c9c6137bc6501b9c0c5846d2da1535
|
|
7
|
+
data.tar.gz: 657aa49800f8112eb249b433f96d1408be47e7bc633b26b3e270991ecf22b71d372e5947b1eb6a8736b0206f542447a8e00f41476ca594683eede493035db1e5
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Auto-generated by Cimas: Do not edit it manually!
|
|
2
|
+
# See https://github.com/metanorma/cimas
|
|
3
|
+
name: rake
|
|
4
|
+
|
|
5
|
+
on:
|
|
6
|
+
push:
|
|
7
|
+
branches: [ master, main ]
|
|
8
|
+
tags: [ v* ]
|
|
9
|
+
pull_request:
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: write
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
rake:
|
|
16
|
+
uses: metanorma/ci/.github/workflows/generic-rake.yml@main
|
|
17
|
+
with:
|
|
18
|
+
setup-tools: libreoffice
|
|
19
|
+
submodules: false
|
|
20
|
+
secrets:
|
|
21
|
+
pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Auto-generated by Cimas: Do not edit it manually!
|
|
2
|
+
# See https://github.com/metanorma/cimas
|
|
3
|
+
name: release
|
|
4
|
+
|
|
5
|
+
on:
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
inputs:
|
|
8
|
+
next_version:
|
|
9
|
+
description: |
|
|
10
|
+
Next release version. Possible values: x.y.z, major, minor, patch (or pre|rc|etc).
|
|
11
|
+
Also, you can pass 'skip' to skip 'git tag' and do 'gem push' for the current version
|
|
12
|
+
required: true
|
|
13
|
+
default: 'skip'
|
|
14
|
+
repository_dispatch:
|
|
15
|
+
types: [ do-release ]
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
release:
|
|
19
|
+
uses: metanorma/ci/.github/workflows/rubygems-release.yml@main
|
|
20
|
+
with:
|
|
21
|
+
next_version: ${{ github.event.inputs.next_version }}
|
|
22
|
+
secrets:
|
|
23
|
+
rubygems-api-key: ${{ secrets.METANORMA_CI_RUBYGEMS_API_KEY }}
|
|
24
|
+
pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
|
|
25
|
+
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
name: Roundtrip Samples
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
schedule:
|
|
6
|
+
- cron: '0 6 * * 1' # Monday 6am UTC
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
# --- Discover which mn-samples-* GitHub Pages sites exist ---
|
|
10
|
+
discover:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
outputs:
|
|
13
|
+
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
|
14
|
+
steps:
|
|
15
|
+
- name: Discover mn-samples GitHub Pages sites
|
|
16
|
+
id: set-matrix
|
|
17
|
+
env:
|
|
18
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
19
|
+
run: |
|
|
20
|
+
set -e
|
|
21
|
+
# List all public metanorma/mn-samples-* repos
|
|
22
|
+
REPOS=$(gh repo list metanorma --limit 1000 --json name \
|
|
23
|
+
--jq '.[].name | select(startswith("mn-samples-")) | sub("^mn-samples-"; "")' \
|
|
24
|
+
2>/dev/null | sort || true)
|
|
25
|
+
|
|
26
|
+
if [ -z "$REPOS" ]; then
|
|
27
|
+
echo "::warning::Failed to discover repos via API, using fallback list"
|
|
28
|
+
REPOS="bipm
|
|
29
|
+
cc
|
|
30
|
+
csa
|
|
31
|
+
iec
|
|
32
|
+
ieee
|
|
33
|
+
ietf
|
|
34
|
+
iho
|
|
35
|
+
iso
|
|
36
|
+
itu
|
|
37
|
+
m3aawg
|
|
38
|
+
ogc
|
|
39
|
+
oiml
|
|
40
|
+
ribose
|
|
41
|
+
standoc
|
|
42
|
+
un"
|
|
43
|
+
fi
|
|
44
|
+
|
|
45
|
+
# Exclude deprecated flavors
|
|
46
|
+
EXCLUDED="mpfa"
|
|
47
|
+
|
|
48
|
+
# Verify each site is reachable (GitHub Pages)
|
|
49
|
+
VALID=""
|
|
50
|
+
for repo in $REPOS; do
|
|
51
|
+
if echo "$EXCLUDED" | grep -qw "$repo"; then
|
|
52
|
+
echo " EXCLUDED: $repo (deprecated)"
|
|
53
|
+
continue
|
|
54
|
+
fi
|
|
55
|
+
url="https://metanorma.github.io/mn-samples-${repo}/"
|
|
56
|
+
code=$(curl -sL -o /dev/null -w '%{http_code}' "$url" --max-time 15)
|
|
57
|
+
if [ "$code" = "200" ]; then
|
|
58
|
+
VALID="${VALID}${repo}
|
|
59
|
+
"
|
|
60
|
+
echo " OK: $repo ($code)"
|
|
61
|
+
else
|
|
62
|
+
echo " SKIP: $repo ($code)"
|
|
63
|
+
fi
|
|
64
|
+
done
|
|
65
|
+
|
|
66
|
+
MATRIX=$(echo "$VALID" | jq -R -s -c \
|
|
67
|
+
'split("\n") | map(select(length > 0)) | map({repo: .})')
|
|
68
|
+
echo "matrix={\"include\":$MATRIX}" >> "$GITHUB_OUTPUT"
|
|
69
|
+
echo "Valid sites: $MATRIX"
|
|
70
|
+
|
|
71
|
+
# --- Round-trip each site in parallel ---
|
|
72
|
+
roundtrip:
|
|
73
|
+
needs: discover
|
|
74
|
+
runs-on: ubuntu-latest
|
|
75
|
+
strategy:
|
|
76
|
+
matrix: ${{ fromJson(needs.discover.outputs.matrix) }}
|
|
77
|
+
fail-fast: false
|
|
78
|
+
steps:
|
|
79
|
+
- uses: actions/checkout@v4
|
|
80
|
+
|
|
81
|
+
- name: Set up Ruby
|
|
82
|
+
uses: ruby/setup-ruby@v1
|
|
83
|
+
with:
|
|
84
|
+
ruby-version: '3.4'
|
|
85
|
+
bundler-cache: true
|
|
86
|
+
|
|
87
|
+
- name: Run roundtrip for ${{ matrix.repo }}
|
|
88
|
+
run: |
|
|
89
|
+
mkdir -p tmp/roundtrip_reports
|
|
90
|
+
bundle exec rake "roundtrip:site[https://metanorma.github.io/mn-samples-${{ matrix.repo }},${{ matrix.repo }}]"
|
|
91
|
+
continue-on-error: true
|
|
92
|
+
|
|
93
|
+
- name: Upload report
|
|
94
|
+
uses: actions/upload-artifact@v4
|
|
95
|
+
if: always()
|
|
96
|
+
with:
|
|
97
|
+
name: report-${{ matrix.repo }}
|
|
98
|
+
path: tmp/roundtrip_reports/${{ matrix.repo }}.yml
|
|
99
|
+
retention-days: 14
|
|
100
|
+
|
|
101
|
+
# --- Consolidate all reports ---
|
|
102
|
+
consolidate:
|
|
103
|
+
needs: roundtrip
|
|
104
|
+
runs-on: ubuntu-latest
|
|
105
|
+
if: always()
|
|
106
|
+
steps:
|
|
107
|
+
- uses: actions/checkout@v4
|
|
108
|
+
|
|
109
|
+
- name: Download all reports
|
|
110
|
+
uses: actions/download-artifact@v4
|
|
111
|
+
with:
|
|
112
|
+
path: tmp/roundtrip_reports
|
|
113
|
+
pattern: report-*
|
|
114
|
+
merge-multiple: true
|
|
115
|
+
|
|
116
|
+
- name: Set up Ruby
|
|
117
|
+
uses: ruby/setup-ruby@v1
|
|
118
|
+
with:
|
|
119
|
+
ruby-version: '3.4'
|
|
120
|
+
bundler-cache: true
|
|
121
|
+
|
|
122
|
+
- name: Consolidate reports
|
|
123
|
+
run: bundle exec rake "roundtrip:consolidate[tmp/roundtrip_reports]"
|
|
124
|
+
continue-on-error: true
|
|
125
|
+
|
|
126
|
+
- name: Upload consolidated report
|
|
127
|
+
uses: actions/upload-artifact@v4
|
|
128
|
+
if: always()
|
|
129
|
+
with:
|
|
130
|
+
name: roundtrip-consolidated-report
|
|
131
|
+
path: tmp/roundtrip_consolidated.yml
|
|
132
|
+
retention-days: 30
|
data/.gitignore
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/.bundle/
|
|
2
|
+
/.yardoc
|
|
3
|
+
/_yardoc/
|
|
4
|
+
/coverage/
|
|
5
|
+
/doc/
|
|
6
|
+
/pkg/
|
|
7
|
+
/spec/reports/
|
|
8
|
+
/tmp/
|
|
9
|
+
|
|
10
|
+
# rspec failure tracking
|
|
11
|
+
.rspec_status
|
|
12
|
+
|
|
13
|
+
/Gemfile.lock
|
|
14
|
+
TODO*
|
|
15
|
+
/data/dist/
|
|
16
|
+
**/output/
|
|
17
|
+
output.html
|
|
18
|
+
output-*.html
|
|
19
|
+
/private-do-not-commit/
|
data/.rspec
ADDED
data/.rubocop.yml
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
inherit_from:
|
|
2
|
+
- https://raw.githubusercontent.com/riboseinc/oss-guides/main/ci/rubocop.yml
|
|
3
|
+
- .rubocop_todo.yml
|
|
4
|
+
|
|
5
|
+
inherit_mode:
|
|
6
|
+
merge:
|
|
7
|
+
- Exclude
|
|
8
|
+
|
|
9
|
+
# local repo-specific modifications
|
|
10
|
+
# ...
|
|
11
|
+
|
|
12
|
+
plugins:
|
|
13
|
+
- rubocop-rspec
|
|
14
|
+
- rubocop-performance
|
|
15
|
+
- rubocop-rake
|
|
16
|
+
|
|
17
|
+
AllCops:
|
|
18
|
+
TargetRubyVersion: 3.4
|
|
19
|
+
NewCops: enable
|
|
20
|
+
Exclude:
|
|
21
|
+
- 'vendor/**/*'
|
|
22
|
+
- 'data/**/*'
|
data/.rubocop_todo.yml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on 2026-
|
|
3
|
+
# on 2026-05-21 09:20:40 UTC using RuboCop version 1.86.1.
|
|
4
4
|
# The point is for the user to remove these configuration records
|
|
5
5
|
# one by one as the offenses are removed from the code base.
|
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
|
@@ -11,53 +11,16 @@ Gemspec/RequiredRubyVersion:
|
|
|
11
11
|
Exclude:
|
|
12
12
|
- 'metanorma-document.gemspec'
|
|
13
13
|
|
|
14
|
-
# Offense count:
|
|
14
|
+
# Offense count: 9
|
|
15
15
|
# This cop supports safe autocorrection (--autocorrect).
|
|
16
16
|
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
17
17
|
# SupportedStyles: with_first_argument, with_fixed_indentation
|
|
18
18
|
Layout/ArgumentAlignment:
|
|
19
19
|
Exclude:
|
|
20
|
-
- '
|
|
21
|
-
|
|
22
|
-
# Offense count: 2
|
|
23
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
24
|
-
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
25
|
-
# SupportedStyles: with_first_element, with_fixed_indentation
|
|
26
|
-
Layout/ArrayAlignment:
|
|
27
|
-
Exclude:
|
|
28
|
-
- 'spec/metanorma/document/components/inline/span_element_bug01_spec.rb'
|
|
29
|
-
|
|
30
|
-
# Offense count: 1
|
|
31
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
32
|
-
# Configuration parameters: EnforcedStyleAlignWith.
|
|
33
|
-
# SupportedStylesAlignWith: either, start_of_block, start_of_line
|
|
34
|
-
Layout/BlockAlignment:
|
|
35
|
-
Exclude:
|
|
36
|
-
- 'spec/metanorma/document/components/inline/semantic_content_bug05_spec.rb'
|
|
37
|
-
|
|
38
|
-
# Offense count: 1
|
|
39
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
40
|
-
Layout/BlockEndNewline:
|
|
41
|
-
Exclude:
|
|
42
|
-
- 'spec/metanorma/document/components/inline/semantic_content_bug05_spec.rb'
|
|
43
|
-
|
|
44
|
-
# Offense count: 2
|
|
45
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
46
|
-
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
47
|
-
# SupportedStyles: special_inside_parentheses, consistent, align_brackets
|
|
48
|
-
Layout/FirstArrayElementIndentation:
|
|
49
|
-
Exclude:
|
|
50
|
-
- 'spec/metanorma/document/components/inline/span_element_bug01_spec.rb'
|
|
51
|
-
|
|
52
|
-
# Offense count: 2
|
|
53
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
54
|
-
# Configuration parameters: Width, EnforcedStyleAlignWith, AllowedPatterns.
|
|
55
|
-
# SupportedStylesAlignWith: start_of_line, relative_to_receiver
|
|
56
|
-
Layout/IndentationWidth:
|
|
57
|
-
Exclude:
|
|
58
|
-
- 'spec/metanorma/document/components/inline/semantic_content_bug05_spec.rb'
|
|
20
|
+
- 'lib/metanorma/standard_document.rb'
|
|
21
|
+
- 'spec/metanorma/flavor_roots/flavor_roots_spec.rb'
|
|
59
22
|
|
|
60
|
-
# Offense count:
|
|
23
|
+
# Offense count: 666
|
|
61
24
|
# This cop supports safe autocorrection (--autocorrect).
|
|
62
25
|
# Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
|
|
63
26
|
# URISchemes: http, https
|
|
@@ -66,101 +29,106 @@ Layout/LineLength:
|
|
|
66
29
|
|
|
67
30
|
# Offense count: 1
|
|
68
31
|
# This cop supports safe autocorrection (--autocorrect).
|
|
69
|
-
# Configuration parameters:
|
|
70
|
-
|
|
71
|
-
Layout/MultilineMethodCallIndentation:
|
|
32
|
+
# Configuration parameters: AllowInHeredoc.
|
|
33
|
+
Layout/TrailingWhitespace:
|
|
72
34
|
Exclude:
|
|
73
|
-
- '
|
|
35
|
+
- 'lib/metanorma/standard_document.rb'
|
|
74
36
|
|
|
75
|
-
# Offense count:
|
|
37
|
+
# Offense count: 1
|
|
76
38
|
# Configuration parameters: AllowedMethods.
|
|
77
39
|
# AllowedMethods: enums
|
|
78
40
|
Lint/ConstantDefinitionInBlock:
|
|
79
41
|
Exclude:
|
|
80
42
|
- 'spec/metanorma/html/renderer/class_ownership_spec.rb'
|
|
81
|
-
- 'spec/metanorma/html/renderer/liquid_templates_spec.rb'
|
|
82
43
|
|
|
83
|
-
# Offense count:
|
|
44
|
+
# Offense count: 1
|
|
84
45
|
# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches, IgnoreDuplicateElseBranch.
|
|
85
46
|
Lint/DuplicateBranch:
|
|
86
47
|
Exclude:
|
|
87
48
|
- 'lib/metanorma/html/base_renderer.rb'
|
|
88
|
-
- 'lib/metanorma/html/renderers/inline_renderer.rb'
|
|
89
|
-
- 'lib/metanorma/html/standard_renderer.rb'
|
|
90
49
|
|
|
91
|
-
# Offense count:
|
|
50
|
+
# Offense count: 3
|
|
92
51
|
# Configuration parameters: AllowComments, AllowEmptyLambdas.
|
|
93
52
|
Lint/EmptyBlock:
|
|
94
53
|
Exclude:
|
|
54
|
+
- 'lib/metanorma/html/drops/formula_drop.rb'
|
|
95
55
|
- 'spec/metanorma/iso_document/metadata/title_roundtrip_spec.rb'
|
|
96
56
|
|
|
97
57
|
# Offense count: 4
|
|
98
58
|
# Configuration parameters: AllowedParentClasses.
|
|
99
59
|
Lint/MissingSuper:
|
|
100
60
|
Exclude:
|
|
101
|
-
- 'lib/metanorma/html/drops/
|
|
102
|
-
- 'lib/metanorma/html/drops/
|
|
103
|
-
- 'lib/metanorma/html/drops/
|
|
104
|
-
- 'lib/metanorma/
|
|
61
|
+
- 'lib/metanorma/html/drops/block_element_drop.rb'
|
|
62
|
+
- 'lib/metanorma/html/drops/figure_list_entry_drop.rb'
|
|
63
|
+
- 'lib/metanorma/html/drops/footnote_drop.rb'
|
|
64
|
+
- 'lib/metanorma/html/drops/toc_entry_drop.rb'
|
|
105
65
|
|
|
106
66
|
# Offense count: 1
|
|
107
67
|
Lint/StructNewOverride:
|
|
108
68
|
Exclude:
|
|
109
69
|
- 'lib/metanorma/html/component/index_term_collector.rb'
|
|
110
70
|
|
|
111
|
-
# Offense count:
|
|
112
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
113
|
-
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
|
|
114
|
-
# NotImplementedExceptions: NotImplementedError
|
|
115
|
-
Lint/UnusedMethodArgument:
|
|
116
|
-
Exclude:
|
|
117
|
-
- 'lib/metanorma/mirror/handlers/formula.rb'
|
|
118
|
-
- 'lib/metanorma/mirror/handlers/sourcecode.rb'
|
|
119
|
-
- 'lib/metanorma/mirror/output/html_renderers/block_renderers.rb'
|
|
120
|
-
- 'lib/metanorma/mirror/output/html_renderers/list_renderers.rb'
|
|
121
|
-
- 'lib/metanorma/mirror/output/html_renderers/section_renderers.rb'
|
|
122
|
-
- 'lib/metanorma/mirror/output/html_renderers/structural_renderers.rb'
|
|
123
|
-
- 'lib/metanorma/mirror/output/html_renderers/table_renderers.rb'
|
|
124
|
-
- 'spec/metanorma/mirror/handler_registry_spec.rb'
|
|
125
|
-
- 'spec/metanorma/mirror/html_renderer_spec.rb'
|
|
126
|
-
|
|
127
|
-
# Offense count: 114
|
|
71
|
+
# Offense count: 80
|
|
128
72
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
|
|
129
73
|
Metrics/AbcSize:
|
|
130
74
|
Enabled: false
|
|
131
75
|
|
|
132
|
-
# Offense count:
|
|
76
|
+
# Offense count: 23
|
|
133
77
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
|
|
134
78
|
# AllowedMethods: refine
|
|
135
79
|
Metrics/BlockLength:
|
|
136
|
-
Max:
|
|
80
|
+
Max: 80
|
|
137
81
|
|
|
138
|
-
# Offense count:
|
|
82
|
+
# Offense count: 1
|
|
139
83
|
# Configuration parameters: CountBlocks, CountModifierForms.
|
|
140
84
|
Metrics/BlockNesting:
|
|
141
85
|
Max: 4
|
|
142
86
|
|
|
143
|
-
# Offense count:
|
|
87
|
+
# Offense count: 56
|
|
144
88
|
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
145
89
|
Metrics/CyclomaticComplexity:
|
|
146
|
-
|
|
90
|
+
Exclude:
|
|
91
|
+
- 'lib/metanorma/document/components/lists/list_item.rb'
|
|
92
|
+
- 'lib/metanorma/html/base_renderer.rb'
|
|
93
|
+
- 'lib/metanorma/html/bipm_renderer.rb'
|
|
94
|
+
- 'lib/metanorma/html/component/index_term_collector.rb'
|
|
95
|
+
- 'lib/metanorma/html/drops/figure_drop.rb'
|
|
96
|
+
- 'lib/metanorma/html/drops/formula_drop.rb'
|
|
97
|
+
- 'lib/metanorma/html/generator.rb'
|
|
98
|
+
- 'lib/metanorma/html/iso_renderer.rb'
|
|
99
|
+
- 'lib/metanorma/html/ogc_renderer.rb'
|
|
100
|
+
- 'lib/metanorma/html/standard_renderer.rb'
|
|
101
|
+
- 'lib/metanorma/html/theme.rb'
|
|
102
|
+
- 'lib/metanorma/iso_document/metadata/iso_localized_title.rb'
|
|
147
103
|
|
|
148
|
-
# Offense count:
|
|
104
|
+
# Offense count: 101
|
|
149
105
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
150
106
|
Metrics/MethodLength:
|
|
151
|
-
Max:
|
|
107
|
+
Max: 95
|
|
152
108
|
|
|
153
|
-
# Offense count:
|
|
109
|
+
# Offense count: 1
|
|
154
110
|
# Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
|
|
155
111
|
Metrics/ParameterLists:
|
|
156
112
|
Max: 7
|
|
157
113
|
|
|
158
|
-
# Offense count:
|
|
114
|
+
# Offense count: 51
|
|
159
115
|
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
160
116
|
Metrics/PerceivedComplexity:
|
|
161
|
-
|
|
117
|
+
Exclude:
|
|
118
|
+
- 'lib/metanorma/document/components/lists/list_item.rb'
|
|
119
|
+
- 'lib/metanorma/html/base_renderer.rb'
|
|
120
|
+
- 'lib/metanorma/html/bipm_renderer.rb'
|
|
121
|
+
- 'lib/metanorma/html/component/index_term_collector.rb'
|
|
122
|
+
- 'lib/metanorma/html/drops/figure_drop.rb'
|
|
123
|
+
- 'lib/metanorma/html/drops/formula_drop.rb'
|
|
124
|
+
- 'lib/metanorma/html/generator.rb'
|
|
125
|
+
- 'lib/metanorma/html/iso_renderer.rb'
|
|
126
|
+
- 'lib/metanorma/html/ogc_renderer.rb'
|
|
127
|
+
- 'lib/metanorma/html/standard_renderer.rb'
|
|
128
|
+
- 'lib/metanorma/html/theme.rb'
|
|
129
|
+
- 'lib/metanorma/iso_document/metadata/iso_localized_title.rb'
|
|
162
130
|
|
|
163
|
-
# Offense count:
|
|
131
|
+
# Offense count: 28
|
|
164
132
|
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
|
165
133
|
# AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
|
|
166
134
|
Naming/MethodParameterName:
|
|
@@ -169,35 +137,23 @@ Naming/MethodParameterName:
|
|
|
169
137
|
- 'lib/metanorma/html/component/footnote_collector.rb'
|
|
170
138
|
- 'lib/metanorma/html/drops/sourcecode_drop.rb'
|
|
171
139
|
- 'lib/metanorma/html/iso_renderer.rb'
|
|
172
|
-
- 'lib/metanorma/html/renderers/block_renderer.rb'
|
|
173
|
-
- 'lib/metanorma/html/renderers/inline_renderer.rb'
|
|
174
140
|
- 'spec/metanorma/html/renderer/footnote_collector_spec.rb'
|
|
175
141
|
|
|
176
|
-
# Offense count:
|
|
142
|
+
# Offense count: 2
|
|
177
143
|
# Configuration parameters: Mode, AllowedMethods, AllowedPatterns, AllowBangMethods, WaywardPredicates.
|
|
178
144
|
# AllowedMethods: call
|
|
179
145
|
# WaywardPredicates: infinite?, nonzero?
|
|
180
146
|
Naming/PredicateMethod:
|
|
181
147
|
Exclude:
|
|
182
148
|
- 'lib/metanorma/html/base_renderer.rb'
|
|
183
|
-
- 'lib/metanorma/html/drops/biblio_entry_drop.rb'
|
|
184
|
-
- 'lib/metanorma/html/renderers/inline_renderer.rb'
|
|
185
149
|
|
|
186
|
-
# Offense count:
|
|
150
|
+
# Offense count: 1
|
|
187
151
|
# Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros, UseSorbetSigs.
|
|
188
152
|
# NamePrefix: is_, has_, have_, does_
|
|
189
153
|
# ForbiddenPrefixes: is_, has_, have_, does_
|
|
190
154
|
# AllowedMethods: is_a?
|
|
191
155
|
# MethodDefinitionMacros: define_method, define_singleton_method
|
|
192
156
|
Naming/PredicatePrefix:
|
|
193
|
-
Exclude:
|
|
194
|
-
- 'spec/**/*'
|
|
195
|
-
- 'lib/metanorma/html/base_renderer.rb'
|
|
196
|
-
- 'lib/metanorma/html/drops/biblio_entry_drop.rb'
|
|
197
|
-
|
|
198
|
-
# Offense count: 1
|
|
199
|
-
# Configuration parameters: MinSize.
|
|
200
|
-
Performance/CollectionLiteralInLoop:
|
|
201
157
|
Exclude:
|
|
202
158
|
- 'lib/metanorma/html/standard_renderer.rb'
|
|
203
159
|
|
|
@@ -206,60 +162,30 @@ Performance/MapMethodChain:
|
|
|
206
162
|
Exclude:
|
|
207
163
|
- 'spec/metanorma/flavor_roots/flavor_roots_spec.rb'
|
|
208
164
|
|
|
209
|
-
# Offense count: 1
|
|
210
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
211
|
-
# Configuration parameters: AllowRegexpMatch.
|
|
212
|
-
Performance/RedundantEqualityComparisonBlock:
|
|
213
|
-
Exclude:
|
|
214
|
-
- 'spec/metanorma/document/components/inline/fmt_stem_element_bug03_spec.rb'
|
|
215
|
-
|
|
216
165
|
# Offense count: 7
|
|
217
166
|
RSpec/BeforeAfterAll:
|
|
218
167
|
Exclude:
|
|
219
|
-
- '**/spec/spec_helper.rb'
|
|
220
|
-
- '**/spec/rails_helper.rb'
|
|
221
|
-
- '**/spec/support/**/*.rb'
|
|
222
168
|
- 'spec/metanorma/flavor_roots/flavor_roots_spec.rb'
|
|
223
169
|
|
|
224
|
-
# Offense count:
|
|
225
|
-
# Configuration parameters: Prefixes, AllowedPatterns.
|
|
226
|
-
# Prefixes: when, with, without
|
|
227
|
-
RSpec/ContextWording:
|
|
228
|
-
Exclude:
|
|
229
|
-
- 'spec/metanorma/html/renderer/theme_spec.rb'
|
|
230
|
-
- 'spec/metanorma/mirror/html_renderer_spec.rb'
|
|
231
|
-
|
|
232
|
-
# Offense count: 32
|
|
170
|
+
# Offense count: 18
|
|
233
171
|
# Configuration parameters: IgnoredMetadata.
|
|
234
172
|
RSpec/DescribeClass:
|
|
235
173
|
Enabled: false
|
|
236
174
|
|
|
237
|
-
# Offense count:
|
|
238
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
239
|
-
# Configuration parameters: SkipBlocks, EnforcedStyle, OnlyStaticConstants.
|
|
240
|
-
# SupportedStyles: described_class, explicit
|
|
241
|
-
RSpec/DescribedClass:
|
|
242
|
-
Exclude:
|
|
243
|
-
- 'spec/metanorma/document/components/inline/semantic_content_bug05_spec.rb'
|
|
244
|
-
- 'spec/metanorma/document/components/inline/xref_element_bug04_spec.rb'
|
|
245
|
-
|
|
246
|
-
# Offense count: 234
|
|
175
|
+
# Offense count: 95
|
|
247
176
|
# Configuration parameters: CountAsOne.
|
|
248
177
|
RSpec/ExampleLength:
|
|
249
|
-
Max:
|
|
178
|
+
Max: 29
|
|
250
179
|
|
|
251
|
-
# Offense count:
|
|
180
|
+
# Offense count: 1
|
|
252
181
|
RSpec/LeakyConstantDeclaration:
|
|
253
182
|
Exclude:
|
|
254
183
|
- 'spec/metanorma/html/renderer/class_ownership_spec.rb'
|
|
255
|
-
- 'spec/metanorma/html/renderer/liquid_templates_spec.rb'
|
|
256
184
|
|
|
257
|
-
# Offense count:
|
|
185
|
+
# Offense count: 2
|
|
258
186
|
RSpec/MultipleDescribes:
|
|
259
187
|
Exclude:
|
|
260
188
|
- 'spec/metanorma/document_spec.rb'
|
|
261
|
-
- 'spec/metanorma/mirror/handlers/remaining_handlers_spec.rb'
|
|
262
|
-
- 'spec/metanorma/mirror/serialization_spec.rb'
|
|
263
189
|
- 'spec/metanorma/standard_document/sections_spec.rb'
|
|
264
190
|
|
|
265
191
|
# Offense count: 1
|
|
@@ -274,54 +200,30 @@ RSpec/NamedSubject:
|
|
|
274
200
|
Exclude:
|
|
275
201
|
- 'spec/metanorma/flavor_roots/flavor_roots_spec.rb'
|
|
276
202
|
|
|
277
|
-
# Offense count:
|
|
203
|
+
# Offense count: 599
|
|
278
204
|
# Configuration parameters: AllowedPatterns.
|
|
279
205
|
# AllowedPatterns: ^expect_, ^assert_
|
|
280
206
|
RSpec/NoExpectationExample:
|
|
281
207
|
Enabled: false
|
|
282
208
|
|
|
283
|
-
# Offense count:
|
|
209
|
+
# Offense count: 25
|
|
284
210
|
# Configuration parameters: CustomTransform, IgnoreMethods, IgnoreMetadata, InflectorPath, EnforcedInflector.
|
|
285
211
|
# SupportedInflectors: default, active_support
|
|
286
212
|
RSpec/SpecFilePathFormat:
|
|
287
213
|
Enabled: false
|
|
288
214
|
|
|
289
|
-
# Offense count: 1
|
|
290
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
291
|
-
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
|
|
292
|
-
# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
|
|
293
|
-
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
|
|
294
|
-
# FunctionalMethods: let, let!, subject, watch
|
|
295
|
-
# AllowedMethods: lambda, proc, it
|
|
296
|
-
Style/BlockDelimiters:
|
|
297
|
-
Exclude:
|
|
298
|
-
- 'spec/metanorma/document/components/inline/semantic_content_bug05_spec.rb'
|
|
299
|
-
|
|
300
215
|
# Offense count: 5
|
|
301
216
|
# This cop supports safe autocorrection (--autocorrect).
|
|
302
217
|
Style/ComparableClamp:
|
|
303
218
|
Exclude:
|
|
219
|
+
- 'lib/metanorma/html/base_renderer.rb'
|
|
304
220
|
- 'lib/metanorma/html/iso_renderer.rb'
|
|
305
|
-
- 'lib/metanorma/html/renderers/section_renderer.rb'
|
|
306
221
|
- 'lib/metanorma/html/standard_renderer.rb'
|
|
307
222
|
|
|
308
223
|
# Offense count: 1
|
|
309
224
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
# Offense count: 2
|
|
315
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
316
|
-
Style/SelectByKind:
|
|
317
|
-
Exclude:
|
|
318
|
-
- 'spec/metanorma/document/components/inline/semantic_content_bug05_spec.rb'
|
|
319
|
-
|
|
320
|
-
# Offense count: 3
|
|
321
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
322
|
-
# Configuration parameters: EnforcedStyleForMultiline.
|
|
323
|
-
# SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
|
|
324
|
-
Style/TrailingCommaInArguments:
|
|
225
|
+
# Configuration parameters: EnforcedStyle.
|
|
226
|
+
# SupportedStyles: literals, strict
|
|
227
|
+
Style/MutableConstant:
|
|
325
228
|
Exclude:
|
|
326
|
-
- '
|
|
327
|
-
- 'spec/metanorma/document/components/inline/xref_element_bug04_spec.rb'
|
|
229
|
+
- 'lib/metanorma/html/base_renderer.rb'
|
data/CHANGELOG.md
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
### Fixed
|
|
15
15
|
|
|
16
|
+
- `Moxml::Adapter::Nokogiri.children` override accepts the `entity_bearing:` keyword of moxml 0.5.36 and later (#66)
|
|
16
17
|
- Roundtrip fidelity: missing attributes, model corrections, and Canon config alignment
|
|
17
18
|
- Stale `Semantic::Root` reference in rake task
|
|
18
19
|
|
data/Gemfile
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
source "https://rubygems.org"
|
|
4
|
+
|
|
5
|
+
# Specify your gem's dependencies in metanorma-standoc-document.gemspec
|
|
6
|
+
gemspec
|
|
7
|
+
|
|
8
|
+
# The 0.2.x maintenance line serves the metanorma-cli 0.2.x bundle,
|
|
9
|
+
# whose relaton keeps rubyzip ~> 2.3 and therefore resolves
|
|
10
|
+
# lutaml-model below 0.8.31 (0.8.31+ needs rubyzip ~> 3.4). Released
|
|
11
|
+
# gems only: the upstream main branches move past this line.
|
|
12
|
+
if ENV["CI"]
|
|
13
|
+
gem "canon"
|
|
14
|
+
gem "lutaml-model", "~> 0.8.0", "< 0.8.31"
|
|
15
|
+
gem "mml", "~> 2.4"
|
|
16
|
+
gem "moxml", "~> 0.5.0"
|
|
17
|
+
else
|
|
18
|
+
gem "canon", path: "../../lutaml/canon"
|
|
19
|
+
gem "lutaml-model", path: "../../lutaml/lutaml-model"
|
|
20
|
+
gem "mml", path: "../../plurimath/mml"
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
gem "nokogiri"
|
|
24
|
+
gem "rake", "~> 13.0"
|
|
25
|
+
gem "rdoc"
|
|
26
|
+
gem "rspec", "~> 3.0"
|
|
27
|
+
gem "rubocop"
|
|
28
|
+
gem "rubocop-performance"
|
|
29
|
+
gem "rubocop-rake"
|
|
30
|
+
gem "rubocop-rspec"
|
|
31
|
+
|
|
32
|
+
gem "concurrent-ruby", "~> 1.3"
|