commonmeta-ruby 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/workflows/build.yml +38 -0
- data/.github/workflows/changelog.yml +36 -0
- data/.github/workflows/codeql-analysis.yml +72 -0
- data/.github/workflows/rubocop.yml +50 -0
- data/.gitignore +59 -0
- data/.rubocop.yml +182 -0
- data/.rubocop_todo.yml +76 -0
- data/.tool-versions +1 -0
- data/CHANGELOG.md +124 -0
- data/CITATION +16 -0
- data/CITATION.cff +20 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +270 -0
- data/LICENSE.md +21 -0
- data/README.md +733 -0
- data/Rakefile +13 -0
- data/bin/commonmeta +9 -0
- data/commonmeta.gemspec +68 -0
- data/lib/commonmeta/array.rb +13 -0
- data/lib/commonmeta/author_utils.rb +172 -0
- data/lib/commonmeta/cli.rb +70 -0
- data/lib/commonmeta/crossref_utils.rb +343 -0
- data/lib/commonmeta/doi_utils.rb +81 -0
- data/lib/commonmeta/metadata.rb +269 -0
- data/lib/commonmeta/metadata_utils.rb +184 -0
- data/lib/commonmeta/pubmed.rb +36 -0
- data/lib/commonmeta/readers/bibtex_reader.rb +62 -0
- data/lib/commonmeta/readers/cff_reader.rb +146 -0
- data/lib/commonmeta/readers/codemeta_reader.rb +90 -0
- data/lib/commonmeta/readers/crossref_reader.rb +186 -0
- data/lib/commonmeta/readers/crossref_xml_reader.rb +379 -0
- data/lib/commonmeta/readers/csl_reader.rb +85 -0
- data/lib/commonmeta/readers/datacite_reader.rb +169 -0
- data/lib/commonmeta/readers/npm_reader.rb +94 -0
- data/lib/commonmeta/readers/ris_reader.rb +66 -0
- data/lib/commonmeta/readers/schema_org_reader.rb +300 -0
- data/lib/commonmeta/schema_utils.rb +19 -0
- data/lib/commonmeta/string.rb +7 -0
- data/lib/commonmeta/utils.rb +1351 -0
- data/lib/commonmeta/version.rb +5 -0
- data/lib/commonmeta/whitelist_scrubber.rb +54 -0
- data/lib/commonmeta/writers/bibtex_writer.rb +36 -0
- data/lib/commonmeta/writers/cff_writer.rb +63 -0
- data/lib/commonmeta/writers/citation_writer.rb +14 -0
- data/lib/commonmeta/writers/codemeta_writer.rb +33 -0
- data/lib/commonmeta/writers/crossref_xml_writer.rb +11 -0
- data/lib/commonmeta/writers/csl_writer.rb +11 -0
- data/lib/commonmeta/writers/csv_writer.rb +26 -0
- data/lib/commonmeta/writers/datacite_writer.rb +94 -0
- data/lib/commonmeta/writers/jats_writer.rb +138 -0
- data/lib/commonmeta/writers/rdf_xml_writer.rb +11 -0
- data/lib/commonmeta/writers/ris_writer.rb +41 -0
- data/lib/commonmeta/writers/schema_org_writer.rb +61 -0
- data/lib/commonmeta/writers/turtle_writer.rb +11 -0
- data/lib/commonmeta/xml_converter.rb +14 -0
- data/lib/commonmeta.rb +35 -0
- data/resources/2008/09/xsd.xsl +997 -0
- data/resources/cff.json +1827 -0
- data/resources/commonmeta_v0.9.json +393 -0
- data/resources/crossref/AccessIndicators.xsd +47 -0
- data/resources/crossref/JATS-journalpublishing1-3d2-mathml3-elements.xsd +10130 -0
- data/resources/crossref/JATS-journalpublishing1-3d2-mathml3.xsd +48 -0
- data/resources/crossref/JATS-journalpublishing1-elements.xsd +8705 -0
- data/resources/crossref/JATS-journalpublishing1-mathml3-elements.xsd +8608 -0
- data/resources/crossref/JATS-journalpublishing1-mathml3.xsd +49 -0
- data/resources/crossref/JATS-journalpublishing1.xsd +6176 -0
- data/resources/crossref/clinicaltrials.xsd +61 -0
- data/resources/crossref/common5.3.1.xsd +1530 -0
- data/resources/crossref/crossref5.3.1.xsd +1949 -0
- data/resources/crossref/crossref_query_output3.0.xsd +1097 -0
- data/resources/crossref/fundref.xsd +49 -0
- data/resources/crossref/module-ali.xsd +39 -0
- data/resources/crossref/relations.xsd +444 -0
- data/resources/datacite-contributorType-v4.xsd +35 -0
- data/resources/datacite-dateType-v4.xsd +25 -0
- data/resources/datacite-descriptionType-v4.xsd +19 -0
- data/resources/datacite-funderIdentifierType-v4.xsd +15 -0
- data/resources/datacite-nameType-v4.xsd +10 -0
- data/resources/datacite-relatedIdentifierType-v4.xsd +34 -0
- data/resources/datacite-relationType-v4.xsd +49 -0
- data/resources/datacite-resourceType-v4.xsd +28 -0
- data/resources/datacite-titleType-v4.xsd +14 -0
- data/resources/datacite-v3.json +508 -0
- data/resources/datacite-v4.json +512 -0
- data/resources/kernel-3.0/include/datacite-contributorType-v3.xsd +33 -0
- data/resources/kernel-3.0/include/datacite-dateType-v3.xsd +21 -0
- data/resources/kernel-3.0/include/datacite-descriptionType-v3.xsd +17 -0
- data/resources/kernel-3.0/include/datacite-relatedIdentifierType-v3.xsd +27 -0
- data/resources/kernel-3.0/include/datacite-relationType-v3.xsd +33 -0
- data/resources/kernel-3.0/include/datacite-resourceType-v3.xsd +26 -0
- data/resources/kernel-3.0/include/datacite-titleType-v3.xsd +12 -0
- data/resources/kernel-3.0/include/xml.xsd +286 -0
- data/resources/kernel-3.0/metadata.xsd +377 -0
- data/resources/kernel-4/include/datacite-contributorType-v4.xsd +35 -0
- data/resources/kernel-4/include/datacite-dateType-v4.xsd +25 -0
- data/resources/kernel-4/include/datacite-descriptionType-v4.xsd +19 -0
- data/resources/kernel-4/include/datacite-funderIdentifierType-v4.xsd +16 -0
- data/resources/kernel-4/include/datacite-nameType-v4.xsd +10 -0
- data/resources/kernel-4/include/datacite-numberType-v4.xsd +12 -0
- data/resources/kernel-4/include/datacite-relatedIdentifierType-v4.xsd +34 -0
- data/resources/kernel-4/include/datacite-relationType-v4.xsd +51 -0
- data/resources/kernel-4/include/datacite-resourceType-v4.xsd +43 -0
- data/resources/kernel-4/include/datacite-titleType-v4.xsd +14 -0
- data/resources/kernel-4/include/xml.xsd +286 -0
- data/resources/kernel-4/metadata.xsd +707 -0
- data/resources/oecd/dfg-mappings.json +1866 -0
- data/resources/oecd/for-mappings.json +1099 -0
- data/resources/oecd/fos-mappings.json +198 -0
- data/resources/schema_org/jsonldcontext.json +7477 -0
- data/resources/spdx/licenses.json +5297 -0
- data/resources/xml.xsd +286 -0
- data/rubocop.sarif +0 -0
- data/sonar-project.properties +11 -0
- data/spec/array_spec.rb +22 -0
- data/spec/author_utils_spec.rb +132 -0
- data/spec/cli_spec.rb +309 -0
- data/spec/doi_utils_spec.rb +318 -0
- data/spec/find_from_format_spec.rb +144 -0
- data/spec/fixtures/CITATION.cff +83 -0
- data/spec/fixtures/aida.json +82 -0
- data/spec/fixtures/cgimp_package.json +18 -0
- data/spec/fixtures/cit_package.json +19 -0
- data/spec/fixtures/citeproc-no-author.json +26 -0
- data/spec/fixtures/citeproc-no-categories.json +21 -0
- data/spec/fixtures/citeproc.json +30 -0
- data/spec/fixtures/codemeta.json +86 -0
- data/spec/fixtures/codemeta_v2.json +86 -0
- data/spec/fixtures/crosscite.json +63 -0
- data/spec/fixtures/crossref.bib +14 -0
- data/spec/fixtures/crossref.json +572 -0
- data/spec/fixtures/crossref.ris +15 -0
- data/spec/fixtures/crossref.xml +606 -0
- data/spec/fixtures/datacite.json +86 -0
- data/spec/fixtures/datacite_software.json +21 -0
- data/spec/fixtures/datacite_software_missing_comma.json +18 -0
- data/spec/fixtures/datacite_software_overlapping_keys.json +18 -0
- data/spec/fixtures/datacite_software_version.json +74 -0
- data/spec/fixtures/edam_package.json +12 -0
- data/spec/fixtures/maremma/codemeta.json +36 -0
- data/spec/fixtures/pure.bib +14 -0
- data/spec/fixtures/pure.ris +15 -0
- data/spec/fixtures/pure.xml +188 -0
- data/spec/fixtures/ris_bug.ris +9 -0
- data/spec/fixtures/schema_4.0.xml +140 -0
- data/spec/fixtures/schema_org.json +49 -0
- data/spec/fixtures/schema_org_front-matter.json +32 -0
- data/spec/fixtures/schema_org_geolocation.json +82 -0
- data/spec/fixtures/schema_org_geoshape.json +550 -0
- data/spec/fixtures/schema_org_gtex.json +75 -0
- data/spec/fixtures/schema_org_list.json +12623 -0
- data/spec/fixtures/schema_org_tdl_iodp_invalid_authors.json +25 -0
- data/spec/fixtures/schema_org_topmed.json +53 -0
- data/spec/fixtures/schema_org_type_as_array.json +41 -0
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_file/crossref/default.yml +110 -0
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_file/crossref/to_bibtex.yml +110 -0
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_file/crossref/to_crossref_xml.yml +110 -0
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_file/crossref/to_datacite.yml +110 -0
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_file/crossref/to_schema_org.yml +110 -0
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_file/crossref_xml/default.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_file/crossref_xml/to_bibtex.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_file/crossref_xml/to_crossref_xml.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_file/crossref_xml/to_datacite.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_file/crossref_xml/to_schema_org.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_from_id/crossref/default.yml +299 -0
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_from_id/crossref/to_bibtex.yml +299 -0
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_from_id/crossref/to_citation.yml +299 -0
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_from_id/crossref/to_crossref_xml.yml +299 -0
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_from_id/crossref/to_datacite.yml +299 -0
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_from_id/crossref/to_jats.yml +299 -0
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_from_id/crossref/to_schema_org.yml +299 -0
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_from_id/datacite/default.yml +172 -0
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_from_id/datacite/to_bibtex.yml +172 -0
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_from_id/datacite/to_citation.yml +172 -0
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_from_id/datacite/to_datacite.yml +172 -0
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_from_id/datacite/to_jats.yml +172 -0
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_from_id/datacite/to_schema_org.yml +172 -0
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_from_id/schema_org/default.yml +1098 -0
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_from_id/schema_org/to_datacite.yml +1098 -0
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_from_id/schema_org/to_schema_org.yml +1100 -0
- data/spec/fixtures/vcr_cassettes/Briard_CLI/find_from_format_by_id/crossref.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Briard_CLI/find_from_format_by_id/datacite.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Briard_CLI/find_from_format_by_id/jalc.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Briard_CLI/find_from_format_by_id/kisti.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Briard_CLI/find_from_format_by_id/medra.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Briard_CLI/find_from_format_by_id/op.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/authors_as_string/author.yml +164 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/authors_as_string/no_author.yml +164 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/authors_as_string/single_author.yml +164 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/authors_as_string/with_organization.yml +164 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/change_metadata_as_datacite_xml/with_data_citation.yml +247 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/doi_registration_agency/crossref.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/doi_registration_agency/datacite.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/doi_registration_agency/jalc.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/doi_registration_agency/kisti.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/doi_registration_agency/medra.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/doi_registration_agency/not_found.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/doi_registration_agency/op.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/find_from_format_by_ID/crossref.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/find_from_format_by_ID/crossref_doi_not_url.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/find_from_format_by_ID/datacite.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/find_from_format_by_ID/datacite_doi_http.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/find_from_format_by_ID/unknown_DOI_registration_agency.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/fos/hsh_to_fos_for_match.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/fos/hsh_to_fos_for_with_schemeUri_in_hash.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/fos/hsh_to_fos_match.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/fos/hsh_to_fos_no_match.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/fos/name_to_fos_for_match.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/fos/name_to_fos_match.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/fos/name_to_fos_no_match.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/from_schema_org/with_id.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/from_schema_org_creators/with_affiliation.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/from_schema_org_creators/without_affiliation.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_cff_metadata/cff-converter-python.yml +200 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_cff_metadata/ruby-cff.yml +154 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_cff_metadata/ruby-cff_repository_url.yml +154 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_codemeta_metadata/maremma.yml +86 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_codemeta_metadata/metadata_reports.yml +93 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/DOI_with_ORCID_ID.yml +337 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/DOI_with_SICI_DOI.yml +347 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/DOI_with_data_citation.yml +359 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/JaLC.yml +384 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/KISTI.yml +330 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/OP.yml +969 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/affiliation_is_space.yml +358 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/another_book.yml +312 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/another_book_chapter.yml +465 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/article_id_as_page_number.yml +276 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/author_literal.yml +492 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/book.yml +523 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/book_chapter.yml +377 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/book_chapter_with_RDF_for_container.yml +336 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/book_oup.yml +289 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/component.yml +289 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/dataset.yml +299 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/dataset_usda.yml +341 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/date_in_future.yml +570 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/dissertation.yml +301 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/empty_given_name.yml +303 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/invalid_date.yml +307 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/journal_article.yml +461 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/journal_article_original_language_title.yml +276 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/journal_article_with.yml +470 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/journal_article_with_RDF_for_container.yml +519 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/journal_article_with_funding.yml +456 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/journal_issue.yml +270 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/mEDRA.yml +310 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/markup.yml +329 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/missing_creator.yml +307 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/multiple_issn.yml +393 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/multiple_titles.yml +265 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/multiple_titles_with_missing.yml +860 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/not_found_error.yml +209 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/peer_review.yml +287 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/posted_content.yml +326 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/posted_content_copernicus.yml +297 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/report_osti.yml +315 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/vor_with_url.yml +451 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/yet_another_book.yml +816 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/yet_another_book_chapter.yml +324 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_raw/journal_article.yml +110 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/dissertation.yml +152 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/funding_references.yml +175 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/subject_scheme.yml +328 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_date/publication_date.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_date_from_date_parts/date.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_date_from_date_parts/year-month.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_date_from_date_parts/year.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_date_from_parts/date.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_date_from_parts/year-month.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_date_from_parts/year.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_date_parts/date.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_date_parts/year-month.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_date_parts/year.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datetime_from_time/future.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datetime_from_time/invalid.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datetime_from_time/nil.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datetime_from_time/past.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datetime_from_time/present.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_one_author/has_familyName.yml +133 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_one_author/has_name_in_display-order_with_ORCID.yml +153 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_one_author/is_organization.yml +164 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_one_author/name_with_affiliation_crossref.yml +247 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_one_author/only_familyName_and_givenName.yml +468 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_schema_org_metadata/BlogPosting.yml +530 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_schema_org_metadata/BlogPosting_with_new_DOI.yml +530 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_schema_org_metadata/get_schema_org_metadata_front_matter/BlogPosting.yml +534 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_schema_org_metadata/harvard_dataverse.yml +1838 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_schema_org_metadata/pangaea.yml +468 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_schema_org_metadata/upstream_blog.yml +885 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_schema_org_metadata/zenodo.yml +583 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_series_information/only_title.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_series_information/title_and_pages.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_series_information/title_volume_and_pages.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_series_information/title_volume_issue_and_pages.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/github/github_as_cff_url.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/github/github_as_codemeta_url.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/github/github_from_url.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/github/github_from_url_cff_file.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/github/github_from_url_file.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/handle_input/DOI_RA_not_Crossref_or_DataCite.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/handle_input/unknown_DOI_prefix.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/is_personal_name_/has_comma.yml +164 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/is_personal_name_/has_family_name.yml +164 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/is_personal_name_/has_id.yml +164 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/is_personal_name_/has_known_given_name.yml +164 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/is_personal_name_/has_no_info.yml +164 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/is_personal_name_/has_orcid_id.yml +164 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/is_personal_name_/has_type_organization.yml +164 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/json_schema_errors/is_valid.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_cc_url/not_found.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_cc_url/with_trailing_slash.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_cc_url/with_trailing_slash_and_to_https.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_id/doi.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_id/doi_as_url.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_id/filename.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_id/ftp.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_id/invalid_url.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_id/sandbox_via_options.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_id/sandbox_via_url.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_id/string.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_id/url.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_id/url_with_utf-8.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_ids/doi.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_ids/url.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_issn/from_array.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_issn/from_empty_array.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_issn/from_hash.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_issn/from_string.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_url/uri.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_url/with_trailing_slash.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_url/with_trailing_slash_and_to_https.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/parse_attributes/array.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/parse_attributes/array_of_strings.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/parse_attributes/first.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/parse_attributes/hash.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/parse_attributes/hash_with_array_value.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/parse_attributes/nil.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/parse_attributes/string.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/random_doi/decode_anothe_doi.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/random_doi/decode_doi.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/random_doi/encode_doi.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/sanitize/onlies_keep_specific_tags.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/sanitize/removes_a_tags.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/spdx/hsh_to_spdx_id.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/spdx/hsh_to_spdx_not_found.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/spdx/hsh_to_spdx_url.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/spdx/name_to_spdx_exists.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/spdx/name_to_spdx_id.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/to_schema_org/with_id.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/to_schema_org_identifiers/with_identifiers.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_orcid/validate_orcid.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_orcid/validate_orcid_https.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_orcid/validate_orcid_id.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_orcid/validate_orcid_sandbox.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_orcid/validate_orcid_sandbox_https.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_orcid/validate_orcid_with_spaces.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_orcid/validate_orcid_wrong_id.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_orcid/validate_orcid_www.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_orcid_scheme/validate_orcid_scheme.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_orcid_scheme/validate_orcid_scheme_https.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_orcid_scheme/validate_orcid_scheme_trailing_slash.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_orcid_scheme/validate_orcid_scheme_www.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_url/DOI.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_url/ISSN.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_url/URL.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_url/string.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_bibtex/BlogPosting.yml +81 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_bibtex/Dataset.yml +120 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_bibtex/authors_with_affiliations.yml +186 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_bibtex/climate_data.yml +74 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_bibtex/from_schema_org.yml +530 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_bibtex/keywords_subject_scheme.yml +149 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_bibtex/maremma.yml +86 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_bibtex/text.yml +100 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_bibtex/with_data_citation.yml +247 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_bibtex/with_pages.yml +228 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_cff/Collection_of_Jupyter_notebooks.yml +143 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_cff/SoftwareSourceCode_Zenodo.yml +150 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_cff/SoftwareSourceCode_also_Zenodo.yml +93 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_cff/ruby-cff.yml +154 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_citation/Dataset.yml +120 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_citation/Journal_article.yml +247 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_citation/Journal_article_vancouver_style.yml +299 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_citation/Missing_author.yml +199 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_citation/interactive_resource_without_dates.yml +75 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_citation/software_w/version.yml +86 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_codemeta/SoftwareSourceCode_DataCite.yml +76 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_codemeta/SoftwareSourceCode_DataCite_check_codemeta_v2.yml +76 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_crossref/another_schema_org_from_front-matter.yml +541 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_crossref/journal_article.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_crossref/journal_article_from_datacite.yml +85 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_crossref/posted_content.yml +283 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_crossref/schema_org_from_another_science_blog.yml +123 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_crossref/schema_org_from_front_matter.yml +477 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_crossref/schema_org_from_upstream_blog.yml +1025 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_csl/Another_dataset.yml +110 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_csl/BlogPosting.yml +81 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_csl/BlogPosting_schema_org.yml +530 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_csl/Dataset.yml +120 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_csl/container_title.yml +153 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_csl/interactive_resource_without_dates.yml +75 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_csl/journal_article.yml +247 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_csl/keywords_subject_scheme.yml +149 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_csl/maremma.yml +86 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_csl/missing_creator.yml +199 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_csl/multiple_abstracts.yml +101 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_csl/organization_author.yml +314 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_csl/software.yml +90 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_csl/software_w/version.yml +86 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_csl/with_only_first_page.yml +333 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_csl/with_pages.yml +228 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_csv/climate_data.yml +74 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_csv/maremma.yml +86 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_csv/text.yml +100 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_csv/with_data_citation.yml +247 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_csv/with_pages.yml +228 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_datacite/from_schema_org.yml +530 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_datacite/maremma.yml +86 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_datacite/with_ORCID_ID.yml +228 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_datacite/with_data_citation.yml +247 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_datacite_json/from_schema_org.yml +530 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_datacite_json/maremma.yml +86 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_datacite_json/with_ORCID_ID.yml +228 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_datacite_json/with_data_citation.yml +247 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_jats_xml/Dataset_in_schema_4_0.yml +120 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_jats_xml/Text_pass-thru.yml +106 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_jats_xml/book_chapter.yml +163 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_jats_xml/from_schema_org.yml +530 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_jats_xml/interactive_resource_without_dates.yml +75 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_jats_xml/maremma.yml +86 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_jats_xml/with_ORCID_ID.yml +228 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_jats_xml/with_data_citation.yml +247 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_jats_xml/with_editor.yml +355 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_rdf_xml/BlogPosting.yml +81 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_rdf_xml/BlogPosting_schema_org.yml +530 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_rdf_xml/journal_article.yml +247 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_rdf_xml/maremma.yml +86 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_rdf_xml/with_pages.yml +228 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_ris/BlogPosting.yml +81 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_ris/BlogPosting_schema_org.yml +530 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_ris/Dataset.yml +120 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_ris/alternate_name.yml +138 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_ris/journal_article.yml +115 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_ris/keywords_with_subject_scheme.yml +149 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_ris/maremma.yml +86 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_ris/with_pages.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_schema_org/Another_Schema_org_JSON.yml +120 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_schema_org/Funding.yml +192 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_schema_org/Funding_OpenAIRE.yml +150 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_schema_org/Schema_org_JSON.yml +98 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_schema_org/Schema_org_JSON_Cyark.yml +160 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_schema_org/Schema_org_JSON_IsSupplementTo.yml +153 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_schema_org/alternate_identifiers.yml +131 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_schema_org/data_catalog.yml +136 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_schema_org/geo_location_box.yml +181 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_schema_org/interactive_resource_without_dates.yml +127 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_schema_org/journal_article.yml +247 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_schema_org/maremma_schema_org_JSON.yml +86 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_schema_org/series_information.yml +174 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_schema_org/subject_scheme.yml +199 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_schema_org/subject_scheme_multiple_keywords.yml +201 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_turtle/BlogPosting.yml +81 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_turtle/BlogPosting_schema_org.yml +530 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_turtle/Dataset.yml +120 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_turtle/journal_article.yml +247 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_turtle/with_pages.yml +228 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_file/crossref/default.yml +110 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_file/crossref/to_bibtex.yml +110 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_file/crossref/to_crossref_xml.yml +110 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_file/crossref/to_datacite.yml +110 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_file/crossref/to_schema_org.yml +110 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_file/crossref_xml/default.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_file/crossref_xml/to_bibtex.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_file/crossref_xml/to_crossref_xml.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_file/crossref_xml/to_datacite.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_file/crossref_xml/to_schema_org.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/crossref/default.yml +299 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/crossref/to_bibtex.yml +299 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/crossref/to_citation.yml +299 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/crossref/to_crossref_xml.yml +299 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/crossref/to_datacite.yml +299 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/crossref/to_jats.yml +299 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/crossref/to_schema_org.yml +299 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/datacite/default.yml +172 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/datacite/to_bibtex.yml +172 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/datacite/to_citation.yml +172 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/datacite/to_datacite.yml +172 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/datacite/to_jats.yml +172 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/datacite/to_schema_org.yml +172 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/schema_org/default.yml +1096 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/schema_org/to_datacite.yml +1096 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/schema_org/to_schema_org.yml +1098 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/find_from_format_by_id/crossref.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/find_from_format_by_id/datacite.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/find_from_format_by_id/jalc.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/find_from_format_by_id/kisti.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/find_from_format_by_id/medra.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/find_from_format_by_id/op.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/change_metadata_as_datacite_xml/with_data_citation.yml +247 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/doi_registration_agency/crossref.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/doi_registration_agency/datacite.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/doi_registration_agency/jalc.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/doi_registration_agency/kisti.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/doi_registration_agency/medra.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/doi_registration_agency/not_found.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/doi_registration_agency/op.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/find_from_format_by_ID/crossref.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/find_from_format_by_ID/crossref_doi_not_url.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/find_from_format_by_ID/datacite.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/find_from_format_by_ID/datacite_doi_http.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/find_from_format_by_ID/unknown_DOI_registration_agency.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/fos/hsh_to_fos_for_match.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/fos/hsh_to_fos_for_with_schemeUri_in_hash.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/fos/hsh_to_fos_match.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/fos/hsh_to_fos_no_match.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/fos/name_to_fos_for_match.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/fos/name_to_fos_match.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/fos/name_to_fos_no_match.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/from_schema_org/with_id.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_cff_metadata/cff-converter-python.yml +200 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_cff_metadata/ruby-cff.yml +154 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_cff_metadata/ruby-cff_repository_url.yml +154 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_codemeta_metadata/maremma.yml +86 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_codemeta_metadata/metadata_reports.yml +93 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/DOI_with_ORCID_ID.yml +337 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/DOI_with_SICI_DOI.yml +347 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/DOI_with_data_citation.yml +170 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/JaLC.yml +384 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/KISTI.yml +330 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/OP.yml +969 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/affiliation_is_space.yml +358 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/another_book.yml +312 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/another_book_chapter.yml +465 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/article_id_as_page_number.yml +276 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/author_literal.yml +492 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/book.yml +523 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/book_chapter.yml +377 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/book_chapter_with_RDF_for_container.yml +336 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/book_oup.yml +289 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/component.yml +289 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/dataset.yml +300 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/dataset_usda.yml +341 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/date_in_future.yml +570 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/dissertation.yml +301 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/empty_given_name.yml +303 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/invalid_date.yml +307 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/journal_article.yml +461 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/journal_article_original_language_title.yml +276 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/journal_article_with.yml +908 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/journal_article_with_RDF_for_container.yml +519 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/journal_article_with_funding.yml +456 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/journal_issue.yml +270 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/mEDRA.yml +310 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/markup.yml +329 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/missing_creator.yml +307 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/multiple_issn.yml +393 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/multiple_titles.yml +265 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/multiple_titles_with_missing.yml +860 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/not_found_error.yml +209 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/peer_review.yml +287 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/posted_content.yml +326 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/posted_content_copernicus.yml +297 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/report_osti.yml +315 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/vor_with_url.yml +451 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/yet_another_book.yml +816 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/yet_another_book_chapter.yml +324 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_raw/journal_article.yml +110 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_datacite_metadata/dissertation.yml +152 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_datacite_metadata/funding_references.yml +175 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_datacite_metadata/subject_scheme.yml +328 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_date/publication_date.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_date_from_date_parts/date.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_date_from_date_parts/year-month.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_date_from_date_parts/year.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_date_from_parts/date.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_date_from_parts/year-month.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_date_from_parts/year.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_date_parts/date.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_date_parts/year-month.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_date_parts/year.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_datetime_from_time/future.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_datetime_from_time/invalid.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_datetime_from_time/nil.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_datetime_from_time/past.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_datetime_from_time/present.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_one_author/has_familyName.yml +133 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_one_author/has_name_in_display-order_with_ORCID.yml +153 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_one_author/name_with_affiliation_crossref.yml +247 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_one_author/only_familyName_and_givenName.yml +467 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_schema_org_metadata/BlogPosting.yml +530 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_schema_org_metadata/BlogPosting_with_new_DOI.yml +530 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_schema_org_metadata/get_schema_org_metadata_front_matter/BlogPosting.yml +534 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_schema_org_metadata/harvard_dataverse.yml +1838 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_schema_org_metadata/pangaea.yml +467 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_schema_org_metadata/upstream_blog.yml +885 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_schema_org_metadata/zenodo.yml +583 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_series_information/only_title.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_series_information/title_and_pages.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_series_information/title_volume_and_pages.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_series_information/title_volume_issue_and_pages.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/github/github_as_cff_url.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/github/github_as_codemeta_url.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/github/github_from_url.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/github/github_from_url_cff_file.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/github/github_from_url_file.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/handle_input/DOI_RA_not_Crossref_or_DataCite.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/handle_input/unknown_DOI_prefix.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/json_schema_errors/is_valid.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/normalize_cc_url/not_found.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/normalize_cc_url/with_trailing_slash.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/normalize_cc_url/with_trailing_slash_and_to_https.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/normalize_id/doi.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/normalize_id/doi_as_url.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/normalize_id/filename.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/normalize_id/ftp.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/normalize_id/invalid_url.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/normalize_id/sandbox_via_options.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/normalize_id/sandbox_via_url.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/normalize_id/string.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/normalize_id/url.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/normalize_id/url_with_utf-8.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/normalize_issn/from_array.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/normalize_issn/from_empty_array.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/normalize_issn/from_hash.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/normalize_issn/from_string.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/normalize_url/uri.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/normalize_url/with_trailing_slash.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/normalize_url/with_trailing_slash_and_to_https.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/parse_attributes/array.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/parse_attributes/array_of_strings.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/parse_attributes/first.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/parse_attributes/hash.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/parse_attributes/hash_with_array_value.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/parse_attributes/nil.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/parse_attributes/string.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/random_doi/decode_anothe_doi.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/random_doi/decode_doi.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/random_doi/encode_doi.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/sanitize/onlies_keep_specific_tags.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/sanitize/removes_a_tags.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/spdx/hsh_to_spdx_id.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/spdx/hsh_to_spdx_not_found.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/spdx/hsh_to_spdx_url.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/spdx/name_to_spdx_exists.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/spdx/name_to_spdx_id.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/to_schema_org/with_id.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/to_schema_org_identifiers/with_identifiers.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/validate_orcid/validate_orcid.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/validate_orcid/validate_orcid_https.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/validate_orcid/validate_orcid_id.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/validate_orcid/validate_orcid_sandbox.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/validate_orcid/validate_orcid_sandbox_https.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/validate_orcid/validate_orcid_with_spaces.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/validate_orcid/validate_orcid_wrong_id.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/validate_orcid/validate_orcid_www.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/validate_orcid_scheme/validate_orcid_scheme.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/validate_orcid_scheme/validate_orcid_scheme_https.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/validate_orcid_scheme/validate_orcid_scheme_trailing_slash.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/validate_orcid_scheme/validate_orcid_scheme_www.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/validate_url/DOI.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/validate_url/ISSN.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/validate_url/URL.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/validate_url/string.yml +221 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_bibtex/BlogPosting.yml +81 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_bibtex/Dataset.yml +120 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_bibtex/authors_with_affiliations.yml +186 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_bibtex/climate_data.yml +74 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_bibtex/from_schema_org.yml +530 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_bibtex/keywords_subject_scheme.yml +149 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_bibtex/maremma.yml +86 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_bibtex/text.yml +100 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_bibtex/with_data_citation.yml +247 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_bibtex/with_pages.yml +228 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_cff/Collection_of_Jupyter_notebooks.yml +143 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_cff/SoftwareSourceCode_Zenodo.yml +150 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_cff/SoftwareSourceCode_also_Zenodo.yml +93 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_cff/ruby-cff.yml +154 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_citation/Dataset.yml +120 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_citation/Journal_article.yml +247 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_citation/Journal_article_vancouver_style.yml +299 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_citation/Missing_author.yml +199 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_citation/interactive_resource_without_dates.yml +75 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_citation/software_w/version.yml +86 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_codemeta/SoftwareSourceCode_DataCite.yml +76 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_codemeta/SoftwareSourceCode_DataCite_check_codemeta_v2.yml +76 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/another_schema_org_from_front-matter.yml +541 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/journal_article.yml +55 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/journal_article_from_datacite.yml +85 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/posted_content.yml +283 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/schema_org_from_another_science_blog.yml +123 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/schema_org_from_front_matter.yml +477 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/schema_org_from_upstream_blog.yml +1025 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csl/Another_dataset.yml +110 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csl/BlogPosting.yml +81 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csl/BlogPosting_schema_org.yml +530 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csl/Dataset.yml +120 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csl/container_title.yml +153 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csl/interactive_resource_without_dates.yml +75 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csl/journal_article.yml +247 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csl/keywords_subject_scheme.yml +149 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csl/maremma.yml +86 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csl/missing_creator.yml +199 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csl/multiple_abstracts.yml +101 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csl/organization_author.yml +314 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csl/software.yml +90 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csl/software_w/version.yml +86 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csl/with_only_first_page.yml +333 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csl/with_pages.yml +228 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csv/climate_data.yml +74 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csv/maremma.yml +86 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csv/text.yml +100 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csv/with_data_citation.yml +247 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csv/with_pages.yml +228 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_datacite/dissertation.yml +218 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_datacite/from_schema_org.yml +530 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_datacite/journal_article.yml +407 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_datacite/maremma.yml +86 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_datacite/with_ORCID_ID.yml +228 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_datacite/with_data_citation.yml +247 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_jats_xml/Dataset_in_schema_4_0.yml +120 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_jats_xml/Text_pass-thru.yml +106 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_jats_xml/book_chapter.yml +163 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_jats_xml/from_schema_org.yml +530 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_jats_xml/interactive_resource_without_dates.yml +75 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_jats_xml/maremma.yml +86 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_jats_xml/with_ORCID_ID.yml +228 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_jats_xml/with_data_citation.yml +247 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_jats_xml/with_editor.yml +355 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_rdf_xml/BlogPosting.yml +81 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_rdf_xml/BlogPosting_schema_org.yml +530 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_rdf_xml/journal_article.yml +247 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_rdf_xml/maremma.yml +86 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_rdf_xml/with_pages.yml +228 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_ris/BlogPosting.yml +81 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_ris/BlogPosting_schema_org.yml +530 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_ris/Dataset.yml +120 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_ris/alternate_name.yml +138 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_ris/journal_article.yml +115 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_ris/keywords_with_subject_scheme.yml +149 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_ris/maremma.yml +86 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_ris/with_pages.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_schema_org/Another_Schema_org_JSON.yml +120 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_schema_org/Funding.yml +192 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_schema_org/Funding_OpenAIRE.yml +150 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_schema_org/Schema_org_JSON.yml +98 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_schema_org/Schema_org_JSON_Cyark.yml +160 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_schema_org/Schema_org_JSON_IsSupplementTo.yml +153 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_schema_org/alternate_identifiers.yml +131 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_schema_org/data_catalog.yml +136 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_schema_org/geo_location_box.yml +181 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_schema_org/interactive_resource_without_dates.yml +127 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_schema_org/journal_article.yml +247 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_schema_org/maremma_schema_org_JSON.yml +86 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_schema_org/series_information.yml +174 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_schema_org/subject_scheme.yml +199 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_schema_org/subject_scheme_multiple_keywords.yml +201 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_turtle/BlogPosting.yml +81 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_turtle/BlogPosting_schema_org.yml +530 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_turtle/Dataset.yml +120 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_turtle/journal_article.yml +247 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_turtle/with_pages.yml +228 -0
- data/spec/fixtures/vivli.xml +17 -0
- data/spec/metadata_spec.rb +147 -0
- data/spec/readers/bibtex_reader_spec.rb +58 -0
- data/spec/readers/cff_reader_spec.rb +148 -0
- data/spec/readers/codemeta_reader_spec.rb +116 -0
- data/spec/readers/crossref_reader_spec.rb +919 -0
- data/spec/readers/crossref_xml_reader_spec.rb +948 -0
- data/spec/readers/csl_reader_spec.rb +61 -0
- data/spec/readers/datacite_reader_spec.rb +156 -0
- data/spec/readers/npm_reader_spec.rb +69 -0
- data/spec/readers/ris_reader_spec.rb +70 -0
- data/spec/readers/schema_org_reader_spec.rb +416 -0
- data/spec/schema_utils_spec.rb +16 -0
- data/spec/spec_helper.rb +96 -0
- data/spec/utils_spec.rb +631 -0
- data/spec/writers/bibtex_writer_spec.rb +160 -0
- data/spec/writers/cff_writer_spec.rb +118 -0
- data/spec/writers/citation_writer_spec.rb +51 -0
- data/spec/writers/codemeta_writer_spec.rb +47 -0
- data/spec/writers/crossref_xml_writer_spec.rb +173 -0
- data/spec/writers/csl_writer_spec.rb +291 -0
- data/spec/writers/csv_writer_spec.rb +82 -0
- data/spec/writers/datacite_writer_spec.rb +150 -0
- data/spec/writers/jats_writer_spec.rb +210 -0
- data/spec/writers/rdf_xml_writer_spec.rb +91 -0
- data/spec/writers/ris_writer_spec.rb +206 -0
- data/spec/writers/schema_org_writer_spec.rb +301 -0
- data/spec/writers/turtle_writer_spec.rb +85 -0
- metadata +1514 -0
@@ -0,0 +1,210 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe Commonmeta::Metadata, vcr: true do
|
6
|
+
context 'write metadata as jats xml' do
|
7
|
+
it 'with data citation' do
|
8
|
+
input = '10.7554/eLife.01567'
|
9
|
+
subject = described_class.new(input: input, from: 'crossref')
|
10
|
+
jats = Hash.from_xml(subject.jats).fetch('element_citation', {})
|
11
|
+
expect(jats['publication_type']).to eq('journal')
|
12
|
+
expect(jats['article_title']).to eq('Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth')
|
13
|
+
expect(jats['source']).to eq('eLife')
|
14
|
+
expect(jats.dig('person_group', 'name').length).to eq(5)
|
15
|
+
expect(jats.dig('person_group',
|
16
|
+
'name').first).to eq('surname' => 'Sankar', 'given_names' => 'Martial')
|
17
|
+
expect(jats['year']).to eq('iso_8601_date' => '2014-02-11', '__content__' => '2014')
|
18
|
+
expect(jats['month']).to eq('02')
|
19
|
+
expect(jats['day']).to eq('11')
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'with ORCID ID' do
|
23
|
+
input = 'https://doi.org/10.1155/2012/291294'
|
24
|
+
subject = described_class.new(input: input, from: 'crossref')
|
25
|
+
jats = Hash.from_xml(subject.jats).fetch('element_citation', {})
|
26
|
+
expect(jats['publication_type']).to eq('journal')
|
27
|
+
expect(jats['article_title']).to eq('Delineating a Retesting Zone Using Receiver Operating Characteristic Analysis on Serial QuantiFERON Tuberculosis Test Results in US Healthcare Workers')
|
28
|
+
expect(jats['source']).to eq('Pulmonary Medicine')
|
29
|
+
expect(jats.dig('person_group', 'name').length).to eq(7)
|
30
|
+
expect(jats.dig('person_group',
|
31
|
+
'name').first).to eq('surname' => 'Thanassi', 'given_names' => 'Wendy')
|
32
|
+
expect(jats['year']).to eq('iso_8601_date' => '2012', '__content__' => '2012')
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'with editor' do
|
36
|
+
input = 'https://doi.org/10.1371/journal.pone.0000030'
|
37
|
+
subject = described_class.new(input: input, from: 'crossref')
|
38
|
+
jats = Hash.from_xml(subject.jats).fetch('element_citation', {})
|
39
|
+
expect(jats['publication_type']).to eq('journal')
|
40
|
+
expect(jats['article_title']).to eq('Triose Phosphate Isomerase Deficiency Is Caused by Altered Dimerization–Not Catalytic Inactivity–of the Mutant Enzymes')
|
41
|
+
expect(jats['source']).to eq('PLoS ONE')
|
42
|
+
expect(jats.dig('person_group', 0, 'name').length).to eq(5)
|
43
|
+
expect(jats.dig('person_group', 0,
|
44
|
+
'name').first).to eq('surname' => 'Ralser', 'given_names' => 'Markus')
|
45
|
+
expect(jats.dig('person_group', 1,
|
46
|
+
'name')).to eq('surname' => 'Janbon', 'given_names' => 'Guilhem')
|
47
|
+
expect(jats['year']).to eq('iso_8601_date' => '2006-12-20', '__content__' => '2006')
|
48
|
+
expect(jats['month']).to eq('12')
|
49
|
+
expect(jats['day']).to eq('20')
|
50
|
+
expect(jats['fpage']).to eq('e30')
|
51
|
+
expect(jats['pub_id']).to eq('pub_id_type' => 'doi',
|
52
|
+
'__content__' => '10.1371/journal.pone.0000030')
|
53
|
+
end
|
54
|
+
|
55
|
+
it 'book chapter' do
|
56
|
+
input = 'https://doi.org/10.5005/jp/books/12414_3'
|
57
|
+
subject = described_class.new(input: input, from: 'crossref')
|
58
|
+
jats = Hash.from_xml(subject.jats).fetch('element_citation', {})
|
59
|
+
expect(jats['publication_type']).to eq('chapter')
|
60
|
+
expect(jats['chapter_title']).to eq('Physical Examinations')
|
61
|
+
expect(jats['source']).to eq('Jaypee Brothers Medical Publishing')
|
62
|
+
expect(jats.dig('person_group', 'name')).to eq('surname' => 'Saha', 'given_names' => 'Ashis')
|
63
|
+
expect(jats['year']).to eq('iso_8601_date' => '2015', '__content__' => '2015')
|
64
|
+
expect(jats['fpage']).to eq('27')
|
65
|
+
expect(jats['lpage']).to eq('27')
|
66
|
+
expect(jats['pub_id']).to eq('pub_id_type' => 'doi',
|
67
|
+
'__content__' => '10.5005/jp/books/12414_3')
|
68
|
+
end
|
69
|
+
|
70
|
+
it 'Crossref DOI' do
|
71
|
+
input = "#{fixture_path}crossref.bib"
|
72
|
+
subject = described_class.new(input: input, from: 'bibtex')
|
73
|
+
jats = Hash.from_xml(subject.jats).fetch('element_citation', {})
|
74
|
+
expect(jats['publication_type']).to eq('journal')
|
75
|
+
expect(jats['article_title']).to eq('Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth')
|
76
|
+
expect(jats['source']).to eq('eLife')
|
77
|
+
expect(jats.dig('person_group', 'name').length).to eq(5)
|
78
|
+
expect(jats.dig('person_group',
|
79
|
+
'name').first).to eq('surname' => 'Sankar', 'given_names' => 'Martial')
|
80
|
+
expect(jats['year']).to eq('iso_8601_date' => '2014', '__content__' => '2014')
|
81
|
+
expect(jats['month'].nil?).to be(true)
|
82
|
+
expect(jats['pub_id']).to eq('pub_id_type' => 'doi', '__content__' => '10.7554/elife.01567')
|
83
|
+
end
|
84
|
+
|
85
|
+
it 'BlogPosting Citeproc JSON' do
|
86
|
+
input = "#{fixture_path}citeproc.json"
|
87
|
+
subject = described_class.new(input: input, from: 'csl')
|
88
|
+
jats = Hash.from_xml(subject.jats).fetch('element_citation', {})
|
89
|
+
expect(jats['publication_type']).to eq('journal')
|
90
|
+
expect(jats['source']).to eq('DataCite Blog')
|
91
|
+
expect(jats['publisher_name']).to eq('DataCite')
|
92
|
+
expect(jats.dig('person_group',
|
93
|
+
'name')).to eq('surname' => 'Fenner', 'given_names' => 'Martin')
|
94
|
+
expect(jats['year']).to eq('iso_8601_date' => '2016-12-20', '__content__' => '2016')
|
95
|
+
expect(jats['month']).to eq('12')
|
96
|
+
expect(jats['day']).to eq('20')
|
97
|
+
expect(jats['pub_id']).to eq('pub_id_type' => 'doi', '__content__' => '10.5438/4k3m-nyvg')
|
98
|
+
end
|
99
|
+
|
100
|
+
it 'rdataone' do
|
101
|
+
input = "#{fixture_path}codemeta.json"
|
102
|
+
subject = described_class.new(input: input, from: 'codemeta')
|
103
|
+
jats = Hash.from_xml(subject.jats).fetch('element_citation', {})
|
104
|
+
expect(jats['publication_type']).to eq('software')
|
105
|
+
expect(jats['source']).to eq('R Interface to the DataONE REST API')
|
106
|
+
expect(jats['publisher_name']).to eq('https://cran.r-project.org')
|
107
|
+
expect(jats.dig('person_group', 'name').length).to eq(3)
|
108
|
+
expect(jats.dig('person_group',
|
109
|
+
'name').first).to eq('surname' => 'Jones', 'given_names' => 'Matt')
|
110
|
+
expect(jats['year']).to eq('iso_8601_date' => '2016-05-27', '__content__' => '2016')
|
111
|
+
expect(jats['month']).to eq('05')
|
112
|
+
expect(jats['day']).to eq('27')
|
113
|
+
expect(jats['version']).to eq('2.0.0')
|
114
|
+
expect(jats['pub_id']).to eq('pub_id_type' => 'doi', '__content__' => '10.5063/f1m61h5x')
|
115
|
+
end
|
116
|
+
|
117
|
+
it 'maremma' do
|
118
|
+
input = 'https://github.com/datacite/maremma'
|
119
|
+
subject = described_class.new(input: input, from: 'codemeta')
|
120
|
+
jats = Hash.from_xml(subject.jats).fetch('element_citation', {})
|
121
|
+
expect(jats['publication_type']).to eq('software')
|
122
|
+
expect(jats['source']).to eq('Maremma: a Ruby library for simplified network calls')
|
123
|
+
expect(jats['publisher_name']).to eq('DataCite')
|
124
|
+
expect(jats.dig('person_group',
|
125
|
+
'name')).to eq('surname' => 'Fenner', 'given_names' => 'Martin')
|
126
|
+
expect(jats['year']).to eq('iso_8601_date' => '2017-02-24', '__content__' => '2017')
|
127
|
+
expect(jats['month']).to eq('02')
|
128
|
+
expect(jats['day']).to eq('24')
|
129
|
+
expect(jats['pub_id']).to eq('pub_id_type' => 'doi', '__content__' => '10.5438/qeg0-3gm3')
|
130
|
+
end
|
131
|
+
|
132
|
+
it 'Text pass-thru' do
|
133
|
+
input = 'https://doi.org/10.23640/07243.5153971'
|
134
|
+
subject = described_class.new(input: input, from: 'datacite')
|
135
|
+
jats = Hash.from_xml(subject.jats).fetch('element_citation', {})
|
136
|
+
expect(jats['publication_type']).to eq('journal')
|
137
|
+
expect(jats['article_title']).to eq('Recommendation of: ORCID Works Metadata Working Group')
|
138
|
+
expect(jats['source']).to eq('Figshare')
|
139
|
+
expect(jats.dig('person_group', 'name').length).to eq(20)
|
140
|
+
expect(jats.dig('person_group',
|
141
|
+
'name').first).to eq('surname' => 'Paglione', 'given_names' => 'Laura')
|
142
|
+
expect(jats['year']).to eq('iso_8601_date' => '2017', '__content__' => '2017')
|
143
|
+
expect(jats['pub_id']).to eq('pub_id_type' => 'doi',
|
144
|
+
'__content__' => '10.23640/07243.5153971')
|
145
|
+
end
|
146
|
+
|
147
|
+
it 'Dataset in schema 4.0' do
|
148
|
+
input = 'https://doi.org/10.5061/DRYAD.8515'
|
149
|
+
subject = described_class.new(input: input, from: 'datacite', regenerate: true)
|
150
|
+
jats = Hash.from_xml(subject.jats).fetch('element_citation', {})
|
151
|
+
expect(jats['publication_type']).to eq('data')
|
152
|
+
expect(jats['data_title']).to eq('Data from: A new malaria agent in African hominids.')
|
153
|
+
expect(jats['source']).to eq('Dryad')
|
154
|
+
expect(jats.dig('person_group', 'name').length).to eq(8)
|
155
|
+
expect(jats.dig('person_group',
|
156
|
+
'name').first).to eq('surname' => 'Ollomo', 'given_names' => 'Benjamin')
|
157
|
+
expect(jats['year']).to eq('iso_8601_date' => '2011', '__content__' => '2011')
|
158
|
+
expect(jats['pub_id']).to eq('pub_id_type' => 'doi', '__content__' => '10.5061/dryad.8515')
|
159
|
+
end
|
160
|
+
|
161
|
+
it 'from schema_org' do
|
162
|
+
input = 'https://blog.front-matter.io/posts/eating-your-own-dog-food/'
|
163
|
+
subject = described_class.new(input: input, from: 'schema_org')
|
164
|
+
jats = Hash.from_xml(subject.jats).fetch('element_citation', {})
|
165
|
+
expect(jats['publication_type']).to eq('journal')
|
166
|
+
expect(jats['article_title']).to eq('Eating your own Dog Food')
|
167
|
+
expect(jats['source']).to eq('Front Matter')
|
168
|
+
expect(jats['publisher_name']).to eq('Front Matter')
|
169
|
+
expect(jats.dig('person_group',
|
170
|
+
'name')).to eq('surname' => 'Fenner', 'given_names' => 'Martin')
|
171
|
+
expect(jats['year']).to eq('iso_8601_date' => '2016-12-20T00:00:00Z', '__content__' => '2016')
|
172
|
+
expect(jats['month']).to eq('12')
|
173
|
+
expect(jats['day']).to eq('20')
|
174
|
+
expect(jats['pub_id']).to eq('pub_id_type' => 'doi',
|
175
|
+
'__content__' => '10.53731/r79vxn1-97aq74v-ag58n')
|
176
|
+
end
|
177
|
+
|
178
|
+
it 'interactive resource without dates' do
|
179
|
+
input = 'https://doi.org/10.34747/g6yb-3412'
|
180
|
+
subject = described_class.new(input: input, from: 'datacite')
|
181
|
+
jats = Hash.from_xml(subject.jats).fetch('element_citation', {})
|
182
|
+
expect(jats['publication_type']).to be_blank
|
183
|
+
expect(jats['source']).to eq('Exploring the "Many analysts, one dataset" project from COS')
|
184
|
+
expect(jats['publisher_name']).to eq('Gigantum, Inc.')
|
185
|
+
expect(jats.dig('person_group', 'name')).to eq('given_names' => 'Dav', 'surname' => 'Clark')
|
186
|
+
expect(jats['year']).to eq('__content__' => '2019', 'iso_8601_date' => '2019')
|
187
|
+
expect(jats['month'].nil?).to be(true)
|
188
|
+
expect(jats['day'].nil?).to be(true)
|
189
|
+
expect(jats['pub_id']).to eq('pub_id_type' => 'doi', '__content__' => '10.34747/g6yb-3412')
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
context 'change metadata as datacite xml' do
|
194
|
+
it 'with data citation' do
|
195
|
+
input = '10.7554/eLife.01567'
|
196
|
+
subject = described_class.new(input: input, from: 'crossref')
|
197
|
+
jats = Hash.from_xml(subject.jats).fetch('element_citation', {})
|
198
|
+
expect(jats['publication_type']).to eq('journal')
|
199
|
+
expect(jats['article_title']).to eq('Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth')
|
200
|
+
expect(jats['source']).to eq('eLife')
|
201
|
+
expect(jats.dig('person_group', 'name').length).to eq(5)
|
202
|
+
expect(jats.dig('person_group',
|
203
|
+
'name').first).to eq('surname' => 'Sankar', 'given_names' => 'Martial')
|
204
|
+
expect(jats['year']).to eq('iso_8601_date' => '2014-02-11', '__content__' => '2014')
|
205
|
+
expect(jats['month']).to eq('02')
|
206
|
+
expect(jats['day']).to eq('11')
|
207
|
+
expect(jats['pub_id']).to eq('pub_id_type' => 'doi', '__content__' => '10.7554/elife.01567')
|
208
|
+
end
|
209
|
+
end
|
210
|
+
end
|
@@ -0,0 +1,91 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe Commonmeta::Metadata, vcr: true do
|
6
|
+
context 'write metadata as rdf xml' do
|
7
|
+
# it 'journal article' do
|
8
|
+
# input = '10.7554/eLife.01567'
|
9
|
+
# subject = described_class.new(input: input, from: 'crossref')
|
10
|
+
# expect(subject.valid?).to be true
|
11
|
+
# rdf_xml = Hash.from_xml(subject.rdf_xml).fetch('RDF', {})
|
12
|
+
# expect(rdf_xml.dig('ScholarlyArticle', 'about')).to eq('https://doi.org/10.7554/elife.01567')
|
13
|
+
# expect(rdf_xml.dig('ScholarlyArticle',
|
14
|
+
# 'name')).to eq('Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth')
|
15
|
+
# expect(rdf_xml.dig('ScholarlyArticle', 'datePublished', '__content__')).to eq('2014-02-11')
|
16
|
+
# end
|
17
|
+
|
18
|
+
# it 'with pages' do
|
19
|
+
# input = 'https://doi.org/10.1155/2012/291294'
|
20
|
+
# subject = described_class.new(input: input, from: 'crossref')
|
21
|
+
# expect(subject.valid?).to be true
|
22
|
+
# rdf_xml = Hash.from_xml(subject.rdf_xml).fetch('RDF', {})
|
23
|
+
# expect(rdf_xml.dig('ScholarlyArticle', 'about')).to eq('https://doi.org/10.1155/2012/291294')
|
24
|
+
# expect(rdf_xml.dig('ScholarlyArticle',
|
25
|
+
# 'name')).to eq('Delineating a Retesting Zone Using Receiver Operating Characteristic Analysis on Serial QuantiFERON Tuberculosis Test Results in US Healthcare Workers')
|
26
|
+
# expect(rdf_xml.dig('ScholarlyArticle', 'datePublished', '__content__')).to eq('2012')
|
27
|
+
# expect(rdf_xml.dig('ScholarlyArticle', 'pageStart')).to eq('1')
|
28
|
+
# expect(rdf_xml.dig('ScholarlyArticle', 'pageEnd')).to eq('7')
|
29
|
+
# end
|
30
|
+
|
31
|
+
# it 'Crossref DOI' do
|
32
|
+
# input = "#{fixture_path}crossref.bib"
|
33
|
+
# subject = described_class.new(input: input, from: 'bibtex')
|
34
|
+
# expect(subject.valid?).to be true
|
35
|
+
# rdf_xml = Hash.from_xml(subject.rdf_xml).fetch('RDF', {})
|
36
|
+
|
37
|
+
# expect(rdf_xml.dig('ScholarlyArticle', 'about')).to eq('https://doi.org/10.7554/elife.01567')
|
38
|
+
# expect(rdf_xml.dig('ScholarlyArticle',
|
39
|
+
# 'name')).to eq('Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth')
|
40
|
+
# expect(rdf_xml.dig('ScholarlyArticle', 'datePublished', '__content__')).to eq('2014')
|
41
|
+
# expect(rdf_xml.dig('ScholarlyArticle', 'periodical', 'Journal', 'name')).to eq('eLife')
|
42
|
+
# end
|
43
|
+
|
44
|
+
# it 'BlogPosting' do
|
45
|
+
# input = 'https://doi.org/10.5438/4K3M-NYVG'
|
46
|
+
# subject = described_class.new(input: input, from: 'datacite')
|
47
|
+
# expect(subject.valid?).to be true
|
48
|
+
# rdf_xml = Hash.from_xml(subject.rdf_xml).fetch('RDF', {})
|
49
|
+
# expect(rdf_xml.dig('ScholarlyArticle', 'about')).to eq('https://doi.org/10.5438/4k3m-nyvg')
|
50
|
+
# expect(rdf_xml.dig('ScholarlyArticle', 'name')).to eq('Eating your own Dog Food')
|
51
|
+
# expect(rdf_xml.dig('ScholarlyArticle',
|
52
|
+
# 'keywords')).to eq('datacite, doi, metadata, FOS: Computer and information sciences')
|
53
|
+
# expect(rdf_xml.dig('ScholarlyArticle', 'datePublished', '__content__')).to eq('2016-12-20')
|
54
|
+
# end
|
55
|
+
|
56
|
+
# it 'BlogPosting Citeproc JSON' do
|
57
|
+
# input = "#{fixture_path}citeproc.json"
|
58
|
+
# subject = described_class.new(input: input, from: 'csl')
|
59
|
+
# rdf_xml = Hash.from_xml(subject.rdf_xml).fetch('RDF', {})
|
60
|
+
# expect(rdf_xml.dig('BlogPosting', 'about')).to eq('https://doi.org/10.5438/4k3m-nyvg')
|
61
|
+
# expect(rdf_xml.dig('BlogPosting', 'name')).to eq('Eating your own Dog Food')
|
62
|
+
# expect(rdf_xml.dig('BlogPosting', 'datePublished', '__content__')).to eq('2016-12-20')
|
63
|
+
# end
|
64
|
+
|
65
|
+
# it 'maremma' do
|
66
|
+
# input = 'https://github.com/datacite/maremma'
|
67
|
+
# subject = described_class.new(input: input, from: 'codemeta')
|
68
|
+
# rdf_xml = Hash.from_xml(subject.rdf_xml).fetch('RDF', {})
|
69
|
+
# expect(rdf_xml.dig('SoftwareSourceCode', 'about')).to eq('https://doi.org/10.5438/qeg0-3gm3')
|
70
|
+
# expect(rdf_xml.dig('SoftwareSourceCode', 'author', 'Person', 'about')).to eq('https://orcid.org/0000-0003-0077-4738')
|
71
|
+
# expect(rdf_xml.dig('SoftwareSourceCode', 'author', 'Person', 'name')).to eq('Martin Fenner')
|
72
|
+
# expect(rdf_xml.dig('SoftwareSourceCode',
|
73
|
+
# 'name')).to eq('Maremma: a Ruby library for simplified network calls')
|
74
|
+
# expect(rdf_xml.dig('SoftwareSourceCode', 'keywords')).to eq('faraday, excon, net/http')
|
75
|
+
# expect(rdf_xml.dig('SoftwareSourceCode', 'datePublished', '__content__')).to eq('2017-02-24')
|
76
|
+
# end
|
77
|
+
|
78
|
+
# it 'BlogPosting schema.org' do
|
79
|
+
# input = 'https://blog.front-matter.io/posts/eating-your-own-dog-food/'
|
80
|
+
# subject = described_class.new(input: input, from: 'schema_org')
|
81
|
+
# expect(subject.valid?).to be true
|
82
|
+
# rdf_xml = Hash.from_xml(subject.rdf_xml).fetch('RDF', {})
|
83
|
+
# expect(rdf_xml.dig('Article', 'about')).to eq('https://doi.org/10.53731/r79vxn1-97aq74v-ag58n')
|
84
|
+
# expect(rdf_xml.dig('Article', 'author', 'Person', 'about')).to eq('https://orcid.org/0000-0003-1419-2405')
|
85
|
+
# expect(rdf_xml.dig('Article', 'author', 'Person', 'name')).to eq('Martin Fenner')
|
86
|
+
# expect(rdf_xml.dig('Article', 'name')).to eq('Eating your own Dog Food')
|
87
|
+
# expect(rdf_xml.dig('Article', 'keywords')).to eq('feature')
|
88
|
+
# expect(rdf_xml.dig('Article', 'datePublished', '__content__')).to eq('2016-12-20T00:00:00Z')
|
89
|
+
# end
|
90
|
+
end
|
91
|
+
end
|
@@ -0,0 +1,206 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe Commonmeta::Metadata, vcr: true do
|
6
|
+
context 'write metadata as ris' do
|
7
|
+
it 'journal article' do
|
8
|
+
input = '10.7554/eLife.01567'
|
9
|
+
subject = described_class.new(input: input, from: 'crossref_xml')
|
10
|
+
ris = subject.ris.split("\r\n")
|
11
|
+
expect(ris[0]).to eq('TY - JOUR')
|
12
|
+
expect(ris[1]).to eq('T1 - Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth')
|
13
|
+
expect(ris[2]).to eq('T2 - eLife')
|
14
|
+
expect(ris[3]).to eq('AU - Sankar, Martial')
|
15
|
+
expect(ris[8]).to eq('DO - 10.7554/elife.01567')
|
16
|
+
expect(ris[9]).to eq('UR - https://elifesciences.org/articles/01567')
|
17
|
+
expect(ris[10]).to start_with('AB - Among various advantages')
|
18
|
+
expect(ris[11]).to eq('PY - 2014')
|
19
|
+
expect(ris[12]).to eq('PB - eLife Sciences Publications, Ltd')
|
20
|
+
expect(ris[13]).to eq('VL - 3')
|
21
|
+
expect(ris[14]).to eq('SP - e01567')
|
22
|
+
expect(ris[15]).to eq('SN - 2050-084X')
|
23
|
+
expect(ris[16]).to eq('ER - ')
|
24
|
+
end
|
25
|
+
|
26
|
+
it 'with pages' do
|
27
|
+
input = 'https://doi.org/10.1155/2012/291294'
|
28
|
+
subject = described_class.new(input: input, from: 'crossref_xml')
|
29
|
+
# expect(subject.valid?).to be true
|
30
|
+
ris = subject.ris.split("\r\n")
|
31
|
+
expect(ris[0]).to eq('TY - JOUR')
|
32
|
+
expect(ris[1]).to eq('T1 - Delineating a Retesting Zone Using Receiver Operating Characteristic Analysis on Serial QuantiFERON Tuberculosis Test Results in US Healthcare Workers')
|
33
|
+
expect(ris[2]).to eq('T2 - Pulmonary Medicine')
|
34
|
+
expect(ris[3]).to eq('AU - Thanassi, Wendy')
|
35
|
+
expect(ris[10]).to eq('DO - 10.1155/2012/291294')
|
36
|
+
expect(ris[11]).to eq('UR - http://www.hindawi.com/journals/pm/2012/291294')
|
37
|
+
expect(ris[12]).to start_with('AB - . To find a statistically significant separation point for the QuantiFERON')
|
38
|
+
expect(ris[13]).to eq('PY - 2012')
|
39
|
+
expect(ris[14]).to eq('PB - Hindawi Limited')
|
40
|
+
expect(ris[15]).to eq('VL - 2012')
|
41
|
+
expect(ris[16]).to eq('SP - 1')
|
42
|
+
expect(ris[17]).to eq('EP - 7')
|
43
|
+
expect(ris[18]).to eq('SN - 2090-1844')
|
44
|
+
expect(ris[19]).to eq('ER - ')
|
45
|
+
end
|
46
|
+
|
47
|
+
it 'alternate name' do
|
48
|
+
input = 'https://doi.org/10.3205/ZMA001102'
|
49
|
+
subject = described_class.new(input: input, from: 'datacite')
|
50
|
+
# expect(subject.valid?).to be true
|
51
|
+
ris = subject.ris.split("\r\n")
|
52
|
+
expect(ris[0]).to eq('TY - GEN')
|
53
|
+
expect(ris[1]).to eq('T1 - Visions and reality: the idea of competence-oriented assessment for German medical students is not yet realised in licensing examinations')
|
54
|
+
expect(ris[2]).to eq('T2 - GMS Journal for Medical Education; 34(2):Doc25')
|
55
|
+
expect(ris[3]).to eq('AU - Huber-Lang, Markus')
|
56
|
+
expect(ris[9]).to eq('DO - 10.3205/zma001102')
|
57
|
+
expect(ris[10]).to eq('UR - http://www.egms.de/en/journals/zma/2017-34/zma001102.shtml')
|
58
|
+
expect(ris[11]).to start_with('AB - Objective: Competence orientation')
|
59
|
+
expect(ris[12]).to eq('KW - medical competence')
|
60
|
+
expect(ris[22]).to eq('PY - 2017')
|
61
|
+
expect(ris[23]).to eq('PB - German Medical Science GMS Publishing House')
|
62
|
+
expect(ris[24]).to eq('LA - en')
|
63
|
+
expect(ris[25]).to eq('SN - 2366-5017')
|
64
|
+
expect(ris[26]).to eq('ER - ')
|
65
|
+
end
|
66
|
+
|
67
|
+
it 'Crossref DOI' do
|
68
|
+
input = "#{fixture_path}crossref.bib"
|
69
|
+
subject = described_class.new(input: input, from: 'bibtex')
|
70
|
+
|
71
|
+
ris = subject.ris.split("\r\n")
|
72
|
+
expect(ris[0]).to eq('TY - JOUR')
|
73
|
+
expect(ris[1]).to eq('T1 - Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth')
|
74
|
+
expect(ris[2]).to eq('T2 - eLife')
|
75
|
+
expect(ris[3]).to eq('AU - Sankar, Martial')
|
76
|
+
expect(ris[8]).to eq('DO - 10.7554/elife.01567')
|
77
|
+
expect(ris[9]).to eq('UR - http://elifesciences.org/lookup/doi/10.7554/eLife.01567')
|
78
|
+
expect(ris[10]).to eq('AB - Among various advantages, their small size makes model organisms preferred subjects of investigation. Yet, even in model systems detailed analysis of numerous developmental processes at cellular level is severely hampered by their scale.')
|
79
|
+
expect(ris[11]).to eq('PY - 2014')
|
80
|
+
expect(ris[12]).to eq('PB - {eLife} Sciences Organisation, Ltd.')
|
81
|
+
expect(ris[13]).to eq('VL - 3')
|
82
|
+
expect(ris[14]).to eq('SN - 2050-084X')
|
83
|
+
expect(ris[15]).to eq('ER - ')
|
84
|
+
end
|
85
|
+
|
86
|
+
it 'BlogPosting' do
|
87
|
+
input = 'https://doi.org/10.5438/4K3M-NYVG'
|
88
|
+
subject = described_class.new(input: input, from: 'datacite')
|
89
|
+
expect(subject.valid?).to be true
|
90
|
+
ris = subject.ris.split("\r\n")
|
91
|
+
expect(ris[0]).to eq('TY - JOUR')
|
92
|
+
expect(ris[1]).to eq('T1 - Eating your own Dog Food')
|
93
|
+
expect(ris[2]).to eq('AU - Fenner, Martin')
|
94
|
+
expect(ris[3]).to eq('DO - 10.5438/4k3m-nyvg')
|
95
|
+
expect(ris[4]).to eq('UR - https://blog.datacite.org/eating-your-own-dog-food/')
|
96
|
+
expect(ris[5]).to eq('AB - Eating your own dog food is a slang term to describe that an organization should itself use the products and services it provides. For DataCite this means that we should use DOIs with appropriate metadata and strategies for long-term preservation for...')
|
97
|
+
expect(ris[6]).to eq('KW - datacite')
|
98
|
+
expect(ris[9]).to eq('KW - FOS: Computer and information sciences')
|
99
|
+
expect(ris[10]).to eq('PY - 2016')
|
100
|
+
expect(ris[11]).to eq('PB - DataCite')
|
101
|
+
expect(ris[12]).to eq('LA - en')
|
102
|
+
expect(ris[13]).to eq('SN - 10.5438/0000-00ss')
|
103
|
+
expect(ris[14]).to eq('ER - ')
|
104
|
+
end
|
105
|
+
|
106
|
+
it 'BlogPosting Citeproc JSON' do
|
107
|
+
input = "#{fixture_path}citeproc.json"
|
108
|
+
subject = described_class.new(input: input, from: 'csl')
|
109
|
+
ris = subject.ris.split("\r\n")
|
110
|
+
expect(ris[0]).to eq('TY - JOUR')
|
111
|
+
expect(ris[1]).to eq('T1 - Eating your own Dog Food')
|
112
|
+
expect(ris[2]).to eq('T2 - DataCite Blog')
|
113
|
+
expect(ris[3]).to eq('AU - Fenner, Martin')
|
114
|
+
expect(ris[4]).to eq('DO - 10.5438/4k3m-nyvg')
|
115
|
+
expect(ris[5]).to eq('UR - https://blog.datacite.org/eating-your-own-dog-food')
|
116
|
+
expect(ris[6]).to eq('AB - Eating your own dog food is a slang term to describe that an organization should itself use the products and services it provides. For DataCite this means that we should use DOIs with appropriate metadata and strategies for long-term preservation for...')
|
117
|
+
expect(ris[7]).to eq('KW - phylogeny')
|
118
|
+
expect(ris[14]).to eq('PY - 2016')
|
119
|
+
expect(ris[15]).to eq('PB - DataCite')
|
120
|
+
expect(ris[16]).to eq('ER - ')
|
121
|
+
end
|
122
|
+
|
123
|
+
it 'BlogPosting DataCite JSON' do
|
124
|
+
input = "#{fixture_path}datacite.json"
|
125
|
+
subject = described_class.new(input: input, from: 'datacite')
|
126
|
+
ris = subject.ris.split("\r\n")
|
127
|
+
expect(ris[0]).to eq('TY - JOUR')
|
128
|
+
expect(ris[1]).to eq('T1 - Eating your own Dog Food')
|
129
|
+
expect(ris[2]).to eq('AU - Fenner, Martin')
|
130
|
+
expect(ris[3]).to eq('DO - 10.5438/4k3m-nyvg')
|
131
|
+
expect(ris[4]).to eq('AB - Eating your own dog food is a slang term to describe that an organization should itself use the products and services it provides. For DataCite this means that we should use DOIs with appropriate metadata and strategies for long-term preservation for...')
|
132
|
+
expect(ris[5]).to eq('KW - datacite')
|
133
|
+
expect(ris[8]).to eq('PY - 2016')
|
134
|
+
expect(ris[9]).to eq('PB - DataCite')
|
135
|
+
expect(ris[10]).to eq('ER - ')
|
136
|
+
end
|
137
|
+
|
138
|
+
it 'BlogPosting schema.org' do
|
139
|
+
input = 'https://blog.front-matter.io/posts/eating-your-own-dog-food/'
|
140
|
+
subject = described_class.new(input: input, from: 'schema_org')
|
141
|
+
ris = subject.ris.split("\r\n")
|
142
|
+
expect(ris[0]).to eq('TY - JOUR')
|
143
|
+
expect(ris[1]).to eq('T1 - Eating your own Dog Food')
|
144
|
+
expect(ris[2]).to eq('T2 - Front Matter')
|
145
|
+
expect(ris[3]).to eq('AU - Fenner, Martin')
|
146
|
+
expect(ris[4]).to eq('DO - 10.53731/r79vxn1-97aq74v-ag58n')
|
147
|
+
expect(ris[5]).to eq('UR - https://blog.front-matter.io/posts/eating-your-own-dog-food')
|
148
|
+
expect(ris[6]).to eq('AB - Eating your own dog food is a slang term to describe that an organization should itself use the products and services it provides. For DataCite this means that we should use DOIs with appropriate metadata and strategies for long-term preservation for the scholarly outputs we produce. For the most part this is not research data, but rather technical documents such as the DataCite Schema and its documentation (2016). These outputs also include the posts on this blog, where we discuss topics relev')
|
149
|
+
expect(ris[7]).to eq('KW - feature')
|
150
|
+
expect(ris[8]).to eq('PY - 2016')
|
151
|
+
expect(ris[9]).to eq('PB - Front Matter')
|
152
|
+
expect(ris[10]).to eq('LA - en')
|
153
|
+
expect(ris[11]).to eq('SN - 2749-9952')
|
154
|
+
expect(ris[12]).to eq('ER - ')
|
155
|
+
end
|
156
|
+
|
157
|
+
it 'Dataset' do
|
158
|
+
input = '10.5061/DRYAD.8515'
|
159
|
+
subject = described_class.new(input: input, from: 'datacite')
|
160
|
+
expect(subject.valid?).to be true
|
161
|
+
ris = subject.ris.split("\r\n")
|
162
|
+
expect(ris[0]).to eq('TY - DATA')
|
163
|
+
expect(ris[1]).to eq('T1 - Data from: A new malaria agent in African hominids.')
|
164
|
+
expect(ris[2]).to eq('AU - Ollomo, Benjamin')
|
165
|
+
expect(ris[10]).to eq('DO - 10.5061/dryad.8515')
|
166
|
+
expect(ris[11]).to eq('UR - http://datadryad.org/stash/dataset/doi:10.5061/dryad.8515')
|
167
|
+
expect(ris[13]).to eq('KW - Plasmodium')
|
168
|
+
expect(ris[18]).to eq('PB - Dryad')
|
169
|
+
expect(ris[19]).to eq('LA - en')
|
170
|
+
expect(ris[20]).to eq('ER - ')
|
171
|
+
end
|
172
|
+
|
173
|
+
it 'maremma' do
|
174
|
+
input = 'https://github.com/datacite/maremma'
|
175
|
+
subject = described_class.new(input: input, from: 'codemeta')
|
176
|
+
ris = subject.ris.split("\r\n")
|
177
|
+
expect(ris[0]).to eq('TY - COMP')
|
178
|
+
expect(ris[1]).to eq('T1 - Maremma: a Ruby library for simplified network calls')
|
179
|
+
expect(ris[2]).to eq('AU - Fenner, Martin')
|
180
|
+
expect(ris[3]).to eq('DO - 10.5438/qeg0-3gm3')
|
181
|
+
expect(ris[4]).to eq('UR - https://github.com/datacite/maremma')
|
182
|
+
expect(ris[5]).to eq('AB - Ruby utility library for network requests. Based on Faraday and Excon, provides a wrapper for XML/JSON parsing and error handling. All successful responses are returned as hash with key data, all errors in a JSONAPI-friendly hash with key errors.')
|
183
|
+
expect(ris[6]).to eq('KW - faraday')
|
184
|
+
expect(ris[9]).to eq('PY - 2017')
|
185
|
+
expect(ris[10]).to eq('PB - DataCite')
|
186
|
+
expect(ris[11]).to eq('ER - ')
|
187
|
+
end
|
188
|
+
|
189
|
+
it 'keywords with subject scheme' do
|
190
|
+
input = 'https://doi.org/10.1594/pangaea.721193'
|
191
|
+
subject = described_class.new(input: input, from: 'datacite')
|
192
|
+
ris = subject.ris.split("\r\n")
|
193
|
+
expect(ris[0]).to eq('TY - DATA')
|
194
|
+
expect(ris[1]).to eq('T1 - Seawater carbonate chemistry and processes during experiments with Crassostrea gigas, 2007')
|
195
|
+
expect(ris[2]).to eq('AU - Kurihara, Haruko')
|
196
|
+
expect(ris[5]).to eq('DO - 10.1594/pangaea.721193')
|
197
|
+
expect(ris[6]).to eq('UR - https://doi.pangaea.de/10.1594/PANGAEA.721193')
|
198
|
+
expect(ris[8]).to eq('KW - Animalia')
|
199
|
+
expect(ris[9]).to eq('KW - Bottles or small containers/Aquaria (<20 L)')
|
200
|
+
expect(ris[51]).to eq('PY - 2007')
|
201
|
+
expect(ris[52]).to eq('PB - PANGAEA')
|
202
|
+
expect(ris[53]).to eq('LA - en')
|
203
|
+
expect(ris[54]).to eq('ER - ')
|
204
|
+
end
|
205
|
+
end
|
206
|
+
end
|