bolognese 1.6.12 → 1.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/bolognese.gemspec +2 -2
- data/lib/bolognese/datacite_utils.rb +2 -3
- data/lib/bolognese/doi_utils.rb +1 -1
- data/lib/bolognese/metadata.rb +7 -2
- data/lib/bolognese/readers/bibtex_reader.rb +0 -1
- data/lib/bolognese/readers/citeproc_reader.rb +2 -14
- data/lib/bolognese/readers/codemeta_reader.rb +4 -7
- data/lib/bolognese/readers/crossref_reader.rb +3 -5
- data/lib/bolognese/readers/datacite_reader.rb +3 -5
- data/lib/bolognese/readers/ris_reader.rb +3 -9
- data/lib/bolognese/readers/schema_org_reader.rb +3 -5
- data/lib/bolognese/version.rb +1 -1
- data/spec/author_utils_spec.rb +1 -1
- data/spec/cli_spec.rb +2 -2
- data/spec/datacite_utils_spec.rb +14 -15
- data/spec/doi_utils_spec.rb +7 -7
- data/spec/fixtures/schema_org_gtex.json +0 -1
- data/spec/fixtures/schema_org_list.json +0 -5
- data/spec/fixtures/schema_org_topmed.json +0 -1
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/default.yml +19 -15
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_bibtex.yml +19 -15
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_citation.yml +19 -15
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_crossref.yml +19 -15
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_datacite.yml +19 -15
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_jats.yml +19 -15
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_schema_org.yml +19 -15
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/default.yml +24 -20
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_bibtex.yml +24 -20
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_citation.yml +25 -21
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_datacite.yml +25 -21
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_datacite_json.yml +25 -21
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_jats.yml +25 -21
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_schema_org.yml +24 -20
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/default.yml +24 -24
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/to_bibtex.yml +24 -24
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/to_datacite.yml +24 -24
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/to_schema_org.yml +24 -24
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/find_from_format_by_id/crossref.yml +13 -9
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/find_from_format_by_id/datacite.yml +13 -9
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/find_from_format_by_id/jalc.yml +13 -9
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/find_from_format_by_id/kisti.yml +13 -9
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/find_from_format_by_id/medra.yml +13 -9
- data/spec/fixtures/vcr_cassettes/Bolognese_CLI/find_from_format_by_id/op.yml +13 -9
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/authors_as_string/author.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/authors_as_string/no_author.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/authors_as_string/single_author.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/authors_as_string/with_organization.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_datacite_metadata/change_state.yml +25 -21
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_datacite_metadata/change_title.yml +24 -20
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/change_description.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/change_license.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/change_license_name.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/change_license_url.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/change_state.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/validates_against_schema.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/with_data_citation.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/doi.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/doi_with_protocol.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/dx_doi_org_url.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/force_test_resolver.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/https_url.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/test_resolver.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/test_resolver_http.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_from_url/doi.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_from_url/doi_with_special_characters.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_from_url/not_a_doi.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_from_url/sandbox_url.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_from_url/url.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/crossref.yml +19 -15
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/datacite.yml +19 -15
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/jalc.yml +19 -15
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/kisti.yml +19 -15
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/medra.yml +19 -15
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/not_a_valid_prefix.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/not_found.yml +19 -15
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/op.yml +19 -15
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/doi.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/doi_with_protocol.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/dx_doi_org_url.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/force_test_resolver.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/https_url.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/test_resolver.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/test_resolver_http.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/crossref.yml +41 -33
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/crossref_doi_not_url.yml +41 -33
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/datacite.yml +40 -32
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/datacite_doi_http.yml +40 -32
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/github.yml +28 -24
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/orcid.yml +28 -24
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/schema_org.yml +27 -23
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/unknown_DOI_registration_agency.yml +41 -33
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/bibtex.yml +28 -24
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/citeproc.yml +27 -23
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/codemeta.yml +27 -23
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/crosscite.yml +27 -23
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/crossref.yml +28 -24
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/datacite.yml +27 -23
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/datacite_json.yml +28 -24
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/ris.yml +28 -24
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/schema_org.yml +27 -23
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_string/crosscite.yml +28 -24
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/fos/hsh_to_fos_for_match.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/fos/hsh_to_fos_match.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/fos/hsh_to_fos_no_match.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/fos/name_to_fos_for_match.yml +4 -4
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/fos/name_to_fos_match.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/fos/name_to_fos_no_match.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/from_schema_org/with_id.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/from_schema_org_creators/with_affiliation.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/from_schema_org_creators/without_affiliation.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_codemeta_metadata/maremma.yml +25 -27
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_codemeta_metadata/metadata_reports.yml +23 -25
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/DOI_with_ORCID_ID.yml +18 -14
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/DOI_with_SICI_DOI.yml +18 -14
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/DOI_with_data_citation.yml +19 -15
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/JaLC.yml +18 -14
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/KISTI.yml +17 -13
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/OP.yml +19 -15
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/another_book.yml +18 -14
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/another_book_chapter.yml +19 -15
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/author_literal.yml +15 -13
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/book.yml +19 -15
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/book_chapter.yml +17 -13
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/book_chapter_with_RDF_for_container.yml +17 -15
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/component.yml +19 -15
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/dataset.yml +35 -31
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/dataset_usda.yml +29 -22
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/date_in_future.yml +19 -15
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/empty_given_name.yml +14 -12
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/invalid_date.yml +15 -15
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_article.yml +19 -15
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_article_original_language_title.yml +17 -13
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_article_with.yml +18 -14
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_article_with_RDF_for_container.yml +18 -16
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_article_with_funding.yml +19 -15
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_issue.yml +17 -13
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/mEDRA.yml +17 -13
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/markup.yml +26 -21
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/missing_creator.yml +19 -15
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/multiple_titles.yml +18 -14
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/not_found_error.yml +17 -13
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/posted_content.yml +19 -15
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/vor_with_url.yml +18 -14
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/yet_another_book.yml +18 -14
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/yet_another_book_chapter.yml +17 -13
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_json_metadata/metadata_from_api.yml +22 -20
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/BlogPosting.yml +28 -24
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_in_test_system.yml +26 -22
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_in_test_system_schema_3.yml +27 -23
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_in_with_related_id_system.yml +31 -28
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_not_found.yml +23 -19
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Dataset.yml +24 -20
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Funding.yml +25 -21
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Funding_empty_awardTitle.yml +24 -20
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Funding_schema_version_4.yml +25 -21
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Referee_report_in_test_system.yml +29 -24
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Schema_org_type.yml +24 -22
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/author_only_full_name.yml +24 -20
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/author_with_scheme.yml +25 -21
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/author_with_wrong_orcid_scheme.yml +24 -20
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/content_url.yml +29 -26
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/date.yml +38 -24
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/dissertation.yml +24 -20
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/doi_with_sign.yml +27 -24
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/empty_subject.yml +26 -22
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/even_more_subject_scheme_FOR.yml +19 -19
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/funding_references.yml +20 -18
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/funding_schema_version_3.yml +42 -38
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/is_identical_to.yml +25 -21
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/keywords_with_attributes.yml +35 -32
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/leading_and_trailing_whitespace.yml +33 -29
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/more_subject_scheme_FOR.yml +20 -19
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/multiple_author_names_in_one_creatorsName.yml +31 -28
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/multiple_licenses.yml +37 -33
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/series-information.yml +25 -21
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/subject_scheme.yml +24 -20
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/subject_scheme_FOR.yml +32 -25
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date/publication_date.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_date_parts/date.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_date_parts/year-month.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_date_parts/year.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_parts/date.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_parts/year-month.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_parts/year.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_parts/date.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_parts/year-month.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_parts/year.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datetime_from_time/future.yml +4 -4
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datetime_from_time/invalid.yml +4 -4
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datetime_from_time/nil.yml +4 -4
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datetime_from_time/past.yml +4 -4
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datetime_from_time/present.yml +4 -4
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_familyName.yml +14 -14
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_name_in_Thai.yml +12 -12
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_name_in_display-order.yml +25 -25
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_name_in_display-order_with_ORCID.yml +11 -11
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_name_in_sort-order.yml +11 -11
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/hyper-authorship.yml +1180 -1161
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/is_organization.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/multiple_author_names_in_one_field.yml +18 -19
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/multiple_name_identifier.yml +11 -11
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/name_with_affiliation.yml +11 -11
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/name_with_affiliation_and_country.yml +19 -19
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/name_with_role.yml +11 -11
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/only_familyName_and_givenName.yml +13 -9
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/BlogPosting.yml +26 -22
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/BlogPosting_with_new_DOI.yml +24 -22
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/harvard_dataverse.yml +7 -8
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/pangaea.yml +11 -9
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/zenodo.yml +70 -62
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_series_information/only_title.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_series_information/title_and_pages.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_series_information/title_volume_and_pages.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_series_information/title_volume_issue_and_pages.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/github/github_as_codemeta_url.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/github/github_from_url.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/github/github_from_url_file.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/handle_input/DOI_RA_not_Crossref_or_DataCite.yml +13 -9
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/handle_input/unknown_DOI_prefix.yml +13 -9
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_contributors/none.yml +12 -12
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_creators/insert.yml +11 -11
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_dates/insert.yml +12 -12
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_descriptions/insert.yml +15 -15
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_identifier/doi.yml +11 -11
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_language/insert.yml +11 -11
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_person/creator_only_name.yml +11 -11
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_publication_year/insert.yml +12 -12
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_publisher/insert.yml +11 -11
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_related_identifiers/insert.yml +11 -11
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_related_identifiers/related_identifier.yml +12 -12
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_resource_type/insert.yml +11 -11
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_rights_list/insert.yml +11 -11
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_sizes/insert.yml +12 -12
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_subjects/insert.yml +11 -11
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_titles/insert.yml +11 -11
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_version/insert.yml +12 -12
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_comma.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_family_name.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_id.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_known_given_name.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_no_info.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_orcid_id.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_type_organization.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/missing_comma.yml +28 -24
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/nil.yml +27 -23
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/overlapping_keys.yml +28 -24
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/valid.yml +28 -24
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_cc_url/not_found.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_cc_url/with_trailing_slash.yml +4 -4
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_cc_url/with_trailing_slash_and_to_https.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/SICI_doi.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_force_datacite_sandbox.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_from_datacite_sandbox.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_from_url_without_doi_proxy.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_prefix_too_long.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_prefix_with_string.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_with_protocol.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/dx_doi_org_url.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/https_url.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/not_valid_doi_prefix.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/url_with_one_slash.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/doi.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/doi_as_url.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/ftp.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/invalid_url.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/sandbox_via_options.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/sandbox_via_url.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/string.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/url.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/url_with_utf-8.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_ids/doi.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_ids/url.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_issn/from_array.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_issn/from_empty_array.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_issn/from_hash.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_issn/from_string.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_url/uri.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_url/with_trailing_slash.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_url/with_trailing_slash_and_to_https.yml +4 -4
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/array.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/array_of_strings.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/first.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/hash.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/nil.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/string.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/sanitize/should_only_keep_specific_tags.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/sanitize/should_remove_a_tags.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/hsh_to_spdx_id.yml +4 -4
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/hsh_to_spdx_not_found.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/hsh_to_spdx_url.yml +4 -4
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/name_to_spdx_exists.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/name_to_spdx_id.yml +4 -4
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/to_schema_org/with_id.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/to_schema_org_identifiers/with_identifiers.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_doi/doi.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/funder_doi.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/funder_doi_without_prefix.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/non-funder_doi.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_https.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_id.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_with_spaces.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_wrong_id.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_www.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid_scheme/validate_orcid_scheme.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid_scheme/validate_orcid_scheme_https.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid_scheme/validate_orcid_scheme_trailing_slash.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid_scheme/validate_orcid_scheme_www.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_prefix/doi.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_prefix/doi_as_url.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_prefix/doi_with_protocol.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_prefix/only_prefix.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_url/DOI.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_url/ISSN.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_url/URL.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_url/string.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/BlogPosting.yml +15 -15
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/Dataset.yml +12 -12
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/authors_with_affiliations.yml +19 -19
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/climate_data.yml +14 -15
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/from_schema_org.yml +24 -24
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/keywords_subject_scheme.yml +32 -25
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/maremma.yml +25 -27
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/text.yml +12 -12
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/with_data_citation.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/with_pages.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/Dataset.yml +12 -12
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/Journal_article.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/Journal_article_vancouver_style.yml +51 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/Missing_author.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/interactive_resource_without_dates.yml +8 -8
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/software_w/version.yml +19 -8
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/BlogPosting.yml +15 -15
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/BlogPosting_schema_org.yml +25 -23
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/Dataset.yml +11 -11
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/container_title.yml +12 -12
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/interactive_resource_without_dates.yml +8 -8
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/journal_article.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/keywords_subject_scheme.yml +32 -25
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/maremma.yml +25 -27
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/missing_creator.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/multiple_abstracts.yml +11 -11
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/organization_author.yml +4 -4
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/software.yml +11 -11
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/software_w/version.yml +23 -12
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/with_only_first_page.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/with_pages.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_codemeta/SoftwareSourceCode_DataCite.yml +14 -15
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_codemeta/SoftwareSourceCode_DataCite_check_codemeta_v2.yml +14 -15
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/datacite_database_attributes.yml +12 -12
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/maremma.yml +25 -27
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/with_ORCID_ID.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/with_data_citation.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/with_data_citation_schema_org.yml +24 -24
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crossref/from_DataCite.yml +12 -12
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_csv/climate_data.yml +13 -14
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_csv/maremma.yml +25 -27
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_csv/text.yml +11 -11
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_csv/with_data_citation.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_csv/with_pages.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_json/maremma.yml +25 -27
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_json/with_ORCID_ID.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_json/with_data_citation.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_json/with_data_citation_schema_org.yml +24 -24
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/DOI_not_found.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/Dataset_in_schema_4_0.yml +12 -12
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/Text_pass-thru.yml +33 -33
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/Text_pass-thru_with_doi_in_options.yml +34 -34
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/maremma.yml +25 -27
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_ORCID_ID.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_data_citation.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_data_citation_schema_org.yml +24 -24
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_editor.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_version.yml +16 -16
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/Dataset_in_schema_4_0.yml +11 -11
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/Text_pass-thru.yml +34 -34
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/book_chapter.yml +21 -21
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/interactive_resource_without_dates.yml +7 -7
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/maremma.yml +25 -27
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/with_ORCID_ID.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/with_data_citation.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/with_data_citation_schema_org.yml +23 -25
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/with_editor.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_rdf_xml/BlogPosting.yml +14 -14
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_rdf_xml/BlogPosting_schema_org.yml +20 -20
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_rdf_xml/journal_article.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_rdf_xml/maremma.yml +22 -24
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_rdf_xml/with_pages.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/BlogPosting.yml +14 -14
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/BlogPosting_schema_org.yml +24 -24
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/Dataset.yml +12 -12
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/alternate_name.yml +12 -12
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/journal_article.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/keywords_with_subject_scheme.yml +31 -24
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/maremma.yml +25 -27
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/with_pages.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Funding.yml +18 -18
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Funding_OpenAIRE.yml +28 -17
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON.yml +24 -24
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON_Cyark.yml +40 -18
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON_IsSupplementTo.yml +18 -18
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON_isReferencedBy.yml +12 -12
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/alternate_identifiers.yml +16 -17
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/data_catalog.yml +13 -14
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/geo_location_box.yml +36 -28
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/interactive_resource_without_dates.yml +7 -7
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/journal_article.yml +6 -6
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/maremma_schema_org_JSON.yml +25 -27
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/series_information.yml +11 -11
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/subject_scheme.yml +12 -12
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/subject_scheme_multiple_keywords.yml +31 -24
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/BlogPosting.yml +14 -14
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/BlogPosting_schema_org.yml +20 -20
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/Dataset.yml +12 -12
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/journal_article.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/with_pages.yml +5 -5
- data/spec/readers/bibtex_reader_spec.rb +3 -3
- data/spec/readers/citeproc_reader_spec.rb +3 -3
- data/spec/readers/codemeta_reader_spec.rb +4 -4
- data/spec/readers/crossref_reader_spec.rb +73 -63
- data/spec/readers/datacite_json_reader_spec.rb +2 -1
- data/spec/readers/datacite_reader_spec.rb +94 -92
- data/spec/readers/ris_reader_spec.rb +4 -4
- data/spec/readers/schema_org_reader_spec.rb +40 -38
- data/spec/writers/bibtex_writer_spec.rb +2 -2
- data/spec/writers/citation_writer_spec.rb +8 -8
- data/spec/writers/citeproc_writer_spec.rb +2 -2
- data/spec/writers/codemeta_writer_spec.rb +0 -1
- data/spec/writers/crosscite_writer_spec.rb +3 -3
- data/spec/writers/datacite_writer_spec.rb +14 -15
- data/spec/writers/jats_writer_spec.rb +3 -3
- data/spec/writers/ris_writer_spec.rb +6 -5
- data/spec/writers/schema_org_writer_spec.rb +6 -18
- metadata +7 -25
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/error_unknown.yml +0 -88
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/jj.yml +0 -87
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/multiple_t.yml +0 -47
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/xs_string_attributes.yml +0 -93
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datetime_from_timestamp/present.yml +0 -44
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/is_crossrer_organization.yml +0 -44
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/harvard_dataverse_via_identifiers_org.yml +0 -158
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/ornl.yml +0 -706
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_alternate_identifiers/insert.yml +0 -49
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_formats/insert.yml +0 -49
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_person/creator_given_and_family_name.yml +0 -49
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_url/to_https.yml +0 -44
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/hsh_to_spdx_id_lowercase.yml +0 -44
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/name_to_spdx_not_found.yml +0 -44
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/url_to_https/http.yml +0 -44
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/url_to_https/uri.yml +0 -44
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/url_to_https/with_trailing_slash.yml +0 -44
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/dataset_neurophysiology.yml +0 -116
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/with_first_page.yml +0 -46
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34f2f4c88f2a10491132ce386d931e83f5f84fed96bf4accf442e82d2c59889e
|
4
|
+
data.tar.gz: 5a8ec1c8fe1962d6531effeca7ca3d0e769506d9580d00b559ac0e8d2f11ed83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99c48d238c54eaf64003bacd6488c558d837c37405fc59acb46a17d9999f838f9bde197c966d3bef35e315febd789dc6f06c0732f46d8a53462433a38cd08cf1
|
7
|
+
data.tar.gz: 71240642a6069ef06e412ad4fc28b80fd84768021c21b770d9553aa85f09a440f66ffd7b982bc82a549970b2987bbc32627e2b2a593f565ccea0bc42e743ee0b
|
data/Gemfile.lock
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
bolognese (1.
|
4
|
+
bolognese (1.7.1)
|
5
5
|
activesupport (>= 4.2.5)
|
6
6
|
benchmark_methods (~> 0.7)
|
7
7
|
bibtex-ruby (>= 5.1.0)
|
8
8
|
builder (~> 3.2, >= 3.2.2)
|
9
|
-
citeproc-ruby (~> 1.1, >= 1.1.
|
9
|
+
citeproc-ruby (~> 1.1, >= 1.1.12)
|
10
10
|
colorize (~> 0.8.1)
|
11
11
|
concurrent-ruby (~> 1.1, >= 1.1.5)
|
12
|
-
csl-styles (~> 1.0, >= 1.0.1.
|
12
|
+
csl-styles (~> 1.0, >= 1.0.1.10)
|
13
13
|
edtf (~> 3.0, >= 3.0.4)
|
14
14
|
faraday (~> 0.17.3)
|
15
15
|
gender_detector (~> 0.1.2)
|
data/bolognese.gemspec
CHANGED
@@ -27,8 +27,8 @@ Gem::Specification.new do |s|
|
|
27
27
|
s.add_dependency 'colorize', '~> 0.8.1'
|
28
28
|
s.add_dependency 'namae', '~> 1.0'
|
29
29
|
s.add_dependency 'edtf', '~> 3.0', '>= 3.0.4'
|
30
|
-
s.add_dependency 'citeproc-ruby', '~> 1.1', '>= 1.1.
|
31
|
-
s.add_dependency 'csl-styles', '~> 1.0', '>= 1.0.1.
|
30
|
+
s.add_dependency 'citeproc-ruby', '~> 1.1', '>= 1.1.12'
|
31
|
+
s.add_dependency 'csl-styles', '~> 1.0', '>= 1.0.1.10'
|
32
32
|
s.add_dependency 'iso8601', '~> 0.9.1'
|
33
33
|
s.add_dependency 'postrank-uri', '~> 1.0', '>= 1.0.18'
|
34
34
|
s.add_dependency 'json-ld', '~> 3.1', '>= 3.1.4'
|
@@ -116,11 +116,10 @@ module Bolognese
|
|
116
116
|
end
|
117
117
|
|
118
118
|
def insert_alternate_identifiers(xml)
|
119
|
-
|
120
|
-
return xml unless alternate_identifiers.present?
|
119
|
+
return xml unless identifiers.present?
|
121
120
|
|
122
121
|
xml.alternateIdentifiers do
|
123
|
-
Array.wrap(
|
122
|
+
Array.wrap(identifiers).each do |alternate_identifier|
|
124
123
|
xml.alternateIdentifier(alternate_identifier["identifier"], 'alternateIdentifierType' => alternate_identifier["identifierType"])
|
125
124
|
end
|
126
125
|
end
|
data/lib/bolognese/doi_utils.rb
CHANGED
@@ -28,7 +28,7 @@ module Bolognese
|
|
28
28
|
|
29
29
|
def doi_api_url(doi, options = {})
|
30
30
|
sandbox = Array(/handle.test.datacite.org/.match(doi)).last
|
31
|
-
sandbox.present? || options[:sandbox] ? "https://api.test.datacite.org/dois
|
31
|
+
sandbox.present? || options[:sandbox] ? "https://api.test.datacite.org/dois/#{doi_from_url(doi)}?include=media,client" : "https://api.datacite.org/dois/#{doi_from_url(doi)}?include=media,client"
|
32
32
|
end
|
33
33
|
|
34
34
|
def normalize_doi(doi, options = {})
|
data/lib/bolognese/metadata.rb
CHANGED
@@ -8,7 +8,7 @@ module Bolognese
|
|
8
8
|
|
9
9
|
attr_accessor :string, :from, :sandbox, :meta, :regenerate, :issue, :show_errors
|
10
10
|
attr_reader :doc, :page_start, :page_end
|
11
|
-
attr_writer :id, :provider_id, :client_id, :doi, :identifiers, :creators, :contributors, :titles, :publisher,
|
11
|
+
attr_writer :id, :provider_id, :client_id, :doi, :identifiers, :alternate_identifiers, :creators, :contributors, :titles, :publisher,
|
12
12
|
:rights_list, :dates, :publication_year, :volume, :url, :version_info,
|
13
13
|
:subjects, :contributor, :descriptions, :language, :sizes,
|
14
14
|
:formats, :schema_version, :meta, :container, :agency,
|
@@ -99,6 +99,7 @@ module Bolognese
|
|
99
99
|
:titles,
|
100
100
|
:types,
|
101
101
|
:identifiers,
|
102
|
+
:alternate_identifiers,
|
102
103
|
:container,
|
103
104
|
:publisher,
|
104
105
|
:funding_references,
|
@@ -215,7 +216,11 @@ module Bolognese
|
|
215
216
|
end
|
216
217
|
|
217
218
|
def identifiers
|
218
|
-
@identifiers ||= meta.fetch("identifiers", nil)
|
219
|
+
@identifiers ||= Array.wrap(@alternate_identifiers).map { |a| { "identifierType" => a["alternateIdentifierType"], "identifier" => a["alternateIdentifier"] } }.presence || meta.fetch("identifiers", nil)
|
220
|
+
# (Array.wrap(@identifiers) +
|
221
|
+
# Array.wrap(@alternate_identifiers).select { |r| r["alternateIdentifierType"] != "DOI" }.map do |a|
|
222
|
+
# { "identifierType" => a["alternateIdentifierType"], "identifier" => a["alternateIdentifier"] }
|
223
|
+
# end).uniq ||= meta.fetch("identifiers", nil)
|
219
224
|
end
|
220
225
|
|
221
226
|
def content_url
|
@@ -80,7 +80,6 @@ module Bolognese
|
|
80
80
|
|
81
81
|
{ "id" => normalize_doi(doi),
|
82
82
|
"types" => types,
|
83
|
-
"identifiers" => [{ "identifier" => normalize_doi(doi), "identifierType" => "DOI" }],
|
84
83
|
"doi" => doi,
|
85
84
|
"url" => meta.try(:url).to_s.presence,
|
86
85
|
"titles" => meta.try(:title).present? ? [{ "title" => meta.try(:title).to_s }] : [],
|
@@ -86,19 +86,8 @@ module Bolognese
|
|
86
86
|
nil
|
87
87
|
end
|
88
88
|
|
89
|
-
|
90
|
-
r = normalize_id(r)
|
89
|
+
id = normalize_id(meta.fetch("id", nil) || meta.fetch("DOI", nil))
|
91
90
|
|
92
|
-
if r.start_with?("https://doi.org")
|
93
|
-
{ "identifierType" => "DOI", "identifier" => r }
|
94
|
-
else
|
95
|
-
{ "identifierType" => "URL", "identifier" => r }
|
96
|
-
end
|
97
|
-
end.uniq
|
98
|
-
|
99
|
-
id = Array.wrap(identifiers).first.to_h.fetch("identifier", nil)
|
100
|
-
doi = Array.wrap(identifiers).find { |r| r["identifierType"] == "DOI" }.to_h.fetch("identifier", nil)
|
101
|
-
|
102
91
|
state = id.present? || read_options.present? ? "findable" : "not_found"
|
103
92
|
subjects = Array.wrap(meta.fetch("categories", nil)).reduce([]) do |sum, subject|
|
104
93
|
sum += name_to_fos(subject)
|
@@ -107,9 +96,8 @@ module Bolognese
|
|
107
96
|
end
|
108
97
|
|
109
98
|
{ "id" => id,
|
110
|
-
"identifiers" => identifiers,
|
111
99
|
"types" => types,
|
112
|
-
"doi" => doi_from_url(
|
100
|
+
"doi" => doi_from_url(id),
|
113
101
|
"url" => normalize_id(meta.fetch("URL", nil)),
|
114
102
|
"titles" => [{ "title" => meta.fetch("title", nil) }],
|
115
103
|
"creators" => creators,
|
@@ -22,19 +22,16 @@ module Bolognese
|
|
22
22
|
|
23
23
|
meta = string.present? ? Maremma.from_json(string) : {}
|
24
24
|
|
25
|
-
identifiers =
|
25
|
+
identifiers = Array.wrap(meta.fetch("identifier", nil)).map do |r|
|
26
26
|
r = normalize_id(r) if r.is_a?(String)
|
27
|
-
if r.is_a?(String) && r.start_with?("https://doi.org")
|
28
|
-
{ "identifierType" => "DOI", "identifier" => r }
|
29
|
-
elsif r.is_a?(String)
|
27
|
+
if r.is_a?(String) && !r.start_with?("https://doi.org")
|
30
28
|
{ "identifierType" => "URL", "identifier" => r }
|
31
29
|
elsif r.is_a?(Hash)
|
32
30
|
{ "identifierType" => get_identifier_type(r["propertyID"]), "identifier" => r["value"] }
|
33
31
|
end
|
34
32
|
end.compact.uniq
|
35
33
|
|
36
|
-
id =
|
37
|
-
doi = Array.wrap(identifiers).find { |r| r["identifierType"] == "DOI" }.to_h.fetch("identifier", nil)
|
34
|
+
id = normalize_id(options[:doi] || meta.fetch("@id", nil) || meta.fetch("identifier", nil))
|
38
35
|
|
39
36
|
has_agents = meta.fetch("agents", nil)
|
40
37
|
authors = has_agents.nil? ? meta.fetch("authors", nil) : has_agents
|
@@ -70,7 +67,7 @@ module Bolognese
|
|
70
67
|
{ "id" => id,
|
71
68
|
"types" => types,
|
72
69
|
"identifiers" => identifiers,
|
73
|
-
"doi" => doi_from_url(
|
70
|
+
"doi" => doi_from_url(id),
|
74
71
|
"url" => normalize_id(meta.fetch("codeRepository", nil)),
|
75
72
|
"titles" => titles,
|
76
73
|
"creators" => creators,
|
@@ -150,14 +150,12 @@ module Bolognese
|
|
150
150
|
"volume" => bibliographic_metadata.fetch("volume", nil) }.compact
|
151
151
|
end
|
152
152
|
|
153
|
-
|
154
|
-
|
155
|
-
id = Array.wrap(identifiers).first.to_h.fetch("identifier", nil)
|
156
|
-
doi = Array.wrap(identifiers).find { |r| r["identifierType"] == "DOI" }.to_h.fetch("identifier", nil)
|
153
|
+
id = normalize_doi(options[:doi] || options[:id] || bibliographic_metadata.dig("doi_data", "doi"))
|
154
|
+
identifiers = [crossref_alternate_identifiers(bibliographic_metadata)].compact
|
157
155
|
|
158
156
|
{ "id" => id,
|
159
157
|
"types" => types,
|
160
|
-
"doi" => doi_from_url(
|
158
|
+
"doi" => doi_from_url(id),
|
161
159
|
"url" => parse_attributes(bibliographic_metadata.dig("doi_data", "resource"), first: true),
|
162
160
|
"titles" => titles,
|
163
161
|
"identifiers" => identifiers,
|
@@ -74,14 +74,12 @@ module Bolognese
|
|
74
74
|
id = normalize_doi(meta.dig("identifier", "__content__") || options[:id], sandbox: options[:sandbox])
|
75
75
|
end
|
76
76
|
|
77
|
-
identifiers =
|
77
|
+
identifiers = Array.wrap(meta.dig("alternateIdentifiers", "alternateIdentifier")).map do |r|
|
78
78
|
if r["__content__"].present?
|
79
79
|
{ "identifierType" => get_identifier_type(r["alternateIdentifierType"]), "identifier" => r["__content__"] }
|
80
80
|
end
|
81
81
|
end.compact
|
82
82
|
|
83
|
-
doi = Array.wrap(identifiers).find { |r| r["identifierType"] == "DOI" }.to_h.fetch("identifier", nil)
|
84
|
-
|
85
83
|
resource_type_general = meta.dig("resourceType", "resourceTypeGeneral")
|
86
84
|
resource_type = meta.dig("resourceType", "__content__")
|
87
85
|
schema_org = Bolognese::Utils::CR_TO_SO_TRANSLATIONS[resource_type.to_s.underscore.camelcase] || Bolognese::Utils::DC_TO_SO_TRANSLATIONS[resource_type_general.to_s.dasherize] || "CreativeWork"
|
@@ -217,11 +215,11 @@ module Bolognese
|
|
217
215
|
end
|
218
216
|
end.compact
|
219
217
|
|
220
|
-
state =
|
218
|
+
state = id.present? || read_options.present? ? "findable" : "not_found"
|
221
219
|
|
222
220
|
{ "id" => id,
|
223
221
|
"types" => types,
|
224
|
-
"doi" => doi_from_url(
|
222
|
+
"doi" => doi_from_url(id),
|
225
223
|
"identifiers" => identifiers,
|
226
224
|
"url" => options.fetch(:url, nil).to_s.strip.presence,
|
227
225
|
"titles" => titles,
|
@@ -47,13 +47,8 @@ module Bolognese
|
|
47
47
|
"ris" => ris_type
|
48
48
|
}.compact
|
49
49
|
|
50
|
-
|
51
|
-
|
52
|
-
end.compact
|
53
|
-
|
54
|
-
id = Array.wrap(identifiers).first.to_h.fetch("identifier", nil)
|
55
|
-
doi = Array.wrap(identifiers).find { |r| r["identifierType"] == "DOI" }.to_h.fetch("identifier", nil)
|
56
|
-
|
50
|
+
id = normalize_doi(options[:doi] || meta.fetch("DO", nil))
|
51
|
+
|
57
52
|
author = Array.wrap(meta.fetch("AU", nil)).map { |a| { "creatorName" => a } }
|
58
53
|
date_parts = meta.fetch("PY", nil).to_s.split("/")
|
59
54
|
created_date_parts = meta.fetch("Y1", nil).to_s.split("/")
|
@@ -90,8 +85,7 @@ module Bolognese
|
|
90
85
|
|
91
86
|
{ "id" => id,
|
92
87
|
"types" => types,
|
93
|
-
"
|
94
|
-
"doi" => doi_from_url(doi),
|
88
|
+
"doi" => doi_from_url(id),
|
95
89
|
"url" => meta.fetch("UR", nil),
|
96
90
|
"titles" => meta.fetch("T1", nil).present? ? [{ "title" => meta.fetch("T1", nil) }] : nil,
|
97
91
|
"creators" => get_authors(author),
|
@@ -48,18 +48,16 @@ module Bolognese
|
|
48
48
|
|
49
49
|
meta = string.present? ? Maremma.from_json(string) : {}
|
50
50
|
|
51
|
-
identifiers =
|
51
|
+
identifiers = Array.wrap(meta.fetch("identifier", nil)).map do |r|
|
52
52
|
r = normalize_id(r) if r.is_a?(String)
|
53
|
-
if r.is_a?(String) && r.start_with?("https://doi.org")
|
54
|
-
{ "identifierType" => "DOI", "identifier" => r }
|
55
|
-
elsif r.is_a?(String)
|
53
|
+
if r.is_a?(String) && !r.start_with?("https://doi.org")
|
56
54
|
{ "identifierType" => "URL", "identifier" => r }
|
57
55
|
elsif r.is_a?(Hash)
|
58
56
|
{ "identifierType" => get_identifier_type(r["propertyID"]), "identifier" => r["value"] }
|
59
57
|
end
|
60
58
|
end.compact.uniq
|
61
59
|
|
62
|
-
id =
|
60
|
+
id = normalize_id(options[:doi] || meta.fetch("@id", nil) || meta.fetch("identifier", nil))
|
63
61
|
|
64
62
|
schema_org = meta.fetch("@type", nil) && meta.fetch("@type").camelcase
|
65
63
|
resource_type_general = Bolognese::Utils::SO_TO_DC_TRANSLATIONS[schema_org]
|
data/lib/bolognese/version.rb
CHANGED
data/spec/author_utils_spec.rb
CHANGED
@@ -57,7 +57,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
57
57
|
subject = Bolognese::Metadata.new(input: input, from: "datacite")
|
58
58
|
meta = Maremma.from_xml(subject.raw).fetch("resource", {})
|
59
59
|
response = subject.get_one_author(meta.dig("creators", "creator").first)
|
60
|
-
expect(response).to eq("nameType"=>"Personal", "name"=>"Ollomo, Benjamin", "givenName"=>"Benjamin", "familyName"=>"Ollomo", "nameIdentifiers" => [], "affiliation" => [])
|
60
|
+
expect(response).to eq("nameType"=>"Personal", "name"=>"Ollomo, Benjamin", "givenName"=>"Benjamin", "familyName"=>"Ollomo", "nameIdentifiers" => [], "affiliation" => [{"affiliationIdentifier"=>"https://ror.org/01wyqb997", "affiliationIdentifierScheme"=>"ROR", "name"=>"Centre International de Recherches Médicales de Franceville"}])
|
61
61
|
end
|
62
62
|
|
63
63
|
it "has name in display-order" do
|
data/spec/cli_spec.rb
CHANGED
@@ -51,12 +51,12 @@ describe Bolognese::CLI do
|
|
51
51
|
let(:input) { "10.5061/dryad.8515" }
|
52
52
|
|
53
53
|
it 'default' do
|
54
|
-
expect { subject.convert input }.to output(/
|
54
|
+
expect { subject.convert input }.to output(/Plasmodium, malaria, taxonomy, mitochondrial genome, phylogeny, Parasites/).to_stdout
|
55
55
|
end
|
56
56
|
|
57
57
|
it 'to schema_org' do
|
58
58
|
subject.options = { to: "schema_org" }
|
59
|
-
expect { subject.convert input }.to output(/
|
59
|
+
expect { subject.convert input }.to output(/Plasmodium, malaria, taxonomy, mitochondrial genome, phylogeny, Parasites/).to_stdout
|
60
60
|
end
|
61
61
|
|
62
62
|
it 'to bibtex' do
|
data/spec/datacite_utils_spec.rb
CHANGED
@@ -19,7 +19,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
19
19
|
it "insert" do
|
20
20
|
xml = Nokogiri::XML::Builder.new(:encoding => 'UTF-8') { |xml| subject.insert_creators(xml) }.to_xml
|
21
21
|
response = Maremma.from_xml(xml)
|
22
|
-
expect(response.dig("creators", "creator").first).to eq("creatorName"=>{"__content__"=>"Ollomo, Benjamin", "nameType"=>"Personal"}, "familyName"=>"Ollomo", "givenName"=>"Benjamin")
|
22
|
+
expect(response.dig("creators", "creator").first).to eq("affiliation" => {"__content__"=>"Centre International de Recherches Médicales de Franceville", "affiliationIdentifier"=>"https://ror.org/01wyqb997", "affiliationIdentifierScheme"=>"ROR"}, "creatorName"=>{"__content__"=>"Ollomo, Benjamin", "nameType"=>"Personal"}, "familyName"=>"Ollomo", "givenName"=>"Benjamin")
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
@@ -61,7 +61,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
61
61
|
it "insert" do
|
62
62
|
xml = Nokogiri::XML::Builder.new(:encoding => 'UTF-8') { |xml| subject.insert_publisher(xml) }.to_xml
|
63
63
|
response = Maremma.from_xml(xml)
|
64
|
-
expect(response["publisher"]).to eq("Dryad
|
64
|
+
expect(response["publisher"]).to eq("Dryad")
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
@@ -77,17 +77,17 @@ describe Bolognese::Metadata, vcr: true do
|
|
77
77
|
it "insert" do
|
78
78
|
xml = Nokogiri::XML::Builder.new(:encoding => 'UTF-8') { |xml| subject.insert_resource_type(xml) }.to_xml
|
79
79
|
response = Maremma.from_xml(xml)
|
80
|
-
expect(response["resourceType"]).to eq("resourceTypeGeneral"=>"Dataset", "__content__"=>"
|
80
|
+
expect(response["resourceType"]).to eq("resourceTypeGeneral"=>"Dataset", "__content__"=>"dataset")
|
81
81
|
end
|
82
82
|
end
|
83
83
|
|
84
|
-
context "insert_alternate_identifiers" do
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
end
|
84
|
+
# context "insert_alternate_identifiers" do
|
85
|
+
# it "insert" do
|
86
|
+
# xml = Nokogiri::XML::Builder.new(:encoding => 'UTF-8') { |xml| subject.insert_alternate_identifiers(xml) }.to_xml
|
87
|
+
# response = Maremma.from_xml(xml)
|
88
|
+
# expect(response.dig("alternateIdentifiers", "alternateIdentifier").to be_nil)
|
89
|
+
# end
|
90
|
+
# end
|
91
91
|
|
92
92
|
context "insert_dates" do
|
93
93
|
it "insert" do
|
@@ -101,7 +101,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
101
101
|
it "insert" do
|
102
102
|
xml = Nokogiri::XML::Builder.new(:encoding => 'UTF-8') { |xml| subject.insert_subjects(xml) }.to_xml
|
103
103
|
response = Maremma.from_xml(xml)
|
104
|
-
expect(response.dig("subjects", "subject")).to eq(["
|
104
|
+
expect(response.dig("subjects", "subject")).to eq(["Plasmodium", "malaria", "taxonomy", "mitochondrial genome", "phylogeny", "Parasites"])
|
105
105
|
end
|
106
106
|
end
|
107
107
|
|
@@ -143,15 +143,14 @@ describe Bolognese::Metadata, vcr: true do
|
|
143
143
|
|
144
144
|
context "insert_related_identifiers" do
|
145
145
|
it "related_identifier" do
|
146
|
-
expect(subject.related_identifiers.length).to eq(
|
147
|
-
expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"10.
|
146
|
+
expect(subject.related_identifiers.length).to eq(1)
|
147
|
+
expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"10.1371/journal.ppat.1000446", "relatedIdentifierType"=>"DOI", "relationType"=>"IsSupplementTo")
|
148
148
|
end
|
149
149
|
|
150
150
|
it "insert" do
|
151
151
|
xml = Nokogiri::XML::Builder.new(:encoding => 'UTF-8') { |xml| subject.insert_related_identifiers(xml) }.to_xml
|
152
152
|
response = Maremma.from_xml(xml)
|
153
|
-
expect(response.dig("relatedIdentifiers", "relatedIdentifier")
|
154
|
-
expect(response.dig("relatedIdentifiers", "relatedIdentifier").first).to eq("__content__"=>"10.5061/dryad.8515/1", "relatedIdentifierType"=>"DOI", "relationType"=>"HasPart")
|
153
|
+
expect(response.dig("relatedIdentifiers", "relatedIdentifier")).to eq("__content__"=>"10.1371/journal.ppat.1000446", "relatedIdentifierType"=>"DOI", "relationType"=>"IsSupplementTo")
|
155
154
|
end
|
156
155
|
end
|
157
156
|
|
data/spec/doi_utils_spec.rb
CHANGED
@@ -55,43 +55,43 @@ describe Bolognese::Metadata, vcr: true do
|
|
55
55
|
it "doi" do
|
56
56
|
doi = "10.5061/DRYAD.8515"
|
57
57
|
response = subject.doi_api_url(doi)
|
58
|
-
expect(response).to eq("https://api.datacite.org/dois/10.5061/dryad.8515")
|
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
63
|
response = subject.doi_api_url(doi)
|
64
|
-
expect(response).to eq("https://api.datacite.org/dois/10.5061/dryad.8515")
|
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
69
|
response = subject.doi_api_url(doi)
|
70
|
-
expect(response).to eq("https://api.datacite.org/dois/10.5061/dryad.8515")
|
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
75
|
response = subject.doi_api_url(doi)
|
76
|
-
expect(response).to eq("https://api.datacite.org/dois/10.5061/dryad.8515")
|
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.test.datacite.org/10.5061/dryad.8515"
|
81
81
|
response = subject.doi_api_url(doi)
|
82
|
-
expect(response).to eq("https://api.test.datacite.org/dois/10.5061/dryad.8515")
|
82
|
+
expect(response).to eq("https://api.test.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.test.datacite.org/10.5061/dryad.8515"
|
87
87
|
response = subject.doi_api_url(doi)
|
88
|
-
expect(response).to eq("https://api.test.datacite.org/dois/10.5061/dryad.8515")
|
88
|
+
expect(response).to eq("https://api.test.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
93
|
response = subject.doi_api_url(doi, sandbox: true)
|
94
|
-
expect(response).to eq("https://api.test.datacite.org/dois/10.5061/dryad.8515")
|
94
|
+
expect(response).to eq("https://api.test.datacite.org/dois/10.5061/dryad.8515?include=media,client")
|
95
95
|
end
|
96
96
|
end
|
97
97
|
|