bolognese 1.6.10 → 1.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +20 -17
- data/bolognese.gemspec +5 -5
- data/lib/bolognese/doi_utils.rb +1 -1
- data/lib/bolognese/metadata_utils.rb +1 -1
- 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 +13 -6
- data/lib/bolognese/utils.rb +1 -1
- data/lib/bolognese/version.rb +1 -1
- data/lib/bolognese/writers/codemeta_writer.rb +1 -1
- data/lib/bolognese/writers/jats_writer.rb +1 -1
- data/lib/bolognese/writers/schema_org_writer.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.json +5 -0
- 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_alternate_identifiers.yml +51 -0
- 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_identifiers.yml +51 -0
- 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 +52 -0
- 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 +52 -0
- 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 +52 -0
- 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 +52 -0
- 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 +44 -38
- data/spec/writers/bibtex_writer_spec.rb +2 -2
- data/spec/writers/citation_writer_spec.rb +16 -8
- data/spec/writers/citeproc_writer_spec.rb +11 -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 +25 -15
- data/spec/writers/jats_writer_spec.rb +17 -3
- data/spec/writers/ris_writer_spec.rb +6 -5
- data/spec/writers/schema_org_writer_spec.rb +15 -18
- metadata +22 -34
- 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: 3ac0ee73b69d1bcb02c47710f614f155f29c749dfe11bdbac818543ff7a4d552
|
4
|
+
data.tar.gz: c887eb61cf622633d71c36437eac5926fa4e40638f5a7fe5ae4c894ed52b39ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d617a7cd669a789a7b12a92c2e7c958fb1a1f0ac8953d105218ea2f027d63b635bd973504688ff958f91183a0894111c542410a013bbcdf1c7e2dfa30a580a51
|
7
|
+
data.tar.gz: 14024d1535562346ca08c236c9bbf7403bcae3b8b06e2db264ef7717e136c7d1e633fa6f96ff859d78b3ddc7d513bf7dc65b944be2dc18e3dffbbf3df0b9c51c
|
data/Gemfile.lock
CHANGED
@@ -1,23 +1,23 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
bolognese (1.
|
4
|
+
bolognese (1.7.3)
|
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
|
-
faraday (
|
14
|
+
faraday (~> 0.17.3)
|
15
15
|
gender_detector (~> 0.1.2)
|
16
16
|
iso8601 (~> 0.9.1)
|
17
|
-
json-ld (~> 3.1, >= 3.1.
|
17
|
+
json-ld-preloaded (~> 3.1, >= 3.1.3)
|
18
18
|
jsonlint (~> 0.3.0)
|
19
19
|
loofah (~> 2.0, >= 2.0.3)
|
20
|
-
maremma (>= 4.
|
20
|
+
maremma (>= 4.7, < 5)
|
21
21
|
namae (~> 1.0)
|
22
22
|
nokogiri (~> 1.10.4)
|
23
23
|
oj (~> 3.10)
|
@@ -56,7 +56,7 @@ GEM
|
|
56
56
|
namae (~> 1.0)
|
57
57
|
csl-styles (1.0.1.10)
|
58
58
|
csl (~> 1.0)
|
59
|
-
diff-lcs (1.4.
|
59
|
+
diff-lcs (1.4.4)
|
60
60
|
docile (1.3.2)
|
61
61
|
ebnf (1.2.0)
|
62
62
|
rdf (~> 3.1)
|
@@ -64,11 +64,11 @@ GEM
|
|
64
64
|
edtf (3.0.5)
|
65
65
|
activesupport (>= 3.0, < 7.0)
|
66
66
|
excon (0.71.1)
|
67
|
-
faraday (0.17.
|
67
|
+
faraday (0.17.3)
|
68
68
|
multipart-post (>= 1.2, < 3)
|
69
69
|
faraday-encoding (0.0.5)
|
70
70
|
faraday
|
71
|
-
faraday_middleware (0.
|
71
|
+
faraday_middleware (0.14.0)
|
72
72
|
faraday (>= 0.7.4, < 1.0)
|
73
73
|
gender_detector (0.1.2)
|
74
74
|
unicode_utils (>= 1.3.0)
|
@@ -90,6 +90,9 @@ GEM
|
|
90
90
|
multi_json (~> 1.14)
|
91
91
|
rack (~> 2.0)
|
92
92
|
rdf (~> 3.1)
|
93
|
+
json-ld-preloaded (3.1.3)
|
94
|
+
json-ld (~> 3.1)
|
95
|
+
rdf (~> 3.1)
|
93
96
|
jsonlint (0.3.0)
|
94
97
|
oj (~> 3)
|
95
98
|
optimist (~> 3)
|
@@ -98,23 +101,23 @@ GEM
|
|
98
101
|
loofah (2.6.0)
|
99
102
|
crass (~> 1.0.2)
|
100
103
|
nokogiri (>= 1.5.9)
|
101
|
-
maremma (4.7)
|
104
|
+
maremma (4.7.1)
|
102
105
|
activesupport (>= 4.2.5)
|
103
106
|
addressable (>= 2.3.6)
|
104
107
|
builder (~> 3.2, >= 3.2.2)
|
105
108
|
excon (~> 0.71.0)
|
106
|
-
faraday (
|
109
|
+
faraday (~> 0.17.3)
|
107
110
|
faraday-encoding (~> 0.0.4)
|
108
|
-
faraday_middleware (~> 0.
|
111
|
+
faraday_middleware (~> 0.14.0)
|
109
112
|
nokogiri (~> 1.10.4)
|
110
113
|
oj (>= 2.8.3)
|
111
114
|
oj_mimic_json (~> 1.0, >= 1.0.1)
|
112
115
|
mini_portile2 (2.4.0)
|
113
116
|
minitest (5.14.1)
|
114
|
-
multi_json (1.
|
117
|
+
multi_json (1.15.0)
|
115
118
|
multipart-post (2.1.1)
|
116
119
|
namae (1.0.1)
|
117
|
-
nokogiri (1.10.
|
120
|
+
nokogiri (1.10.10)
|
118
121
|
mini_portile2 (~> 2.4.0)
|
119
122
|
oj (3.10.6)
|
120
123
|
oj_mimic_json (1.0.1)
|
@@ -128,12 +131,12 @@ GEM
|
|
128
131
|
rack-test (0.8.3)
|
129
132
|
rack (>= 1.0, < 3)
|
130
133
|
rake (12.3.3)
|
131
|
-
rdf (3.1.
|
134
|
+
rdf (3.1.4)
|
132
135
|
hamster (~> 3.0)
|
133
136
|
link_header (~> 0.0, >= 0.0.8)
|
134
137
|
rdf-aggregate-repo (3.1.0)
|
135
138
|
rdf (~> 3.1)
|
136
|
-
rdf-rdfa (3.1.
|
139
|
+
rdf-rdfa (3.1.2)
|
137
140
|
haml (~> 5.1)
|
138
141
|
htmlentities (~> 4.3)
|
139
142
|
rdf (~> 3.1, >= 3.1.2)
|
@@ -148,7 +151,7 @@ GEM
|
|
148
151
|
rdf-turtle (3.1.1)
|
149
152
|
ebnf (~> 1.2)
|
150
153
|
rdf (~> 3.1, >= 3.1.2)
|
151
|
-
rdf-vocab (3.1.
|
154
|
+
rdf-vocab (3.1.7)
|
152
155
|
rdf (~> 3.1, >= 3.1.2)
|
153
156
|
rdf-xsd (3.1.0)
|
154
157
|
rdf (~> 3.1)
|
data/bolognese.gemspec
CHANGED
@@ -16,8 +16,8 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.required_ruby_version = '~> 2.3'
|
17
17
|
|
18
18
|
# Declare dependencies here, rather than in the Gemfile
|
19
|
-
s.add_dependency 'maremma', '>= 4.
|
20
|
-
s.add_dependency 'faraday',
|
19
|
+
s.add_dependency 'maremma', '>= 4.7', '< 5'
|
20
|
+
s.add_dependency 'faraday', '~> 0.17.3'
|
21
21
|
s.add_dependency 'nokogiri', '~> 1.10.4'
|
22
22
|
s.add_dependency 'loofah', '~> 2.0', '>= 2.0.3'
|
23
23
|
s.add_dependency 'builder', '~> 3.2', '>= 3.2.2'
|
@@ -27,11 +27,11 @@ 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
|
-
s.add_dependency 'json-ld', '~> 3.1', '>= 3.1.
|
34
|
+
s.add_dependency 'json-ld-preloaded', '~> 3.1', '>= 3.1.3'
|
35
35
|
s.add_dependency 'jsonlint', '~> 0.3.0'
|
36
36
|
s.add_dependency 'oj', '~> 3.10'
|
37
37
|
s.add_dependency "oj_mimic_json", "~> 1.0", ">= 1.0.1"
|
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 = {})
|
@@ -153,7 +153,7 @@ module Bolognese
|
|
153
153
|
"language" => language,
|
154
154
|
"author" => author,
|
155
155
|
"contributor" => to_citeproc(contributors),
|
156
|
-
"issued" => get_date(dates, "Issued") ? get_date_parts(get_date(dates, "Issued")) :
|
156
|
+
"issued" => get_date(dates, "Issued") ? get_date_parts(get_date(dates, "Issued")) : get_date_parts(publication_year),
|
157
157
|
"submitted" => Array.wrap(dates).find { |d| d["dateType"] == "Submitted" }.to_h.fetch("__content__", nil),
|
158
158
|
"abstract" => parse_attributes(descriptions, content: "description", first: true),
|
159
159
|
"container-title" => container_title,
|
@@ -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]
|
@@ -128,6 +126,14 @@ module Bolognese
|
|
128
126
|
dates << { "date" => meta.fetch("dateModified"), "dateType" => "Updated" } if Date.edtf(meta.fetch("dateModified", nil)).present?
|
129
127
|
publication_year = meta.fetch("datePublished")[0..3] if meta.fetch("datePublished", nil).present?
|
130
128
|
|
129
|
+
if meta.fetch("inLanguage", nil).is_a?(String)
|
130
|
+
language = meta.fetch("inLanguage")
|
131
|
+
elsif meta.fetch("inLanguage", nil).is_a?(Object)
|
132
|
+
language = meta.dig("inLanguage", 'alternateName') || meta.dig("inLanguage", 'name')
|
133
|
+
else
|
134
|
+
language = nil
|
135
|
+
end
|
136
|
+
|
131
137
|
state = meta.present? || read_options.present? ? "findable" : "not_found"
|
132
138
|
geo_locations = Array.wrap(meta.fetch("spatialCoverage", nil)).map do |gl|
|
133
139
|
if gl.dig("geo", "box")
|
@@ -136,7 +142,7 @@ module Bolognese
|
|
136
142
|
"westBoundLongitude" => w,
|
137
143
|
"eastBoundLongitude" => e,
|
138
144
|
"southBoundLatitude" => s,
|
139
|
-
"northBoundLatitude" => n
|
145
|
+
"northBoundLatitude" => n,
|
140
146
|
}.compact.presence
|
141
147
|
else
|
142
148
|
geo_location_box = nil
|
@@ -179,6 +185,7 @@ module Bolognese
|
|
179
185
|
"rights_list" => rights_list,
|
180
186
|
"version_info" => meta.fetch("version", nil).to_s.presence,
|
181
187
|
"subjects" => subjects,
|
188
|
+
"language" => language,
|
182
189
|
"state" => state,
|
183
190
|
"schema_version" => meta.fetch("schemaVersion", nil).to_s.presence,
|
184
191
|
"funding_references" => funding_references,
|
data/lib/bolognese/utils.rb
CHANGED
@@ -1200,7 +1200,7 @@ module Bolognese
|
|
1200
1200
|
|
1201
1201
|
# try to extract forId
|
1202
1202
|
if hsh["subjectScheme"] == "FOR"
|
1203
|
-
for_id = hsh["__content__"].split(" ").first || hsh["subject"].split(" ").first
|
1203
|
+
for_id = hsh["__content__"].to_s.split(" ").first || hsh["subject"].to_s.split(" ").first
|
1204
1204
|
for_id = for_id.rjust(6, "0")
|
1205
1205
|
|
1206
1206
|
subject = for_fields.find { |l| l["forId"] == for_id } ||
|
data/lib/bolognese/version.rb
CHANGED
@@ -17,7 +17,7 @@ module Bolognese
|
|
17
17
|
"description" => parse_attributes(descriptions, content: "description", first: true),
|
18
18
|
"version" => version_info,
|
19
19
|
"tags" => subjects.present? ? Array.wrap(subjects).map { |k| parse_attributes(k, content: "subject", first: true) } : nil,
|
20
|
-
"datePublished" => get_date(dates, "Issued"),
|
20
|
+
"datePublished" => get_date(dates, "Issued") || publication_year,
|
21
21
|
"dateModified" => get_date(dates, "Updated"),
|
22
22
|
"publisher" => publisher,
|
23
23
|
"license" => Array.wrap(rights_list).map { |l| l["rightsUri"] }.compact.unwrap,
|
@@ -21,7 +21,7 @@ module Bolognese
|
|
21
21
|
"contentSize" => Array.wrap(sizes).unwrap,
|
22
22
|
"encodingFormat" => Array.wrap(formats).unwrap,
|
23
23
|
"dateCreated" => get_date(dates, "Created"),
|
24
|
-
"datePublished" => get_date(dates, "Issued"),
|
24
|
+
"datePublished" => get_date(dates, "Issued") || publication_year,
|
25
25
|
"dateModified" => get_date(dates, "Updated"),
|
26
26
|
"pageStart" => container.to_h["firstPage"],
|
27
27
|
"pageEnd" => container.to_h["lastPage"],
|
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
|
|