bolognese 1.9.4 → 1.9.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (458) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +39 -3
  3. data/Gemfile.lock +20 -16
  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 +22 -5
  8. data/lib/bolognese/readers/datacite_reader.rb +12 -3
  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 +9 -8
  15. data/spec/datacite_utils_spec.rb +3 -3
  16. data/spec/doi_utils_spec.rb +29 -17
  17. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/default.yml +27 -20
  18. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_bibtex.yml +27 -20
  19. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_citation.yml +27 -20
  20. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_crossref.yml +27 -20
  21. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_datacite.yml +27 -20
  22. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_jats.yml +27 -20
  23. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_schema_org.yml +27 -20
  24. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/default.yml +33 -24
  25. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_bibtex.yml +33 -24
  26. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_citation.yml +34 -25
  27. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_datacite.yml +34 -25
  28. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_datacite_json.yml +34 -25
  29. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_jats.yml +34 -25
  30. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_schema_org.yml +33 -24
  31. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/default.yml +28 -22
  32. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/to_datacite.yml +28 -22
  33. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/to_schema_org.yml +29 -25
  34. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/find_from_format_by_id/crossref.yml +18 -15
  35. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/find_from_format_by_id/datacite.yml +18 -15
  36. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/find_from_format_by_id/jalc.yml +18 -15
  37. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/find_from_format_by_id/kisti.yml +18 -15
  38. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/find_from_format_by_id/medra.yml +18 -15
  39. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/find_from_format_by_id/op.yml +18 -15
  40. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/authors_as_string/author.yml +9 -5
  41. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/authors_as_string/no_author.yml +9 -5
  42. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/authors_as_string/single_author.yml +9 -5
  43. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/authors_as_string/with_organization.yml +9 -5
  44. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_datacite_metadata/change_state.yml +34 -25
  45. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_datacite_metadata/change_title.yml +33 -24
  46. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/change_description.yml +9 -5
  47. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/change_identifiers.yml +9 -5
  48. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/change_license.yml +9 -5
  49. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/change_license_name.yml +9 -5
  50. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/change_license_url.yml +9 -5
  51. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/change_state.yml +9 -5
  52. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/validates_against_schema.yml +9 -5
  53. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/with_data_citation.yml +9 -5
  54. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/doi.yml +9 -5
  55. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/doi_with_protocol.yml +9 -5
  56. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/dx_doi_org_url.yml +9 -5
  57. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/force_test_resolver.yml +9 -5
  58. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/https_url.yml +9 -5
  59. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/test_resolver.yml +9 -5
  60. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/test_resolver_http.yml +9 -5
  61. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_from_url/doi.yml +9 -5
  62. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_from_url/doi_with_special_characters.yml +9 -5
  63. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_from_url/not_a_doi.yml +9 -5
  64. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_from_url/sandbox_url.yml +9 -5
  65. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_from_url/url.yml +9 -5
  66. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/crossref.yml +27 -20
  67. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/datacite.yml +27 -20
  68. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/jalc.yml +27 -20
  69. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/kisti.yml +27 -20
  70. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/medra.yml +27 -20
  71. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/not_a_valid_prefix.yml +9 -5
  72. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/not_found.yml +27 -20
  73. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/op.yml +27 -20
  74. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/doi.yml +9 -5
  75. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/doi_with_protocol.yml +9 -5
  76. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/dx_doi_org_url.yml +9 -5
  77. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/{test_resolver_http.yml → force_stage_resolver.yml} +9 -5
  78. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/https_url.yml +9 -5
  79. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/stage_resolver.yml +48 -0
  80. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/{force_test_resolver.yml → stage_resolver_http.yml} +9 -5
  81. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/crossref.yml +53 -47
  82. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/crossref_doi_not_url.yml +53 -47
  83. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/datacite.yml +52 -46
  84. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/datacite_doi_http.yml +52 -46
  85. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/github.yml +35 -32
  86. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/orcid.yml +35 -32
  87. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/schema_org.yml +35 -32
  88. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/unknown_DOI_registration_agency.yml +53 -47
  89. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/bibtex.yml +35 -32
  90. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/citeproc.yml +35 -32
  91. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/codemeta.yml +34 -31
  92. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/crosscite.yml +34 -31
  93. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/crossref.yml +35 -32
  94. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/datacite.yml +34 -31
  95. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/datacite_json.yml +35 -32
  96. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/ris.yml +35 -32
  97. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/schema_org.yml +34 -31
  98. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_string/crosscite.yml +35 -32
  99. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/fos/hsh_to_fos_for_match.yml +9 -5
  100. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/fos/hsh_to_fos_for_with_schemeUri_in_hash.yml +48 -0
  101. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/fos/hsh_to_fos_match.yml +9 -5
  102. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/fos/hsh_to_fos_no_match.yml +9 -5
  103. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/fos/name_to_fos_for_match.yml +9 -5
  104. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/fos/name_to_fos_match.yml +9 -5
  105. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/fos/name_to_fos_no_match.yml +9 -5
  106. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/from_schema_org/with_id.yml +9 -5
  107. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/from_schema_org_creators/with_affiliation.yml +9 -5
  108. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/from_schema_org_creators/without_affiliation.yml +9 -5
  109. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_codemeta_metadata/maremma.yml +20 -16
  110. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_codemeta_metadata/metadata_reports.yml +20 -37
  111. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/DOI_with_ORCID_ID.yml +27 -20
  112. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/DOI_with_SICI_DOI.yml +27 -20
  113. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/DOI_with_data_citation.yml +27 -20
  114. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/JaLC.yml +26 -19
  115. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/KISTI.yml +26 -19
  116. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/OP.yml +28 -21
  117. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/affiliation_is_space.yml +24 -23
  118. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/another_book.yml +27 -20
  119. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/another_book_chapter.yml +26 -19
  120. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/article_id_as_page_number.yml +23 -22
  121. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/author_literal.yml +27 -20
  122. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/book.yml +28 -21
  123. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/book_chapter.yml +27 -20
  124. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/book_chapter_with_RDF_for_container.yml +29 -22
  125. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/book_oup.yml +26 -19
  126. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/component.yml +28 -21
  127. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/dataset.yml +28 -21
  128. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/dataset_usda.yml +26 -19
  129. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/date_in_future.yml +28 -21
  130. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/dissertation.yml +26 -19
  131. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/empty_given_name.yml +29 -21
  132. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/invalid_date.yml +27 -20
  133. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_article.yml +27 -20
  134. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_article_original_language_title.yml +30 -22
  135. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_article_with.yml +27 -20
  136. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_article_with_RDF_for_container.yml +27 -20
  137. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_article_with_funding.yml +27 -20
  138. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_issue.yml +26 -19
  139. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/mEDRA.yml +29 -60
  140. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/markup.yml +31 -23
  141. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/missing_creator.yml +27 -20
  142. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/multiple_issn.yml +25 -24
  143. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/multiple_titles.yml +28 -21
  144. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/multiple_titles_with_missing.yml +23 -22
  145. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/not_found_error.yml +26 -19
  146. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/peer_review.yml +26 -19
  147. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/posted_content.yml +27 -20
  148. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/posted_content_copernicus.yml +32 -24
  149. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/report_osti.yml +37 -31
  150. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/vor_with_url.yml +27 -20
  151. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/yet_another_book.yml +30 -22
  152. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/yet_another_book_chapter.yml +26 -19
  153. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_json_metadata/metadata_from_api.yml +34 -40
  154. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/BlogPosting.yml +35 -32
  155. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_in_staging_system.yml +106 -0
  156. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_in_staging_system_schema_3.yml +106 -0
  157. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_in_with_related_id_system.yml +34 -41
  158. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_not_found.yml +34 -25
  159. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Dataset.yml +33 -24
  160. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Funding.yml +34 -25
  161. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Funding_empty_awardTitle.yml +33 -24
  162. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Funding_schema_version_4.yml +34 -25
  163. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Referee_report_in_staging_system.yml +106 -0
  164. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Schema_org_type.yml +34 -25
  165. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/author_only_full_name.yml +33 -24
  166. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/author_with_scheme.yml +34 -25
  167. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/author_with_wrong_orcid_scheme.yml +34 -25
  168. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/cc-by_3_0_us.yml +34 -32
  169. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/content_url.yml +35 -33
  170. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/date.yml +34 -48
  171. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/dissertation.yml +33 -24
  172. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/doi_with_sign.yml +34 -28
  173. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/empty_subject.yml +35 -28
  174. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/even_more_subject_scheme_FOR.yml +34 -25
  175. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/funding_references.yml +34 -25
  176. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/funding_schema_version_3.yml +34 -51
  177. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/is_identical_to.yml +34 -25
  178. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/keywords_with_attributes.yml +35 -40
  179. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/leading_and_trailing_whitespace.yml +34 -53
  180. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/more_subject_scheme_FOR.yml +35 -37
  181. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/multiple_author_names_in_one_creatorsName.yml +34 -33
  182. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/multiple_licenses.yml +35 -52
  183. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/series-information.yml +34 -25
  184. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/subject_scheme.yml +33 -24
  185. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/subject_scheme_FOR.yml +35 -46
  186. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date/publication_date.yml +9 -5
  187. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_date_parts/date.yml +9 -5
  188. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_date_parts/year-month.yml +9 -5
  189. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_date_parts/year.yml +9 -5
  190. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_parts/date.yml +9 -5
  191. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_parts/year-month.yml +9 -5
  192. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_parts/year.yml +9 -5
  193. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_parts/date.yml +9 -5
  194. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_parts/year-month.yml +9 -5
  195. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_parts/year.yml +9 -5
  196. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datetime_from_time/future.yml +9 -5
  197. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datetime_from_time/invalid.yml +9 -5
  198. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datetime_from_time/nil.yml +9 -5
  199. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datetime_from_time/past.yml +9 -5
  200. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datetime_from_time/present.yml +9 -5
  201. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_familyName.yml +16 -16
  202. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_name_in_Thai.yml +16 -10
  203. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_name_in_display-order.yml +17 -37
  204. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_name_in_display-order_with_ORCID.yml +15 -9
  205. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_name_in_sort-order.yml +15 -9
  206. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/hyper-authorship.yml +17 -1203
  207. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/is_organization.yml +9 -5
  208. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/multiple_author_names_in_one_field.yml +16 -18
  209. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/multiple_name_identifier.yml +15 -9
  210. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/name_with_affiliation.yml +15 -9
  211. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/name_with_affiliation_and_country.yml +79 -40
  212. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/name_with_role.yml +15 -9
  213. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/only_familyName_and_givenName.yml +12 -8
  214. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/BlogPosting.yml +28 -22
  215. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/BlogPosting_with_new_DOI.yml +28 -22
  216. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/harvard_dataverse.yml +14 -12
  217. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/pangaea.yml +12 -8
  218. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/zenodo.yml +16 -542
  219. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_series_information/only_title.yml +9 -5
  220. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_series_information/title_and_pages.yml +9 -5
  221. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_series_information/title_volume_and_pages.yml +9 -5
  222. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_series_information/title_volume_issue_and_pages.yml +9 -5
  223. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/github/github_as_codemeta_url.yml +9 -5
  224. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/github/github_from_url.yml +9 -5
  225. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/github/github_from_url_file.yml +9 -5
  226. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/handle_input/DOI_RA_not_Crossref_or_DataCite.yml +18 -15
  227. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/handle_input/unknown_DOI_prefix.yml +18 -15
  228. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_contributors/none.yml +16 -10
  229. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_creators/insert.yml +15 -9
  230. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_dates/insert.yml +16 -10
  231. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_descriptions/insert.yml +17 -17
  232. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_identifier/doi.yml +15 -9
  233. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_language/insert.yml +16 -10
  234. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_person/creator_only_name.yml +15 -9
  235. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_publication_year/insert.yml +16 -10
  236. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_publisher/insert.yml +15 -9
  237. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_related_identifiers/insert.yml +16 -10
  238. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_related_identifiers/related_identifier.yml +16 -10
  239. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_resource_type/insert.yml +15 -9
  240. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_rights_list/insert.yml +15 -9
  241. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_sizes/insert.yml +16 -10
  242. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_subjects/insert.yml +15 -9
  243. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_titles/insert.yml +15 -9
  244. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_version/insert.yml +16 -10
  245. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_comma.yml +9 -5
  246. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_family_name.yml +9 -5
  247. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_id.yml +9 -5
  248. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_known_given_name.yml +9 -5
  249. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_no_info.yml +9 -5
  250. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_orcid_id.yml +9 -5
  251. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_type_organization.yml +9 -5
  252. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/missing_comma.yml +35 -32
  253. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/nil.yml +34 -31
  254. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/overlapping_keys.yml +35 -32
  255. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/valid.yml +35 -32
  256. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_cc_url/not_found.yml +9 -5
  257. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_cc_url/with_trailing_slash.yml +9 -5
  258. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_cc_url/with_trailing_slash_and_to_https.yml +9 -5
  259. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/SICI_doi.yml +9 -5
  260. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi.yml +9 -5
  261. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_force_datacite_sandbox.yml +9 -5
  262. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_from_datacite_sandbox.yml +9 -5
  263. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_from_url_without_doi_proxy.yml +9 -5
  264. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_prefix_too_long.yml +9 -5
  265. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_prefix_with_string.yml +9 -5
  266. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_with_protocol.yml +9 -5
  267. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/dx_doi_org_url.yml +9 -5
  268. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/https_url.yml +9 -5
  269. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/not_valid_doi_prefix.yml +9 -5
  270. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/url_with_one_slash.yml +9 -5
  271. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/doi.yml +9 -5
  272. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/doi_as_url.yml +9 -5
  273. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/ftp.yml +9 -5
  274. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/invalid_url.yml +9 -5
  275. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/sandbox_via_options.yml +9 -5
  276. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/sandbox_via_url.yml +9 -5
  277. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/string.yml +9 -5
  278. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/url.yml +9 -5
  279. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/url_with_utf-8.yml +9 -5
  280. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_ids/doi.yml +9 -5
  281. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_ids/url.yml +9 -5
  282. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_issn/from_array.yml +9 -5
  283. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_issn/from_empty_array.yml +9 -5
  284. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_issn/from_hash.yml +9 -5
  285. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_issn/from_string.yml +9 -5
  286. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_url/uri.yml +9 -5
  287. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_url/with_trailing_slash.yml +9 -5
  288. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_url/with_trailing_slash_and_to_https.yml +9 -5
  289. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/array.yml +9 -5
  290. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/array_of_strings.yml +9 -5
  291. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/first.yml +9 -5
  292. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/hash.yml +9 -5
  293. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/nil.yml +9 -5
  294. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/string.yml +9 -5
  295. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/sanitize/should_only_keep_specific_tags.yml +9 -5
  296. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/sanitize/should_remove_a_tags.yml +9 -5
  297. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/hsh_to_spdx_id.yml +9 -5
  298. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/hsh_to_spdx_not_found.yml +9 -5
  299. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/hsh_to_spdx_url.yml +9 -5
  300. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/name_to_spdx_exists.yml +9 -5
  301. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/name_to_spdx_id.yml +9 -5
  302. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/to_schema_org/with_id.yml +9 -5
  303. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/to_schema_org_identifiers/with_identifiers.yml +9 -5
  304. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_doi/doi.yml +9 -5
  305. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/{doi_resolver/test_resolver.yml → validate_funder_doi/1_7_10.yml} +9 -5
  306. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/1_7_11.yml +48 -0
  307. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/1_7_12.yml +48 -0
  308. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/1_7_13.yml +48 -0
  309. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/1_7_14.yml +48 -0
  310. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/1_7_4.yml +48 -0
  311. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/1_7_5.yml +48 -0
  312. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/1_7_6.yml +48 -0
  313. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/1_7_7.yml +48 -0
  314. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/1_7_8.yml +48 -0
  315. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/1_7_9.yml +48 -0
  316. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/funder_doi.yml +9 -5
  317. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/funder_doi_without_prefix.yml +9 -5
  318. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/non-funder_doi.yml +9 -5
  319. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid.yml +9 -5
  320. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_https.yml +9 -5
  321. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_id.yml +9 -5
  322. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_with_spaces.yml +9 -5
  323. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_wrong_id.yml +9 -5
  324. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_www.yml +9 -5
  325. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid_scheme/validate_orcid_scheme.yml +9 -5
  326. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid_scheme/validate_orcid_scheme_https.yml +9 -5
  327. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid_scheme/validate_orcid_scheme_trailing_slash.yml +9 -5
  328. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid_scheme/validate_orcid_scheme_www.yml +9 -5
  329. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_prefix/doi.yml +9 -5
  330. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_prefix/doi_as_url.yml +9 -5
  331. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_prefix/doi_with_protocol.yml +9 -5
  332. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_prefix/only_prefix.yml +9 -5
  333. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_url/DOI.yml +9 -5
  334. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_url/ISSN.yml +9 -5
  335. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_url/URL.yml +9 -5
  336. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_url/string.yml +9 -5
  337. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/BlogPosting.yml +17 -17
  338. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/Dataset.yml +16 -10
  339. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/authors_with_affiliations.yml +79 -40
  340. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/climate_data.yml +17 -13
  341. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/from_schema_org.yml +28 -24
  342. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/keywords_subject_scheme.yml +17 -88
  343. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/maremma.yml +20 -16
  344. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/text.yml +16 -10
  345. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/with_data_citation.yml +9 -5
  346. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/with_pages.yml +9 -5
  347. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/Dataset.yml +16 -10
  348. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/Journal_article.yml +9 -5
  349. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/Journal_article_vancouver_style.yml +9 -5
  350. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/Missing_author.yml +9 -5
  351. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/interactive_resource_without_dates.yml +17 -14
  352. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/software_w/version.yml +16 -24
  353. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/Another_dataset.yml +16 -34
  354. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/BlogPosting.yml +17 -17
  355. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/BlogPosting_schema_org.yml +29 -25
  356. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/Dataset.yml +15 -9
  357. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/container_title.yml +16 -10
  358. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/interactive_resource_without_dates.yml +16 -13
  359. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/journal_article.yml +9 -5
  360. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/keywords_subject_scheme.yml +17 -88
  361. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/maremma.yml +20 -16
  362. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/missing_creator.yml +9 -5
  363. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/multiple_abstracts.yml +15 -9
  364. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/organization_author.yml +9 -5
  365. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/software.yml +15 -9
  366. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/software_w/version.yml +16 -24
  367. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/with_only_first_page.yml +9 -5
  368. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/with_pages.yml +9 -5
  369. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_codemeta/SoftwareSourceCode_DataCite.yml +16 -14
  370. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_codemeta/SoftwareSourceCode_DataCite_check_codemeta_v2.yml +16 -14
  371. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/datacite_database_attributes.yml +16 -10
  372. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/maremma.yml +20 -16
  373. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/with_ORCID_ID.yml +9 -5
  374. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/with_data_citation.yml +9 -5
  375. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/with_data_citation_schema_org.yml +28 -22
  376. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crossref/from_DataCite.yml +16 -10
  377. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_csv/climate_data.yml +16 -12
  378. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_csv/maremma.yml +19 -15
  379. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_csv/text.yml +15 -9
  380. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_csv/with_data_citation.yml +9 -5
  381. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_csv/with_pages.yml +9 -5
  382. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_json/maremma.yml +20 -16
  383. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_json/with_ORCID_ID.yml +9 -5
  384. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_json/with_data_citation.yml +9 -5
  385. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_json/with_data_citation_schema_org.yml +29 -23
  386. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/DOI_not_found.yml +16 -10
  387. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/Dataset_in_schema_4_0.yml +16 -10
  388. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/Text_pass-thru.yml +16 -42
  389. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/Text_pass-thru_with_doi_in_options.yml +17 -43
  390. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/maremma.yml +20 -16
  391. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_ORCID_ID.yml +9 -5
  392. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_data_citation.yml +9 -5
  393. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_data_citation_schema_org.yml +29 -25
  394. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_editor.yml +9 -5
  395. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_version.yml +17 -26
  396. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/Dataset_in_schema_4_0.yml +16 -10
  397. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/Text_pass-thru.yml +17 -43
  398. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/book_chapter.yml +8 -4
  399. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/interactive_resource_without_dates.yml +16 -13
  400. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/maremma.yml +20 -16
  401. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/with_ORCID_ID.yml +9 -5
  402. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/with_data_citation.yml +9 -5
  403. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/with_data_citation_schema_org.yml +30 -22
  404. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/with_editor.yml +9 -5
  405. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_rdf_xml/BlogPosting.yml +16 -16
  406. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_rdf_xml/BlogPosting_schema_org.yml +28 -22
  407. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_rdf_xml/journal_article.yml +9 -5
  408. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_rdf_xml/maremma.yml +20 -16
  409. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_rdf_xml/with_pages.yml +9 -5
  410. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/BlogPosting.yml +16 -16
  411. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/BlogPosting_schema_org.yml +28 -22
  412. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/Dataset.yml +16 -10
  413. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/alternate_name.yml +16 -10
  414. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/journal_article.yml +9 -5
  415. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/keywords_with_subject_scheme.yml +16 -87
  416. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/maremma.yml +20 -16
  417. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/with_pages.yml +9 -5
  418. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Funding.yml +33 -24
  419. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Funding_OpenAIRE.yml +35 -52
  420. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON.yml +16 -36
  421. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON_Cyark.yml +34 -48
  422. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON_IsSupplementTo.yml +33 -24
  423. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON_isReferencedBy.yml +16 -10
  424. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/alternate_identifiers.yml +17 -18
  425. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/data_catalog.yml +16 -22
  426. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/geo_location_box.yml +17 -68
  427. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/interactive_resource_without_dates.yml +17 -14
  428. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/journal_article.yml +9 -5
  429. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/maremma_schema_org_JSON.yml +20 -16
  430. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/series_information.yml +15 -9
  431. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/subject_scheme.yml +16 -10
  432. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/subject_scheme_multiple_keywords.yml +16 -87
  433. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/BlogPosting.yml +17 -17
  434. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/BlogPosting_schema_org.yml +30 -24
  435. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/Dataset.yml +16 -10
  436. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/journal_article.yml +9 -5
  437. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/with_pages.yml +9 -5
  438. data/spec/metadata_spec.rb +1 -1
  439. data/spec/readers/crossref_reader_spec.rb +298 -23
  440. data/spec/readers/datacite_json_reader_spec.rb +1 -1
  441. data/spec/readers/datacite_reader_spec.rb +64 -27
  442. data/spec/readers/schema_org_reader_spec.rb +4 -6
  443. data/spec/utils_spec.rb +17 -4
  444. data/spec/writers/bibtex_writer_spec.rb +4 -6
  445. data/spec/writers/citeproc_writer_spec.rb +3 -3
  446. data/spec/writers/csv_writer_spec.rb +1 -1
  447. data/spec/writers/datacite_writer_spec.rb +1 -1
  448. data/spec/writers/jats_writer_spec.rb +1 -1
  449. data/spec/writers/rdf_xml_writer_spec.rb +1 -1
  450. data/spec/writers/ris_writer_spec.rb +10 -8
  451. data/spec/writers/schema_org_writer_spec.rb +4 -4
  452. data/spec/writers/turtle_writer_spec.rb +1 -1
  453. metadata +23 -13
  454. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/to_bibtex.yml +0 -111
  455. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/change_alternate_identifiers.yml +0 -51
  456. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_in_test_system.yml +0 -104
  457. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_in_test_system_schema_3.yml +0 -99
  458. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Referee_report_in_test_system.yml +0 -102
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f8f8cb84bf74f8a75d2469aa5a3e49dd4ba0adbd9b465d60e11bdbbd8252c267
4
- data.tar.gz: 3fc9719de82891ce908fd4af271f05fc1f024442d0a1e6bc88b65db438118ab3
3
+ metadata.gz: fbe9e35e7353f028ff77b7265ebf35db75b6ca6827fd5e64fcbfc42c0ca04b0a
4
+ data.tar.gz: 734492dd88ddc4511a34c885a05431e31500fe422ed4bc642f06296177a9d824
5
5
  SHA512:
6
- metadata.gz: 797b852b3dafd982249bb57a91dff364bd2dcc6d2b52cb50494dcc6a5cfec7a2fc714a27eed6cd46dde158c495ca93154a858ca0f1800a3990b3f6708878fcec
7
- data.tar.gz: c19d5e7833401549a98b71a13e9063b52bbdfaaa70ff2165272aff311b2d3df6ae765ae79a4ad62ae45fb259520a3e3b39ada0dbef838cc602972ecdad50305b
6
+ metadata.gz: c72d97cc6f095710a6861188b5f6e6761813c67fbb3d7fa2ebd09586a427954d78997b4f9d1565b255a42646e48c0ead0a2f68319b38b79752924ce12774e852
7
+ data.tar.gz: 0d890b5b6572161d1596ad8641261e3d9d754613a18d66bf7b0406013b3d93308247fe8790022c3964295165cca51593314ec4b35e9ae4cdeb638330a035ea78
data/CHANGELOG.md CHANGED
@@ -1,8 +1,41 @@
1
1
  # Changelog
2
2
 
3
- ## [Unreleased](https://github.com/datacite/bolognese/tree/HEAD)
3
+ ## [1.9.8](https://github.com/datacite/bolognese/tree/1.9.8) (2021-06-08)
4
4
 
5
- [Full Changelog](https://github.com/datacite/bolognese/compare/1.9.3...HEAD)
5
+ [Full Changelog](https://github.com/datacite/bolognese/compare/1.9.7...1.9.8)
6
+
7
+ ## [1.9.7](https://github.com/datacite/bolognese/tree/1.9.7) (2021-05-26)
8
+
9
+ [Full Changelog](https://github.com/datacite/bolognese/compare/1.9.6...1.9.7)
10
+
11
+ ## [1.9.6](https://github.com/datacite/bolognese/tree/1.9.6) (2021-05-26)
12
+
13
+ [Full Changelog](https://github.com/datacite/bolognese/compare/1.9.5...1.9.6)
14
+
15
+ **Fixed bugs:**
16
+
17
+ - Missing affiliationIdentiifer when used with schemaURI raises an error [\#116](https://github.com/datacite/bolognese/issues/116)
18
+ - Optional numberType being treated as required generating error [\#112](https://github.com/datacite/bolognese/issues/112)
19
+
20
+ **Closed issues:**
21
+
22
+ - Book metadata seems to be ignored [\#113](https://github.com/datacite/bolognese/issues/113)
23
+ - Namespaced XML Tags [\#109](https://github.com/datacite/bolognese/issues/109)
24
+ - Funder DOI validation [\#108](https://github.com/datacite/bolognese/issues/108)
25
+
26
+ **Merged pull requests:**
27
+
28
+ - Fix missing affiliation identifier [\#117](https://github.com/datacite/bolognese/pull/117) ([richardhallett](https://github.com/richardhallett))
29
+ - Add support for book title and additional metadata when reading Crossref Book Chapter DOI [\#115](https://github.com/datacite/bolognese/pull/115) ([prdanelli](https://github.com/prdanelli))
30
+ - Valid Funder DOIs are being rejected for not starting with a 5 [\#114](https://github.com/datacite/bolognese/pull/114) ([prdanelli](https://github.com/prdanelli))
31
+
32
+ ## [1.9.5](https://github.com/datacite/bolognese/tree/1.9.5) (2021-04-20)
33
+
34
+ [Full Changelog](https://github.com/datacite/bolognese/compare/1.9.4...1.9.5)
35
+
36
+ ## [1.9.4](https://github.com/datacite/bolognese/tree/1.9.4) (2021-04-13)
37
+
38
+ [Full Changelog](https://github.com/datacite/bolognese/compare/1.9.3...1.9.4)
6
39
 
7
40
  **Implemented enhancements:**
8
41
 
@@ -535,6 +568,10 @@
535
568
 
536
569
  - Error when schema.org in put has array value for @type [\#66](https://github.com/datacite/bolognese/issues/66)
537
570
 
571
+ **Merged pull requests:**
572
+
573
+ - Default to `ScholarlyArticle` type for `citation` and `isBasedOn` relationships with datasets [\#64](https://github.com/datacite/bolognese/pull/64) ([chrisgorgo](https://github.com/chrisgorgo))
574
+
538
575
  ## [v.1.2.16](https://github.com/datacite/bolognese/tree/v.1.2.16) (2019-07-07)
539
576
 
540
577
  [Full Changelog](https://github.com/datacite/bolognese/compare/v.1.2.15...v.1.2.16)
@@ -633,7 +670,6 @@
633
670
 
634
671
  **Merged pull requests:**
635
672
 
636
- - Default to `ScholarlyArticle` type for `citation` and `isBasedOn` relationships with datasets [\#64](https://github.com/datacite/bolognese/pull/64) ([chrisgorgo](https://github.com/chrisgorgo))
637
673
  - When authors is a plain string, don't try to parse [\#60](https://github.com/datacite/bolognese/pull/60) ([richardhallett](https://github.com/richardhallett))
638
674
 
639
675
  ## [v.1.1.12](https://github.com/datacite/bolognese/tree/v.1.1.12) (2019-04-15)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bolognese (1.9.4)
4
+ bolognese (1.9.9)
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.1)
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)
@@ -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.1)
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.16
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
@@ -9,7 +9,7 @@ module Bolognese
9
9
 
10
10
  doi = doi_from_url(id)
11
11
  url = "https://api.crossref.org/works/#{doi}/transform/application/vnd.crossref.unixsd+xml"
12
- response = Maremma.get(url, accept: "text/xml", raw: true)
12
+ response = Maremma.get(url, accept: "text/xml;charset=utf-8", raw: true)
13
13
  string = response.body.fetch("data", nil)
14
14
  string = Nokogiri::XML(string, nil, 'UTF-8', &:noblanks).to_s if string.present?
15
15
 
@@ -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"],
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Bolognese
2
- VERSION = "1.9.4"
2
+ VERSION = "1.9.9"
3
3
  end
@@ -76,7 +76,9 @@ module Bolognese
76
76
  end
77
77
 
78
78
  def insert_source(xml)
79
- if is_article? || is_data? || is_chapter?
79
+ if is_chapter?
80
+ xml.source(publisher)
81
+ elsif is_article? || is_data?
80
82
  xml.source(container && container["title"] || publisher)
81
83
  else
82
84
  xml.source(parse_attributes(titles, content: "title", first: true))