briard 2.7.1 → 2.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rubocop.yml +6 -6
- data/Gemfile.lock +2 -2
- data/README.md +7 -0
- data/briard.gemspec +1 -1
- data/lib/briard/author_utils.rb +50 -33
- data/lib/briard/doi_utils.rb +5 -1
- data/lib/briard/metadata.rb +1 -1
- data/lib/briard/metadata_utils.rb +2 -0
- data/lib/briard/readers/crossref_json_reader.rb +167 -0
- data/lib/briard/readers/crossref_reader.rb +3 -3
- data/lib/briard/readers/datacite_reader.rb +1 -1
- data/lib/briard/utils.rb +13 -3
- data/lib/briard/version.rb +1 -1
- data/spec/author_utils_spec.rb +36 -32
- data/spec/cli_spec.rb +1 -1
- data/spec/doi_utils_spec.rb +8 -8
- data/spec/fixtures/crossref.json +572 -0
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_from_id/crossref/default.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_from_id/crossref/to_bibtex.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_from_id/crossref/to_citation.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_from_id/crossref/to_crossref.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_from_id/crossref/to_datacite.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_from_id/crossref/to_jats.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_from_id/crossref/to_schema_org.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_from_id/datacite/default.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_from_id/datacite/to_bibtex.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_from_id/datacite/to_citation.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_from_id/datacite/to_datacite.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_from_id/datacite/to_datacite_json.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_from_id/datacite/to_jats.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_from_id/datacite/to_schema_org.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_from_id/schema_org/default.yml +7 -9
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_from_id/schema_org/to_datacite.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_CLI/convert_from_id/schema_org/to_schema_org.yml +9 -7
- data/spec/fixtures/vcr_cassettes/Briard_CLI/find_from_format_by_id/crossref.yml +4 -4
- data/spec/fixtures/vcr_cassettes/Briard_CLI/find_from_format_by_id/datacite.yml +4 -4
- data/spec/fixtures/vcr_cassettes/Briard_CLI/find_from_format_by_id/jalc.yml +4 -4
- data/spec/fixtures/vcr_cassettes/Briard_CLI/find_from_format_by_id/kisti.yml +4 -4
- data/spec/fixtures/vcr_cassettes/Briard_CLI/find_from_format_by_id/medra.yml +4 -4
- data/spec/fixtures/vcr_cassettes/Briard_CLI/find_from_format_by_id/op.yml +4 -4
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/authors_as_string/author.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/authors_as_string/no_author.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/authors_as_string/single_author.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/authors_as_string/with_organization.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/change_datacite_metadata/change_state.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/change_datacite_metadata/change_title.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/change_metadata_as_datacite_xml/change_description.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/change_metadata_as_datacite_xml/change_identifiers.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/change_metadata_as_datacite_xml/change_license.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/change_metadata_as_datacite_xml/change_license_name.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/change_metadata_as_datacite_xml/change_license_url.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/change_metadata_as_datacite_xml/change_state.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/change_metadata_as_datacite_xml/validates_against_schema.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/change_metadata_as_datacite_xml/with_data_citation.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/{doi_api_url → datacite_api_url}/doi.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/{doi_api_url/test_resolver.yml → datacite_api_url/doi_with_protocol.yml} +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/datacite_api_url/dx_doi_org_url.yml +65 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/datacite_api_url/force_test_resolver.yml +65 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/{doi_api_url → datacite_api_url}/https_url.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/{doi_api_url/doi_with_protocol.yml → datacite_api_url/test_resolver.yml} +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/{doi_api_url → datacite_api_url}/test_resolver_http.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/{doi_api_url/dx_doi_org_url.yml → doi_from_url/crossref_api_url.yml} +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/doi_from_url/doi.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/doi_from_url/doi_with_special_characters.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/doi_from_url/not_a_doi.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/doi_from_url/sandbox_url.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/doi_from_url/url.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/doi_registration_agency/crossref.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/doi_registration_agency/datacite.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/doi_registration_agency/jalc.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/doi_registration_agency/kisti.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/doi_registration_agency/medra.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/doi_registration_agency/not_a_valid_prefix.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/doi_registration_agency/not_found.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/doi_registration_agency/op.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/doi_resolver/doi.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/doi_resolver/doi_with_protocol.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/doi_resolver/dx_doi_org_url.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/doi_resolver/force_stage_resolver.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/doi_resolver/https_url.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/doi_resolver/stage_resolver.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/doi_resolver/stage_resolver_http.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/find_from_format_by_ID/crossref.yml +14 -14
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/find_from_format_by_ID/crossref_doi_not_url.yml +14 -14
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/find_from_format_by_ID/datacite.yml +14 -14
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/find_from_format_by_ID/datacite_doi_http.yml +14 -14
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/find_from_format_by_ID/github.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/find_from_format_by_ID/orcid.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/find_from_format_by_ID/schema_org.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/find_from_format_by_ID/unknown_DOI_registration_agency.yml +14 -14
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/find_from_format_from_file/bibtex.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/find_from_format_from_file/citeproc.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/find_from_format_from_file/codemeta.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/find_from_format_from_file/crosscite.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/find_from_format_from_file/crossref.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/find_from_format_from_file/datacite.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/find_from_format_from_file/datacite_json.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/find_from_format_from_file/ris.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/find_from_format_from_file/schema_org.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/find_from_format_from_string/crosscite.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/fos/hsh_to_fos_for_match.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/fos/hsh_to_fos_for_with_schemeUri_in_hash.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/fos/hsh_to_fos_match.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/fos/hsh_to_fos_no_match.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/fos/name_to_fos_for_match.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/fos/name_to_fos_match.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/fos/name_to_fos_no_match.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/from_schema_org/with_id.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/from_schema_org_creators/with_affiliation.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/from_schema_org_creators/without_affiliation.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_cff_metadata/cff-converter-python.yml +7 -7
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_cff_metadata/ruby-cff.yml +7 -7
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_cff_metadata/ruby-cff_repository_url.yml +8 -8
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_codemeta_metadata/maremma.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_codemeta_metadata/metadata_reports.yml +7 -7
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/DOI_with_ORCID_ID.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/DOI_with_SICI_DOI.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/DOI_with_data_citation.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/JaLC.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/KISTI.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/OP.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/affiliation_is_space.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/another_book.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/another_book_chapter.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/article_id_as_page_number.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/author_literal.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/book.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/book_chapter.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/book_chapter_with_RDF_for_container.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/book_oup.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/component.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/dataset.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/dataset_usda.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/date_in_future.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/dissertation.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/empty_given_name.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/invalid_date.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/journal_article.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/journal_article_original_language_title.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/journal_article_with.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/journal_article_with_RDF_for_container.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/journal_article_with_funding.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/journal_issue.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/mEDRA.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/markup.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/missing_creator.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/multiple_issn.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/multiple_titles.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/multiple_titles_with_missing.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/not_found_error.yml +105 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/peer_review.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/posted_content.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/posted_content_copernicus.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/report_osti.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/vor_with_url.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/yet_another_book.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_json_metadata/yet_another_book_chapter.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/DOI_with_ORCID_ID.yml +11 -11
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/DOI_with_SICI_DOI.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/DOI_with_data_citation.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/JaLC.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/KISTI.yml +11 -11
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/OP.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/affiliation_is_space.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/another_book.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/another_book_chapter.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/article_id_as_page_number.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/author_literal.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/book.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/book_chapter.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/book_chapter_with_RDF_for_container.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/book_oup.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/component.yml +11 -11
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/dataset.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/dataset_usda.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/date_in_future.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/dissertation.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/empty_given_name.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/invalid_date.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/journal_article.yml +57 -59
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/journal_article_original_language_title.yml +57 -58
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/journal_article_with.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/journal_article_with_RDF_for_container.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/journal_article_with_funding.yml +57 -59
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/journal_issue.yml +11 -11
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/mEDRA.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/markup.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/missing_creator.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/multiple_issn.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/multiple_titles.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/multiple_titles_with_missing.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/not_found_error.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/peer_review.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/posted_content.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/posted_content_copernicus.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/report_osti.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/vor_with_url.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/yet_another_book.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_crossref_metadata/yet_another_book_chapter.yml +11 -11
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_json_metadata/metadata_from_api.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/BlogPosting.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/DOI_in_staging_system.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/DOI_in_staging_system_schema_3.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/DOI_in_with_related_id_system.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/DOI_not_found.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/Dataset.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/Funding.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/Funding_empty_awardTitle.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/Funding_schema_version_4.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/Referee_report_in_staging_system.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/Schema_org_type.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/author_only_full_name.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/author_with_scheme.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/author_with_wrong_orcid_scheme.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/cc-by_3_0_us.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/content_url.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/date.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/dissertation.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/doi_with_sign.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/empty_subject.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/even_more_subject_scheme_FOR.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/funding_references.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/funding_schema_version_3.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/is_identical_to.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/keywords_with_attributes.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/leading_and_trailing_whitespace.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/more_subject_scheme_FOR.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/multiple_author_names_in_one_creatorsName.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/multiple_licenses.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/series-information.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/subject_scheme.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datacite_metadata/subject_scheme_FOR.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_date/publication_date.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_date_from_date_parts/date.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_date_from_date_parts/year-month.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_date_from_date_parts/year.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_date_from_parts/date.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_date_from_parts/year-month.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_date_from_parts/year.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_date_parts/date.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_date_parts/year-month.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_date_parts/year.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datetime_from_time/future.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datetime_from_time/invalid.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datetime_from_time/nil.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datetime_from_time/past.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_datetime_from_time/present.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_one_author/has_familyName.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_one_author/has_name_in_Thai.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_one_author/has_name_in_display-order.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_one_author/has_name_in_display-order_with_ORCID.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_one_author/has_name_in_sort-order.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_one_author/hyper-authorship.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_one_author/is_organization.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_one_author/multiple_author_names_in_one_field.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_one_author/multiple_name_identifier.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_one_author/name_with_affiliation.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_one_author/name_with_affiliation_and_country.yml +7 -7
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_one_author/name_with_affiliation_crossref.yml +112 -0
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_one_author/name_with_role.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_one_author/only_familyName_and_givenName.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_schema_org_metadata/BlogPosting.yml +15 -15
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_schema_org_metadata/BlogPosting_with_new_DOI.yml +15 -15
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_schema_org_metadata/get_schema_org_metadata_front_matter/BlogPosting.yml +18 -18
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_schema_org_metadata/harvard_dataverse.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_schema_org_metadata/pangaea.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_schema_org_metadata/zenodo.yml +8 -8
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_series_information/only_title.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_series_information/title_and_pages.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_series_information/title_volume_and_pages.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/get_series_information/title_volume_issue_and_pages.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/github/github_as_cff_url.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/github/github_as_codemeta_url.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/github/github_from_url.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/github/github_from_url_cff_file.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/github/github_from_url_file.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/handle_input/DOI_RA_not_Crossref_or_DataCite.yml +4 -4
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/handle_input/unknown_DOI_prefix.yml +4 -4
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/insert_contributors/none.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/insert_creators/insert.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/insert_dates/insert.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/insert_descriptions/insert.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/insert_identifier/doi.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/insert_language/insert.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/insert_person/creator_only_name.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/insert_publication_year/insert.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/insert_publisher/insert.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/insert_related_identifiers/insert.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/insert_related_identifiers/related_identifier.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/insert_resource_type/insert.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/insert_rights_list/insert.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/insert_sizes/insert.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/insert_subjects/insert.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/insert_titles/insert.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/insert_version/insert.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/is_personal_name_/has_comma.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/is_personal_name_/has_family_name.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/{doi_api_url/force_test_resolver.yml → is_personal_name_/has_family_name_crossref.yml} +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/is_personal_name_/has_id.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/is_personal_name_/has_known_given_name.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/is_personal_name_/has_no_info.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/is_personal_name_/has_orcid_id.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/is_personal_name_/has_type_organization.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/jsonlint/missing_comma.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/jsonlint/nil.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/jsonlint/overlapping_keys.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/jsonlint/valid.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_cc_url/not_found.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_cc_url/with_trailing_slash.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_cc_url/with_trailing_slash_and_to_https.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_doi/SICI_doi.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_doi/doi.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_doi/doi_force_datacite_sandbox.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_doi/doi_from_datacite_sandbox.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_doi/doi_from_url_without_doi_proxy.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_doi/doi_prefix_too_long.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_doi/doi_prefix_with_string.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_doi/doi_with_protocol.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_doi/dx_doi_org_url.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_doi/https_url.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_doi/not_valid_doi_prefix.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_doi/url_with_one_slash.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_id/doi.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_id/doi_as_url.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_id/ftp.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_id/invalid_url.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_id/sandbox_via_options.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_id/sandbox_via_url.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_id/string.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_id/url.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_id/url_with_utf-8.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_ids/doi.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_ids/url.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_issn/from_array.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_issn/from_empty_array.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_issn/from_hash.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_issn/from_string.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_url/uri.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_url/with_trailing_slash.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/normalize_url/with_trailing_slash_and_to_https.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/parse_attributes/array.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/parse_attributes/array_of_strings.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/parse_attributes/first.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/parse_attributes/hash.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/parse_attributes/nil.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/parse_attributes/string.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/random_doi/decode_anothe_doi.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/random_doi/decode_doi.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/random_doi/encode_doi.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/sanitize/onlies_keep_specific_tags.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/sanitize/removes_a_tags.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/spdx/hsh_to_spdx_id.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/spdx/hsh_to_spdx_not_found.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/spdx/hsh_to_spdx_url.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/spdx/name_to_spdx_exists.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/spdx/name_to_spdx_id.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/to_schema_org/with_id.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/to_schema_org_identifiers/with_identifiers.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_doi/doi.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_funder_doi/1_7_10.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_funder_doi/1_7_11.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_funder_doi/1_7_12.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_funder_doi/1_7_13.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_funder_doi/1_7_14.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_funder_doi/1_7_4.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_funder_doi/1_7_5.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_funder_doi/1_7_6.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_funder_doi/1_7_7.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_funder_doi/1_7_8.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_funder_doi/1_7_9.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_funder_doi/funder_doi.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_funder_doi/funder_doi_without_prefix.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_funder_doi/non-funder_doi.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_orcid/validate_orcid.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_orcid/validate_orcid_https.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_orcid/validate_orcid_id.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_orcid/validate_orcid_sandbox.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_orcid/validate_orcid_sandbox_https.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_orcid/validate_orcid_with_spaces.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_orcid/validate_orcid_wrong_id.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_orcid/validate_orcid_www.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_orcid_scheme/validate_orcid_scheme.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_orcid_scheme/validate_orcid_scheme_https.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_orcid_scheme/validate_orcid_scheme_trailing_slash.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_orcid_scheme/validate_orcid_scheme_www.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_prefix/doi.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_prefix/doi_as_url.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_prefix/doi_with_protocol.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_prefix/only_prefix.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_url/DOI.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_url/ISSN.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_url/URL.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/validate_url/string.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_bibtex/BlogPosting.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_bibtex/Dataset.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_bibtex/authors_with_affiliations.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_bibtex/climate_data.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_bibtex/from_schema_org.yml +15 -15
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_bibtex/keywords_subject_scheme.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_bibtex/maremma.yml +8 -8
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_bibtex/text.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_bibtex/with_data_citation.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_bibtex/with_pages.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_cff/Collection_of_Jupyter_notebooks.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_cff/SoftwareSourceCode_Zenodo.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_cff/SoftwareSourceCode_also_Zenodo.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_cff/ruby-cff.yml +8 -8
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_citation/Dataset.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_citation/Journal_article.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_citation/Journal_article_vancouver_style.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_citation/Missing_author.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_citation/interactive_resource_without_dates.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_citation/software_w/version.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_citeproc/Another_dataset.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_citeproc/BlogPosting.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_citeproc/BlogPosting_schema_org.yml +15 -15
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_citeproc/Dataset.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_citeproc/container_title.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_citeproc/interactive_resource_without_dates.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_citeproc/journal_article.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_citeproc/keywords_subject_scheme.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_citeproc/maremma.yml +8 -8
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_citeproc/missing_creator.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_citeproc/multiple_abstracts.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_citeproc/organization_author.yml +7 -7
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_citeproc/software.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_citeproc/software_w/version.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_citeproc/with_only_first_page.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_citeproc/with_pages.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_codemeta/SoftwareSourceCode_DataCite.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_codemeta/SoftwareSourceCode_DataCite_check_codemeta_v2.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_crosscite/datacite_database_attributes.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_crosscite/maremma.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_crosscite/with_ORCID_ID.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_crosscite/with_data_citation.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_crossref/another_schema_org_from_front-matter.yml +18 -18
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_crossref/journal_article_from_datacite.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_crossref/posted_content.yml +9 -9
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_crossref/schema_org_from_another_science_blog.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_crossref/schema_org_from_front_matter.yml +18 -18
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_csv/climate_data.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_csv/maremma.yml +8 -8
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_csv/text.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_csv/with_data_citation.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_csv/with_pages.yml +7 -7
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_datacite_json/from_schema_org.yml +15 -15
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_datacite_json/maremma.yml +8 -8
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_datacite_json/with_ORCID_ID.yml +7 -7
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_datacite_json/with_data_citation.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_datacite_xml/DOI_not_found.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_datacite_xml/Dataset_in_schema_4_0.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_datacite_xml/Text_pass-thru.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_datacite_xml/Text_pass-thru_with_doi_in_options.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_datacite_xml/maremma.yml +8 -8
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_datacite_xml/with_ORCID_ID.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_datacite_xml/with_data_citation.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_datacite_xml/with_editor.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_datacite_xml/with_version.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_jats_xml/Dataset_in_schema_4_0.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_jats_xml/Text_pass-thru.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_jats_xml/book_chapter.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_jats_xml/from_schema_org.yml +17 -17
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_jats_xml/interactive_resource_without_dates.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_jats_xml/maremma.yml +8 -8
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_jats_xml/with_ORCID_ID.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_jats_xml/with_data_citation.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_jats_xml/with_editor.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_rdf_xml/BlogPosting.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_rdf_xml/BlogPosting_schema_org.yml +15 -15
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_rdf_xml/journal_article.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_rdf_xml/maremma.yml +8 -8
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_rdf_xml/with_pages.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_ris/BlogPosting.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_ris/BlogPosting_schema_org.yml +15 -15
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_ris/Dataset.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_ris/alternate_name.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_ris/journal_article.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_ris/keywords_with_subject_scheme.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_ris/maremma.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_ris/with_pages.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_schema_org/Another_Schema_org_JSON.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_schema_org/Funding.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_schema_org/Funding_OpenAIRE.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_schema_org/Schema_org_JSON.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_schema_org/Schema_org_JSON_Cyark.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_schema_org/Schema_org_JSON_IsSupplementTo.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_schema_org/alternate_identifiers.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_schema_org/data_catalog.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_schema_org/geo_location_box.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_schema_org/interactive_resource_without_dates.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_schema_org/journal_article.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_schema_org/maremma_schema_org_JSON.yml +8 -8
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_schema_org/series_information.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_schema_org/subject_scheme.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_schema_org/subject_scheme_multiple_keywords.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_turtle/BlogPosting.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_turtle/BlogPosting_schema_org.yml +15 -15
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_turtle/Dataset.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_turtle/journal_article.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Briard_Metadata/write_metadata_as_turtle/with_pages.yml +5 -5
- data/spec/readers/citeproc_reader_spec.rb +2 -2
- data/spec/readers/codemeta_reader_spec.rb +3 -4
- data/spec/readers/crossref_json_reader_spec.rb +1237 -0
- data/spec/readers/crossref_reader_spec.rb +57 -64
- data/spec/readers/datacite_json_reader_spec.rb +1 -1
- data/spec/readers/datacite_reader_spec.rb +53 -82
- data/spec/readers/npm_reader_spec.rb +2 -2
- data/spec/readers/ris_reader_spec.rb +2 -5
- data/spec/readers/schema_org_reader_spec.rb +7 -12
- data/spec/writers/bibtex_writer_spec.rb +2 -2
- data/spec/writers/citation_writer_spec.rb +2 -2
- data/spec/writers/citeproc_writer_spec.rb +1 -1
- data/spec/writers/codemeta_writer_spec.rb +1 -1
- data/spec/writers/crosscite_writer_spec.rb +4 -5
- data/spec/writers/crossref_writer_spec.rb +3 -6
- data/spec/writers/datacite_json_writer_spec.rb +2 -4
- data/spec/writers/datacite_writer_spec.rb +7 -9
- data/spec/writers/schema_org_writer_spec.rb +8 -9
- metadata +59 -17
data/spec/author_utils_spec.rb
CHANGED
@@ -11,38 +11,38 @@ describe Briard::Metadata, vcr: true do
|
|
11
11
|
it 'has type organization' do
|
12
12
|
author = { 'email' => 'info@ucop.edu', 'name' => 'University of California, Santa Barbara',
|
13
13
|
'role' => { 'namespace' => 'http://www.ngdc.noaa.gov/metadata/published/xsd/schema/resources/Codelist/gmxCodelists.xml#CI_RoleCode', 'roleCode' => 'copyrightHolder' }, 'nameType' => 'Organizational' }
|
14
|
-
expect(subject.is_personal_name?(author)).to be false
|
14
|
+
expect(subject.is_personal_name?(name: author['name'])).to be false
|
15
15
|
end
|
16
16
|
|
17
17
|
it 'has id' do
|
18
18
|
author = { 'id' => 'http://orcid.org/0000-0003-1419-2405', 'givenName' => 'Martin', 'familyName' => 'Fenner', 'name' => 'Martin Fenner' }
|
19
|
-
expect(subject.is_personal_name?(author)).to be true
|
19
|
+
expect(subject.is_personal_name?(given_name: author['given_name'], name: author['name'])).to be true
|
20
20
|
end
|
21
21
|
|
22
22
|
it 'has orcid id' do
|
23
23
|
author = { 'creatorName' => 'Fenner, Martin', 'givenName' => 'Martin', 'familyName' => 'Fenner',
|
24
24
|
'nameIdentifier' => { 'schemeURI' => 'http://orcid.org/', 'nameIdentifierScheme' => 'ORCID', '__content__' => '0000-0003-1419-2405' } }
|
25
|
-
expect(subject.is_personal_name?(author)).to be true
|
25
|
+
expect(subject.is_personal_name?(given_name: author['givenName'], name: author['creatorName'])).to be true
|
26
26
|
end
|
27
27
|
|
28
28
|
it 'has family name' do
|
29
29
|
author = { 'givenName' => 'Martin', 'familyName' => 'Fenner', 'name' => 'Martin Fenner' }
|
30
|
-
expect(subject.is_personal_name?(author)).to be true
|
30
|
+
expect(subject.is_personal_name?(given_name: author['givenName'], name: author['name'])).to be true
|
31
31
|
end
|
32
32
|
|
33
33
|
it 'has comma' do
|
34
34
|
author = { 'name' => 'Fenner, Martin' }
|
35
|
-
expect(subject.is_personal_name?(author)).to be true
|
35
|
+
expect(subject.is_personal_name?(name: author['name'])).to be true
|
36
36
|
end
|
37
37
|
|
38
38
|
it 'has known given name' do
|
39
39
|
author = { 'name' => 'Martin Fenner' }
|
40
|
-
expect(subject.is_personal_name?(author)).to be true
|
40
|
+
expect(subject.is_personal_name?(name: author['name'])).to be true
|
41
41
|
end
|
42
42
|
|
43
43
|
it 'has no info' do
|
44
44
|
author = { 'name' => 'M Fenner' }
|
45
|
-
expect(subject.is_personal_name?(author)).to be false
|
45
|
+
expect(subject.is_personal_name?(name: author['name'])).to be false
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
@@ -54,8 +54,9 @@ describe Briard::Metadata, vcr: true do
|
|
54
54
|
response = subject.get_one_author(meta.dig('creators', 'creator'))
|
55
55
|
expect(response).to eq(
|
56
56
|
'nameIdentifiers' => [{ 'nameIdentifier' => 'https://orcid.org/0000-0003-1419-2405',
|
57
|
-
'nameIdentifierScheme' => 'ORCID', 'schemeUri' => 'https://orcid.org' }],
|
58
|
-
|
57
|
+
'nameIdentifierScheme' => 'ORCID', 'schemeUri' => 'https://orcid.org' }],
|
58
|
+
'name' => 'Fenner, Martin', 'givenName' => 'Martin', 'familyName' => 'Fenner',
|
59
|
+
"nameType" => "Personal")
|
59
60
|
end
|
60
61
|
|
61
62
|
it 'has name in sort-order' do
|
@@ -64,7 +65,7 @@ describe Briard::Metadata, vcr: true do
|
|
64
65
|
meta = Maremma.from_xml(subject.raw).fetch('resource', {})
|
65
66
|
response = subject.get_one_author(meta.dig('creators', 'creator').first)
|
66
67
|
expect(response).to eq('nameType' => 'Personal', 'name' => 'Ollomo, Benjamin',
|
67
|
-
'givenName' => 'Benjamin', 'familyName' => 'Ollomo', '
|
68
|
+
'givenName' => 'Benjamin', 'familyName' => 'Ollomo', 'affiliation' => [{ 'affiliationIdentifier' => 'https://ror.org/01wyqb997', 'affiliationIdentifierScheme' => 'ROR', 'name' => 'Centre International de Recherches Médicales de Franceville' }])
|
68
69
|
end
|
69
70
|
|
70
71
|
it 'has name in display-order' do
|
@@ -73,7 +74,7 @@ describe Briard::Metadata, vcr: true do
|
|
73
74
|
meta = Maremma.from_xml(subject.raw).fetch('resource', {})
|
74
75
|
response = subject.get_one_author(meta.dig('creators', 'creator'))
|
75
76
|
expect(response).to eq('nameType' => 'Personal', 'name' => 'Garza, Kristian',
|
76
|
-
'givenName' => 'Kristian', 'familyName' => 'Garza'
|
77
|
+
'givenName' => 'Kristian', 'familyName' => 'Garza')
|
77
78
|
end
|
78
79
|
|
79
80
|
it 'has name in display-order with ORCID' do
|
@@ -82,7 +83,7 @@ describe Briard::Metadata, vcr: true do
|
|
82
83
|
meta = Maremma.from_xml(subject.raw).fetch('resource', {})
|
83
84
|
response = subject.get_one_author(meta.dig('creators', 'creator'))
|
84
85
|
expect(response).to eq('nameType' => 'Personal',
|
85
|
-
'nameIdentifiers' => [{ 'nameIdentifier' => 'https://orcid.org/0000-0003-4881-1606', 'nameIdentifierScheme' => 'ORCID', 'schemeUri' => 'https://orcid.org' }], 'name' => 'Bedini, Andrea', 'givenName' => 'Andrea', 'familyName' => 'Bedini'
|
86
|
+
'nameIdentifiers' => [{ 'nameIdentifier' => 'https://orcid.org/0000-0003-4881-1606', 'nameIdentifierScheme' => 'ORCID', 'schemeUri' => 'https://orcid.org' }], 'name' => 'Bedini, Andrea', 'givenName' => 'Andrea', 'familyName' => 'Bedini')
|
86
87
|
end
|
87
88
|
|
88
89
|
it 'has name in Thai' do
|
@@ -90,8 +91,7 @@ describe Briard::Metadata, vcr: true do
|
|
90
91
|
subject = described_class.new(input: input, from: 'datacite')
|
91
92
|
meta = Maremma.from_xml(subject.raw).fetch('resource', {})
|
92
93
|
response = subject.get_one_author(meta.dig('creators', 'creator'))
|
93
|
-
expect(response).to eq(
|
94
|
-
'affiliation' => [])
|
94
|
+
expect(response).to eq("name"=>"กัญจนา แซ่เตียว")
|
95
95
|
end
|
96
96
|
|
97
97
|
it 'multiple author names in one field' do
|
@@ -99,9 +99,8 @@ describe Briard::Metadata, vcr: true do
|
|
99
99
|
subject = described_class.new(input: input, from: 'datacite')
|
100
100
|
meta = Maremma.from_xml(subject.raw).fetch('resource', {})
|
101
101
|
response = subject.get_authors(meta.dig('creators', 'creator'))
|
102
|
-
expect(response).to eq([{
|
103
|
-
|
104
|
-
}])
|
102
|
+
expect(response).to eq([{"name"=>
|
103
|
+
"Enos, Ryan (Harvard University); Fowler, Anthony (University of Chicago); Vavreck, Lynn (UCLA)" }])
|
105
104
|
end
|
106
105
|
|
107
106
|
it 'hyper-authorship' do
|
@@ -109,16 +108,14 @@ describe Briard::Metadata, vcr: true do
|
|
109
108
|
subject = described_class.new(input: input, from: 'datacite')
|
110
109
|
meta = Maremma.from_xml(subject.raw).fetch('resource', {})
|
111
110
|
response = subject.get_authors(meta.dig('creators', 'creator'))
|
112
|
-
expect(response).to eq([{ '
|
113
|
-
'nameIdentifiers' => [], 'nameType' => 'Organizational' }])
|
111
|
+
expect(response).to eq([{ 'name' => 'ALICE Collaboration', "nameType"=>"Organizational" }])
|
114
112
|
end
|
115
113
|
|
116
114
|
it 'is organization' do
|
117
115
|
author = { 'email' => 'info@ucop.edu',
|
118
116
|
'creatorName' => { '__content__' => 'University of California, Santa Barbara', 'nameType' => 'Organizational' }, 'role' => { 'namespace' => 'http://www.ngdc.noaa.gov/metadata/published/xsd/schema/resources/Codelist/gmxCodelists.xml#CI_RoleCode', 'roleCode' => 'copyrightHolder' } }
|
119
117
|
response = subject.get_one_author(author)
|
120
|
-
expect(response).to eq('
|
121
|
-
'name' => 'University Of California, Santa Barbara', 'nameIdentifiers' => [], 'affiliation' => [])
|
118
|
+
expect(response).to eq('name' => 'University of California, Santa Barbara', "nameType"=>"Organizational")
|
122
119
|
end
|
123
120
|
|
124
121
|
it 'name with affiliation' do
|
@@ -126,17 +123,25 @@ describe Briard::Metadata, vcr: true do
|
|
126
123
|
subject = described_class.new(input: input, from: 'datacite')
|
127
124
|
meta = Maremma.from_xml(subject.raw).fetch('resource', {})
|
128
125
|
response = subject.get_one_author(meta.dig('creators', 'creator'))
|
129
|
-
expect(response).to eq('
|
130
|
-
'nameIdentifiers' => [], 'affiliation' => [])
|
126
|
+
expect(response).to eq('name' => 'Dr. Störi, Kunstsalon', "nameType"=>"Organizational")
|
131
127
|
end
|
132
128
|
|
133
|
-
it 'name with affiliation and country' do
|
134
|
-
|
135
|
-
|
129
|
+
# it 'name with affiliation and country' do
|
130
|
+
# input = '10.16910/jemr.9.1.2'
|
131
|
+
# subject = described_class.new(input: input, from: 'crossref')
|
132
|
+
# response = subject.get_one_author(subject.creators.first)
|
133
|
+
# expect(response).to eq('familyName' => 'Eraslan',
|
134
|
+
# 'givenName' => 'Sukru',
|
135
|
+
# 'name' => 'Eraslan, Sukru')
|
136
|
+
# end
|
137
|
+
|
138
|
+
it 'name with affiliation crossref' do
|
139
|
+
input = '10.7554/elife.01567'
|
140
|
+
subject = described_class.new(input: input, from: 'crossref_json')
|
136
141
|
response = subject.get_one_author(subject.creators.first)
|
137
|
-
expect(response).to eq('familyName' => '
|
138
|
-
'givenName' => '
|
139
|
-
'name' => '
|
142
|
+
expect(response).to eq('affiliation' => [{"name"=>"Department of Plant Molecular Biology, University of Lausanne, Lausanne, Switzerland"}],'familyName' => 'Sankar',
|
143
|
+
'givenName' => 'Martial',
|
144
|
+
'name' => 'Sankar, Martial', "nameType" => "Personal")
|
140
145
|
end
|
141
146
|
|
142
147
|
it 'name with role' do
|
@@ -144,7 +149,7 @@ describe Briard::Metadata, vcr: true do
|
|
144
149
|
subject = described_class.new(input: input, from: 'datacite')
|
145
150
|
meta = Maremma.from_xml(subject.raw).fetch('resource', {})
|
146
151
|
response = subject.get_one_author(meta.dig('creators', 'creator'))
|
147
|
-
expect(response).to eq(
|
152
|
+
expect(response).to eq("name"=>"Unknown")
|
148
153
|
end
|
149
154
|
|
150
155
|
it 'multiple name_identifier' do
|
@@ -161,8 +166,7 @@ describe Briard::Metadata, vcr: true do
|
|
161
166
|
subject = described_class.new(input: input, from: 'datacite')
|
162
167
|
meta = Maremma.from_xml(subject.raw).fetch('resource', {})
|
163
168
|
response = subject.get_one_author(meta.dig('creators', 'creator'))
|
164
|
-
expect(response).to eq('nameType' => 'Organizational', 'name' => 'The GTEx Consortium'
|
165
|
-
'nameIdentifiers' => [], 'affiliation' => [])
|
169
|
+
expect(response).to eq('nameType' => 'Organizational', 'name' => 'The GTEx Consortium')
|
166
170
|
end
|
167
171
|
|
168
172
|
it 'only familyName and givenName' do
|
data/spec/cli_spec.rb
CHANGED
@@ -76,7 +76,7 @@ describe Briard::CLI do
|
|
76
76
|
|
77
77
|
it 'to citation' do
|
78
78
|
subject.options = { to: "citation", style: "vancouver" }
|
79
|
-
expect { subject.convert input }.to output(/Ollomo B, Durand P, Prugnolle F
|
79
|
+
expect { subject.convert input }.to output(/Ollomo B, Durand P, Prugnolle F/).to_stdout
|
80
80
|
end
|
81
81
|
|
82
82
|
it 'to jats' do
|
data/spec/doi_utils_spec.rb
CHANGED
@@ -51,46 +51,46 @@ describe Briard::Metadata, vcr: true do
|
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
|
-
context '
|
54
|
+
context 'datacite_api_url' do
|
55
55
|
it 'doi' do
|
56
56
|
doi = '10.5061/DRYAD.8515'
|
57
|
-
response = subject.
|
57
|
+
response = subject.datacite_api_url(doi)
|
58
58
|
expect(response).to eq('https://api.datacite.org/dois/10.5061/dryad.8515?include=media,client')
|
59
59
|
end
|
60
60
|
|
61
61
|
it 'doi with protocol' do
|
62
62
|
doi = 'doi:10.5061/DRYAD.8515'
|
63
|
-
response = subject.
|
63
|
+
response = subject.datacite_api_url(doi)
|
64
64
|
expect(response).to eq('https://api.datacite.org/dois/10.5061/dryad.8515?include=media,client')
|
65
65
|
end
|
66
66
|
|
67
67
|
it 'https url' do
|
68
68
|
doi = 'https://doi.org/10.5061/dryad.8515'
|
69
|
-
response = subject.
|
69
|
+
response = subject.datacite_api_url(doi)
|
70
70
|
expect(response).to eq('https://api.datacite.org/dois/10.5061/dryad.8515?include=media,client')
|
71
71
|
end
|
72
72
|
|
73
73
|
it 'dx.doi.org url' do
|
74
74
|
doi = 'http://dx.doi.org/10.5061/dryad.8515'
|
75
|
-
response = subject.
|
75
|
+
response = subject.datacite_api_url(doi)
|
76
76
|
expect(response).to eq('https://api.datacite.org/dois/10.5061/dryad.8515?include=media,client')
|
77
77
|
end
|
78
78
|
|
79
79
|
it 'test resolver' do
|
80
80
|
doi = 'https://handle.stage.datacite.org/10.5061/dryad.8515'
|
81
|
-
response = subject.
|
81
|
+
response = subject.datacite_api_url(doi)
|
82
82
|
expect(response).to eq('https://api.stage.datacite.org/dois/10.5061/dryad.8515?include=media,client')
|
83
83
|
end
|
84
84
|
|
85
85
|
it 'test resolver http' do
|
86
86
|
doi = 'http://handle.stage.datacite.org/10.5061/dryad.8515'
|
87
|
-
response = subject.
|
87
|
+
response = subject.datacite_api_url(doi)
|
88
88
|
expect(response).to eq('https://api.stage.datacite.org/dois/10.5061/dryad.8515?include=media,client')
|
89
89
|
end
|
90
90
|
|
91
91
|
it 'force test resolver' do
|
92
92
|
doi = 'https://doi.org/10.5061/dryad.8515'
|
93
|
-
response = subject.
|
93
|
+
response = subject.datacite_api_url(doi, sandbox: true)
|
94
94
|
expect(response).to eq('https://api.stage.datacite.org/dois/10.5061/dryad.8515?include=media,client')
|
95
95
|
end
|
96
96
|
end
|