bolognese 1.6.12 → 1.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (456) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +3 -3
  3. data/bolognese.gemspec +2 -2
  4. data/lib/bolognese/datacite_utils.rb +2 -3
  5. data/lib/bolognese/doi_utils.rb +1 -1
  6. data/lib/bolognese/metadata.rb +7 -2
  7. data/lib/bolognese/readers/bibtex_reader.rb +0 -1
  8. data/lib/bolognese/readers/citeproc_reader.rb +2 -14
  9. data/lib/bolognese/readers/codemeta_reader.rb +4 -7
  10. data/lib/bolognese/readers/crossref_reader.rb +3 -5
  11. data/lib/bolognese/readers/datacite_reader.rb +3 -5
  12. data/lib/bolognese/readers/ris_reader.rb +3 -9
  13. data/lib/bolognese/readers/schema_org_reader.rb +3 -5
  14. data/lib/bolognese/version.rb +1 -1
  15. data/spec/author_utils_spec.rb +1 -1
  16. data/spec/cli_spec.rb +2 -2
  17. data/spec/datacite_utils_spec.rb +14 -15
  18. data/spec/doi_utils_spec.rb +7 -7
  19. data/spec/fixtures/schema_org_gtex.json +0 -1
  20. data/spec/fixtures/schema_org_list.json +0 -5
  21. data/spec/fixtures/schema_org_topmed.json +0 -1
  22. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/default.yml +19 -15
  23. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_bibtex.yml +19 -15
  24. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_citation.yml +19 -15
  25. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_crossref.yml +19 -15
  26. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_datacite.yml +19 -15
  27. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_jats.yml +19 -15
  28. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_schema_org.yml +19 -15
  29. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/default.yml +24 -20
  30. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_bibtex.yml +24 -20
  31. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_citation.yml +25 -21
  32. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_datacite.yml +25 -21
  33. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_datacite_json.yml +25 -21
  34. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_jats.yml +25 -21
  35. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_schema_org.yml +24 -20
  36. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/default.yml +24 -24
  37. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/to_bibtex.yml +24 -24
  38. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/to_datacite.yml +24 -24
  39. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/to_schema_org.yml +24 -24
  40. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/find_from_format_by_id/crossref.yml +13 -9
  41. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/find_from_format_by_id/datacite.yml +13 -9
  42. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/find_from_format_by_id/jalc.yml +13 -9
  43. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/find_from_format_by_id/kisti.yml +13 -9
  44. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/find_from_format_by_id/medra.yml +13 -9
  45. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/find_from_format_by_id/op.yml +13 -9
  46. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/authors_as_string/author.yml +6 -6
  47. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/authors_as_string/no_author.yml +6 -6
  48. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/authors_as_string/single_author.yml +6 -6
  49. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/authors_as_string/with_organization.yml +6 -6
  50. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_datacite_metadata/change_state.yml +25 -21
  51. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_datacite_metadata/change_title.yml +24 -20
  52. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/change_description.yml +6 -6
  53. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/change_license.yml +6 -6
  54. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/change_license_name.yml +6 -6
  55. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/change_license_url.yml +6 -6
  56. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/change_state.yml +6 -6
  57. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/validates_against_schema.yml +6 -6
  58. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/with_data_citation.yml +6 -6
  59. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/doi.yml +6 -6
  60. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/doi_with_protocol.yml +6 -6
  61. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/dx_doi_org_url.yml +6 -6
  62. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/force_test_resolver.yml +6 -6
  63. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/https_url.yml +6 -6
  64. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/test_resolver.yml +6 -6
  65. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/test_resolver_http.yml +6 -6
  66. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_from_url/doi.yml +6 -6
  67. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_from_url/doi_with_special_characters.yml +6 -6
  68. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_from_url/not_a_doi.yml +6 -6
  69. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_from_url/sandbox_url.yml +6 -6
  70. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_from_url/url.yml +6 -6
  71. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/crossref.yml +19 -15
  72. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/datacite.yml +19 -15
  73. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/jalc.yml +19 -15
  74. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/kisti.yml +19 -15
  75. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/medra.yml +19 -15
  76. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/not_a_valid_prefix.yml +6 -6
  77. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/not_found.yml +19 -15
  78. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/op.yml +19 -15
  79. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/doi.yml +6 -6
  80. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/doi_with_protocol.yml +6 -6
  81. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/dx_doi_org_url.yml +6 -6
  82. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/force_test_resolver.yml +6 -6
  83. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/https_url.yml +6 -6
  84. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/test_resolver.yml +6 -6
  85. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/test_resolver_http.yml +6 -6
  86. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/crossref.yml +41 -33
  87. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/crossref_doi_not_url.yml +41 -33
  88. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/datacite.yml +40 -32
  89. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/datacite_doi_http.yml +40 -32
  90. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/github.yml +28 -24
  91. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/orcid.yml +28 -24
  92. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/schema_org.yml +27 -23
  93. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/unknown_DOI_registration_agency.yml +41 -33
  94. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/bibtex.yml +28 -24
  95. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/citeproc.yml +27 -23
  96. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/codemeta.yml +27 -23
  97. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/crosscite.yml +27 -23
  98. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/crossref.yml +28 -24
  99. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/datacite.yml +27 -23
  100. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/datacite_json.yml +28 -24
  101. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/ris.yml +28 -24
  102. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/schema_org.yml +27 -23
  103. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_string/crosscite.yml +28 -24
  104. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/fos/hsh_to_fos_for_match.yml +5 -5
  105. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/fos/hsh_to_fos_match.yml +5 -5
  106. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/fos/hsh_to_fos_no_match.yml +5 -5
  107. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/fos/name_to_fos_for_match.yml +4 -4
  108. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/fos/name_to_fos_match.yml +5 -5
  109. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/fos/name_to_fos_no_match.yml +5 -5
  110. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/from_schema_org/with_id.yml +6 -6
  111. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/from_schema_org_creators/with_affiliation.yml +6 -6
  112. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/from_schema_org_creators/without_affiliation.yml +6 -6
  113. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_codemeta_metadata/maremma.yml +25 -27
  114. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_codemeta_metadata/metadata_reports.yml +23 -25
  115. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/DOI_with_ORCID_ID.yml +18 -14
  116. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/DOI_with_SICI_DOI.yml +18 -14
  117. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/DOI_with_data_citation.yml +19 -15
  118. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/JaLC.yml +18 -14
  119. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/KISTI.yml +17 -13
  120. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/OP.yml +19 -15
  121. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/another_book.yml +18 -14
  122. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/another_book_chapter.yml +19 -15
  123. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/author_literal.yml +15 -13
  124. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/book.yml +19 -15
  125. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/book_chapter.yml +17 -13
  126. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/book_chapter_with_RDF_for_container.yml +17 -15
  127. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/component.yml +19 -15
  128. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/dataset.yml +35 -31
  129. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/dataset_usda.yml +29 -22
  130. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/date_in_future.yml +19 -15
  131. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/empty_given_name.yml +14 -12
  132. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/invalid_date.yml +15 -15
  133. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_article.yml +19 -15
  134. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_article_original_language_title.yml +17 -13
  135. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_article_with.yml +18 -14
  136. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_article_with_RDF_for_container.yml +18 -16
  137. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_article_with_funding.yml +19 -15
  138. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_issue.yml +17 -13
  139. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/mEDRA.yml +17 -13
  140. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/markup.yml +26 -21
  141. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/missing_creator.yml +19 -15
  142. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/multiple_titles.yml +18 -14
  143. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/not_found_error.yml +17 -13
  144. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/posted_content.yml +19 -15
  145. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/vor_with_url.yml +18 -14
  146. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/yet_another_book.yml +18 -14
  147. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/yet_another_book_chapter.yml +17 -13
  148. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_json_metadata/metadata_from_api.yml +22 -20
  149. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/BlogPosting.yml +28 -24
  150. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_in_test_system.yml +26 -22
  151. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_in_test_system_schema_3.yml +27 -23
  152. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_in_with_related_id_system.yml +31 -28
  153. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_not_found.yml +23 -19
  154. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Dataset.yml +24 -20
  155. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Funding.yml +25 -21
  156. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Funding_empty_awardTitle.yml +24 -20
  157. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Funding_schema_version_4.yml +25 -21
  158. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Referee_report_in_test_system.yml +29 -24
  159. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Schema_org_type.yml +24 -22
  160. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/author_only_full_name.yml +24 -20
  161. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/author_with_scheme.yml +25 -21
  162. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/author_with_wrong_orcid_scheme.yml +24 -20
  163. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/content_url.yml +29 -26
  164. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/date.yml +38 -24
  165. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/dissertation.yml +24 -20
  166. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/doi_with_sign.yml +27 -24
  167. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/empty_subject.yml +26 -22
  168. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/even_more_subject_scheme_FOR.yml +19 -19
  169. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/funding_references.yml +20 -18
  170. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/funding_schema_version_3.yml +42 -38
  171. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/is_identical_to.yml +25 -21
  172. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/keywords_with_attributes.yml +35 -32
  173. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/leading_and_trailing_whitespace.yml +33 -29
  174. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/more_subject_scheme_FOR.yml +20 -19
  175. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/multiple_author_names_in_one_creatorsName.yml +31 -28
  176. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/multiple_licenses.yml +37 -33
  177. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/series-information.yml +25 -21
  178. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/subject_scheme.yml +24 -20
  179. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/subject_scheme_FOR.yml +32 -25
  180. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date/publication_date.yml +6 -6
  181. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_date_parts/date.yml +6 -6
  182. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_date_parts/year-month.yml +6 -6
  183. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_date_parts/year.yml +6 -6
  184. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_parts/date.yml +6 -6
  185. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_parts/year-month.yml +6 -6
  186. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_parts/year.yml +6 -6
  187. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_parts/date.yml +6 -6
  188. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_parts/year-month.yml +6 -6
  189. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_parts/year.yml +6 -6
  190. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datetime_from_time/future.yml +4 -4
  191. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datetime_from_time/invalid.yml +4 -4
  192. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datetime_from_time/nil.yml +4 -4
  193. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datetime_from_time/past.yml +4 -4
  194. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datetime_from_time/present.yml +4 -4
  195. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_familyName.yml +14 -14
  196. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_name_in_Thai.yml +12 -12
  197. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_name_in_display-order.yml +25 -25
  198. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_name_in_display-order_with_ORCID.yml +11 -11
  199. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_name_in_sort-order.yml +11 -11
  200. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/hyper-authorship.yml +1180 -1161
  201. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/is_organization.yml +6 -6
  202. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/multiple_author_names_in_one_field.yml +18 -19
  203. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/multiple_name_identifier.yml +11 -11
  204. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/name_with_affiliation.yml +11 -11
  205. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/name_with_affiliation_and_country.yml +19 -19
  206. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/name_with_role.yml +11 -11
  207. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/only_familyName_and_givenName.yml +13 -9
  208. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/BlogPosting.yml +26 -22
  209. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/BlogPosting_with_new_DOI.yml +24 -22
  210. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/harvard_dataverse.yml +7 -8
  211. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/pangaea.yml +11 -9
  212. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/zenodo.yml +70 -62
  213. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_series_information/only_title.yml +6 -6
  214. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_series_information/title_and_pages.yml +6 -6
  215. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_series_information/title_volume_and_pages.yml +6 -6
  216. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_series_information/title_volume_issue_and_pages.yml +6 -6
  217. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/github/github_as_codemeta_url.yml +6 -6
  218. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/github/github_from_url.yml +6 -6
  219. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/github/github_from_url_file.yml +6 -6
  220. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/handle_input/DOI_RA_not_Crossref_or_DataCite.yml +13 -9
  221. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/handle_input/unknown_DOI_prefix.yml +13 -9
  222. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_contributors/none.yml +12 -12
  223. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_creators/insert.yml +11 -11
  224. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_dates/insert.yml +12 -12
  225. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_descriptions/insert.yml +15 -15
  226. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_identifier/doi.yml +11 -11
  227. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_language/insert.yml +11 -11
  228. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_person/creator_only_name.yml +11 -11
  229. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_publication_year/insert.yml +12 -12
  230. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_publisher/insert.yml +11 -11
  231. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_related_identifiers/insert.yml +11 -11
  232. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_related_identifiers/related_identifier.yml +12 -12
  233. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_resource_type/insert.yml +11 -11
  234. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_rights_list/insert.yml +11 -11
  235. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_sizes/insert.yml +12 -12
  236. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_subjects/insert.yml +11 -11
  237. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_titles/insert.yml +11 -11
  238. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_version/insert.yml +12 -12
  239. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_comma.yml +6 -6
  240. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_family_name.yml +6 -6
  241. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_id.yml +6 -6
  242. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_known_given_name.yml +6 -6
  243. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_no_info.yml +6 -6
  244. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_orcid_id.yml +6 -6
  245. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_type_organization.yml +6 -6
  246. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/missing_comma.yml +28 -24
  247. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/nil.yml +27 -23
  248. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/overlapping_keys.yml +28 -24
  249. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/valid.yml +28 -24
  250. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_cc_url/not_found.yml +5 -5
  251. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_cc_url/with_trailing_slash.yml +4 -4
  252. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_cc_url/with_trailing_slash_and_to_https.yml +5 -5
  253. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/SICI_doi.yml +6 -6
  254. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi.yml +6 -6
  255. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_force_datacite_sandbox.yml +6 -6
  256. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_from_datacite_sandbox.yml +6 -6
  257. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_from_url_without_doi_proxy.yml +6 -6
  258. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_prefix_too_long.yml +6 -6
  259. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_prefix_with_string.yml +6 -6
  260. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_with_protocol.yml +6 -6
  261. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/dx_doi_org_url.yml +6 -6
  262. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/https_url.yml +6 -6
  263. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/not_valid_doi_prefix.yml +6 -6
  264. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/url_with_one_slash.yml +6 -6
  265. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/doi.yml +6 -6
  266. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/doi_as_url.yml +6 -6
  267. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/ftp.yml +6 -6
  268. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/invalid_url.yml +6 -6
  269. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/sandbox_via_options.yml +6 -6
  270. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/sandbox_via_url.yml +6 -6
  271. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/string.yml +6 -6
  272. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/url.yml +6 -6
  273. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/url_with_utf-8.yml +6 -6
  274. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_ids/doi.yml +6 -6
  275. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_ids/url.yml +6 -6
  276. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_issn/from_array.yml +6 -6
  277. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_issn/from_empty_array.yml +6 -6
  278. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_issn/from_hash.yml +6 -6
  279. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_issn/from_string.yml +6 -6
  280. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_url/uri.yml +6 -6
  281. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_url/with_trailing_slash.yml +6 -6
  282. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_url/with_trailing_slash_and_to_https.yml +4 -4
  283. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/array.yml +6 -6
  284. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/array_of_strings.yml +6 -6
  285. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/first.yml +6 -6
  286. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/hash.yml +6 -6
  287. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/nil.yml +6 -6
  288. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/string.yml +6 -6
  289. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/sanitize/should_only_keep_specific_tags.yml +6 -6
  290. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/sanitize/should_remove_a_tags.yml +6 -6
  291. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/hsh_to_spdx_id.yml +4 -4
  292. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/hsh_to_spdx_not_found.yml +5 -5
  293. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/hsh_to_spdx_url.yml +4 -4
  294. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/name_to_spdx_exists.yml +5 -5
  295. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/name_to_spdx_id.yml +4 -4
  296. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/to_schema_org/with_id.yml +6 -6
  297. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/to_schema_org_identifiers/with_identifiers.yml +6 -6
  298. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_doi/doi.yml +6 -6
  299. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/funder_doi.yml +6 -6
  300. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/funder_doi_without_prefix.yml +6 -6
  301. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/non-funder_doi.yml +6 -6
  302. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid.yml +6 -6
  303. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_https.yml +6 -6
  304. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_id.yml +6 -6
  305. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_with_spaces.yml +6 -6
  306. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_wrong_id.yml +6 -6
  307. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_www.yml +6 -6
  308. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid_scheme/validate_orcid_scheme.yml +6 -6
  309. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid_scheme/validate_orcid_scheme_https.yml +6 -6
  310. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid_scheme/validate_orcid_scheme_trailing_slash.yml +6 -6
  311. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid_scheme/validate_orcid_scheme_www.yml +6 -6
  312. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_prefix/doi.yml +6 -6
  313. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_prefix/doi_as_url.yml +6 -6
  314. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_prefix/doi_with_protocol.yml +6 -6
  315. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_prefix/only_prefix.yml +6 -6
  316. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_url/DOI.yml +6 -6
  317. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_url/ISSN.yml +6 -6
  318. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_url/URL.yml +6 -6
  319. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_url/string.yml +6 -6
  320. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/BlogPosting.yml +15 -15
  321. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/Dataset.yml +12 -12
  322. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/authors_with_affiliations.yml +19 -19
  323. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/climate_data.yml +14 -15
  324. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/from_schema_org.yml +24 -24
  325. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/keywords_subject_scheme.yml +32 -25
  326. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/maremma.yml +25 -27
  327. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/text.yml +12 -12
  328. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/with_data_citation.yml +6 -6
  329. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/with_pages.yml +5 -5
  330. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/Dataset.yml +12 -12
  331. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/Journal_article.yml +6 -6
  332. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/Journal_article_vancouver_style.yml +51 -0
  333. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/Missing_author.yml +6 -6
  334. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/interactive_resource_without_dates.yml +8 -8
  335. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/software_w/version.yml +19 -8
  336. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/BlogPosting.yml +15 -15
  337. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/BlogPosting_schema_org.yml +25 -23
  338. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/Dataset.yml +11 -11
  339. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/container_title.yml +12 -12
  340. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/interactive_resource_without_dates.yml +8 -8
  341. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/journal_article.yml +6 -6
  342. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/keywords_subject_scheme.yml +32 -25
  343. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/maremma.yml +25 -27
  344. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/missing_creator.yml +6 -6
  345. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/multiple_abstracts.yml +11 -11
  346. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/organization_author.yml +4 -4
  347. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/software.yml +11 -11
  348. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/software_w/version.yml +23 -12
  349. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/with_only_first_page.yml +6 -6
  350. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/with_pages.yml +5 -5
  351. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_codemeta/SoftwareSourceCode_DataCite.yml +14 -15
  352. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_codemeta/SoftwareSourceCode_DataCite_check_codemeta_v2.yml +14 -15
  353. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/datacite_database_attributes.yml +12 -12
  354. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/maremma.yml +25 -27
  355. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/with_ORCID_ID.yml +5 -5
  356. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/with_data_citation.yml +6 -6
  357. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/with_data_citation_schema_org.yml +24 -24
  358. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crossref/from_DataCite.yml +12 -12
  359. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_csv/climate_data.yml +13 -14
  360. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_csv/maremma.yml +25 -27
  361. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_csv/text.yml +11 -11
  362. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_csv/with_data_citation.yml +6 -6
  363. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_csv/with_pages.yml +5 -5
  364. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_json/maremma.yml +25 -27
  365. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_json/with_ORCID_ID.yml +5 -5
  366. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_json/with_data_citation.yml +6 -6
  367. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_json/with_data_citation_schema_org.yml +24 -24
  368. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/DOI_not_found.yml +10 -10
  369. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/Dataset_in_schema_4_0.yml +12 -12
  370. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/Text_pass-thru.yml +33 -33
  371. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/Text_pass-thru_with_doi_in_options.yml +34 -34
  372. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/maremma.yml +25 -27
  373. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_ORCID_ID.yml +5 -5
  374. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_data_citation.yml +6 -6
  375. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_data_citation_schema_org.yml +24 -24
  376. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_editor.yml +6 -6
  377. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_version.yml +16 -16
  378. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/Dataset_in_schema_4_0.yml +11 -11
  379. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/Text_pass-thru.yml +34 -34
  380. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/book_chapter.yml +21 -21
  381. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/interactive_resource_without_dates.yml +7 -7
  382. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/maremma.yml +25 -27
  383. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/with_ORCID_ID.yml +5 -5
  384. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/with_data_citation.yml +6 -6
  385. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/with_data_citation_schema_org.yml +23 -25
  386. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/with_editor.yml +6 -6
  387. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_rdf_xml/BlogPosting.yml +14 -14
  388. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_rdf_xml/BlogPosting_schema_org.yml +20 -20
  389. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_rdf_xml/journal_article.yml +5 -5
  390. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_rdf_xml/maremma.yml +22 -24
  391. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_rdf_xml/with_pages.yml +5 -5
  392. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/BlogPosting.yml +14 -14
  393. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/BlogPosting_schema_org.yml +24 -24
  394. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/Dataset.yml +12 -12
  395. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/alternate_name.yml +12 -12
  396. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/journal_article.yml +6 -6
  397. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/keywords_with_subject_scheme.yml +31 -24
  398. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/maremma.yml +25 -27
  399. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/with_pages.yml +5 -5
  400. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Funding.yml +18 -18
  401. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Funding_OpenAIRE.yml +28 -17
  402. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON.yml +24 -24
  403. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON_Cyark.yml +40 -18
  404. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON_IsSupplementTo.yml +18 -18
  405. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON_isReferencedBy.yml +12 -12
  406. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/alternate_identifiers.yml +16 -17
  407. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/data_catalog.yml +13 -14
  408. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/geo_location_box.yml +36 -28
  409. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/interactive_resource_without_dates.yml +7 -7
  410. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/journal_article.yml +6 -6
  411. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/maremma_schema_org_JSON.yml +25 -27
  412. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/series_information.yml +11 -11
  413. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/subject_scheme.yml +12 -12
  414. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/subject_scheme_multiple_keywords.yml +31 -24
  415. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/BlogPosting.yml +14 -14
  416. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/BlogPosting_schema_org.yml +20 -20
  417. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/Dataset.yml +12 -12
  418. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/journal_article.yml +5 -5
  419. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/with_pages.yml +5 -5
  420. data/spec/readers/bibtex_reader_spec.rb +3 -3
  421. data/spec/readers/citeproc_reader_spec.rb +3 -3
  422. data/spec/readers/codemeta_reader_spec.rb +4 -4
  423. data/spec/readers/crossref_reader_spec.rb +73 -63
  424. data/spec/readers/datacite_json_reader_spec.rb +2 -1
  425. data/spec/readers/datacite_reader_spec.rb +94 -92
  426. data/spec/readers/ris_reader_spec.rb +4 -4
  427. data/spec/readers/schema_org_reader_spec.rb +40 -38
  428. data/spec/writers/bibtex_writer_spec.rb +2 -2
  429. data/spec/writers/citation_writer_spec.rb +8 -8
  430. data/spec/writers/citeproc_writer_spec.rb +2 -2
  431. data/spec/writers/codemeta_writer_spec.rb +0 -1
  432. data/spec/writers/crosscite_writer_spec.rb +3 -3
  433. data/spec/writers/datacite_writer_spec.rb +14 -15
  434. data/spec/writers/jats_writer_spec.rb +3 -3
  435. data/spec/writers/ris_writer_spec.rb +6 -5
  436. data/spec/writers/schema_org_writer_spec.rb +6 -18
  437. metadata +7 -25
  438. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/error_unknown.yml +0 -88
  439. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/jj.yml +0 -87
  440. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/multiple_t.yml +0 -47
  441. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/xs_string_attributes.yml +0 -93
  442. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datetime_from_timestamp/present.yml +0 -44
  443. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/is_crossrer_organization.yml +0 -44
  444. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/harvard_dataverse_via_identifiers_org.yml +0 -158
  445. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/ornl.yml +0 -706
  446. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_alternate_identifiers/insert.yml +0 -49
  447. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_formats/insert.yml +0 -49
  448. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_person/creator_given_and_family_name.yml +0 -49
  449. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_url/to_https.yml +0 -44
  450. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/hsh_to_spdx_id_lowercase.yml +0 -44
  451. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/name_to_spdx_not_found.yml +0 -44
  452. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/url_to_https/http.yml +0 -44
  453. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/url_to_https/uri.yml +0 -44
  454. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/url_to_https/with_trailing_slash.yml +0 -44
  455. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/dataset_neurophysiology.yml +0 -116
  456. 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: c15833a959ce325ba131b2a0e0223cab0f5fa1146261be403d973fa4a4fa1106
4
- data.tar.gz: d9c6f41c15f6b4ef19c1867e8c325d1321d34fbf3458e0ebd76869424fdfb166
3
+ metadata.gz: 34f2f4c88f2a10491132ce386d931e83f5f84fed96bf4accf442e82d2c59889e
4
+ data.tar.gz: 5a8ec1c8fe1962d6531effeca7ca3d0e769506d9580d00b559ac0e8d2f11ed83
5
5
  SHA512:
6
- metadata.gz: 68287f6b86134328c2e87db64c51f0d9cd2438f13c196e6745a8c4ac6dc554f5b3aaa342876506ebfafd96538f303e0e62e65a4811faa39c2fbf525c44bfd18a
7
- data.tar.gz: 76446fa76402b465a3538c258f0967a6a7dac7db96806dbf26e2e40fbe60fa5287106addc6490b0a8c48b28cfb1282f191dd8e49681459528cac92994536fff6
6
+ metadata.gz: 99c48d238c54eaf64003bacd6488c558d837c37405fc59acb46a17d9999f838f9bde197c966d3bef35e315febd789dc6f06c0732f46d8a53462433a38cd08cf1
7
+ data.tar.gz: 71240642a6069ef06e412ad4fc28b80fd84768021c21b770d9553aa85f09a440f66ffd7b982bc82a549970b2987bbc32627e2b2a593f565ccea0bc42e743ee0b
@@ -1,15 +1,15 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bolognese (1.6.12)
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.10)
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.8)
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)
@@ -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.10'
31
- s.add_dependency 'csl-styles', '~> 1.0', '>= 1.0.1.8'
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
- alternate_identifiers = Array.wrap(identifiers).select { |r| r["identifierType"] != "DOI" }
120
- return xml unless alternate_identifiers.present?
119
+ return xml unless identifiers.present?
121
120
 
122
121
  xml.alternateIdentifiers do
123
- Array.wrap(alternate_identifiers).each do |alternate_identifier|
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
@@ -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/" + doi_from_url(doi) : "https://api.datacite.org/dois/" + doi_from_url(doi)
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 = {})
@@ -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
- identifiers = [normalize_id(meta.fetch("id", nil)), normalize_doi(meta.fetch("DOI", nil))].compact.map do |r|
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(doi),
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 = ([meta.fetch("@id", nil)] + Array.wrap(meta.fetch("identifier", nil))).map do |r|
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 = Array.wrap(identifiers).first.to_h.fetch("identifier", nil)
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(doi),
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
- identifiers = [{ "identifierType" => "DOI", "identifier" => normalize_doi(options[:doi] || options[:id] || bibliographic_metadata.dig("doi_data", "doi")) }, crossref_alternate_identifiers(bibliographic_metadata)].compact
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(doi),
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 = [{ "identifierType" => "DOI", "identifier" => id }] + Array.wrap(meta.dig("alternateIdentifiers", "alternateIdentifier")).map do |r|
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 = doi.present? || read_options.present? ? "findable" : "not_found"
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(doi),
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
- identifiers = [normalize_doi(options[:doi]) || normalize_doi(meta.fetch("DO", nil))].map do |r|
51
- { "identifierType" => "DOI", "identifier" => normalize_id(r) }
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
- "identifiers" => identifiers,
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 = ([options[:doi] || meta.fetch("@id", nil)] + Array.wrap(meta.fetch("identifier", nil))).map do |r|
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 = Array.wrap(identifiers).first.to_h.fetch("identifier", nil)
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]
@@ -1,3 +1,3 @@
1
1
  module Bolognese
2
- VERSION = "1.6.12"
2
+ VERSION = "1.7.1"
3
3
  end
@@ -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
@@ -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(/Phylogeny, Malaria, Parasites, Taxonomy, Mitochondrial genome, Africa, Plasmodium/).to_stdout
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(/Phylogeny, Malaria, Parasites, Taxonomy, Mitochondrial genome, Africa, Plasmodium/).to_stdout
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
@@ -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 Digital Repository")
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__"=>"DataPackage")
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
- 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 eq("alternateIdentifierType"=>"citation", "__content__"=>"Ollomo B, Durand P, Prugnolle F, Douzery EJP, Arnathau C, Nkoghe D, Leroy E, Renaud F (2009) A new malaria agent in African hominids. PLoS Pathogens 5(5): e1000446.")
89
- end
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(["Phylogeny", "Malaria", "Parasites", "Taxonomy", "Mitochondrial genome", "Africa", "Plasmodium"])
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(6)
147
- expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"10.5061/dryad.8515/1", "relatedIdentifierType"=>"DOI", "relationType"=>"HasPart")
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").length).to eq(6)
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
 
@@ -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
 
@@ -3,7 +3,6 @@
3
3
  "@type": "Dataset",
4
4
  "@id": "https://doi.org/10.25491/d50j-3083",
5
5
  "identifier": [
6
- "https://doi.org/10.25491/d50j-3083",
7
6
  {
8
7
  "@type": "PropertyValue",
9
8
  "propertyID": "md5",
@@ -4,11 +4,6 @@
4
4
  "@type": "Dataset",
5
5
  "@id": "https://doi.org/10.23725/7jg3-v803",
6
6
  "identifier": [
7
- {
8
- "@type": "PropertyValue",
9
- "propertyID": "doi",
10
- "value": "https://doi.org/10.23725/7jg3-v803"
11
- },
12
7
  {
13
8
  "@type": "PropertyValue",
14
9
  "propertyID": "minid",
@@ -3,7 +3,6 @@
3
3
  "@type": "Dataset",
4
4
  "@id": "https://doi.org/10.23725/8na3-9s47",
5
5
  "identifier": [
6
- "https://doi.org/10.23725/8na3-9s47",
7
6
  {
8
7
  "@type": "PropertyValue",
9
8
  "propertyID": "md5",