relaton 2.2.0.pre.alpha.1 → 3.0.0.pre.alpha.1
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/{docs/README.adoc → README.adoc} +109 -38
- data/lib/relaton/3gpp/bibdata.rb +9 -0
- data/lib/relaton/3gpp/bibitem.rb +9 -0
- data/lib/relaton/3gpp/bibliography.rb +48 -0
- data/lib/relaton/3gpp/data_fetcher.rb +255 -0
- data/lib/relaton/3gpp/doctype.rb +9 -0
- data/lib/relaton/3gpp/ext.rb +31 -0
- data/lib/relaton/3gpp/item.rb +12 -0
- data/lib/relaton/3gpp/item_data.rb +15 -0
- data/lib/relaton/3gpp/parser.rb +400 -0
- data/lib/relaton/3gpp/processor.rb +68 -0
- data/lib/relaton/3gpp/release.rb +34 -0
- data/lib/relaton/3gpp/util.rb +8 -0
- data/lib/relaton/3gpp.rb +25 -0
- data/lib/relaton/bib/converter/asciibib/to_asciibib.rb +663 -0
- data/lib/relaton/bib/converter/asciibib.rb +13 -0
- data/lib/relaton/bib/converter/bibtex/from_bibtex.rb +245 -0
- data/lib/relaton/bib/converter/bibtex/to_bibtex.rb +341 -0
- data/lib/relaton/bib/converter/bibtex.rb +23 -0
- data/lib/relaton/bib/converter/bibxml/from_rfcxml.rb +386 -0
- data/lib/relaton/bib/converter/bibxml/from_rfcxml_referencegroup.rb +71 -0
- data/lib/relaton/bib/converter/bibxml/to_rfcxml.rb +308 -0
- data/lib/relaton/bib/converter/bibxml/to_rfcxml_referencegroup.rb +52 -0
- data/lib/relaton/bib/converter/bibxml.rb +51 -0
- data/lib/relaton/bib/hash_parser_v1.rb +767 -0
- data/lib/relaton/bib/item_data.rb +229 -0
- data/lib/relaton/bib/model/abstract.rb +16 -0
- data/lib/relaton/bib/model/address.rb +22 -0
- data/lib/relaton/bib/model/affiliation.rb +16 -0
- data/lib/relaton/bib/model/bibdata.rb +11 -0
- data/lib/relaton/bib/model/bibdata_shared.rb +12 -0
- data/lib/relaton/bib/model/bibitem.rb +11 -0
- data/lib/relaton/bib/model/bibitem_shared.rb +12 -0
- data/lib/relaton/bib/model/contact.rb +18 -0
- data/lib/relaton/bib/model/contribution_info.rb +15 -0
- data/lib/relaton/bib/model/contributor.rb +29 -0
- data/lib/relaton/bib/model/copyright.rb +27 -0
- data/lib/relaton/bib/model/date.rb +31 -0
- data/lib/relaton/bib/model/depiction.rb +16 -0
- data/lib/relaton/bib/model/docidentifier.rb +34 -0
- data/lib/relaton/bib/model/doctype.rb +14 -0
- data/lib/relaton/bib/model/edition.rb +14 -0
- data/lib/relaton/bib/model/ext.rb +39 -0
- data/lib/relaton/bib/model/extent.rb +16 -0
- data/lib/relaton/bib/model/formattedref.rb +43 -0
- data/lib/relaton/bib/model/full_name_type.rb +64 -0
- data/lib/relaton/bib/model/fullname.rb +11 -0
- data/lib/relaton/bib/model/ics.rb +49 -0
- data/lib/relaton/bib/model/image.rb +28 -0
- data/lib/relaton/bib/model/item.rb +96 -0
- data/lib/relaton/bib/model/item_base.rb +20 -0
- data/lib/relaton/bib/model/item_shared.rb +88 -0
- data/lib/relaton/bib/model/keyword.rb +30 -0
- data/lib/relaton/bib/model/locality.rb +18 -0
- data/lib/relaton/bib/model/locality_stack.rb +14 -0
- data/lib/relaton/bib/model/localized_string.rb +48 -0
- data/lib/relaton/bib/model/localized_string_attrs.rb +24 -0
- data/lib/relaton/bib/model/logo.rb +14 -0
- data/lib/relaton/bib/model/medium.rb +22 -0
- data/lib/relaton/bib/model/note.rb +16 -0
- data/lib/relaton/bib/model/organization.rb +13 -0
- data/lib/relaton/bib/model/organization_type.rb +42 -0
- data/lib/relaton/bib/model/person.rb +36 -0
- data/lib/relaton/bib/model/phone.rb +14 -0
- data/lib/relaton/bib/model/place.rb +33 -0
- data/lib/relaton/bib/model/price.rb +14 -0
- data/lib/relaton/bib/model/relation.rb +43 -0
- data/lib/relaton/bib/model/series.rb +34 -0
- data/lib/relaton/bib/model/size.rb +23 -0
- data/lib/relaton/bib/model/source_locality_stack.rb +14 -0
- data/lib/relaton/bib/model/status.rb +27 -0
- data/lib/relaton/bib/model/structured_identifier.rb +48 -0
- data/lib/relaton/bib/model/subdivision.rb +16 -0
- data/lib/relaton/bib/model/title.rb +56 -0
- data/lib/relaton/bib/model/type/plain_date.rb +16 -0
- data/lib/relaton/bib/model/type/string_date.rb +48 -0
- data/lib/relaton/bib/model/uri.rb +18 -0
- data/lib/relaton/bib/model/validity.rb +16 -0
- data/lib/relaton/bib/model/version.rb +43 -0
- data/lib/relaton/bib/namespace_helper.rb +21 -0
- data/lib/relaton/bib/sanitizer.rb +68 -0
- data/lib/relaton/bib/util.rb +18 -0
- data/lib/relaton/bib/versions.json +35 -0
- data/lib/relaton/bib.rb +48 -0
- data/lib/relaton/bipm/bibliography.rb +82 -0
- data/lib/relaton/bipm/converter/asciibib.rb +64 -0
- data/lib/relaton/bipm/data_fetcher.rb +57 -0
- data/lib/relaton/bipm/data_outcomes_parser.rb +657 -0
- data/lib/relaton/bipm/id_parser.rb +277 -0
- data/lib/relaton/bipm/item_data.rb +47 -0
- data/lib/relaton/bipm/model/bibdata.rb +9 -0
- data/lib/relaton/bipm/model/bibitem.rb +9 -0
- data/lib/relaton/bipm/model/comment_period.rb +13 -0
- data/lib/relaton/bipm/model/doctype.rb +12 -0
- data/lib/relaton/bipm/model/ext.rb +38 -0
- data/lib/relaton/bipm/model/item.rb +11 -0
- data/lib/relaton/bipm/model/structured_identifier.rb +15 -0
- data/lib/relaton/bipm/processor.rb +69 -0
- data/lib/relaton/bipm/rawdata_bipm_metrologia/affiliations.rb +111 -0
- data/lib/relaton/bipm/rawdata_bipm_metrologia/fetcher.rb +174 -0
- data/lib/relaton/bipm/rawdata_bipm_metrologia/niso_jats_parser.rb +353 -0
- data/lib/relaton/bipm/si_brochure_parser.rb +186 -0
- data/lib/relaton/bipm/util.rb +8 -0
- data/lib/relaton/bipm.rb +32 -0
- data/lib/relaton/bsi/bibliography.rb +124 -0
- data/lib/relaton/bsi/hit.rb +14 -0
- data/lib/relaton/bsi/hit_collection.rb +114 -0
- data/lib/relaton/bsi/item_data.rb +13 -0
- data/lib/relaton/bsi/model/bibdata.rb +8 -0
- data/lib/relaton/bsi/model/bibitem.rb +8 -0
- data/lib/relaton/bsi/model/docidentifier.rb +9 -0
- data/lib/relaton/bsi/model/doctype.rb +14 -0
- data/lib/relaton/bsi/model/ext.rb +17 -0
- data/lib/relaton/bsi/model/item.rb +17 -0
- data/lib/relaton/bsi/model/item_base.rb +22 -0
- data/lib/relaton/bsi/model/relation.rb +9 -0
- data/lib/relaton/bsi/processor.rb +42 -0
- data/lib/relaton/bsi/schema.json +24882 -0
- data/lib/relaton/bsi/scraper.rb +288 -0
- data/lib/relaton/bsi/util.rb +8 -0
- data/lib/relaton/bsi.rb +25 -0
- data/lib/relaton/calconnect/bibliography.rb +95 -0
- data/lib/relaton/calconnect/data_fetcher.rb +106 -0
- data/lib/relaton/calconnect/hit.rb +14 -0
- data/lib/relaton/calconnect/hit_collection.rb +84 -0
- data/lib/relaton/calconnect/item_data.rb +12 -0
- data/lib/relaton/calconnect/model/bibdata.rb +8 -0
- data/lib/relaton/calconnect/model/bibitem.rb +8 -0
- data/lib/relaton/calconnect/model/doctype.rb +11 -0
- data/lib/relaton/calconnect/model/ext.rb +11 -0
- data/lib/relaton/calconnect/model/item.rb +13 -0
- data/lib/relaton/calconnect/processor.rb +66 -0
- data/lib/relaton/calconnect/scraper.rb +87 -0
- data/lib/relaton/calconnect/util.rb +8 -0
- data/lib/relaton/calconnect.rb +26 -0
- data/lib/relaton/ccsds/bibliography.rb +63 -0
- data/lib/relaton/ccsds/data/fetcher.rb +247 -0
- data/lib/relaton/ccsds/data/iso_references.rb +30 -0
- data/lib/relaton/ccsds/data/parser.rb +194 -0
- data/lib/relaton/ccsds/hit.rb +24 -0
- data/lib/relaton/ccsds/hit_collection.rb +42 -0
- data/lib/relaton/ccsds/item_data.rb +9 -0
- data/lib/relaton/ccsds/model/bibdata.rb +8 -0
- data/lib/relaton/ccsds/model/bibitem.rb +8 -0
- data/lib/relaton/ccsds/model/doctype.rb +9 -0
- data/lib/relaton/ccsds/model/ext.rb +19 -0
- data/lib/relaton/ccsds/model/item.rb +13 -0
- data/lib/relaton/ccsds/processor.rb +68 -0
- data/lib/relaton/ccsds/util.rb +10 -0
- data/lib/relaton/ccsds.rb +33 -0
- data/lib/relaton/cen/bibliography.rb +121 -0
- data/lib/relaton/cen/committees.yaml +66 -0
- data/lib/relaton/cen/hit.rb +16 -0
- data/lib/relaton/cen/hit_collection.rb +68 -0
- data/lib/relaton/cen/item_data.rb +7 -0
- data/lib/relaton/cen/model/bibdata.rb +8 -0
- data/lib/relaton/cen/model/bibitem.rb +8 -0
- data/lib/relaton/cen/model/docidentifier.rb +9 -0
- data/lib/relaton/cen/model/ext.rb +11 -0
- data/lib/relaton/cen/model/item.rb +14 -0
- data/lib/relaton/cen/model/structured_identifier.rb +9 -0
- data/lib/relaton/cen/processor.rb +40 -0
- data/lib/relaton/cen/scraper.rb +210 -0
- data/lib/relaton/cen/util.rb +8 -0
- data/lib/relaton/cen.rb +29 -0
- data/lib/relaton/cie/bibdata.rb +8 -0
- data/lib/relaton/cie/bibitem.rb +8 -0
- data/lib/relaton/cie/bibliography.rb +31 -0
- data/lib/relaton/cie/data_fetcher.rb +355 -0
- data/lib/relaton/cie/ext.rb +7 -0
- data/lib/relaton/cie/item.rb +11 -0
- data/lib/relaton/cie/item_data.rb +6 -0
- data/lib/relaton/cie/processor.rb +66 -0
- data/lib/relaton/cie/scrapper.rb +39 -0
- data/lib/relaton/cie/util.rb +8 -0
- data/lib/relaton/cie.rb +28 -0
- data/lib/relaton/core/array_wrapper.rb +20 -0
- data/lib/relaton/core/data_fetcher.rb +97 -0
- data/lib/relaton/core/date_parser.rb +42 -0
- data/lib/relaton/core/hash_keys_sybolizer.rb +19 -0
- data/lib/relaton/core/hit.rb +49 -0
- data/lib/relaton/core/hit_collection.rb +118 -0
- data/lib/relaton/core/processor.rb +48 -0
- data/lib/relaton/core/workers_pool.rb +45 -0
- data/lib/relaton/core.rb +9 -0
- data/lib/relaton/db/registry.rb +4 -4
- data/lib/relaton/db.rb +0 -1
- data/lib/relaton/doi/crossref.rb +72 -0
- data/lib/relaton/doi/parser.rb +827 -0
- data/lib/relaton/doi/processor.rb +65 -0
- data/lib/relaton/doi/util.rb +8 -0
- data/lib/relaton/doi.rb +20 -0
- data/lib/relaton/ecma/bibdata.rb +8 -0
- data/lib/relaton/ecma/bibitem.rb +8 -0
- data/lib/relaton/ecma/bibliography.rb +81 -0
- data/lib/relaton/ecma/data_fetcher.rb +103 -0
- data/lib/relaton/ecma/data_parser.rb +49 -0
- data/lib/relaton/ecma/edition_parser.rb +80 -0
- data/lib/relaton/ecma/ext.rb +7 -0
- data/lib/relaton/ecma/item.rb +11 -0
- data/lib/relaton/ecma/item_data.rb +6 -0
- data/lib/relaton/ecma/memento_parser.rb +60 -0
- data/lib/relaton/ecma/page_fetcher.rb +27 -0
- data/lib/relaton/ecma/parser_common.rb +33 -0
- data/lib/relaton/ecma/processor.rb +66 -0
- data/lib/relaton/ecma/standard_parser.rb +134 -0
- data/lib/relaton/ecma/util.rb +8 -0
- data/lib/relaton/ecma.rb +24 -0
- data/lib/relaton/etsi/bibdata.rb +10 -0
- data/lib/relaton/etsi/bibitem.rb +10 -0
- data/lib/relaton/etsi/bibliography.rb +46 -0
- data/lib/relaton/etsi/data_fetcher.rb +128 -0
- data/lib/relaton/etsi/data_parser.rb +208 -0
- data/lib/relaton/etsi/doctype.rb +30 -0
- data/lib/relaton/etsi/ext.rb +31 -0
- data/lib/relaton/etsi/item.rb +15 -0
- data/lib/relaton/etsi/item_data.rb +6 -0
- data/lib/relaton/etsi/processor.rb +69 -0
- data/lib/relaton/etsi/pubid.rb +37 -0
- data/lib/relaton/etsi/status.rb +13 -0
- data/lib/relaton/etsi/util.rb +8 -0
- data/lib/relaton/etsi.rb +25 -0
- data/lib/relaton/gb/bibdata.rb +8 -0
- data/lib/relaton/gb/bibitem.rb +8 -0
- data/lib/relaton/gb/bibliography.rb +145 -0
- data/lib/relaton/gb/ccs.rb +14 -0
- data/lib/relaton/gb/committee.rb +13 -0
- data/lib/relaton/gb/docidentifier.rb +23 -0
- data/lib/relaton/gb/doctype.rb +9 -0
- data/lib/relaton/gb/ext.rb +36 -0
- data/lib/relaton/gb/gb_scraper.rb +61 -0
- data/lib/relaton/gb/gb_type.rb +20 -0
- data/lib/relaton/gb/hit.rb +48 -0
- data/lib/relaton/gb/hit_collection.rb +19 -0
- data/lib/relaton/gb/item.rb +13 -0
- data/lib/relaton/gb/item_data.rb +6 -0
- data/lib/relaton/gb/processor.rb +46 -0
- data/lib/relaton/gb/project_number.rb +38 -0
- data/lib/relaton/gb/scraper.rb +204 -0
- data/lib/relaton/gb/sec_scraper.rb +92 -0
- data/lib/relaton/gb/stage_name.rb +13 -0
- data/lib/relaton/gb/structured_identifier.rb +26 -0
- data/lib/relaton/gb/t_scraper.rb +126 -0
- data/lib/relaton/gb/util.rb +8 -0
- data/lib/relaton/gb/yaml/prefixes.yaml +200 -0
- data/lib/relaton/gb.rb +33 -0
- data/lib/relaton/iana/bibdata.rb +8 -0
- data/lib/relaton/iana/bibitem.rb +8 -0
- data/lib/relaton/iana/bibliography.rb +47 -0
- data/lib/relaton/iana/data_fetcher.rb +71 -0
- data/lib/relaton/iana/item.rb +7 -0
- data/lib/relaton/iana/item_data.rb +6 -0
- data/lib/relaton/iana/parser.rb +146 -0
- data/lib/relaton/iana/processor.rb +68 -0
- data/lib/relaton/iana/util.rb +8 -0
- data/lib/relaton/iana.rb +29 -0
- data/lib/relaton/iec/bibliography.rb +283 -0
- data/lib/relaton/iec/data_fetcher.rb +216 -0
- data/lib/relaton/iec/data_parser.rb +391 -0
- data/lib/relaton/iec/hit.rb +26 -0
- data/lib/relaton/iec/hit_collection.rb +138 -0
- data/lib/relaton/iec/item_data.rb +7 -0
- data/lib/relaton/iec/model/bibdata.rb +8 -0
- data/lib/relaton/iec/model/bibitem.rb +8 -0
- data/lib/relaton/iec/model/docidentifier.rb +131 -0
- data/lib/relaton/iec/model/doctype.rb +12 -0
- data/lib/relaton/iec/model/ext.rb +53 -0
- data/lib/relaton/iec/model/item.rb +20 -0
- data/lib/relaton/iec/model/item_base.rb +12 -0
- data/lib/relaton/iec/model/relation.rb +7 -0
- data/lib/relaton/iec/model/stage_name.rb +13 -0
- data/lib/relaton/iec/processor.rb +73 -0
- data/lib/relaton/iec/statuses.yml +199 -0
- data/lib/relaton/iec/util.rb +8 -0
- data/lib/relaton/iec.rb +98 -0
- data/lib/relaton/ieee/balloting_group.rb +13 -0
- data/lib/relaton/ieee/bibdata.rb +8 -0
- data/lib/relaton/ieee/bibitem.rb +8 -0
- data/lib/relaton/ieee/bibliography.rb +51 -0
- data/lib/relaton/ieee/converter/bibxml/from_rfcxml.rb +10 -0
- data/lib/relaton/ieee/converter/bibxml/from_rfcxml_referencegroup.rb +10 -0
- data/lib/relaton/ieee/converter/bibxml.rb +20 -0
- data/lib/relaton/ieee/data_fetcher.rb +630 -0
- data/lib/relaton/ieee/doctype.rb +9 -0
- data/lib/relaton/ieee/editorial_group.rb +19 -0
- data/lib/relaton/ieee/ext.rb +36 -0
- data/lib/relaton/ieee/idams_parser.rb +323 -0
- data/lib/relaton/ieee/item.rb +11 -0
- data/lib/relaton/ieee/item_data.rb +7 -0
- data/lib/relaton/ieee/processor.rb +68 -0
- data/lib/relaton/ieee/pub_id.rb +161 -0
- data/lib/relaton/ieee/rawbib_id_parser.rb +548 -0
- data/lib/relaton/ieee/util.rb +8 -0
- data/lib/relaton/ieee.rb +29 -0
- data/lib/relaton/ietf/bibdata.rb +8 -0
- data/lib/relaton/ietf/bibitem.rb +8 -0
- data/lib/relaton/ietf/bibliography.rb +35 -0
- data/lib/relaton/ietf/bibxml_parser.rb +232 -0
- data/lib/relaton/ietf/data_fetcher.rb +278 -0
- data/lib/relaton/ietf/doctype.rb +9 -0
- data/lib/relaton/ietf/ext.rb +63 -0
- data/lib/relaton/ietf/item.rb +16 -0
- data/lib/relaton/ietf/item_base.rb +18 -0
- data/lib/relaton/ietf/item_data.rb +6 -0
- data/lib/relaton/ietf/processing_instructions.rb +79 -0
- data/lib/relaton/ietf/processor.rb +68 -0
- data/lib/relaton/ietf/relation.rb +9 -0
- data/lib/relaton/ietf/rfc/abstract.rb +19 -0
- data/lib/relaton/ietf/rfc/author.rb +21 -0
- data/lib/relaton/ietf/rfc/entry.rb +410 -0
- data/lib/relaton/ietf/rfc/entry_date.rb +21 -0
- data/lib/relaton/ietf/rfc/format.rb +19 -0
- data/lib/relaton/ietf/rfc/index.rb +46 -0
- data/lib/relaton/ietf/rfc/is_also.rb +21 -0
- data/lib/relaton/ietf/rfc/keywords.rb +19 -0
- data/lib/relaton/ietf/rfc/rfc_index_namespace.rb +11 -0
- data/lib/relaton/ietf/scraper.rb +68 -0
- data/lib/relaton/ietf/util.rb +8 -0
- data/lib/relaton/ietf/wg_name_resolver.rb +42 -0
- data/lib/relaton/ietf.rb +27 -0
- data/lib/relaton/iho/bibdata.rb +8 -0
- data/lib/relaton/iho/bibitem.rb +8 -0
- data/lib/relaton/iho/bibliography.rb +114 -0
- data/lib/relaton/iho/comment_period.rb +13 -0
- data/lib/relaton/iho/docidentifier.rb +31 -0
- data/lib/relaton/iho/doctype.rb +10 -0
- data/lib/relaton/iho/ext.rb +20 -0
- data/lib/relaton/iho/hash_parser_v1.rb +144 -0
- data/lib/relaton/iho/item.rb +20 -0
- data/lib/relaton/iho/item_base.rb +18 -0
- data/lib/relaton/iho/item_data.rb +6 -0
- data/lib/relaton/iho/processor.rb +54 -0
- data/lib/relaton/iho/relation.rb +9 -0
- data/lib/relaton/iho/structured_identifier.rb +20 -0
- data/lib/relaton/iho/util.rb +8 -0
- data/lib/relaton/iho.rb +27 -0
- data/lib/relaton/index/config.rb +52 -0
- data/lib/relaton/index/file_io.rb +305 -0
- data/lib/relaton/index/file_storage.rb +61 -0
- data/lib/relaton/index/id_number.rb +30 -0
- data/lib/relaton/index/pool.rb +41 -0
- data/lib/relaton/index/type.rb +159 -0
- data/lib/relaton/index/util.rb +18 -0
- data/lib/relaton/index.rb +60 -0
- data/lib/relaton/isbn/isbn.rb +61 -0
- data/lib/relaton/isbn/open_library.rb +43 -0
- data/lib/relaton/isbn/parser.rb +88 -0
- data/lib/relaton/isbn/processor.rb +48 -0
- data/lib/relaton/isbn/util.rb +8 -0
- data/lib/relaton/isbn.rb +19 -0
- data/lib/relaton/iso/bibliography.rb +407 -0
- data/lib/relaton/iso/data_fetcher.rb +338 -0
- data/lib/relaton/iso/data_parser.rb +444 -0
- data/lib/relaton/iso/hash_parser_v1.rb +177 -0
- data/lib/relaton/iso/hit.rb +57 -0
- data/lib/relaton/iso/hit_collection.rb +184 -0
- data/lib/relaton/iso/item_data.rb +28 -0
- data/lib/relaton/iso/model/bibdata.rb +10 -0
- data/lib/relaton/iso/model/bibitem.rb +8 -0
- data/lib/relaton/iso/model/contributor.rb +6 -0
- data/lib/relaton/iso/model/contributor_info.rb +9 -0
- data/lib/relaton/iso/model/docidentifier.rb +134 -0
- data/lib/relaton/iso/model/doctype.rb +13 -0
- data/lib/relaton/iso/model/ext.rb +35 -0
- data/lib/relaton/iso/model/item.rb +17 -0
- data/lib/relaton/iso/model/item_base.rb +22 -0
- data/lib/relaton/iso/model/organization.rb +9 -0
- data/lib/relaton/iso/model/project_number.rb +22 -0
- data/lib/relaton/iso/model/relation.rb +9 -0
- data/lib/relaton/iso/model/stagename.rb +14 -0
- data/lib/relaton/iso/model/structured_identifier.rb +31 -0
- data/lib/relaton/iso/processor.rb +84 -0
- data/lib/relaton/iso/scraper.rb +619 -0
- data/lib/relaton/iso/type/pubid.rb +50 -0
- data/lib/relaton/iso/util.rb +8 -0
- data/lib/relaton/iso.rb +30 -0
- data/lib/relaton/itu/bibliography.rb +90 -0
- data/lib/relaton/itu/data_fetcher.rb +104 -0
- data/lib/relaton/itu/data_parser_r.rb +140 -0
- data/lib/relaton/itu/hit.rb +22 -0
- data/lib/relaton/itu/hit_collection.rb +127 -0
- data/lib/relaton/itu/item_data.rb +6 -0
- data/lib/relaton/itu/model/approval_stage.rb +13 -0
- data/lib/relaton/itu/model/bibdata.rb +8 -0
- data/lib/relaton/itu/model/bibitem.rb +8 -0
- data/lib/relaton/itu/model/docidentifier.rb +9 -0
- data/lib/relaton/itu/model/doctype.rb +13 -0
- data/lib/relaton/itu/model/ext.rb +47 -0
- data/lib/relaton/itu/model/item.rb +13 -0
- data/lib/relaton/itu/model/meeting.rb +13 -0
- data/lib/relaton/itu/model/meeting_date.rb +15 -0
- data/lib/relaton/itu/model/question.rb +13 -0
- data/lib/relaton/itu/model/recommendation_status.rb +11 -0
- data/lib/relaton/itu/model/structured_identifier.rb +19 -0
- data/lib/relaton/itu/processor.rb +66 -0
- data/lib/relaton/itu/pubid.rb +177 -0
- data/lib/relaton/itu/radio_regulations_parser.rb +70 -0
- data/lib/relaton/itu/recommendation_parser.rb +161 -0
- data/lib/relaton/itu/scraper.rb +193 -0
- data/lib/relaton/itu/util.rb +8 -0
- data/lib/relaton/itu.rb +33 -0
- data/lib/relaton/jis/bibdata.rb +8 -0
- data/lib/relaton/jis/bibitem.rb +8 -0
- data/lib/relaton/jis/bibliography.rb +75 -0
- data/lib/relaton/jis/data_fetcher.rb +181 -0
- data/lib/relaton/jis/docidentifier.rb +21 -0
- data/lib/relaton/jis/doctype.rb +9 -0
- data/lib/relaton/jis/ext.rb +13 -0
- data/lib/relaton/jis/hit.rb +93 -0
- data/lib/relaton/jis/hit_collection.rb +127 -0
- data/lib/relaton/jis/item.rb +22 -0
- data/lib/relaton/jis/item_base.rb +26 -0
- data/lib/relaton/jis/item_data.rb +8 -0
- data/lib/relaton/jis/processor.rb +55 -0
- data/lib/relaton/jis/relation.rb +11 -0
- data/lib/relaton/jis/scraper.rb +232 -0
- data/lib/relaton/jis/structured_identifier.rb +13 -0
- data/lib/relaton/jis/util.rb +8 -0
- data/lib/relaton/jis.rb +33 -0
- data/lib/relaton/logger/channels/gh_issue.rb +78 -0
- data/lib/relaton/logger/config.rb +34 -0
- data/lib/relaton/logger/formatter_json.rb +8 -0
- data/lib/relaton/logger/formatter_string.rb +12 -0
- data/lib/relaton/logger/log.rb +64 -0
- data/lib/relaton/logger/log_device.rb +27 -0
- data/lib/relaton/logger/pool.rb +24 -0
- data/lib/relaton/logger.rb +18 -0
- data/lib/relaton/nist/bibdata.rb +8 -0
- data/lib/relaton/nist/bibitem.rb +8 -0
- data/lib/relaton/nist/bibliography.rb +191 -0
- data/lib/relaton/nist/comment_period.rb +15 -0
- data/lib/relaton/nist/data_fetcher.rb +84 -0
- data/lib/relaton/nist/date.rb +7 -0
- data/lib/relaton/nist/doctype.rb +7 -0
- data/lib/relaton/nist/ext.rb +16 -0
- data/lib/relaton/nist/hit.rb +18 -0
- data/lib/relaton/nist/hit_collection.rb +362 -0
- data/lib/relaton/nist/item.rb +17 -0
- data/lib/relaton/nist/item_data.rb +6 -0
- data/lib/relaton/nist/mods_parser.rb +276 -0
- data/lib/relaton/nist/processor.rb +68 -0
- data/lib/relaton/nist/pubs_export.rb +69 -0
- data/lib/relaton/nist/relation.rb +7 -0
- data/lib/relaton/nist/scraper.rb +290 -0
- data/lib/relaton/nist/series.yaml +49 -0
- data/lib/relaton/nist/util.rb +8 -0
- data/lib/relaton/nist.rb +34 -0
- data/lib/relaton/oasis/bibdata.rb +8 -0
- data/lib/relaton/oasis/bibitem.rb +8 -0
- data/lib/relaton/oasis/bibliography.rb +60 -0
- data/lib/relaton/oasis/browser_agent.rb +71 -0
- data/lib/relaton/oasis/data_fetcher.rb +94 -0
- data/lib/relaton/oasis/data_parser.rb +305 -0
- data/lib/relaton/oasis/data_parser_utils.rb +296 -0
- data/lib/relaton/oasis/data_part_parser.rb +239 -0
- data/lib/relaton/oasis/doctype.rb +7 -0
- data/lib/relaton/oasis/ext.rb +19 -0
- data/lib/relaton/oasis/item.rb +11 -0
- data/lib/relaton/oasis/item_data.rb +6 -0
- data/lib/relaton/oasis/processor.rb +68 -0
- data/lib/relaton/oasis/util.rb +8 -0
- data/lib/relaton/oasis.rb +28 -0
- data/lib/relaton/ogc/bibdata.rb +8 -0
- data/lib/relaton/ogc/bibitem.rb +8 -0
- data/lib/relaton/ogc/bibliography.rb +64 -0
- data/lib/relaton/ogc/data_fetcher.rb +110 -0
- data/lib/relaton/ogc/docidentifier.rb +6 -0
- data/lib/relaton/ogc/doctype.rb +12 -0
- data/lib/relaton/ogc/ext.rb +15 -0
- data/lib/relaton/ogc/hit.rb +18 -0
- data/lib/relaton/ogc/hit_collection.rb +36 -0
- data/lib/relaton/ogc/item.rb +13 -0
- data/lib/relaton/ogc/item_data.rb +6 -0
- data/lib/relaton/ogc/processor.rb +58 -0
- data/lib/relaton/ogc/scraper.rb +225 -0
- data/lib/relaton/ogc/util.rb +8 -0
- data/lib/relaton/ogc.rb +26 -0
- data/lib/relaton/oiml/bibdata.rb +8 -0
- data/lib/relaton/oiml/bibitem.rb +8 -0
- data/lib/relaton/oiml/bibliography.rb +94 -0
- data/lib/relaton/oiml/docidentifier.rb +33 -0
- data/lib/relaton/oiml/doctype.rb +13 -0
- data/lib/relaton/oiml/ext.rb +42 -0
- data/lib/relaton/oiml/item.rb +20 -0
- data/lib/relaton/oiml/item_base.rb +18 -0
- data/lib/relaton/oiml/item_data.rb +6 -0
- data/lib/relaton/oiml/processor.rb +54 -0
- data/lib/relaton/oiml/relation.rb +9 -0
- data/lib/relaton/oiml/util.rb +8 -0
- data/lib/relaton/oiml.rb +24 -0
- data/lib/relaton/omg/bibdata.rb +8 -0
- data/lib/relaton/omg/bibitem.rb +8 -0
- data/lib/relaton/omg/bibliography.rb +31 -0
- data/lib/relaton/omg/ext.rb +7 -0
- data/lib/relaton/omg/item.rb +8 -0
- data/lib/relaton/omg/item_data.rb +6 -0
- data/lib/relaton/omg/processor.rb +34 -0
- data/lib/relaton/omg/scraper.rb +141 -0
- data/lib/relaton/omg/util.rb +8 -0
- data/lib/relaton/omg.rb +24 -0
- data/lib/relaton/plateau/bibdata.rb +8 -0
- data/lib/relaton/plateau/bibitem.rb +8 -0
- data/lib/relaton/plateau/bibliography.rb +24 -0
- data/lib/relaton/plateau/data_fetcher.rb +153 -0
- data/lib/relaton/plateau/doctype.rb +7 -0
- data/lib/relaton/plateau/ext.rb +23 -0
- data/lib/relaton/plateau/handbook_parser.rb +95 -0
- data/lib/relaton/plateau/hit.rb +13 -0
- data/lib/relaton/plateau/hit_collection.rb +59 -0
- data/lib/relaton/plateau/item.rb +12 -0
- data/lib/relaton/plateau/item_data.rb +6 -0
- data/lib/relaton/plateau/parser.rb +101 -0
- data/lib/relaton/plateau/processor.rb +49 -0
- data/lib/relaton/plateau/technical_report_parser.rb +91 -0
- data/lib/relaton/plateau/util.rb +8 -0
- data/lib/relaton/plateau.rb +28 -0
- data/lib/relaton/un/bibdata.rb +8 -0
- data/lib/relaton/un/bibitem.rb +8 -0
- data/lib/relaton/un/bibliography.rb +48 -0
- data/lib/relaton/un/doctype.rb +10 -0
- data/lib/relaton/un/ext.rb +30 -0
- data/lib/relaton/un/hit.rb +56 -0
- data/lib/relaton/un/hit_collection.rb +61 -0
- data/lib/relaton/un/item.rb +11 -0
- data/lib/relaton/un/item_data.rb +6 -0
- data/lib/relaton/un/parser.rb +108 -0
- data/lib/relaton/un/processor.rb +38 -0
- data/lib/relaton/un/session.rb +25 -0
- data/lib/relaton/un/token_generator.rb +105 -0
- data/lib/relaton/un/util.rb +8 -0
- data/lib/relaton/un/wasm/decoder.rb +434 -0
- data/lib/relaton/un/wasm/instance.rb +101 -0
- data/lib/relaton/un/wasm/interpreter.rb +613 -0
- data/lib/relaton/un/wasm/memory.rb +112 -0
- data/lib/relaton/un/wasm/module.rb +47 -0
- data/lib/relaton/un/wasm.rb +17 -0
- data/lib/relaton/un/wasm_v_bg.wasm +0 -0
- data/lib/relaton/un.rb +28 -0
- data/lib/relaton/version.rb +1 -1
- data/lib/relaton/w3c/bibdata.rb +8 -0
- data/lib/relaton/w3c/bibitem.rb +8 -0
- data/lib/relaton/w3c/bibliography.rb +54 -0
- data/lib/relaton/w3c/data_fetcher.rb +309 -0
- data/lib/relaton/w3c/data_parser.rb +379 -0
- data/lib/relaton/w3c/doctype.rb +7 -0
- data/lib/relaton/w3c/ext.rb +11 -0
- data/lib/relaton/w3c/item.rb +12 -0
- data/lib/relaton/w3c/item_data.rb +6 -0
- data/lib/relaton/w3c/processor.rb +49 -0
- data/lib/relaton/w3c/pubid.rb +73 -0
- data/lib/relaton/w3c/safe_realize.rb +59 -0
- data/lib/relaton/w3c/util.rb +8 -0
- data/lib/relaton/w3c.rb +25 -0
- data/lib/relaton/xsf/bibdata.rb +8 -0
- data/lib/relaton/xsf/bibitem.rb +8 -0
- data/lib/relaton/xsf/bibliography.rb +24 -0
- data/lib/relaton/xsf/data_fetcher.rb +56 -0
- data/lib/relaton/xsf/hit.rb +17 -0
- data/lib/relaton/xsf/hit_collection.rb +24 -0
- data/lib/relaton/xsf/item.rb +7 -0
- data/lib/relaton/xsf/item_data.rb +6 -0
- data/lib/relaton/xsf/processor.rb +50 -0
- data/lib/relaton/xsf/util.rb +9 -0
- data/lib/relaton/xsf.rb +30 -0
- data/lib/relaton-core.rb +1 -0
- data/lib/relaton.rb +43 -0
- metadata +673 -170
- data/.github/workflows/rake.yml +0 -14
- data/.github/workflows/release.yml +0 -24
- data/.github/workflows/rubocop.yml +0 -48
- data/.gitignore +0 -12
- data/.rspec +0 -3
- data/CLAUDE.md +0 -78
- data/Gemfile +0 -29
- data/Rakefile +0 -6
- data/docs/CHANGELOG.adoc +0 -16
- data/docs/VERSIONING_POLICY.adoc +0 -38
- data/docs/navigation.adoc +0 -6
- data/lib/relaton/db/version.rb +0 -5
- data/relaton.gemspec +0 -72
- data/spec/relaton/config_spec.rb +0 -10
- data/spec/relaton/db_cache_spec.rb +0 -51
- data/spec/relaton/db_spec.rb +0 -567
- data/spec/relaton/registry_spec.rb +0 -178
- data/spec/relaton/util_spec.rb +0 -3
- data/spec/relaton_meta_spec.rb +0 -25
- data/spec/relaton_spec.rb +0 -800
- data/spec/spec_helper.rb +0 -45
- data/spec/support/gb_t_20223_2006.xml +0 -33
- data/spec/support/iso_111111119115_1.xml +0 -0
- data/spec/support/iso_19115_1.xml +0 -115
- data/spec/support/iso_19115_2.xml +0 -95
- data/spec/support/rfc_8341.xml +0 -46
- data/spec/vcr_cassetes/api_relaton_org.yml +0 -121
- data/spec/vcr_cassetes/api_relaton_org_unavailable.yml +0 -140
- data/spec/vcr_cassetes/cc_dir_10005_2019.yml +0 -202
- data/spec/vcr_cassetes/cipm_meeting_43.yml +0 -1505
- data/spec/vcr_cassetes/gb_t_20223_2006.yml +0 -729
- data/spec/vcr_cassetes/iso_111111119115_1.yml +0 -12951
- data/spec/vcr_cassetes/iso_19115_1.yml +0 -17334
- data/spec/vcr_cassetes/iso_19115_1_2.yml +0 -322
- data/spec/vcr_cassetes/iso_19115_1_std.yml +0 -17334
- data/spec/vcr_cassetes/iso_19115_all_parts.yml +0 -185
- data/spec/vcr_cassetes/iso_19133_2005.yml +0 -144
- data/spec/vcr_cassetes/iso_combined_applied.yml +0 -318
- data/spec/vcr_cassetes/iso_combined_included.yml +0 -318
- data/spec/vcr_cassetes/ogc_19_025r1.yml +0 -374
- data/spec/vcr_cassetes/omg_ami4ccm_1_0.yml +0 -317
- data/spec/vcr_cassetes/rfc_8341.yml +0 -1278
data/.github/workflows/rake.yml
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
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, lutaml-integration ]
|
|
8
|
-
tags: [ v* ]
|
|
9
|
-
pull_request:
|
|
10
|
-
workflow_dispatch:
|
|
11
|
-
|
|
12
|
-
jobs:
|
|
13
|
-
rake:
|
|
14
|
-
uses: relaton/support/.github/workflows/rake.yml@main
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
|
|
18
|
-
jobs:
|
|
19
|
-
release:
|
|
20
|
-
uses: relaton/support/.github/workflows/release.yml@main
|
|
21
|
-
with:
|
|
22
|
-
next_version: ${{ github.event.inputs.next_version }}
|
|
23
|
-
secrets:
|
|
24
|
-
rubygems-api-key: ${{ secrets.RELATON_CI_RUBYGEMS_API_KEY }}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
name: Rubocop
|
|
2
|
-
|
|
3
|
-
on: pull_request
|
|
4
|
-
|
|
5
|
-
permissions:
|
|
6
|
-
contents: read
|
|
7
|
-
pull-requests: write
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
rubocop:
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
steps:
|
|
13
|
-
- uses: actions/checkout@v4
|
|
14
|
-
with:
|
|
15
|
-
fetch-depth: 1
|
|
16
|
-
- name: Determine Ruby version for ruby/setup-ruby
|
|
17
|
-
shell: bash
|
|
18
|
-
run: |
|
|
19
|
-
RUBY_VERSION=${{ vars.RUBY_VERSION }}
|
|
20
|
-
|
|
21
|
-
if [[ -r .rubocop.yml ]]
|
|
22
|
-
then
|
|
23
|
-
RUBY_VERSION=$( \
|
|
24
|
-
command grep \
|
|
25
|
-
-E '^\s*TargetRubyVersion:\s*[0-9]+(\.[0-9]+)*' \
|
|
26
|
-
.rubocop.yml \
|
|
27
|
-
| command awk '{print $2}' \
|
|
28
|
-
)
|
|
29
|
-
fi
|
|
30
|
-
|
|
31
|
-
if [[ -z $RUBY_VERSION ]]
|
|
32
|
-
then
|
|
33
|
-
# Let setup-ruby determine the Ruby version if no .ruby-version,
|
|
34
|
-
# .tool-versions or mise.toml file exists
|
|
35
|
-
RUBY_VERSION=default
|
|
36
|
-
fi
|
|
37
|
-
|
|
38
|
-
echo "RUBY_VERSION=$RUBY_VERSION" >> $GITHUB_ENV
|
|
39
|
-
- uses: ruby/setup-ruby@v1
|
|
40
|
-
with:
|
|
41
|
-
# input ruby-version needs to be specified if no .ruby-version,
|
|
42
|
-
# .tool-versions or mise.toml file exists
|
|
43
|
-
#
|
|
44
|
-
# Use the version that matches the one in gemspec & .rubocop.yml
|
|
45
|
-
ruby-version: ${{ env.RUBY_VERSION }}
|
|
46
|
-
- uses: reclaim-the-stack/rubocop-action@v1.1.0
|
|
47
|
-
with:
|
|
48
|
-
gem_versions: rubocop:1.84.2 rubocop-performance:1.26.1 rubocop-rails:2.34.3
|
data/.gitignore
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
coverage/
|
|
2
|
-
.byebug_history
|
|
3
|
-
.rspec_status
|
|
4
|
-
|
|
5
|
-
testcache
|
|
6
|
-
testcache2
|
|
7
|
-
.rubocop-https---raw-githubusercontent-com-riboseinc-oss-guides-master-ci-rubocop-yml
|
|
8
|
-
.vscode/
|
|
9
|
-
pkg/
|
|
10
|
-
Gemfile.lock
|
|
11
|
-
.rubocop-remote-87c7cdd254a8d09d005ee06efac7acc0.yml
|
|
12
|
-
.claude/
|
data/.rspec
DELETED
data/CLAUDE.md
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
# CLAUDE.md
|
|
2
|
-
|
|
3
|
-
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
-
|
|
5
|
-
## Commands
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
# Run full test suite
|
|
9
|
-
bundle exec rake # or: bundle exec rspec
|
|
10
|
-
|
|
11
|
-
# Run a single spec file
|
|
12
|
-
bundle exec rspec spec/relaton/db_spec.rb
|
|
13
|
-
|
|
14
|
-
# Run a specific test by line number
|
|
15
|
-
bundle exec rspec spec/relaton/db_spec.rb:234
|
|
16
|
-
|
|
17
|
-
# Lint
|
|
18
|
-
bundle exec rubocop
|
|
19
|
-
|
|
20
|
-
# Lint with auto-fix
|
|
21
|
-
bundle exec rubocop -a
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Architecture
|
|
25
|
-
|
|
26
|
-
Relaton is a Ruby gem that fetches, caches, and manages bibliographic references to technical standards from 25+ organizations (ISO, IEC, IETF, NIST, IEEE, etc.).
|
|
27
|
-
|
|
28
|
-
### Plugin Registry Pattern
|
|
29
|
-
|
|
30
|
-
**Relaton::Registry** (singleton) auto-discovers and manages backend processor gems (relaton-iso, relaton-iec, relaton-ietf, etc.). Each processor implements the **Relaton::Processor** interface (`get`, `from_xml`, `from_yaml`, `grammar_hash`, `prefix`, `defaultprefix`). The registry routes reference codes to the correct processor by matching prefixes (e.g., "ISO 19115" → `:relaton_iso`).
|
|
31
|
-
|
|
32
|
-
### Db (lib/relaton/db.rb) — Main Public API
|
|
33
|
-
|
|
34
|
-
`Relaton::Db#fetch(ref, year, opts)` is the primary entry point. It:
|
|
35
|
-
1. Identifies the processor via Registry prefix matching
|
|
36
|
-
2. Handles combined references (`+` for derivedFrom, `,` for amendments) in `combine_doc`
|
|
37
|
-
3. Delegates to `check_bibliocache` which manages the dual-cache lookup and network fetch flow
|
|
38
|
-
|
|
39
|
-
`Relaton::Db#fetch_all(text, edition, year)` searches cached entries, filtering by text content (via `match_xml_text?`), edition, and/or year. Returns an array of deserialized bibliographic items from both local and global caches.
|
|
40
|
-
|
|
41
|
-
The dual-cache strategy uses a **global cache** (`~/.relaton/cache`) and an optional **local cache** (project-level). `check_bibliocache` checks local first, falls back to global, and syncs between them.
|
|
42
|
-
|
|
43
|
-
### DbCache (lib/relaton/db_cache.rb) — File-based Storage
|
|
44
|
-
|
|
45
|
-
Stores entries as files under `{dir}/{prefix}/{filename}.{ext}` (e.g., `testcache/iso/iso_19115-1.xml`). Key behaviors:
|
|
46
|
-
- Cache keys are wrapped like `ISO(ISO 19115-1:2014)` and converted to filenames via regex
|
|
47
|
-
- Entries can be XML, "not_found {date}", or "redirection {target_key}"
|
|
48
|
-
- Undated references expire after 60 days; dated ones persist indefinitely
|
|
49
|
-
- Version tracking per prefix directory invalidates cache when processor grammar changes
|
|
50
|
-
- File locking (`LOCK_EX`) for thread-safe concurrent writes
|
|
51
|
-
|
|
52
|
-
### WorkersPool (lib/relaton/workers_pool.rb)
|
|
53
|
-
|
|
54
|
-
Thread pool for `fetch_async`. Default 10 threads per processor, overridable via `RELATON_FETCH_PARALLEL` env var.
|
|
55
|
-
|
|
56
|
-
### Cache Key Format
|
|
57
|
-
|
|
58
|
-
`std_id` builds keys like `ISO(ISO 19115-1:2014 (all parts) after-2020-01-01)`. The filename regex in `db_cache.rb` uses `[^)]+` — suffixes use `-` not parentheses to avoid breaking it.
|
|
59
|
-
|
|
60
|
-
## Testing
|
|
61
|
-
|
|
62
|
-
- RSpec with VCR cassettes in `spec/vcr_cassetes/` for recorded HTTP interactions
|
|
63
|
-
- Tests create `testcache`/`testcache2` directories and clean them in `before(:each)`
|
|
64
|
-
- Cache-related tests need `<fetched>` elements in XML for `valid_entry?` to return true
|
|
65
|
-
- Integration tests in `spec/relaton_spec.rb`; unit tests mirror `lib/` structure under `spec/relaton/`
|
|
66
|
-
- **ISO lookups are stubbed, not cassette-recorded.** Flavor gems (relaton-iso/iec/nist)
|
|
67
|
-
fetch a large live `index-v2` and deserialize every id through a pinned pubid build,
|
|
68
|
-
so a single drifted id in the live index makes the whole index unparseable and ISO
|
|
69
|
-
lookups return `nil`. Umbrella specs therefore stub `Relaton::Iso::Bibliography.get`
|
|
70
|
-
(and other flavors' `.get`) to return hand-built `ItemData` — the umbrella's job is to
|
|
71
|
-
test `Db` orchestration (`combine_doc`, caching, api fallback), not relaton-iso's index.
|
|
72
|
-
Build stub items with the `docidentifier:` key (not `docid:`) so the id survives the
|
|
73
|
-
cache XML round-trip. Don't reintroduce a live-index cassette for these.
|
|
74
|
-
|
|
75
|
-
## Style
|
|
76
|
-
|
|
77
|
-
- RuboCop config inherits from [Ribose OSS guides](https://github.com/riboseinc/oss-guides), target Ruby 3.2
|
|
78
|
-
- Thread safety via `@semaphore` (Mutex) around cache reads/writes in Db
|
data/Gemfile
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
source "https://rubygems.org"
|
|
2
|
-
|
|
3
|
-
# Specify your gem's dependencies in gemspec
|
|
4
|
-
gemspec
|
|
5
|
-
|
|
6
|
-
# Use local monorepo sibling gems where available.
|
|
7
|
-
Dir["../*/"].each do |dir|
|
|
8
|
-
name = File.basename(dir)
|
|
9
|
-
next if name == File.basename(__dir__)
|
|
10
|
-
next unless File.exist?(File.join(dir, "#{name}.gemspec"))
|
|
11
|
-
gem name, path: dir
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
gem "byebug"
|
|
17
|
-
gem "equivalent-xml", "~> 0.6"
|
|
18
|
-
gem "guard", "~> 2.14"
|
|
19
|
-
gem "guard-rspec", "~> 4.7"
|
|
20
|
-
gem "pry-byebug"
|
|
21
|
-
gem "rake", "~> 13.0"
|
|
22
|
-
gem "rspec", "~> 3.6"
|
|
23
|
-
gem "rubocop"
|
|
24
|
-
gem "rubocop-performance"
|
|
25
|
-
gem "rubocop-rails"
|
|
26
|
-
gem "simplecov", "~> 0.15"
|
|
27
|
-
gem "timecop", "~> 0.9"
|
|
28
|
-
gem "vcr", "~> 6"
|
|
29
|
-
gem "webmock", "~> 3.18"
|
data/Rakefile
DELETED
data/docs/CHANGELOG.adoc
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
= Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
|
|
5
|
-
The format is based on https://keepachangelog.com/en/1.0.0/[Keep a Changelog], and this project adheres to https://semver.org/[Semantic Versioning].
|
|
6
|
-
|
|
7
|
-
== [Unreleased]
|
|
8
|
-
|
|
9
|
-
== [1.19.2] - 2024-06-29
|
|
10
|
-
- Lazy load Relaton flavor gems dependencies.
|
|
11
|
-
|
|
12
|
-
== [1.19.1] - 2024-06-24
|
|
13
|
-
- Add `relaton-plateau` flavor gem.
|
|
14
|
-
|
|
15
|
-
== [1.19.0] - 2024-06-29
|
|
16
|
-
- Switch to using the `relaton-logger` gem for logging.
|
data/docs/VERSIONING_POLICY.adoc
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
= Versioning Policy
|
|
2
|
-
|
|
3
|
-
This document describes the versioning policy for the Relaton project. We follow the https://semver.org/[Semantic Versioning] scheme.
|
|
4
|
-
|
|
5
|
-
== Versioning Scheme
|
|
6
|
-
|
|
7
|
-
Version nubmers are in the form of `MAJOR.MINOR.PATCH`. The version number is incremented based on the following:
|
|
8
|
-
|
|
9
|
-
- `MAJOR` version is incremented when incompatible changes are made to the API.
|
|
10
|
-
- `MINOR` version is incremented when the Relaton data model is changed.
|
|
11
|
-
- `PATCH` version is incremented when backward-compatible bug fixes are made.
|
|
12
|
-
|
|
13
|
-
== Rules for incrementing version numbers
|
|
14
|
-
|
|
15
|
-
1. **MAJOR** version is incremented when incompatible changes are made to the API. Icrement the MAJOR version when:
|
|
16
|
-
- Removing or renaming classes or methods.
|
|
17
|
-
- Changing the signature of a method.
|
|
18
|
-
- Changing the behavior of a method.
|
|
19
|
-
|
|
20
|
-
2. **MINOR** version is incremented when the Relaton data model is changed. Increment the MINOR version when:
|
|
21
|
-
- Adding, remmoving or renaming attributes of data model classes.
|
|
22
|
-
- Adding new data model classes.
|
|
23
|
-
|
|
24
|
-
3. **PATCH** version is incremented when backward-compatible bug fixes are made. Increment the PATCH version when:
|
|
25
|
-
- Fixing a bug that does not change the behavior of the API.
|
|
26
|
-
- Improving the performance of the API.
|
|
27
|
-
|
|
28
|
-
== Additional Guidelines
|
|
29
|
-
|
|
30
|
-
For convenience, we use the same major and minor vesions for all the Relaton flavor gems that uses the same version of the Relaton data model.
|
|
31
|
-
|
|
32
|
-
== Exceptions
|
|
33
|
-
|
|
34
|
-
In some cases, we may increment the `PATCH` version for backward-incompatible changes. In such cases, we will update dependent gems to use the new version or higher. For example `"~> 1.19.2"` doen't allow to use version less than `1.19.2`.
|
|
35
|
-
|
|
36
|
-
== References
|
|
37
|
-
|
|
38
|
-
- https://semver.org/[Semantic Versioning]
|
data/docs/navigation.adoc
DELETED
data/lib/relaton/db/version.rb
DELETED
data/relaton.gemspec
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
|
|
3
|
-
lib = File.expand_path("lib", __dir__)
|
|
4
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
|
-
require "relaton/version"
|
|
6
|
-
|
|
7
|
-
Gem::Specification.new do |spec|
|
|
8
|
-
spec.name = "relaton"
|
|
9
|
-
spec.version = Relaton::VERSION
|
|
10
|
-
spec.authors = ["Ribose Inc."]
|
|
11
|
-
spec.email = ["open.source@ribose.com"]
|
|
12
|
-
|
|
13
|
-
spec.summary = "Relaton: bibliographic references to technical " \
|
|
14
|
-
"standards — database, registry, cache, and all " \
|
|
15
|
-
"flavor plugins bundled in one gem."
|
|
16
|
-
spec.description = <<~DESCRIPTION
|
|
17
|
-
Relaton is the central database, registry, and cache for bibliographic
|
|
18
|
-
references to technical standards in the Relaton/XML bibliographic
|
|
19
|
-
model. It provides the Relaton::Db API, a plugin registry that lazily
|
|
20
|
-
loads flavor gems (relaton-iso, relaton-ietf, etc.) on demand, and a
|
|
21
|
-
file-based cache for fetched references.
|
|
22
|
-
|
|
23
|
-
Installing this gem also pulls in every Relaton flavor plugin so you
|
|
24
|
-
can fetch references from any supported standards body out of the
|
|
25
|
-
box. The CLI (relaton-cli) is intentionally NOT a dependency —
|
|
26
|
-
install it separately when you need command-line access.
|
|
27
|
-
DESCRIPTION
|
|
28
|
-
|
|
29
|
-
spec.homepage = "https://github.com/relaton/relaton"
|
|
30
|
-
spec.license = "BSD-2-Clause"
|
|
31
|
-
|
|
32
|
-
spec.bindir = "bin"
|
|
33
|
-
spec.require_paths = ["lib"]
|
|
34
|
-
spec.files = `git ls-files`.split("\n")
|
|
35
|
-
spec.required_ruby_version = Gem::Requirement.new(">= 3.3.0")
|
|
36
|
-
|
|
37
|
-
spec.add_dependency "relaton-bib", "~> 2.2.0.pre.alpha.1"
|
|
38
|
-
spec.add_dependency "relaton-core", "~> 2.2.0.pre.alpha.1"
|
|
39
|
-
spec.add_dependency "relaton-index", "~> 2.2.0.pre.alpha.1"
|
|
40
|
-
spec.add_dependency "relaton-logger", "~> 2.2.0.pre.alpha.1"
|
|
41
|
-
|
|
42
|
-
spec.add_dependency "relaton-3gpp", "~> 2.2.0.pre.alpha.1"
|
|
43
|
-
spec.add_dependency "relaton-bipm", "~> 2.2.0.pre.alpha.1"
|
|
44
|
-
spec.add_dependency "relaton-bsi", "~> 2.2.0.pre.alpha.1"
|
|
45
|
-
spec.add_dependency "relaton-calconnect", "~> 2.2.0.pre.alpha.1"
|
|
46
|
-
spec.add_dependency "relaton-ccsds", "~> 2.2.0.pre.alpha.1"
|
|
47
|
-
spec.add_dependency "relaton-cen", "~> 2.2.0.pre.alpha.1"
|
|
48
|
-
spec.add_dependency "relaton-cie", "~> 2.2.0.pre.alpha.1"
|
|
49
|
-
spec.add_dependency "relaton-doi", "~> 2.2.0.pre.alpha.1"
|
|
50
|
-
spec.add_dependency "relaton-ecma", "~> 2.2.0.pre.alpha.1"
|
|
51
|
-
spec.add_dependency "relaton-etsi", "~> 2.2.0.pre.alpha.1"
|
|
52
|
-
spec.add_dependency "relaton-gb", "~> 2.2.0.pre.alpha.1"
|
|
53
|
-
spec.add_dependency "relaton-iana", "~> 2.2.0.pre.alpha.1"
|
|
54
|
-
spec.add_dependency "relaton-iec", "~> 2.2.0.pre.alpha.1"
|
|
55
|
-
spec.add_dependency "relaton-ieee", "~> 2.2.0.pre.alpha.1"
|
|
56
|
-
spec.add_dependency "relaton-ietf", "~> 2.2.0.pre.alpha.1"
|
|
57
|
-
spec.add_dependency "relaton-iho", "~> 2.2.0.pre.alpha.1"
|
|
58
|
-
spec.add_dependency "relaton-isbn", "~> 2.2.0.pre.alpha.1"
|
|
59
|
-
spec.add_dependency "relaton-iso", "~> 2.2.0.pre.alpha.1"
|
|
60
|
-
spec.add_dependency "relaton-itu", "~> 2.2.0.pre.alpha.1"
|
|
61
|
-
spec.add_dependency "relaton-jis", "~> 2.2.0.pre.alpha.1"
|
|
62
|
-
spec.add_dependency "relaton-nist", "~> 2.2.0.pre.alpha.1"
|
|
63
|
-
spec.add_dependency "relaton-oasis", "~> 2.2.0.pre.alpha.1"
|
|
64
|
-
spec.add_dependency "relaton-ogc", "~> 2.2.0.pre.alpha.1"
|
|
65
|
-
spec.add_dependency "relaton-omg", "~> 2.2.0.pre.alpha.1"
|
|
66
|
-
spec.add_dependency "relaton-plateau", "~> 2.2.0.pre.alpha.1"
|
|
67
|
-
spec.add_dependency "relaton-un", "~> 2.2.0.pre.alpha.1"
|
|
68
|
-
spec.add_dependency "relaton-w3c", "~> 2.2.0.pre.alpha.1"
|
|
69
|
-
spec.add_dependency "relaton-xsf", "~> 2.2.0.pre.alpha.1"
|
|
70
|
-
|
|
71
|
-
spec.metadata["rubygems_mfa_required"] = "true"
|
|
72
|
-
end
|
data/spec/relaton/config_spec.rb
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
require "fileutils"
|
|
2
|
-
require "timeout"
|
|
3
|
-
|
|
4
|
-
RSpec.describe Relaton::Db::Cache do
|
|
5
|
-
it "creates default caches" do
|
|
6
|
-
cache_path = File.expand_path("~/.relaton/cache")
|
|
7
|
-
FileUtils.mv cache_path, "relaton1/cache", force: true
|
|
8
|
-
FileUtils.rm_rf %w(relaton)
|
|
9
|
-
Relaton::Db.init_bib_caches(
|
|
10
|
-
global_cache: true, local_cache: "", flush_caches: true,
|
|
11
|
-
)
|
|
12
|
-
expect(File.exist?(cache_path)).to be true
|
|
13
|
-
expect(File.exist?("relaton")).to be true
|
|
14
|
-
FileUtils.mv "relaton1/cache", cache_path if File.exist? "relaton1"
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
it "write same file by concurent processes" do
|
|
18
|
-
dir = "testcache/iso"
|
|
19
|
-
FileUtils.mkdir_p dir
|
|
20
|
-
file_name = File.join dir, "iso_123.xml"
|
|
21
|
-
file = File.open(file_name, File::RDWR | File::CREAT, encoding: "UTF-8") # rubocop:disable Style/FileOpen
|
|
22
|
-
file.flock File::LOCK_EX
|
|
23
|
-
command = <<~RBY
|
|
24
|
-
require "relaton/db"
|
|
25
|
-
cache = Relaton::Db::Cache.new "testcache"
|
|
26
|
-
cache["ISO(ISO 123)"] = "test 1"
|
|
27
|
-
RBY
|
|
28
|
-
pid = spawn RbConfig.ruby, "-e #{command}"
|
|
29
|
-
sleep 0.1
|
|
30
|
-
file.write "test 2"
|
|
31
|
-
file.flock File::LOCK_UN
|
|
32
|
-
file.close
|
|
33
|
-
Process.waitpid pid, 0
|
|
34
|
-
expect($?.exitstatus).to eq 0
|
|
35
|
-
expect(File.read(file_name)).to eq "test 1"
|
|
36
|
-
FileUtils.rm_rf "testcache"
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
context "delete file from cache" do
|
|
40
|
-
it "delete redirect file and its original" do
|
|
41
|
-
cache = Relaton::Db::Cache.new "testcache"
|
|
42
|
-
cache["ISO(ISO 123)"] = "test 1"
|
|
43
|
-
cache["ISO(123)"] = "redirection ISO(ISO 123)"
|
|
44
|
-
expect(File.exist?("testcache/iso/iso_123.xml")).to be true
|
|
45
|
-
expect(File.exist?("testcache/iso/123.redirect")).to be true
|
|
46
|
-
cache["ISO(123)"] = nil
|
|
47
|
-
expect(File.exist?("testcache/iso/iso_123.xml")).to be false
|
|
48
|
-
expect(File.exist?("testcache/iso/123.redirect")).to be false
|
|
49
|
-
end
|
|
50
|
-
end
|
|
51
|
-
end
|