bolognese 1.9.3 → 1.9.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (449) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +47 -5
  3. data/Gemfile.lock +21 -17
  4. data/bolognese.gemspec +1 -1
  5. data/lib/bolognese/author_utils.rb +8 -3
  6. data/lib/bolognese/doi_utils.rb +10 -9
  7. data/lib/bolognese/readers/crossref_reader.rb +21 -4
  8. data/lib/bolognese/readers/datacite_reader.rb +26 -6
  9. data/lib/bolognese/readers/schema_org_reader.rb +2 -2
  10. data/lib/bolognese/utils.rb +7 -7
  11. data/lib/bolognese/version.rb +1 -1
  12. data/lib/bolognese/writers/jats_writer.rb +3 -1
  13. data/spec/author_utils_spec.rb +12 -6
  14. data/spec/cli_spec.rb +8 -7
  15. data/spec/datacite_utils_spec.rb +3 -3
  16. data/spec/doi_utils_spec.rb +29 -17
  17. data/spec/fixtures/datacite-geolocationpolygons-multiple.xml +20 -0
  18. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_citation.yml +23 -17
  19. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_datacite.yml +24 -18
  20. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_datacite_json.yml +24 -18
  21. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_jats.yml +24 -18
  22. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_schema_org.yml +24 -18
  23. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/default.yml +26 -24
  24. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/to_bibtex.yml +132 -22
  25. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/to_datacite.yml +26 -24
  26. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/to_schema_org.yml +26 -24
  27. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/find_from_format_by_id/crossref.yml +12 -8
  28. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/find_from_format_by_id/datacite.yml +12 -8
  29. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/find_from_format_by_id/jalc.yml +12 -8
  30. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/find_from_format_by_id/kisti.yml +12 -8
  31. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/find_from_format_by_id/medra.yml +12 -8
  32. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/find_from_format_by_id/op.yml +12 -8
  33. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/authors_as_string/author.yml +6 -4
  34. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/authors_as_string/no_author.yml +6 -4
  35. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/authors_as_string/single_author.yml +6 -4
  36. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/authors_as_string/with_organization.yml +6 -4
  37. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_datacite_metadata/change_state.yml +24 -18
  38. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_datacite_metadata/change_title.yml +23 -17
  39. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/change_description.yml +6 -4
  40. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/change_identifiers.yml +6 -4
  41. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/change_license.yml +6 -4
  42. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/change_license_name.yml +6 -4
  43. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/change_license_url.yml +6 -4
  44. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/change_state.yml +6 -4
  45. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/validates_against_schema.yml +6 -4
  46. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/with_data_citation.yml +6 -4
  47. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/doi.yml +6 -4
  48. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/doi_with_protocol.yml +6 -4
  49. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/dx_doi_org_url.yml +6 -4
  50. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/force_test_resolver.yml +6 -4
  51. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/https_url.yml +6 -4
  52. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/test_resolver.yml +6 -4
  53. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/test_resolver_http.yml +6 -4
  54. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_from_url/doi.yml +6 -4
  55. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_from_url/doi_with_special_characters.yml +6 -4
  56. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_from_url/not_a_doi.yml +6 -4
  57. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_from_url/sandbox_url.yml +6 -4
  58. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_from_url/url.yml +6 -4
  59. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/crossref.yml +18 -12
  60. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/datacite.yml +18 -12
  61. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/jalc.yml +18 -12
  62. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/kisti.yml +18 -12
  63. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/medra.yml +18 -12
  64. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/not_a_valid_prefix.yml +6 -4
  65. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/not_found.yml +18 -12
  66. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/op.yml +18 -12
  67. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/doi.yml +6 -4
  68. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/doi_with_protocol.yml +6 -4
  69. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/dx_doi_org_url.yml +6 -4
  70. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/{force_test_resolver.yml → force_stage_resolver.yml} +6 -4
  71. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/https_url.yml +6 -4
  72. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/{test_resolver.yml → stage_resolver.yml} +6 -4
  73. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/stage_resolver_http.yml +46 -0
  74. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/crossref.yml +41 -28
  75. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/crossref_doi_not_url.yml +41 -28
  76. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/datacite.yml +41 -28
  77. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/datacite_doi_http.yml +41 -28
  78. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/github.yml +30 -21
  79. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/orcid.yml +29 -20
  80. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/schema_org.yml +30 -21
  81. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/unknown_DOI_registration_agency.yml +42 -29
  82. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/bibtex.yml +30 -21
  83. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/citeproc.yml +30 -21
  84. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/codemeta.yml +30 -21
  85. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/crosscite.yml +29 -20
  86. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/crossref.yml +30 -21
  87. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/datacite.yml +29 -20
  88. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/datacite_json.yml +30 -21
  89. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/ris.yml +29 -20
  90. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/schema_org.yml +30 -21
  91. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_string/crosscite.yml +30 -21
  92. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/fos/hsh_to_fos_for_match.yml +6 -4
  93. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/fos/hsh_to_fos_for_with_schemeUri_in_hash.yml +48 -0
  94. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/fos/hsh_to_fos_match.yml +6 -4
  95. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/fos/hsh_to_fos_no_match.yml +6 -4
  96. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/fos/name_to_fos_for_match.yml +6 -4
  97. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/fos/name_to_fos_match.yml +6 -4
  98. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/fos/name_to_fos_no_match.yml +6 -4
  99. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/from_schema_org/with_id.yml +6 -4
  100. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/from_schema_org_creators/with_affiliation.yml +6 -4
  101. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/from_schema_org_creators/without_affiliation.yml +6 -4
  102. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_codemeta_metadata/maremma.yml +13 -13
  103. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_codemeta_metadata/metadata_reports.yml +12 -12
  104. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/DOI_with_ORCID_ID.yml +18 -12
  105. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/DOI_with_SICI_DOI.yml +18 -12
  106. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/DOI_with_data_citation.yml +18 -12
  107. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/JaLC.yml +17 -11
  108. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/KISTI.yml +17 -11
  109. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/OP.yml +19 -13
  110. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/affiliation_is_space.yml +15 -15
  111. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/another_book.yml +18 -12
  112. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/another_book_chapter.yml +18 -12
  113. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/article_id_as_page_number.yml +14 -14
  114. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/author_literal.yml +18 -12
  115. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/book.yml +19 -13
  116. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/book_chapter.yml +18 -12
  117. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/book_chapter_with_RDF_for_container.yml +20 -14
  118. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/book_oup.yml +17 -11
  119. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/component.yml +17 -11
  120. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/dataset.yml +19 -13
  121. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/dataset_usda.yml +17 -11
  122. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/date_in_future.yml +19 -13
  123. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/dissertation.yml +17 -11
  124. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/empty_given_name.yml +20 -13
  125. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/invalid_date.yml +18 -12
  126. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_article.yml +18 -12
  127. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_article_original_language_title.yml +21 -14
  128. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_article_with.yml +18 -12
  129. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_article_with_RDF_for_container.yml +18 -12
  130. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_article_with_funding.yml +18 -12
  131. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_issue.yml +18 -12
  132. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/mEDRA.yml +20 -52
  133. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/markup.yml +22 -15
  134. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/missing_creator.yml +18 -12
  135. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/multiple_issn.yml +16 -16
  136. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/multiple_titles.yml +19 -13
  137. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/multiple_titles_with_missing.yml +14 -14
  138. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/not_found_error.yml +17 -11
  139. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/peer_review.yml +17 -11
  140. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/posted_content.yml +18 -12
  141. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/posted_content_copernicus.yml +23 -16
  142. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/report_osti.yml +28 -23
  143. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/vor_with_url.yml +18 -12
  144. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/yet_another_book.yml +21 -14
  145. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/yet_another_book_chapter.yml +18 -12
  146. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_json_metadata/metadata_from_api.yml +26 -20
  147. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/BlogPosting.yml +30 -21
  148. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_in_staging_system.yml +110 -0
  149. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/{DOI_in_test_system_schema_3.yml → DOI_in_staging_system_schema_3.yml} +29 -22
  150. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_in_with_related_id_system.yml +42 -29
  151. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_not_found.yml +21 -15
  152. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Dataset.yml +23 -17
  153. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Funding.yml +23 -17
  154. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Funding_empty_awardTitle.yml +23 -17
  155. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Funding_schema_version_4.yml +23 -17
  156. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Referee_report_in_staging_system.yml +108 -0
  157. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Referee_report_in_test_system.yml +30 -24
  158. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Schema_org_type.yml +23 -17
  159. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/author_only_full_name.yml +24 -18
  160. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/author_with_scheme.yml +23 -17
  161. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/author_with_wrong_orcid_scheme.yml +24 -18
  162. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/cc-by_3_0_us.yml +47 -21
  163. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/content_url.yml +27 -21
  164. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/date.yml +29 -23
  165. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/dissertation.yml +24 -18
  166. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/doi_with_sign.yml +27 -21
  167. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/empty_subject.yml +25 -19
  168. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/even_more_subject_scheme_FOR.yml +24 -18
  169. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/funding_references.yml +24 -18
  170. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/funding_schema_version_3.yml +30 -24
  171. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/is_identical_to.yml +23 -17
  172. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/keywords_with_attributes.yml +35 -28
  173. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/leading_and_trailing_whitespace.yml +29 -22
  174. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/more_subject_scheme_FOR.yml +30 -22
  175. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/multiple_author_names_in_one_creatorsName.yml +28 -22
  176. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/multiple_licenses.yml +27 -21
  177. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/series-information.yml +24 -18
  178. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/subject_scheme.yml +23 -17
  179. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/subject_scheme_FOR.yml +31 -22
  180. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date/publication_date.yml +6 -4
  181. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_date_parts/date.yml +6 -4
  182. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_date_parts/year-month.yml +6 -4
  183. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_date_parts/year.yml +6 -4
  184. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_parts/date.yml +6 -4
  185. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_parts/year-month.yml +6 -4
  186. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_parts/year.yml +6 -4
  187. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_parts/date.yml +6 -4
  188. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_parts/year-month.yml +6 -4
  189. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_parts/year.yml +6 -4
  190. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datetime_from_time/future.yml +6 -4
  191. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datetime_from_time/invalid.yml +6 -4
  192. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datetime_from_time/nil.yml +6 -4
  193. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datetime_from_time/past.yml +6 -4
  194. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datetime_from_time/present.yml +6 -4
  195. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_familyName.yml +17 -12
  196. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_name_in_Thai.yml +11 -9
  197. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_name_in_display-order.yml +15 -13
  198. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_name_in_display-order_with_ORCID.yml +11 -9
  199. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_name_in_sort-order.yml +11 -9
  200. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/hyper-authorship.yml +1058 -991
  201. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/is_organization.yml +6 -4
  202. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/multiple_author_names_in_one_field.yml +17 -15
  203. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/multiple_name_identifier.yml +12 -10
  204. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/name_with_affiliation.yml +11 -9
  205. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/name_with_affiliation_and_country.yml +77 -40
  206. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/name_with_role.yml +12 -10
  207. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/only_familyName_and_givenName.yml +7 -7
  208. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/BlogPosting.yml +30 -24
  209. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/BlogPosting_with_new_DOI.yml +30 -26
  210. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/harvard_dataverse.yml +14 -12
  211. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/pangaea.yml +12 -8
  212. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/zenodo.yml +15 -541
  213. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_series_information/only_title.yml +6 -4
  214. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_series_information/title_and_pages.yml +6 -4
  215. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_series_information/title_volume_and_pages.yml +6 -4
  216. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_series_information/title_volume_issue_and_pages.yml +6 -4
  217. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/github/github_as_codemeta_url.yml +6 -4
  218. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/github/github_from_url.yml +6 -4
  219. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/github/github_from_url_file.yml +6 -4
  220. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/handle_input/DOI_RA_not_Crossref_or_DataCite.yml +12 -8
  221. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/handle_input/unknown_DOI_prefix.yml +12 -8
  222. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_contributors/none.yml +12 -10
  223. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_creators/insert.yml +11 -9
  224. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_dates/insert.yml +11 -9
  225. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_descriptions/insert.yml +18 -13
  226. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_identifier/doi.yml +12 -10
  227. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_language/insert.yml +11 -9
  228. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_person/creator_only_name.yml +11 -9
  229. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_publication_year/insert.yml +12 -10
  230. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_publisher/insert.yml +12 -10
  231. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_related_identifiers/insert.yml +11 -9
  232. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_related_identifiers/related_identifier.yml +11 -9
  233. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_resource_type/insert.yml +12 -10
  234. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_rights_list/insert.yml +12 -10
  235. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_sizes/insert.yml +12 -10
  236. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_subjects/insert.yml +11 -9
  237. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_titles/insert.yml +12 -10
  238. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_version/insert.yml +11 -9
  239. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_comma.yml +6 -4
  240. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_family_name.yml +6 -4
  241. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_id.yml +6 -4
  242. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_known_given_name.yml +6 -4
  243. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_no_info.yml +6 -4
  244. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_orcid_id.yml +6 -4
  245. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_type_organization.yml +6 -4
  246. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/missing_comma.yml +30 -21
  247. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/nil.yml +29 -20
  248. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/overlapping_keys.yml +30 -21
  249. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/valid.yml +30 -21
  250. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_cc_url/not_found.yml +6 -4
  251. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_cc_url/with_trailing_slash.yml +6 -4
  252. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_cc_url/with_trailing_slash_and_to_https.yml +6 -4
  253. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/SICI_doi.yml +6 -4
  254. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi.yml +6 -4
  255. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_force_datacite_sandbox.yml +6 -4
  256. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_from_datacite_sandbox.yml +6 -4
  257. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_from_url_without_doi_proxy.yml +6 -4
  258. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_prefix_too_long.yml +6 -4
  259. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_prefix_with_string.yml +6 -4
  260. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_with_protocol.yml +6 -4
  261. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/dx_doi_org_url.yml +6 -4
  262. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/https_url.yml +6 -4
  263. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/not_valid_doi_prefix.yml +6 -4
  264. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/url_with_one_slash.yml +6 -4
  265. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/doi.yml +6 -4
  266. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/doi_as_url.yml +6 -4
  267. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/ftp.yml +6 -4
  268. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/invalid_url.yml +6 -4
  269. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/sandbox_via_options.yml +6 -4
  270. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/sandbox_via_url.yml +6 -4
  271. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/string.yml +6 -4
  272. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/url.yml +6 -4
  273. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/url_with_utf-8.yml +6 -4
  274. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_ids/doi.yml +6 -4
  275. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_ids/url.yml +6 -4
  276. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_issn/from_array.yml +6 -4
  277. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_issn/from_empty_array.yml +6 -4
  278. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_issn/from_hash.yml +6 -4
  279. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_issn/from_string.yml +6 -4
  280. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_url/uri.yml +6 -4
  281. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_url/with_trailing_slash.yml +6 -4
  282. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_url/with_trailing_slash_and_to_https.yml +6 -4
  283. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/array.yml +6 -4
  284. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/array_of_strings.yml +6 -4
  285. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/first.yml +6 -4
  286. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/hash.yml +6 -4
  287. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/nil.yml +6 -4
  288. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/string.yml +6 -4
  289. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/sanitize/should_only_keep_specific_tags.yml +6 -4
  290. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/sanitize/should_remove_a_tags.yml +6 -4
  291. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/hsh_to_spdx_id.yml +6 -4
  292. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/hsh_to_spdx_not_found.yml +6 -4
  293. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/hsh_to_spdx_url.yml +6 -4
  294. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/name_to_spdx_exists.yml +6 -4
  295. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/name_to_spdx_id.yml +6 -4
  296. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/to_schema_org/with_id.yml +6 -4
  297. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/to_schema_org_identifiers/with_identifiers.yml +6 -4
  298. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_doi/doi.yml +6 -4
  299. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/{doi_resolver/test_resolver_http.yml → validate_funder_doi/1_7_10.yml} +8 -4
  300. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/1_7_11.yml +48 -0
  301. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/1_7_12.yml +48 -0
  302. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/1_7_13.yml +48 -0
  303. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/1_7_14.yml +48 -0
  304. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/1_7_4.yml +48 -0
  305. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/1_7_5.yml +48 -0
  306. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/1_7_6.yml +48 -0
  307. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/1_7_7.yml +48 -0
  308. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/1_7_8.yml +48 -0
  309. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/1_7_9.yml +48 -0
  310. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/funder_doi.yml +6 -4
  311. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/funder_doi_without_prefix.yml +6 -4
  312. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/non-funder_doi.yml +6 -4
  313. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid.yml +6 -4
  314. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_https.yml +6 -4
  315. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_id.yml +6 -4
  316. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_with_spaces.yml +6 -4
  317. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_wrong_id.yml +6 -4
  318. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_www.yml +6 -4
  319. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid_scheme/validate_orcid_scheme.yml +6 -4
  320. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid_scheme/validate_orcid_scheme_https.yml +6 -4
  321. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid_scheme/validate_orcid_scheme_trailing_slash.yml +6 -4
  322. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid_scheme/validate_orcid_scheme_www.yml +6 -4
  323. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_prefix/doi.yml +6 -4
  324. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_prefix/doi_as_url.yml +6 -4
  325. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_prefix/doi_with_protocol.yml +6 -4
  326. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_prefix/only_prefix.yml +6 -4
  327. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_url/DOI.yml +6 -4
  328. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_url/ISSN.yml +6 -4
  329. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_url/URL.yml +6 -4
  330. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_url/string.yml +6 -4
  331. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/BlogPosting.yml +18 -13
  332. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/Dataset.yml +12 -10
  333. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/authors_with_affiliations.yml +77 -40
  334. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/climate_data.yml +14 -12
  335. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/from_schema_org.yml +26 -24
  336. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/keywords_subject_scheme.yml +19 -17
  337. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/maremma.yml +13 -13
  338. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/text.yml +12 -10
  339. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/with_data_citation.yml +6 -4
  340. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/with_pages.yml +6 -4
  341. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/Dataset.yml +12 -10
  342. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/Journal_article.yml +6 -4
  343. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/Journal_article_vancouver_style.yml +6 -4
  344. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/Missing_author.yml +6 -4
  345. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/interactive_resource_without_dates.yml +15 -13
  346. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/software_w/version.yml +14 -12
  347. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/Another_dataset.yml +19 -13
  348. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/BlogPosting.yml +18 -13
  349. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/BlogPosting_schema_org.yml +24 -22
  350. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/Dataset.yml +12 -10
  351. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/container_title.yml +12 -10
  352. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/interactive_resource_without_dates.yml +14 -12
  353. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/journal_article.yml +6 -4
  354. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/keywords_subject_scheme.yml +20 -18
  355. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/maremma.yml +13 -13
  356. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/missing_creator.yml +6 -4
  357. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/multiple_abstracts.yml +11 -9
  358. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/organization_author.yml +6 -4
  359. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/software.yml +12 -10
  360. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/software_w/version.yml +14 -12
  361. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/with_only_first_page.yml +6 -4
  362. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/with_pages.yml +6 -4
  363. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_codemeta/SoftwareSourceCode_DataCite.yml +15 -13
  364. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_codemeta/SoftwareSourceCode_DataCite_check_codemeta_v2.yml +14 -12
  365. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/datacite_database_attributes.yml +12 -10
  366. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/maremma.yml +13 -13
  367. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/with_ORCID_ID.yml +6 -4
  368. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/with_data_citation.yml +6 -4
  369. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/with_data_citation_schema_org.yml +24 -22
  370. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crossref/from_DataCite.yml +12 -10
  371. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_csv/climate_data.yml +13 -11
  372. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_csv/maremma.yml +13 -13
  373. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_csv/text.yml +11 -9
  374. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_csv/with_data_citation.yml +6 -4
  375. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_csv/with_pages.yml +6 -4
  376. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_json/maremma.yml +13 -13
  377. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_json/with_ORCID_ID.yml +6 -4
  378. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_json/with_data_citation.yml +6 -4
  379. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_json/with_data_citation_schema_org.yml +26 -24
  380. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/DOI_not_found.yml +10 -8
  381. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/Dataset_in_schema_4_0.yml +12 -10
  382. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/Text_pass-thru.yml +26 -22
  383. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/Text_pass-thru_with_doi_in_options.yml +26 -22
  384. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/maremma.yml +13 -13
  385. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_ORCID_ID.yml +6 -4
  386. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_data_citation.yml +6 -4
  387. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_data_citation_schema_org.yml +26 -24
  388. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_editor.yml +6 -4
  389. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_version.yml +14 -12
  390. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/Dataset_in_schema_4_0.yml +12 -10
  391. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/Text_pass-thru.yml +27 -23
  392. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/book_chapter.yml +5 -3
  393. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/interactive_resource_without_dates.yml +14 -12
  394. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/maremma.yml +13 -13
  395. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/with_ORCID_ID.yml +6 -4
  396. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/with_data_citation.yml +6 -4
  397. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/with_data_citation_schema_org.yml +28 -24
  398. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/with_editor.yml +6 -4
  399. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_rdf_xml/BlogPosting.yml +17 -12
  400. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_rdf_xml/BlogPosting_schema_org.yml +26 -24
  401. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_rdf_xml/journal_article.yml +6 -4
  402. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_rdf_xml/maremma.yml +13 -13
  403. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_rdf_xml/with_pages.yml +6 -4
  404. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/BlogPosting.yml +17 -12
  405. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/BlogPosting_schema_org.yml +26 -24
  406. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/Dataset.yml +11 -9
  407. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/alternate_name.yml +12 -10
  408. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/journal_article.yml +6 -4
  409. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/keywords_with_subject_scheme.yml +20 -18
  410. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/maremma.yml +13 -13
  411. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/with_pages.yml +6 -4
  412. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Funding.yml +24 -18
  413. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Funding_OpenAIRE.yml +31 -25
  414. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON.yml +14 -12
  415. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON_Cyark.yml +24 -41
  416. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON_IsSupplementTo.yml +24 -18
  417. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON_isReferencedBy.yml +12 -10
  418. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/alternate_identifiers.yml +15 -13
  419. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/data_catalog.yml +13 -11
  420. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/geo_location_box.yml +22 -19
  421. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/interactive_resource_without_dates.yml +15 -13
  422. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/journal_article.yml +6 -4
  423. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/maremma_schema_org_JSON.yml +12 -12
  424. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/series_information.yml +12 -10
  425. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/subject_scheme.yml +11 -9
  426. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/subject_scheme_multiple_keywords.yml +19 -17
  427. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/BlogPosting.yml +18 -13
  428. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/BlogPosting_schema_org.yml +26 -24
  429. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/Dataset.yml +12 -10
  430. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/journal_article.yml +6 -4
  431. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/with_pages.yml +6 -4
  432. data/spec/metadata_spec.rb +1 -1
  433. data/spec/readers/crossref_reader_spec.rb +299 -24
  434. data/spec/readers/datacite_json_reader_spec.rb +1 -1
  435. data/spec/readers/datacite_reader_spec.rb +74 -29
  436. data/spec/readers/schema_org_reader_spec.rb +4 -6
  437. data/spec/utils_spec.rb +17 -4
  438. data/spec/writers/bibtex_writer_spec.rb +4 -6
  439. data/spec/writers/citeproc_writer_spec.rb +3 -3
  440. data/spec/writers/csv_writer_spec.rb +1 -1
  441. data/spec/writers/datacite_writer_spec.rb +1 -1
  442. data/spec/writers/jats_writer_spec.rb +1 -1
  443. data/spec/writers/rdf_xml_writer_spec.rb +1 -1
  444. data/spec/writers/ris_writer_spec.rb +10 -8
  445. data/spec/writers/schema_org_writer_spec.rb +5 -5
  446. data/spec/writers/turtle_writer_spec.rb +1 -1
  447. metadata +23 -11
  448. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/change_alternate_identifiers.yml +0 -51
  449. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_in_test_system.yml +0 -104
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 32f019db25256fb71b8a6d0b2b45abcc97e0ca6266d2e4d03519a9ac07cafe9c
4
- data.tar.gz: 65ba122b12a9bfb50aac24d499d966f9d88007cf0cf84f2f7b81f24ebf5bf08b
3
+ metadata.gz: dbd614cf40cc2e3600fbcc479bf7f4906445b4c94286de2b8ead48e9c10c7467
4
+ data.tar.gz: a35045240dc173f9ca7e9dae342cf77824837ed5ae57525c919e9a9d33057920
5
5
  SHA512:
6
- metadata.gz: 15804e0a56cae442744b5ade6478b085a66c7cd375c88a86d0166d7e0d86845fbc5e293f85854d424140550e49672136a9d6f5a156e8e68d47a0f13b166db756
7
- data.tar.gz: 32e48adcca39c6de5100777e468fe850324c0a736ab75d2ca758091bb692fa98c9c47047c32f5d36aa192b0d464983fadcfe246a2dfea7cc5f7fd57b3128360a
6
+ metadata.gz: 899ed11d9555e12d7fd55bf5528818aa27ad9d06a43bd6177c2dadd98285e8a6c132797229f550fc9afcff3c9492c2600aa5b39cbb15fd35e2ad0056756b9e48
7
+ data.tar.gz: e3017d4b5e2604a213b1f21162a00330a4106dabd8580120157255132b8cbc6b247b52ba828bc69646ca6ee87a81d7d2d6b6bd20ea1e2cdd7d1947094f14d7cb
data/CHANGELOG.md CHANGED
@@ -1,5 +1,47 @@
1
1
  # Changelog
2
2
 
3
+ ## [Unreleased](https://github.com/datacite/bolognese/tree/HEAD)
4
+
5
+ [Full Changelog](https://github.com/datacite/bolognese/compare/1.9.5...HEAD)
6
+
7
+ **Fixed bugs:**
8
+
9
+ - Missing affiliationIdentiifer when used with schemaURI raises an error [\#116](https://github.com/datacite/bolognese/issues/116)
10
+ - Optional numberType being treated as required generating error [\#112](https://github.com/datacite/bolognese/issues/112)
11
+
12
+ **Closed issues:**
13
+
14
+ - Book metadata seems to be ignored [\#113](https://github.com/datacite/bolognese/issues/113)
15
+ - Namespaced XML Tags [\#109](https://github.com/datacite/bolognese/issues/109)
16
+
17
+ **Merged pull requests:**
18
+
19
+ - Fix missing affiliation identifier [\#117](https://github.com/datacite/bolognese/pull/117) ([richardhallett](https://github.com/richardhallett))
20
+
21
+ ## [1.9.5](https://github.com/datacite/bolognese/tree/1.9.5) (2021-04-20)
22
+
23
+ [Full Changelog](https://github.com/datacite/bolognese/compare/1.9.4...1.9.5)
24
+
25
+ ## [1.9.4](https://github.com/datacite/bolognese/tree/1.9.4) (2021-04-13)
26
+
27
+ [Full Changelog](https://github.com/datacite/bolognese/compare/1.9.3...1.9.4)
28
+
29
+ **Implemented enhancements:**
30
+
31
+ - Should we resolve the Namespace URL for schema [\#62](https://github.com/datacite/bolognese/issues/62)
32
+
33
+ **Fixed bugs:**
34
+
35
+ - Singular geoLocationPolygons are wrapped in additional array [\#110](https://github.com/datacite/bolognese/issues/110)
36
+
37
+ **Merged pull requests:**
38
+
39
+ - Support returning single geoLocationPolygon [\#111](https://github.com/datacite/bolognese/pull/111) ([richardhallett](https://github.com/richardhallett))
40
+
41
+ ## [1.9.3](https://github.com/datacite/bolognese/tree/1.9.3) (2021-03-26)
42
+
43
+ [Full Changelog](https://github.com/datacite/bolognese/compare/1.9.2...1.9.3)
44
+
3
45
  ## [1.9.2](https://github.com/datacite/bolognese/tree/1.9.2) (2021-03-25)
4
46
 
5
47
  [Full Changelog](https://github.com/datacite/bolognese/compare/1.9.1...1.9.2)
@@ -977,14 +1019,14 @@
977
1019
 
978
1020
  [Full Changelog](https://github.com/datacite/bolognese/compare/v.0.11.15...v.0.11.16)
979
1021
 
980
- ## [v.0.11.15](https://github.com/datacite/bolognese/tree/v.0.11.15) (2018-08-01)
981
-
982
- [Full Changelog](https://github.com/datacite/bolognese/compare/v.0.11.14...v.0.11.15)
983
-
984
1022
  **Fixed bugs:**
985
1023
 
986
1024
  - Handle xs:string attribute [\#32](https://github.com/datacite/bolognese/issues/32)
987
1025
 
1026
+ ## [v.0.11.15](https://github.com/datacite/bolognese/tree/v.0.11.15) (2018-08-01)
1027
+
1028
+ [Full Changelog](https://github.com/datacite/bolognese/compare/v.0.11.14...v.0.11.15)
1029
+
988
1030
  ## [v.0.11.14](https://github.com/datacite/bolognese/tree/v.0.11.14) (2018-07-28)
989
1031
 
990
1032
  [Full Changelog](https://github.com/datacite/bolognese/compare/v.0.11.3...v.0.11.14)
@@ -1469,6 +1511,7 @@
1469
1511
  - Error displaying container-title [\#13](https://github.com/datacite/bolognese/issues/13)
1470
1512
  - Error parsing funding information [\#12](https://github.com/datacite/bolognese/issues/12)
1471
1513
  - crossref author id to orcid id? [\#10](https://github.com/datacite/bolognese/issues/10)
1514
+ - Support funding information [\#7](https://github.com/datacite/bolognese/issues/7)
1472
1515
  - datacite: support subjectScheme and subjectURI [\#4](https://github.com/datacite/bolognese/issues/4)
1473
1516
 
1474
1517
  ## [v.0.9.21](https://github.com/datacite/bolognese/tree/v.0.9.21) (2017-06-03)
@@ -1479,7 +1522,6 @@
1479
1522
 
1480
1523
  - Abstract should be a string in Citeproc writer [\#11](https://github.com/datacite/bolognese/issues/11)
1481
1524
  - the Bolognese gem doesn't properly handle the optional language attribute. [\#8](https://github.com/datacite/bolognese/issues/8)
1482
- - Support funding information [\#7](https://github.com/datacite/bolognese/issues/7)
1483
1525
  - datacite: support xml:lang in title [\#3](https://github.com/datacite/bolognese/issues/3)
1484
1526
 
1485
1527
  ## [v.0.9.20](https://github.com/datacite/bolognese/tree/v.0.9.20) (2017-05-13)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bolognese (1.9.3)
4
+ bolognese (1.9.8)
5
5
  activesupport (>= 4.2.5)
6
6
  benchmark_methods (~> 0.7)
7
7
  bibtex-ruby (>= 5.1.0)
@@ -17,7 +17,7 @@ PATH
17
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.7, < 5)
20
+ maremma (>= 4.9.4, < 5)
21
21
  namae (~> 1.0)
22
22
  nokogiri (~> 1.11.2)
23
23
  oj (~> 3.10)
@@ -30,7 +30,7 @@ PATH
30
30
  GEM
31
31
  remote: https://rubygems.org/
32
32
  specs:
33
- activesupport (6.1.3)
33
+ activesupport (6.1.3.2)
34
34
  concurrent-ruby (~> 1.0, >= 1.0.2)
35
35
  i18n (>= 1.6, < 2)
36
36
  minitest (>= 5.1)
@@ -38,6 +38,7 @@ GEM
38
38
  zeitwerk (~> 2.3)
39
39
  addressable (2.7.0)
40
40
  public_suffix (>= 2.0.2, < 5.0)
41
+ amazing_print (1.3.0)
41
42
  benchmark_methods (0.7)
42
43
  bibtex-ruby (6.0.0)
43
44
  latex-decode (~> 0.0)
@@ -48,21 +49,23 @@ GEM
48
49
  citeproc (~> 1.0, >= 1.0.9)
49
50
  csl (~> 1.5)
50
51
  colorize (0.8.1)
51
- concurrent-ruby (1.1.8)
52
+ concurrent-ruby (1.1.9)
52
53
  crack (0.4.5)
53
54
  rexml
54
55
  crass (1.0.6)
55
56
  csl (1.5.2)
56
57
  namae (~> 1.0)
57
- csl-styles (1.0.1.10)
58
+ csl-styles (1.0.1.11)
58
59
  csl (~> 1.0)
59
60
  diff-lcs (1.4.4)
60
- docile (1.3.5)
61
- ebnf (2.1.2)
61
+ docile (1.4.0)
62
+ ebnf (2.1.3)
63
+ amazing_print (~> 1.2)
62
64
  htmlentities (~> 4.3)
63
65
  rdf (~> 3.1)
64
66
  scanf (~> 1.0)
65
67
  sxp (~> 1.1)
68
+ unicode-types (~> 1.6)
66
69
  edtf (3.0.6)
67
70
  activesupport (>= 3.0, < 7.0)
68
71
  excon (0.71.1)
@@ -81,7 +84,7 @@ GEM
81
84
  concurrent-ruby (~> 1.0)
82
85
  hashdiff (1.0.1)
83
86
  htmlentities (4.3.4)
84
- i18n (1.8.9)
87
+ i18n (1.8.10)
85
88
  concurrent-ruby (~> 1.0)
86
89
  iso8601 (0.9.1)
87
90
  json (2.5.1)
@@ -101,10 +104,10 @@ GEM
101
104
  optimist (~> 3)
102
105
  latex-decode (0.3.2)
103
106
  link_header (0.0.8)
104
- loofah (2.9.0)
107
+ loofah (2.10.0)
105
108
  crass (~> 1.0.2)
106
109
  nokogiri (>= 1.5.9)
107
- maremma (4.7.4)
110
+ maremma (4.9.4)
108
111
  activesupport (>= 4.2.5)
109
112
  addressable (>= 2.3.6)
110
113
  builder (~> 3.2, >= 3.2.2)
@@ -115,15 +118,15 @@ GEM
115
118
  nokogiri (~> 1.11.2)
116
119
  oj (>= 2.8.3)
117
120
  oj_mimic_json (~> 1.0, >= 1.0.1)
118
- mini_portile2 (2.5.0)
121
+ mini_portile2 (2.5.3)
119
122
  minitest (5.14.4)
120
123
  multi_json (1.15.0)
121
124
  multipart-post (2.1.1)
122
125
  namae (1.1.1)
123
- nokogiri (1.11.2)
126
+ nokogiri (1.11.7)
124
127
  mini_portile2 (~> 2.5.0)
125
128
  racc (~> 1.4)
126
- oj (3.11.3)
129
+ oj (3.11.5)
127
130
  oj_mimic_json (1.0.1)
128
131
  optimist (3.0.1)
129
132
  postrank-uri (1.0.24)
@@ -136,7 +139,7 @@ GEM
136
139
  rack-test (0.8.3)
137
140
  rack (>= 1.0, < 3)
138
141
  rake (12.3.3)
139
- rdf (3.1.13)
142
+ rdf (3.1.14)
140
143
  hamster (~> 3.0)
141
144
  link_header (~> 0.0, >= 0.0.8)
142
145
  rdf-aggregate-repo (3.1.0)
@@ -161,7 +164,7 @@ GEM
161
164
  rdf-xsd (3.1.1)
162
165
  rdf (~> 3.1)
163
166
  rexml (~> 3.2)
164
- rexml (3.2.4)
167
+ rexml (3.2.5)
165
168
  rspec (3.10.0)
166
169
  rspec-core (~> 3.10.0)
167
170
  rspec-expectations (~> 3.10.0)
@@ -191,9 +194,10 @@ GEM
191
194
  tilt (2.0.10)
192
195
  tzinfo (2.0.4)
193
196
  concurrent-ruby (~> 1.0)
197
+ unicode-types (1.6.0)
194
198
  unicode_utils (1.4.0)
195
199
  vcr (3.0.3)
196
- webmock (3.12.1)
200
+ webmock (3.13.0)
197
201
  addressable (>= 2.3.6)
198
202
  crack (>= 0.3.2)
199
203
  hashdiff (>= 0.4.0, < 2.0.0)
@@ -215,4 +219,4 @@ DEPENDENCIES
215
219
  webmock (~> 3.0, >= 3.0.1)
216
220
 
217
221
  BUNDLED WITH
218
- 2.2.14
222
+ 2.2.19
data/bolognese.gemspec CHANGED
@@ -16,7 +16,7 @@ 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.7', '< 5'
19
+ s.add_dependency 'maremma', '>= 4.9.4', '< 5'
20
20
  s.add_dependency 'faraday', '~> 0.17.3'
21
21
  s.add_dependency 'nokogiri', '~> 1.11.2'
22
22
  s.add_dependency 'loofah', '~> 2.0', '>= 2.0.3'
@@ -138,14 +138,19 @@ module Bolognese
138
138
 
139
139
  def get_affiliations(affiliations)
140
140
  Array.wrap(affiliations).map do |a|
141
+ affiliation_identifier = nil
141
142
  if a.is_a?(String)
142
143
  name = a.squish
143
- affiliation_identifier = nil
144
144
  affiliation_identifier_scheme = nil
145
145
  scheme_uri = nil
146
146
  else
147
- affiliation_identifier = a["affiliationIdentifier"]
148
- affiliation_identifier = !affiliation_identifier.to_s.start_with?("https://") && a["schemeURI"].present? ? normalize_id(a["schemeURI"] + affiliation_identifier) : normalize_id(affiliation_identifier)
147
+ if a["affiliationIdentifier"].present?
148
+ affiliation_identifier = a["affiliationIdentifier"]
149
+ if a["schemeURI"].present?
150
+ schemeURI = a["schemeURI"].end_with?("/") ? a["schemeURI"] : a["schemeURI"] + "/"
151
+ end
152
+ affiliation_identifier = !affiliation_identifier.to_s.start_with?("https://") && schemeURI.present? ? normalize_id(schemeURI + affiliation_identifier) : normalize_id(affiliation_identifier)
153
+ end
149
154
  name = a["__content__"].to_s.squish.presence
150
155
  affiliation_identifier_scheme = a["affiliationIdentifierScheme"]
151
156
  scheme_uri = a["SchemeURI"]
@@ -3,32 +3,33 @@
3
3
  module Bolognese
4
4
  module DoiUtils
5
5
  def validate_doi(doi)
6
- doi = Array(/\A(?:(http|https):\/(\/)?(dx\.)?(doi.org|handle.test.datacite.org)\/)?(doi:)?(10\.\d{4,5}\/.+)\z/.match(doi)).last
6
+ doi = Array(/\A(?:(http|https):\/(\/)?(dx\.)?(doi.org|handle.stage.datacite.org|handle.test.datacite.org)\/)?(doi:)?(10\.\d{4,5}\/.+)\z/.match(doi)).last
7
7
  # remove non-printing whitespace and downcase
8
8
  doi.delete("\u200B").downcase if doi.present?
9
9
  end
10
10
 
11
11
  def validate_funder_doi(doi)
12
- doi = Array(/\A(?:(http|https):\/(\/)?(dx\.)?(doi.org|handle.test.datacite.org)\/)?(doi:)?(10\.13039\/)?(5.+)\z/.match(doi)).last
12
+ doi = Array(/\A(?:(http|https):\/(\/)?(dx\.)?(doi.org|handle.stage.datacite.org|handle.test.datacite.org)\/)?(doi:)?(10\.13039\/)?([1-9]\d+)\z/.match(doi)).last
13
+
13
14
  # remove non-printing whitespace and downcase
14
15
  if doi.present?
15
- doi.delete("\u200B").downcase
16
+ doi.delete("\u200B").downcase
16
17
  "https://doi.org/10.13039/#{doi}"
17
18
  end
18
19
  end
19
20
 
20
21
  def validate_prefix(doi)
21
- Array(/\A(?:(http|https):\/(\/)?(dx\.)?(doi.org|handle.test.datacite.org)\/)?(doi:)?(10\.\d{4,5}).*\z/.match(doi)).last
22
+ Array(/\A(?:(http|https):\/(\/)?(dx\.)?(doi.org|handle.stage.datacite.org|handle.test.datacite.org)\/)?(doi:)?(10\.\d{4,5}).*\z/.match(doi)).last
22
23
  end
23
24
 
24
25
  def doi_resolver(doi, options = {})
25
- sandbox = Array(/handle.test.datacite.org/.match(doi)).last
26
- sandbox.present? || options[:sandbox] ? "https://handle.test.datacite.org/" : "https://doi.org/"
26
+ sandbox = Array(/handle.stage.datacite.org/.match(doi)).last
27
+ sandbox.present? || options[:sandbox] ? "https://handle.stage.datacite.org/" : "https://doi.org/"
27
28
  end
28
29
 
29
30
  def doi_api_url(doi, options = {})
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)}?include=media,client" : "https://api.datacite.org/dois/#{doi_from_url(doi)}?include=media,client"
31
+ sandbox = Array(/handle.stage.datacite.org/.match(doi)).last
32
+ sandbox.present? || options[:sandbox] ? "https://api.stage.datacite.org/dois/#{doi_from_url(doi)}?include=media,client" : "https://api.datacite.org/dois/#{doi_from_url(doi)}?include=media,client"
32
33
  end
33
34
 
34
35
  def normalize_doi(doi, options = {})
@@ -40,7 +41,7 @@ module Bolognese
40
41
  end
41
42
 
42
43
  def doi_from_url(url)
43
- if /\A(?:(http|https):\/\/(dx\.)?(doi.org|handle.test.datacite.org)\/)?(doi:)?(10\.\d{4,5}\/.+)\z/.match(url)
44
+ if /\A(?:(http|https):\/\/(dx\.)?(doi.org|handle.stage.datacite.org|handle.test.datacite.org)\/)?(doi:)?(10\.\d{4,5}\/.+)\z/.match(url)
44
45
  uri = Addressable::URI.parse(url)
45
46
  uri.path.gsub(/^\//, '').downcase
46
47
  end
@@ -56,10 +56,10 @@ module Bolognese
56
56
  # book_series_metadata.dig("publisher", "publisher_name")
57
57
  # end
58
58
  when "conference"
59
- event_metadata = meta.dig("crossref", "conference", "event_metadata") || {}
59
+ event_metadata = meta.dig("crossref", "conference", "event_metadata") || {}
60
60
  bibliographic_metadata = meta.dig("crossref", "conference", "conference_paper").to_h
61
61
  when "journal"
62
- journal_metadata = meta.dig("crossref", "journal", "journal_metadata") || {}
62
+ journal_metadata = meta.dig("crossref", "journal", "journal_metadata") || {}
63
63
  journal_issue = meta.dig("crossref", "journal", "journal_issue") || {}
64
64
  journal_article = meta.dig("crossref", "journal", "journal_article") || {}
65
65
  bibliographic_metadata = journal_article.presence || journal_issue.presence || journal_metadata
@@ -140,7 +140,8 @@ module Bolognese
140
140
  state = meta.present? || read_options.present? ? "findable" : "not_found"
141
141
 
142
142
  related_identifiers = Array.wrap(crossref_is_part_of(journal_metadata)) + Array.wrap(crossref_references(bibliographic_metadata))
143
- container = if journal_metadata.present? || book_metadata.present?
143
+
144
+ container = if journal_metadata.present?
144
145
  issn = normalize_issn(journal_metadata.to_h.fetch("issn", nil))
145
146
 
146
147
  { "type" => "Journal",
@@ -151,6 +152,19 @@ module Bolognese
151
152
  "issue" => parse_attributes(journal_issue.dig("issue")),
152
153
  "firstPage" => bibliographic_metadata.dig("pages", "first_page") || parse_attributes(journal_article.to_h.dig("publisher_item", "item_number"), first: true),
153
154
  "lastPage" => bibliographic_metadata.dig("pages", "last_page") }.compact
155
+
156
+ # By using book_metadata, we can account for where resource_type is `BookChapter` and not assume its a whole book
157
+ elsif book_metadata.present?
158
+ identifiers = crossref_alternate_identifiers(book_metadata)
159
+
160
+ {
161
+ "type" => "Book",
162
+ "title" => book_metadata.dig("titles", "title"),
163
+ "firstPage" => bibliographic_metadata.dig("pages", "first_page"),
164
+ "lastPage" => bibliographic_metadata.dig("pages", "last_page"),
165
+ "identifiers" => identifiers,
166
+ }.compact
167
+
154
168
  elsif book_series_metadata.to_h.fetch("series_metadata", nil).present?
155
169
  issn = normalize_issn(book_series_metadata.dig("series_metadata", "issn"))
156
170
 
@@ -162,7 +176,10 @@ module Bolognese
162
176
  end
163
177
 
164
178
  id = normalize_doi(options[:doi] || options[:id] || bibliographic_metadata.dig("doi_data", "doi"))
165
- identifiers = crossref_alternate_identifiers(bibliographic_metadata)
179
+
180
+ # Let sections override this in case of alternative metadata structures, such as book chapters, which
181
+ # have their meta inside `content_item`, but the main book indentifers inside of `book_metadata`
182
+ identifiers ||= crossref_alternate_identifiers(bibliographic_metadata)
166
183
 
167
184
  { "id" => id,
168
185
  "types" => types,
@@ -7,7 +7,7 @@ module Bolognese
7
7
  return { "string" => nil, "state" => "not_found" } unless id.present?
8
8
 
9
9
  api_url = doi_api_url(id, options)
10
- response = Maremma.get api_url
10
+ response = Maremma.get(api_url)
11
11
  attributes = response.body.dig("data", "attributes")
12
12
  return { "string" => nil, "state" => "not_found" } unless attributes.present?
13
13
 
@@ -203,6 +203,15 @@ module Bolognese
203
203
  "schemeType" => rii["schemeType"]
204
204
  }.compact
205
205
 
206
+ number = ri["number"]
207
+ if number.is_a?(String)
208
+ number = number
209
+ numberType = nil
210
+ else
211
+ number = ri.dig("number", "__content__")
212
+ numberType = ri.dig("number", "numberType")
213
+ end
214
+
206
215
  {
207
216
  "relationType" => ri["relationType"],
208
217
  "relatedItemType" => ri["relatedItemType"],
@@ -212,8 +221,8 @@ module Bolognese
212
221
  "publicationYear" => ri["publicationYear"],
213
222
  "volume" => ri["volume"],
214
223
  "issue" => ri["issue"],
215
- "number" => ri.dig("number", "__content__"),
216
- "numberType" => ri.dig("number", "numberType"),
224
+ "number" => number,
225
+ "numberType" => numberType,
217
226
  "firstPage" => ri["firstPage"],
218
227
  "lastPage" => ri["lastPage"],
219
228
  "publisher" => ri["publisher"],
@@ -226,6 +235,19 @@ module Bolognese
226
235
  if !gl.is_a?(Hash) || gl["geoLocationPoint"].is_a?(String) || gl["geoLocationBox"].is_a?(String) || gl["geoLocationPolygon"].is_a?(String)
227
236
  nil
228
237
  else
238
+
239
+ # Handle scenario where multiple geoLocationPolygons are allowed within a single geoLocation
240
+ # we want to return an array if it's already an array (i.e. multiple geoLocationPolygons)
241
+ # vs if it's singular just return the object
242
+ # This is for backwards compatability to allow both scenarios.
243
+ if gl.dig("geoLocationPolygon").kind_of?(Array)
244
+ geoLocationPolygon = gl.dig("geoLocationPolygon").map do |glp|
245
+ Array.wrap(glp.dig("polygonPoint")).map { |glpp| { "polygonPoint" => glpp } }.compact.presence
246
+ end.compact.presence
247
+ else
248
+ geoLocationPolygon = Array.wrap(gl.dig("geoLocationPolygon", "polygonPoint")).map { |glp| { "polygonPoint" => glp } }.compact.presence
249
+ end
250
+
229
251
  {
230
252
  "geoLocationPoint" => {
231
253
  "pointLatitude" => gl.dig("geoLocationPoint", "pointLatitude"),
@@ -237,9 +259,7 @@ module Bolognese
237
259
  "southBoundLatitude" => gl.dig("geoLocationBox", "southBoundLatitude"),
238
260
  "northBoundLatitude" => gl.dig("geoLocationBox", "northBoundLatitude")
239
261
  }.compact.presence,
240
- "geoLocationPolygon" => Array.wrap(gl.dig("geoLocationPolygon")).map do |glp|
241
- Array.wrap(glp.dig("polygonPoint")).map { |glpp| { "polygonPoint" => glpp } }.compact.presence
242
- end.compact.presence,
262
+ "geoLocationPolygon" => geoLocationPolygon,
243
263
  "geoLocationPlace" => parse_attributes(gl["geoLocationPlace"], first: true).to_s.strip.presence
244
264
  }.compact
245
265
  end
@@ -26,8 +26,8 @@ module Bolognese
26
26
  def get_schema_org(id: nil, **options)
27
27
  return { "string" => nil, "state" => "not_found" } unless id.present?
28
28
 
29
- id = normalize_id(id)
30
- response = Maremma.get(id)
29
+ url = normalize_id(id)
30
+ response = Maremma.get(url)
31
31
  doc = Nokogiri::XML(response.body.fetch("data", nil), nil, 'UTF-8')
32
32
 
33
33
  # workaround for xhtml documents
@@ -499,7 +499,7 @@ module Bolognese
499
499
  def find_from_format_by_id(id)
500
500
  id = normalize_id(id)
501
501
 
502
- if /\A(?:(http|https):\/(\/)?(dx\.)?(doi.org|handle.test.datacite.org)\/)?(doi:)?(10\.\d{4,5}\/.+)\z/.match(id)
502
+ if /\A(?:(http|https):\/(\/)?(dx\.)?(doi.org|handle.stage.datacite.org)\/)?(doi:)?(10\.\d{4,5}\/.+)\z/.match(id)
503
503
  ra = get_doi_ra(id)
504
504
  %w(DataCite Crossref mEDRA KISTI JaLC OP).include?(ra) ? ra.downcase : nil
505
505
  elsif /\A(?:(http|https):\/(\/)?orcid\.org\/)?(\d{4}-\d{4}-\d{4}-\d{3}[0-9X]+)\z/.match(id)
@@ -1306,8 +1306,8 @@ module Bolognese
1306
1306
  return [{
1307
1307
  "subject" => sanitize(hsh["__content__"] || hsh["subject"]),
1308
1308
  "subjectScheme" => hsh["subjectScheme"],
1309
- "schemeUri" => hsh["schemeURI"],
1310
- "valueUri" => hsh["valueURI"],
1309
+ "schemeUri" => hsh["schemeURI"] || hsh["schemeUri"],
1310
+ "valueUri" => hsh["valueURI"] || hsh["valueUri"],
1311
1311
  "classificationCode" => hsh["classificationCode"],
1312
1312
  "lang" => hsh["lang"] }.compact,
1313
1313
  {
@@ -1339,8 +1339,8 @@ module Bolognese
1339
1339
  "subject" => sanitize(hsh["__content__"] || hsh["subject"]),
1340
1340
  "subjectScheme" => hsh["subjectScheme"],
1341
1341
  "classificationCode" => hsh["classificationCode"],
1342
- "schemeUri" => hsh["schemeURI"],
1343
- "valueUri" => hsh["valueURI"],
1342
+ "schemeUri" => hsh["schemeURI"] || hsh["schemeUri"],
1343
+ "valueUri" => hsh["valueURI"] || hsh["valueUri"],
1344
1344
  "lang" => hsh["lang"] }.compact,
1345
1345
  {
1346
1346
  "subject" => "FOS: " + subject["fosLabel"],
@@ -1352,8 +1352,8 @@ module Bolognese
1352
1352
  "subject" => sanitize(hsh["__content__"] || hsh["subject"]),
1353
1353
  "subjectScheme" => hsh["subjectScheme"],
1354
1354
  "classificationCode" => hsh["classificationCode"],
1355
- "schemeUri" => hsh["schemeURI"],
1356
- "valueUri" => hsh["valueURI"],
1355
+ "schemeUri" => hsh["schemeURI"] || hsh["schemeUri"],
1356
+ "valueUri" => hsh["valueURI"] || hsh["valueUri"],
1357
1357
  "lang" => hsh["lang"] }.compact]
1358
1358
  end
1359
1359
  end