bolognese 1.6.10 → 1.7.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (462) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +20 -17
  3. data/bolognese.gemspec +5 -5
  4. data/lib/bolognese/doi_utils.rb +1 -1
  5. data/lib/bolognese/metadata_utils.rb +1 -1
  6. data/lib/bolognese/readers/bibtex_reader.rb +0 -1
  7. data/lib/bolognese/readers/citeproc_reader.rb +2 -14
  8. data/lib/bolognese/readers/codemeta_reader.rb +4 -7
  9. data/lib/bolognese/readers/crossref_reader.rb +3 -5
  10. data/lib/bolognese/readers/datacite_reader.rb +3 -5
  11. data/lib/bolognese/readers/ris_reader.rb +3 -9
  12. data/lib/bolognese/readers/schema_org_reader.rb +13 -6
  13. data/lib/bolognese/utils.rb +1 -1
  14. data/lib/bolognese/version.rb +1 -1
  15. data/lib/bolognese/writers/codemeta_writer.rb +1 -1
  16. data/lib/bolognese/writers/jats_writer.rb +1 -1
  17. data/lib/bolognese/writers/schema_org_writer.rb +1 -1
  18. data/spec/author_utils_spec.rb +1 -1
  19. data/spec/cli_spec.rb +2 -2
  20. data/spec/datacite_utils_spec.rb +14 -15
  21. data/spec/doi_utils_spec.rb +7 -7
  22. data/spec/fixtures/schema_org.json +5 -0
  23. data/spec/fixtures/schema_org_gtex.json +0 -1
  24. data/spec/fixtures/schema_org_list.json +0 -5
  25. data/spec/fixtures/schema_org_topmed.json +0 -1
  26. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/default.yml +19 -15
  27. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_bibtex.yml +19 -15
  28. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_citation.yml +19 -15
  29. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_crossref.yml +19 -15
  30. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_datacite.yml +19 -15
  31. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_jats.yml +19 -15
  32. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_schema_org.yml +19 -15
  33. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/default.yml +24 -20
  34. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_bibtex.yml +24 -20
  35. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_citation.yml +25 -21
  36. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_datacite.yml +25 -21
  37. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_datacite_json.yml +25 -21
  38. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_jats.yml +25 -21
  39. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_schema_org.yml +24 -20
  40. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/default.yml +24 -24
  41. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/to_bibtex.yml +24 -24
  42. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/to_datacite.yml +24 -24
  43. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/to_schema_org.yml +24 -24
  44. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/find_from_format_by_id/crossref.yml +13 -9
  45. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/find_from_format_by_id/datacite.yml +13 -9
  46. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/find_from_format_by_id/jalc.yml +13 -9
  47. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/find_from_format_by_id/kisti.yml +13 -9
  48. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/find_from_format_by_id/medra.yml +13 -9
  49. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/find_from_format_by_id/op.yml +13 -9
  50. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/authors_as_string/author.yml +6 -6
  51. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/authors_as_string/no_author.yml +6 -6
  52. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/authors_as_string/single_author.yml +6 -6
  53. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/authors_as_string/with_organization.yml +6 -6
  54. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_datacite_metadata/change_state.yml +25 -21
  55. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_datacite_metadata/change_title.yml +24 -20
  56. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/change_alternate_identifiers.yml +51 -0
  57. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/change_description.yml +6 -6
  58. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/change_identifiers.yml +51 -0
  59. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/change_license.yml +6 -6
  60. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/change_license_name.yml +6 -6
  61. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/change_license_url.yml +6 -6
  62. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/change_state.yml +6 -6
  63. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/validates_against_schema.yml +6 -6
  64. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/with_data_citation.yml +6 -6
  65. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/doi.yml +6 -6
  66. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/doi_with_protocol.yml +6 -6
  67. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/dx_doi_org_url.yml +6 -6
  68. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/force_test_resolver.yml +6 -6
  69. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/https_url.yml +6 -6
  70. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/test_resolver.yml +6 -6
  71. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_api_url/test_resolver_http.yml +6 -6
  72. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_from_url/doi.yml +6 -6
  73. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_from_url/doi_with_special_characters.yml +6 -6
  74. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_from_url/not_a_doi.yml +6 -6
  75. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_from_url/sandbox_url.yml +6 -6
  76. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_from_url/url.yml +6 -6
  77. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/crossref.yml +19 -15
  78. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/datacite.yml +19 -15
  79. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/jalc.yml +19 -15
  80. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/kisti.yml +19 -15
  81. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/medra.yml +19 -15
  82. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/not_a_valid_prefix.yml +6 -6
  83. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/not_found.yml +19 -15
  84. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/op.yml +19 -15
  85. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/doi.yml +6 -6
  86. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/doi_with_protocol.yml +6 -6
  87. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/dx_doi_org_url.yml +6 -6
  88. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/force_test_resolver.yml +6 -6
  89. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/https_url.yml +6 -6
  90. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/test_resolver.yml +6 -6
  91. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/test_resolver_http.yml +6 -6
  92. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/crossref.yml +41 -33
  93. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/crossref_doi_not_url.yml +41 -33
  94. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/datacite.yml +40 -32
  95. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/datacite_doi_http.yml +40 -32
  96. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/github.yml +28 -24
  97. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/orcid.yml +28 -24
  98. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/schema_org.yml +27 -23
  99. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/unknown_DOI_registration_agency.yml +41 -33
  100. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/bibtex.yml +28 -24
  101. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/citeproc.yml +27 -23
  102. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/codemeta.yml +27 -23
  103. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/crosscite.yml +27 -23
  104. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/crossref.yml +28 -24
  105. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/datacite.yml +27 -23
  106. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/datacite_json.yml +28 -24
  107. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/ris.yml +28 -24
  108. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/schema_org.yml +27 -23
  109. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_string/crosscite.yml +28 -24
  110. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/fos/hsh_to_fos_for_match.yml +5 -5
  111. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/fos/hsh_to_fos_match.yml +5 -5
  112. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/fos/hsh_to_fos_no_match.yml +5 -5
  113. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/fos/name_to_fos_for_match.yml +4 -4
  114. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/fos/name_to_fos_match.yml +5 -5
  115. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/fos/name_to_fos_no_match.yml +5 -5
  116. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/from_schema_org/with_id.yml +6 -6
  117. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/from_schema_org_creators/with_affiliation.yml +6 -6
  118. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/from_schema_org_creators/without_affiliation.yml +6 -6
  119. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_codemeta_metadata/maremma.yml +25 -27
  120. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_codemeta_metadata/metadata_reports.yml +23 -25
  121. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/DOI_with_ORCID_ID.yml +18 -14
  122. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/DOI_with_SICI_DOI.yml +18 -14
  123. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/DOI_with_data_citation.yml +19 -15
  124. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/JaLC.yml +18 -14
  125. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/KISTI.yml +17 -13
  126. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/OP.yml +19 -15
  127. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/another_book.yml +18 -14
  128. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/another_book_chapter.yml +19 -15
  129. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/author_literal.yml +15 -13
  130. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/book.yml +19 -15
  131. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/book_chapter.yml +17 -13
  132. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/book_chapter_with_RDF_for_container.yml +17 -15
  133. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/component.yml +19 -15
  134. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/dataset.yml +35 -31
  135. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/dataset_usda.yml +29 -22
  136. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/date_in_future.yml +19 -15
  137. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/empty_given_name.yml +14 -12
  138. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/invalid_date.yml +15 -15
  139. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_article.yml +19 -15
  140. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_article_original_language_title.yml +17 -13
  141. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_article_with.yml +18 -14
  142. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_article_with_RDF_for_container.yml +18 -16
  143. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_article_with_funding.yml +19 -15
  144. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_issue.yml +17 -13
  145. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/mEDRA.yml +17 -13
  146. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/markup.yml +26 -21
  147. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/missing_creator.yml +19 -15
  148. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/multiple_titles.yml +18 -14
  149. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/not_found_error.yml +17 -13
  150. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/posted_content.yml +19 -15
  151. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/vor_with_url.yml +18 -14
  152. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/yet_another_book.yml +18 -14
  153. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/yet_another_book_chapter.yml +17 -13
  154. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_json_metadata/metadata_from_api.yml +22 -20
  155. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/BlogPosting.yml +28 -24
  156. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_in_test_system.yml +26 -22
  157. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_in_test_system_schema_3.yml +27 -23
  158. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_in_with_related_id_system.yml +31 -28
  159. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_not_found.yml +23 -19
  160. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Dataset.yml +24 -20
  161. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Funding.yml +25 -21
  162. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Funding_empty_awardTitle.yml +24 -20
  163. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Funding_schema_version_4.yml +25 -21
  164. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Referee_report_in_test_system.yml +29 -24
  165. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Schema_org_type.yml +24 -22
  166. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/author_only_full_name.yml +24 -20
  167. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/author_with_scheme.yml +25 -21
  168. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/author_with_wrong_orcid_scheme.yml +24 -20
  169. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/content_url.yml +29 -26
  170. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/date.yml +38 -24
  171. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/dissertation.yml +24 -20
  172. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/doi_with_sign.yml +27 -24
  173. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/empty_subject.yml +26 -22
  174. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/even_more_subject_scheme_FOR.yml +19 -19
  175. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/funding_references.yml +20 -18
  176. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/funding_schema_version_3.yml +42 -38
  177. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/is_identical_to.yml +25 -21
  178. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/keywords_with_attributes.yml +35 -32
  179. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/leading_and_trailing_whitespace.yml +33 -29
  180. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/more_subject_scheme_FOR.yml +20 -19
  181. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/multiple_author_names_in_one_creatorsName.yml +31 -28
  182. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/multiple_licenses.yml +37 -33
  183. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/series-information.yml +25 -21
  184. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/subject_scheme.yml +24 -20
  185. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/subject_scheme_FOR.yml +32 -25
  186. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date/publication_date.yml +6 -6
  187. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_date_parts/date.yml +6 -6
  188. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_date_parts/year-month.yml +6 -6
  189. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_date_parts/year.yml +6 -6
  190. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_parts/date.yml +6 -6
  191. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_parts/year-month.yml +6 -6
  192. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_parts/year.yml +6 -6
  193. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_parts/date.yml +6 -6
  194. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_parts/year-month.yml +6 -6
  195. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_parts/year.yml +6 -6
  196. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datetime_from_time/future.yml +4 -4
  197. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datetime_from_time/invalid.yml +4 -4
  198. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datetime_from_time/nil.yml +4 -4
  199. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datetime_from_time/past.yml +4 -4
  200. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datetime_from_time/present.yml +4 -4
  201. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_familyName.yml +14 -14
  202. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_name_in_Thai.yml +12 -12
  203. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_name_in_display-order.yml +25 -25
  204. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_name_in_display-order_with_ORCID.yml +11 -11
  205. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_name_in_sort-order.yml +11 -11
  206. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/hyper-authorship.yml +1180 -1161
  207. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/is_organization.yml +6 -6
  208. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/multiple_author_names_in_one_field.yml +18 -19
  209. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/multiple_name_identifier.yml +11 -11
  210. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/name_with_affiliation.yml +11 -11
  211. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/name_with_affiliation_and_country.yml +19 -19
  212. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/name_with_role.yml +11 -11
  213. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/only_familyName_and_givenName.yml +13 -9
  214. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/BlogPosting.yml +26 -22
  215. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/BlogPosting_with_new_DOI.yml +24 -22
  216. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/harvard_dataverse.yml +7 -8
  217. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/pangaea.yml +11 -9
  218. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/zenodo.yml +70 -62
  219. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_series_information/only_title.yml +6 -6
  220. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_series_information/title_and_pages.yml +6 -6
  221. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_series_information/title_volume_and_pages.yml +6 -6
  222. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_series_information/title_volume_issue_and_pages.yml +6 -6
  223. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/github/github_as_codemeta_url.yml +6 -6
  224. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/github/github_from_url.yml +6 -6
  225. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/github/github_from_url_file.yml +6 -6
  226. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/handle_input/DOI_RA_not_Crossref_or_DataCite.yml +13 -9
  227. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/handle_input/unknown_DOI_prefix.yml +13 -9
  228. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_contributors/none.yml +12 -12
  229. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_creators/insert.yml +11 -11
  230. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_dates/insert.yml +12 -12
  231. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_descriptions/insert.yml +15 -15
  232. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_identifier/doi.yml +11 -11
  233. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_language/insert.yml +11 -11
  234. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_person/creator_only_name.yml +11 -11
  235. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_publication_year/insert.yml +12 -12
  236. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_publisher/insert.yml +11 -11
  237. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_related_identifiers/insert.yml +11 -11
  238. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_related_identifiers/related_identifier.yml +12 -12
  239. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_resource_type/insert.yml +11 -11
  240. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_rights_list/insert.yml +11 -11
  241. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_sizes/insert.yml +12 -12
  242. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_subjects/insert.yml +11 -11
  243. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_titles/insert.yml +11 -11
  244. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_version/insert.yml +12 -12
  245. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_comma.yml +6 -6
  246. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_family_name.yml +6 -6
  247. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_id.yml +6 -6
  248. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_known_given_name.yml +6 -6
  249. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_no_info.yml +6 -6
  250. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_orcid_id.yml +6 -6
  251. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_type_organization.yml +6 -6
  252. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/missing_comma.yml +28 -24
  253. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/nil.yml +27 -23
  254. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/overlapping_keys.yml +28 -24
  255. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/valid.yml +28 -24
  256. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_cc_url/not_found.yml +5 -5
  257. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_cc_url/with_trailing_slash.yml +4 -4
  258. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_cc_url/with_trailing_slash_and_to_https.yml +5 -5
  259. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/SICI_doi.yml +6 -6
  260. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi.yml +6 -6
  261. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_force_datacite_sandbox.yml +6 -6
  262. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_from_datacite_sandbox.yml +6 -6
  263. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_from_url_without_doi_proxy.yml +6 -6
  264. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_prefix_too_long.yml +6 -6
  265. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_prefix_with_string.yml +6 -6
  266. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_with_protocol.yml +6 -6
  267. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/dx_doi_org_url.yml +6 -6
  268. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/https_url.yml +6 -6
  269. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/not_valid_doi_prefix.yml +6 -6
  270. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/url_with_one_slash.yml +6 -6
  271. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/doi.yml +6 -6
  272. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/doi_as_url.yml +6 -6
  273. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/ftp.yml +6 -6
  274. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/invalid_url.yml +6 -6
  275. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/sandbox_via_options.yml +6 -6
  276. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/sandbox_via_url.yml +6 -6
  277. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/string.yml +6 -6
  278. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/url.yml +6 -6
  279. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/url_with_utf-8.yml +6 -6
  280. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_ids/doi.yml +6 -6
  281. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_ids/url.yml +6 -6
  282. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_issn/from_array.yml +6 -6
  283. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_issn/from_empty_array.yml +6 -6
  284. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_issn/from_hash.yml +6 -6
  285. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_issn/from_string.yml +6 -6
  286. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_url/uri.yml +6 -6
  287. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_url/with_trailing_slash.yml +6 -6
  288. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_url/with_trailing_slash_and_to_https.yml +4 -4
  289. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/array.yml +6 -6
  290. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/array_of_strings.yml +6 -6
  291. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/first.yml +6 -6
  292. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/hash.yml +6 -6
  293. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/nil.yml +6 -6
  294. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/string.yml +6 -6
  295. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/sanitize/should_only_keep_specific_tags.yml +6 -6
  296. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/sanitize/should_remove_a_tags.yml +6 -6
  297. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/hsh_to_spdx_id.yml +4 -4
  298. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/hsh_to_spdx_not_found.yml +5 -5
  299. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/hsh_to_spdx_url.yml +4 -4
  300. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/name_to_spdx_exists.yml +5 -5
  301. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/name_to_spdx_id.yml +4 -4
  302. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/to_schema_org/with_id.yml +6 -6
  303. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/to_schema_org_identifiers/with_identifiers.yml +6 -6
  304. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_doi/doi.yml +6 -6
  305. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/funder_doi.yml +6 -6
  306. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/funder_doi_without_prefix.yml +6 -6
  307. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_funder_doi/non-funder_doi.yml +6 -6
  308. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid.yml +6 -6
  309. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_https.yml +6 -6
  310. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_id.yml +6 -6
  311. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_with_spaces.yml +6 -6
  312. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_wrong_id.yml +6 -6
  313. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_www.yml +6 -6
  314. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid_scheme/validate_orcid_scheme.yml +6 -6
  315. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid_scheme/validate_orcid_scheme_https.yml +6 -6
  316. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid_scheme/validate_orcid_scheme_trailing_slash.yml +6 -6
  317. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid_scheme/validate_orcid_scheme_www.yml +6 -6
  318. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_prefix/doi.yml +6 -6
  319. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_prefix/doi_as_url.yml +6 -6
  320. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_prefix/doi_with_protocol.yml +6 -6
  321. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_prefix/only_prefix.yml +6 -6
  322. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_url/DOI.yml +6 -6
  323. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_url/ISSN.yml +6 -6
  324. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_url/URL.yml +6 -6
  325. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_url/string.yml +6 -6
  326. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/BlogPosting.yml +15 -15
  327. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/Dataset.yml +12 -12
  328. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/authors_with_affiliations.yml +19 -19
  329. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/climate_data.yml +14 -15
  330. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/from_schema_org.yml +24 -24
  331. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/keywords_subject_scheme.yml +32 -25
  332. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/maremma.yml +25 -27
  333. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/text.yml +12 -12
  334. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/with_data_citation.yml +6 -6
  335. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/with_pages.yml +5 -5
  336. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/Dataset.yml +12 -12
  337. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/Journal_article.yml +6 -6
  338. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/Journal_article_vancouver_style.yml +51 -0
  339. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/Missing_author.yml +6 -6
  340. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/interactive_resource_without_dates.yml +52 -0
  341. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/software_w/version.yml +19 -8
  342. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/BlogPosting.yml +15 -15
  343. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/BlogPosting_schema_org.yml +25 -23
  344. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/Dataset.yml +11 -11
  345. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/container_title.yml +12 -12
  346. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/interactive_resource_without_dates.yml +52 -0
  347. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/journal_article.yml +6 -6
  348. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/keywords_subject_scheme.yml +32 -25
  349. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/maremma.yml +25 -27
  350. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/missing_creator.yml +6 -6
  351. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/multiple_abstracts.yml +11 -11
  352. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/organization_author.yml +4 -4
  353. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/software.yml +11 -11
  354. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/software_w/version.yml +23 -12
  355. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/with_only_first_page.yml +6 -6
  356. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/with_pages.yml +5 -5
  357. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_codemeta/SoftwareSourceCode_DataCite.yml +14 -15
  358. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_codemeta/SoftwareSourceCode_DataCite_check_codemeta_v2.yml +14 -15
  359. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/datacite_database_attributes.yml +12 -12
  360. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/maremma.yml +25 -27
  361. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/with_ORCID_ID.yml +5 -5
  362. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/with_data_citation.yml +6 -6
  363. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/with_data_citation_schema_org.yml +24 -24
  364. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crossref/from_DataCite.yml +12 -12
  365. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_csv/climate_data.yml +13 -14
  366. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_csv/maremma.yml +25 -27
  367. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_csv/text.yml +11 -11
  368. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_csv/with_data_citation.yml +6 -6
  369. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_csv/with_pages.yml +5 -5
  370. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_json/maremma.yml +25 -27
  371. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_json/with_ORCID_ID.yml +5 -5
  372. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_json/with_data_citation.yml +6 -6
  373. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_json/with_data_citation_schema_org.yml +24 -24
  374. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/DOI_not_found.yml +10 -10
  375. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/Dataset_in_schema_4_0.yml +12 -12
  376. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/Text_pass-thru.yml +33 -33
  377. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/Text_pass-thru_with_doi_in_options.yml +34 -34
  378. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/maremma.yml +25 -27
  379. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_ORCID_ID.yml +5 -5
  380. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_data_citation.yml +6 -6
  381. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_data_citation_schema_org.yml +24 -24
  382. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_editor.yml +6 -6
  383. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_version.yml +16 -16
  384. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/Dataset_in_schema_4_0.yml +11 -11
  385. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/Text_pass-thru.yml +34 -34
  386. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/book_chapter.yml +21 -21
  387. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/interactive_resource_without_dates.yml +52 -0
  388. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/maremma.yml +25 -27
  389. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/with_ORCID_ID.yml +5 -5
  390. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/with_data_citation.yml +6 -6
  391. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/with_data_citation_schema_org.yml +23 -25
  392. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_jats_xml/with_editor.yml +6 -6
  393. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_rdf_xml/BlogPosting.yml +14 -14
  394. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_rdf_xml/BlogPosting_schema_org.yml +20 -20
  395. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_rdf_xml/journal_article.yml +5 -5
  396. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_rdf_xml/maremma.yml +22 -24
  397. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_rdf_xml/with_pages.yml +5 -5
  398. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/BlogPosting.yml +14 -14
  399. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/BlogPosting_schema_org.yml +24 -24
  400. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/Dataset.yml +12 -12
  401. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/alternate_name.yml +12 -12
  402. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/journal_article.yml +6 -6
  403. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/keywords_with_subject_scheme.yml +31 -24
  404. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/maremma.yml +25 -27
  405. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/with_pages.yml +5 -5
  406. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Funding.yml +18 -18
  407. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Funding_OpenAIRE.yml +28 -17
  408. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON.yml +24 -24
  409. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON_Cyark.yml +40 -18
  410. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON_IsSupplementTo.yml +18 -18
  411. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON_isReferencedBy.yml +12 -12
  412. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/alternate_identifiers.yml +16 -17
  413. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/data_catalog.yml +13 -14
  414. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/geo_location_box.yml +36 -28
  415. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/interactive_resource_without_dates.yml +52 -0
  416. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/journal_article.yml +6 -6
  417. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/maremma_schema_org_JSON.yml +25 -27
  418. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/series_information.yml +11 -11
  419. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/subject_scheme.yml +12 -12
  420. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/subject_scheme_multiple_keywords.yml +31 -24
  421. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/BlogPosting.yml +14 -14
  422. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/BlogPosting_schema_org.yml +20 -20
  423. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/Dataset.yml +12 -12
  424. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/journal_article.yml +5 -5
  425. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/with_pages.yml +5 -5
  426. data/spec/readers/bibtex_reader_spec.rb +3 -3
  427. data/spec/readers/citeproc_reader_spec.rb +3 -3
  428. data/spec/readers/codemeta_reader_spec.rb +4 -4
  429. data/spec/readers/crossref_reader_spec.rb +73 -63
  430. data/spec/readers/datacite_json_reader_spec.rb +2 -1
  431. data/spec/readers/datacite_reader_spec.rb +94 -92
  432. data/spec/readers/ris_reader_spec.rb +4 -4
  433. data/spec/readers/schema_org_reader_spec.rb +44 -38
  434. data/spec/writers/bibtex_writer_spec.rb +2 -2
  435. data/spec/writers/citation_writer_spec.rb +16 -8
  436. data/spec/writers/citeproc_writer_spec.rb +11 -2
  437. data/spec/writers/codemeta_writer_spec.rb +0 -1
  438. data/spec/writers/crosscite_writer_spec.rb +3 -3
  439. data/spec/writers/datacite_writer_spec.rb +25 -15
  440. data/spec/writers/jats_writer_spec.rb +17 -3
  441. data/spec/writers/ris_writer_spec.rb +6 -5
  442. data/spec/writers/schema_org_writer_spec.rb +15 -18
  443. metadata +22 -34
  444. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/error_unknown.yml +0 -88
  445. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/jj.yml +0 -87
  446. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/multiple_t.yml +0 -47
  447. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/xs_string_attributes.yml +0 -93
  448. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datetime_from_timestamp/present.yml +0 -44
  449. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/is_crossrer_organization.yml +0 -44
  450. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/harvard_dataverse_via_identifiers_org.yml +0 -158
  451. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/ornl.yml +0 -706
  452. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_alternate_identifiers/insert.yml +0 -49
  453. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_formats/insert.yml +0 -49
  454. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_person/creator_given_and_family_name.yml +0 -49
  455. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_url/to_https.yml +0 -44
  456. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/hsh_to_spdx_id_lowercase.yml +0 -44
  457. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/name_to_spdx_not_found.yml +0 -44
  458. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/url_to_https/http.yml +0 -44
  459. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/url_to_https/uri.yml +0 -44
  460. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/url_to_https/with_trailing_slash.yml +0 -44
  461. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/dataset_neurophysiology.yml +0 -116
  462. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/with_first_page.yml +0 -46
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7587e889005dfc54745f8159ad04ee1d301dbace34b81ce46df75d3244988446
4
- data.tar.gz: 49a9ecf9265f23855bbe348343e50a8ff38e87929287ec2d7af52c34d9775cdb
3
+ metadata.gz: 3ac0ee73b69d1bcb02c47710f614f155f29c749dfe11bdbac818543ff7a4d552
4
+ data.tar.gz: c887eb61cf622633d71c36437eac5926fa4e40638f5a7fe5ae4c894ed52b39ad
5
5
  SHA512:
6
- metadata.gz: 68575504503ab0c3ec6e38164da0c43c1a52d29a76ba048f8320cf1b0b33261c43cac64e18f49195baac0798c4baee1ea7393dbd59f05744413b42ef78e7bc39
7
- data.tar.gz: ea1bc0f124b11d17bc1b941a94aef32befe128b8c8ce6ef8c1d96b5985ce1732612ec6179ef6df05808d9110fdcd5f47e4b89f91f5b314ed8a9672a908fcaf01
6
+ metadata.gz: d617a7cd669a789a7b12a92c2e7c958fb1a1f0ac8953d105218ea2f027d63b635bd973504688ff958f91183a0894111c542410a013bbcdf1c7e2dfa30a580a51
7
+ data.tar.gz: 14024d1535562346ca08c236c9bbf7403bcae3b8b06e2db264ef7717e136c7d1e633fa6f96ff859d78b3ddc7d513bf7dc65b944be2dc18e3dffbbf3df0b9c51c
@@ -1,23 +1,23 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bolognese (1.6.10)
4
+ bolognese (1.7.3)
5
5
  activesupport (>= 4.2.5)
6
6
  benchmark_methods (~> 0.7)
7
7
  bibtex-ruby (>= 5.1.0)
8
8
  builder (~> 3.2, >= 3.2.2)
9
- citeproc-ruby (~> 1.1, >= 1.1.10)
9
+ citeproc-ruby (~> 1.1, >= 1.1.12)
10
10
  colorize (~> 0.8.1)
11
11
  concurrent-ruby (~> 1.1, >= 1.1.5)
12
- csl-styles (~> 1.0, >= 1.0.1.8)
12
+ csl-styles (~> 1.0, >= 1.0.1.10)
13
13
  edtf (~> 3.0, >= 3.0.4)
14
- faraday (= 0.17.0)
14
+ faraday (~> 0.17.3)
15
15
  gender_detector (~> 0.1.2)
16
16
  iso8601 (~> 0.9.1)
17
- json-ld (~> 3.1, >= 3.1.4)
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.3, < 5)
20
+ maremma (>= 4.7, < 5)
21
21
  namae (~> 1.0)
22
22
  nokogiri (~> 1.10.4)
23
23
  oj (~> 3.10)
@@ -56,7 +56,7 @@ GEM
56
56
  namae (~> 1.0)
57
57
  csl-styles (1.0.1.10)
58
58
  csl (~> 1.0)
59
- diff-lcs (1.4.3)
59
+ diff-lcs (1.4.4)
60
60
  docile (1.3.2)
61
61
  ebnf (1.2.0)
62
62
  rdf (~> 3.1)
@@ -64,11 +64,11 @@ GEM
64
64
  edtf (3.0.5)
65
65
  activesupport (>= 3.0, < 7.0)
66
66
  excon (0.71.1)
67
- faraday (0.17.0)
67
+ faraday (0.17.3)
68
68
  multipart-post (>= 1.2, < 3)
69
69
  faraday-encoding (0.0.5)
70
70
  faraday
71
- faraday_middleware (0.13.1)
71
+ faraday_middleware (0.14.0)
72
72
  faraday (>= 0.7.4, < 1.0)
73
73
  gender_detector (0.1.2)
74
74
  unicode_utils (>= 1.3.0)
@@ -90,6 +90,9 @@ GEM
90
90
  multi_json (~> 1.14)
91
91
  rack (~> 2.0)
92
92
  rdf (~> 3.1)
93
+ json-ld-preloaded (3.1.3)
94
+ json-ld (~> 3.1)
95
+ rdf (~> 3.1)
93
96
  jsonlint (0.3.0)
94
97
  oj (~> 3)
95
98
  optimist (~> 3)
@@ -98,23 +101,23 @@ GEM
98
101
  loofah (2.6.0)
99
102
  crass (~> 1.0.2)
100
103
  nokogiri (>= 1.5.9)
101
- maremma (4.7)
104
+ maremma (4.7.1)
102
105
  activesupport (>= 4.2.5)
103
106
  addressable (>= 2.3.6)
104
107
  builder (~> 3.2, >= 3.2.2)
105
108
  excon (~> 0.71.0)
106
- faraday (= 0.17.0)
109
+ faraday (~> 0.17.3)
107
110
  faraday-encoding (~> 0.0.4)
108
- faraday_middleware (~> 0.13.1)
111
+ faraday_middleware (~> 0.14.0)
109
112
  nokogiri (~> 1.10.4)
110
113
  oj (>= 2.8.3)
111
114
  oj_mimic_json (~> 1.0, >= 1.0.1)
112
115
  mini_portile2 (2.4.0)
113
116
  minitest (5.14.1)
114
- multi_json (1.14.1)
117
+ multi_json (1.15.0)
115
118
  multipart-post (2.1.1)
116
119
  namae (1.0.1)
117
- nokogiri (1.10.9)
120
+ nokogiri (1.10.10)
118
121
  mini_portile2 (~> 2.4.0)
119
122
  oj (3.10.6)
120
123
  oj_mimic_json (1.0.1)
@@ -128,12 +131,12 @@ GEM
128
131
  rack-test (0.8.3)
129
132
  rack (>= 1.0, < 3)
130
133
  rake (12.3.3)
131
- rdf (3.1.3)
134
+ rdf (3.1.4)
132
135
  hamster (~> 3.0)
133
136
  link_header (~> 0.0, >= 0.0.8)
134
137
  rdf-aggregate-repo (3.1.0)
135
138
  rdf (~> 3.1)
136
- rdf-rdfa (3.1.1)
139
+ rdf-rdfa (3.1.2)
137
140
  haml (~> 5.1)
138
141
  htmlentities (~> 4.3)
139
142
  rdf (~> 3.1, >= 3.1.2)
@@ -148,7 +151,7 @@ GEM
148
151
  rdf-turtle (3.1.1)
149
152
  ebnf (~> 1.2)
150
153
  rdf (~> 3.1, >= 3.1.2)
151
- rdf-vocab (3.1.5)
154
+ rdf-vocab (3.1.7)
152
155
  rdf (~> 3.1, >= 3.1.2)
153
156
  rdf-xsd (3.1.0)
154
157
  rdf (~> 3.1)
@@ -16,8 +16,8 @@ Gem::Specification.new do |s|
16
16
  s.required_ruby_version = '~> 2.3'
17
17
 
18
18
  # Declare dependencies here, rather than in the Gemfile
19
- s.add_dependency 'maremma', '>= 4.3', '< 5'
20
- s.add_dependency 'faraday', "0.17.0"
19
+ s.add_dependency 'maremma', '>= 4.7', '< 5'
20
+ s.add_dependency 'faraday', '~> 0.17.3'
21
21
  s.add_dependency 'nokogiri', '~> 1.10.4'
22
22
  s.add_dependency 'loofah', '~> 2.0', '>= 2.0.3'
23
23
  s.add_dependency 'builder', '~> 3.2', '>= 3.2.2'
@@ -27,11 +27,11 @@ Gem::Specification.new do |s|
27
27
  s.add_dependency 'colorize', '~> 0.8.1'
28
28
  s.add_dependency 'namae', '~> 1.0'
29
29
  s.add_dependency 'edtf', '~> 3.0', '>= 3.0.4'
30
- s.add_dependency 'citeproc-ruby', '~> 1.1', '>= 1.1.10'
31
- s.add_dependency 'csl-styles', '~> 1.0', '>= 1.0.1.8'
30
+ s.add_dependency 'citeproc-ruby', '~> 1.1', '>= 1.1.12'
31
+ s.add_dependency 'csl-styles', '~> 1.0', '>= 1.0.1.10'
32
32
  s.add_dependency 'iso8601', '~> 0.9.1'
33
33
  s.add_dependency 'postrank-uri', '~> 1.0', '>= 1.0.18'
34
- s.add_dependency 'json-ld', '~> 3.1', '>= 3.1.4'
34
+ s.add_dependency 'json-ld-preloaded', '~> 3.1', '>= 3.1.3'
35
35
  s.add_dependency 'jsonlint', '~> 0.3.0'
36
36
  s.add_dependency 'oj', '~> 3.10'
37
37
  s.add_dependency "oj_mimic_json", "~> 1.0", ">= 1.0.1"
@@ -28,7 +28,7 @@ module Bolognese
28
28
 
29
29
  def doi_api_url(doi, options = {})
30
30
  sandbox = Array(/handle.test.datacite.org/.match(doi)).last
31
- sandbox.present? || options[:sandbox] ? "https://api.test.datacite.org/dois/" + doi_from_url(doi) : "https://api.datacite.org/dois/" + doi_from_url(doi)
31
+ sandbox.present? || options[:sandbox] ? "https://api.test.datacite.org/dois/#{doi_from_url(doi)}?include=media,client" : "https://api.datacite.org/dois/#{doi_from_url(doi)}?include=media,client"
32
32
  end
33
33
 
34
34
  def normalize_doi(doi, options = {})
@@ -153,7 +153,7 @@ module Bolognese
153
153
  "language" => language,
154
154
  "author" => author,
155
155
  "contributor" => to_citeproc(contributors),
156
- "issued" => get_date(dates, "Issued") ? get_date_parts(get_date(dates, "Issued")) : nil,
156
+ "issued" => get_date(dates, "Issued") ? get_date_parts(get_date(dates, "Issued")) : get_date_parts(publication_year),
157
157
  "submitted" => Array.wrap(dates).find { |d| d["dateType"] == "Submitted" }.to_h.fetch("__content__", nil),
158
158
  "abstract" => parse_attributes(descriptions, content: "description", first: true),
159
159
  "container-title" => container_title,
@@ -80,7 +80,6 @@ module Bolognese
80
80
 
81
81
  { "id" => normalize_doi(doi),
82
82
  "types" => types,
83
- "identifiers" => [{ "identifier" => normalize_doi(doi), "identifierType" => "DOI" }],
84
83
  "doi" => doi,
85
84
  "url" => meta.try(:url).to_s.presence,
86
85
  "titles" => meta.try(:title).present? ? [{ "title" => meta.try(:title).to_s }] : [],
@@ -86,19 +86,8 @@ module Bolognese
86
86
  nil
87
87
  end
88
88
 
89
- identifiers = [normalize_id(meta.fetch("id", nil)), normalize_doi(meta.fetch("DOI", nil))].compact.map do |r|
90
- r = normalize_id(r)
89
+ id = normalize_id(meta.fetch("id", nil) || meta.fetch("DOI", nil))
91
90
 
92
- if r.start_with?("https://doi.org")
93
- { "identifierType" => "DOI", "identifier" => r }
94
- else
95
- { "identifierType" => "URL", "identifier" => r }
96
- end
97
- end.uniq
98
-
99
- id = Array.wrap(identifiers).first.to_h.fetch("identifier", nil)
100
- doi = Array.wrap(identifiers).find { |r| r["identifierType"] == "DOI" }.to_h.fetch("identifier", nil)
101
-
102
91
  state = id.present? || read_options.present? ? "findable" : "not_found"
103
92
  subjects = Array.wrap(meta.fetch("categories", nil)).reduce([]) do |sum, subject|
104
93
  sum += name_to_fos(subject)
@@ -107,9 +96,8 @@ module Bolognese
107
96
  end
108
97
 
109
98
  { "id" => id,
110
- "identifiers" => identifiers,
111
99
  "types" => types,
112
- "doi" => doi_from_url(doi),
100
+ "doi" => doi_from_url(id),
113
101
  "url" => normalize_id(meta.fetch("URL", nil)),
114
102
  "titles" => [{ "title" => meta.fetch("title", nil) }],
115
103
  "creators" => creators,
@@ -22,19 +22,16 @@ module Bolognese
22
22
 
23
23
  meta = string.present? ? Maremma.from_json(string) : {}
24
24
 
25
- identifiers = ([meta.fetch("@id", nil)] + Array.wrap(meta.fetch("identifier", nil))).map do |r|
25
+ identifiers = Array.wrap(meta.fetch("identifier", nil)).map do |r|
26
26
  r = normalize_id(r) if r.is_a?(String)
27
- if r.is_a?(String) && r.start_with?("https://doi.org")
28
- { "identifierType" => "DOI", "identifier" => r }
29
- elsif r.is_a?(String)
27
+ if r.is_a?(String) && !r.start_with?("https://doi.org")
30
28
  { "identifierType" => "URL", "identifier" => r }
31
29
  elsif r.is_a?(Hash)
32
30
  { "identifierType" => get_identifier_type(r["propertyID"]), "identifier" => r["value"] }
33
31
  end
34
32
  end.compact.uniq
35
33
 
36
- id = Array.wrap(identifiers).first.to_h.fetch("identifier", nil)
37
- doi = Array.wrap(identifiers).find { |r| r["identifierType"] == "DOI" }.to_h.fetch("identifier", nil)
34
+ id = normalize_id(options[:doi] || meta.fetch("@id", nil) || meta.fetch("identifier", nil))
38
35
 
39
36
  has_agents = meta.fetch("agents", nil)
40
37
  authors = has_agents.nil? ? meta.fetch("authors", nil) : has_agents
@@ -70,7 +67,7 @@ module Bolognese
70
67
  { "id" => id,
71
68
  "types" => types,
72
69
  "identifiers" => identifiers,
73
- "doi" => doi_from_url(doi),
70
+ "doi" => doi_from_url(id),
74
71
  "url" => normalize_id(meta.fetch("codeRepository", nil)),
75
72
  "titles" => titles,
76
73
  "creators" => creators,
@@ -150,14 +150,12 @@ module Bolognese
150
150
  "volume" => bibliographic_metadata.fetch("volume", nil) }.compact
151
151
  end
152
152
 
153
- identifiers = [{ "identifierType" => "DOI", "identifier" => normalize_doi(options[:doi] || options[:id] || bibliographic_metadata.dig("doi_data", "doi")) }, crossref_alternate_identifiers(bibliographic_metadata)].compact
154
-
155
- id = Array.wrap(identifiers).first.to_h.fetch("identifier", nil)
156
- doi = Array.wrap(identifiers).find { |r| r["identifierType"] == "DOI" }.to_h.fetch("identifier", nil)
153
+ id = normalize_doi(options[:doi] || options[:id] || bibliographic_metadata.dig("doi_data", "doi"))
154
+ identifiers = [crossref_alternate_identifiers(bibliographic_metadata)].compact
157
155
 
158
156
  { "id" => id,
159
157
  "types" => types,
160
- "doi" => doi_from_url(doi),
158
+ "doi" => doi_from_url(id),
161
159
  "url" => parse_attributes(bibliographic_metadata.dig("doi_data", "resource"), first: true),
162
160
  "titles" => titles,
163
161
  "identifiers" => identifiers,
@@ -74,14 +74,12 @@ module Bolognese
74
74
  id = normalize_doi(meta.dig("identifier", "__content__") || options[:id], sandbox: options[:sandbox])
75
75
  end
76
76
 
77
- identifiers = [{ "identifierType" => "DOI", "identifier" => id }] + Array.wrap(meta.dig("alternateIdentifiers", "alternateIdentifier")).map do |r|
77
+ identifiers = Array.wrap(meta.dig("alternateIdentifiers", "alternateIdentifier")).map do |r|
78
78
  if r["__content__"].present?
79
79
  { "identifierType" => get_identifier_type(r["alternateIdentifierType"]), "identifier" => r["__content__"] }
80
80
  end
81
81
  end.compact
82
82
 
83
- doi = Array.wrap(identifiers).find { |r| r["identifierType"] == "DOI" }.to_h.fetch("identifier", nil)
84
-
85
83
  resource_type_general = meta.dig("resourceType", "resourceTypeGeneral")
86
84
  resource_type = meta.dig("resourceType", "__content__")
87
85
  schema_org = Bolognese::Utils::CR_TO_SO_TRANSLATIONS[resource_type.to_s.underscore.camelcase] || Bolognese::Utils::DC_TO_SO_TRANSLATIONS[resource_type_general.to_s.dasherize] || "CreativeWork"
@@ -217,11 +215,11 @@ module Bolognese
217
215
  end
218
216
  end.compact
219
217
 
220
- state = doi.present? || read_options.present? ? "findable" : "not_found"
218
+ state = id.present? || read_options.present? ? "findable" : "not_found"
221
219
 
222
220
  { "id" => id,
223
221
  "types" => types,
224
- "doi" => doi_from_url(doi),
222
+ "doi" => doi_from_url(id),
225
223
  "identifiers" => identifiers,
226
224
  "url" => options.fetch(:url, nil).to_s.strip.presence,
227
225
  "titles" => titles,
@@ -47,13 +47,8 @@ module Bolognese
47
47
  "ris" => ris_type
48
48
  }.compact
49
49
 
50
- identifiers = [normalize_doi(options[:doi]) || normalize_doi(meta.fetch("DO", nil))].map do |r|
51
- { "identifierType" => "DOI", "identifier" => normalize_id(r) }
52
- end.compact
53
-
54
- id = Array.wrap(identifiers).first.to_h.fetch("identifier", nil)
55
- doi = Array.wrap(identifiers).find { |r| r["identifierType"] == "DOI" }.to_h.fetch("identifier", nil)
56
-
50
+ id = normalize_doi(options[:doi] || meta.fetch("DO", nil))
51
+
57
52
  author = Array.wrap(meta.fetch("AU", nil)).map { |a| { "creatorName" => a } }
58
53
  date_parts = meta.fetch("PY", nil).to_s.split("/")
59
54
  created_date_parts = meta.fetch("Y1", nil).to_s.split("/")
@@ -90,8 +85,7 @@ module Bolognese
90
85
 
91
86
  { "id" => id,
92
87
  "types" => types,
93
- "identifiers" => identifiers,
94
- "doi" => doi_from_url(doi),
88
+ "doi" => doi_from_url(id),
95
89
  "url" => meta.fetch("UR", nil),
96
90
  "titles" => meta.fetch("T1", nil).present? ? [{ "title" => meta.fetch("T1", nil) }] : nil,
97
91
  "creators" => get_authors(author),
@@ -48,18 +48,16 @@ module Bolognese
48
48
 
49
49
  meta = string.present? ? Maremma.from_json(string) : {}
50
50
 
51
- identifiers = ([options[:doi] || meta.fetch("@id", nil)] + Array.wrap(meta.fetch("identifier", nil))).map do |r|
51
+ identifiers = Array.wrap(meta.fetch("identifier", nil)).map do |r|
52
52
  r = normalize_id(r) if r.is_a?(String)
53
- if r.is_a?(String) && r.start_with?("https://doi.org")
54
- { "identifierType" => "DOI", "identifier" => r }
55
- elsif r.is_a?(String)
53
+ if r.is_a?(String) && !r.start_with?("https://doi.org")
56
54
  { "identifierType" => "URL", "identifier" => r }
57
55
  elsif r.is_a?(Hash)
58
56
  { "identifierType" => get_identifier_type(r["propertyID"]), "identifier" => r["value"] }
59
57
  end
60
58
  end.compact.uniq
61
59
 
62
- id = Array.wrap(identifiers).first.to_h.fetch("identifier", nil)
60
+ id = normalize_id(options[:doi] || meta.fetch("@id", nil) || meta.fetch("identifier", nil))
63
61
 
64
62
  schema_org = meta.fetch("@type", nil) && meta.fetch("@type").camelcase
65
63
  resource_type_general = Bolognese::Utils::SO_TO_DC_TRANSLATIONS[schema_org]
@@ -128,6 +126,14 @@ module Bolognese
128
126
  dates << { "date" => meta.fetch("dateModified"), "dateType" => "Updated" } if Date.edtf(meta.fetch("dateModified", nil)).present?
129
127
  publication_year = meta.fetch("datePublished")[0..3] if meta.fetch("datePublished", nil).present?
130
128
 
129
+ if meta.fetch("inLanguage", nil).is_a?(String)
130
+ language = meta.fetch("inLanguage")
131
+ elsif meta.fetch("inLanguage", nil).is_a?(Object)
132
+ language = meta.dig("inLanguage", 'alternateName') || meta.dig("inLanguage", 'name')
133
+ else
134
+ language = nil
135
+ end
136
+
131
137
  state = meta.present? || read_options.present? ? "findable" : "not_found"
132
138
  geo_locations = Array.wrap(meta.fetch("spatialCoverage", nil)).map do |gl|
133
139
  if gl.dig("geo", "box")
@@ -136,7 +142,7 @@ module Bolognese
136
142
  "westBoundLongitude" => w,
137
143
  "eastBoundLongitude" => e,
138
144
  "southBoundLatitude" => s,
139
- "northBoundLatitude" => n
145
+ "northBoundLatitude" => n,
140
146
  }.compact.presence
141
147
  else
142
148
  geo_location_box = nil
@@ -179,6 +185,7 @@ module Bolognese
179
185
  "rights_list" => rights_list,
180
186
  "version_info" => meta.fetch("version", nil).to_s.presence,
181
187
  "subjects" => subjects,
188
+ "language" => language,
182
189
  "state" => state,
183
190
  "schema_version" => meta.fetch("schemaVersion", nil).to_s.presence,
184
191
  "funding_references" => funding_references,
@@ -1200,7 +1200,7 @@ module Bolognese
1200
1200
 
1201
1201
  # try to extract forId
1202
1202
  if hsh["subjectScheme"] == "FOR"
1203
- for_id = hsh["__content__"].split(" ").first || hsh["subject"].split(" ").first
1203
+ for_id = hsh["__content__"].to_s.split(" ").first || hsh["subject"].to_s.split(" ").first
1204
1204
  for_id = for_id.rjust(6, "0")
1205
1205
 
1206
1206
  subject = for_fields.find { |l| l["forId"] == for_id } ||
@@ -1,3 +1,3 @@
1
1
  module Bolognese
2
- VERSION = "1.6.10"
2
+ VERSION = "1.7.3"
3
3
  end
@@ -17,7 +17,7 @@ module Bolognese
17
17
  "description" => parse_attributes(descriptions, content: "description", first: true),
18
18
  "version" => version_info,
19
19
  "tags" => subjects.present? ? Array.wrap(subjects).map { |k| parse_attributes(k, content: "subject", first: true) } : nil,
20
- "datePublished" => get_date(dates, "Issued"),
20
+ "datePublished" => get_date(dates, "Issued") || publication_year,
21
21
  "dateModified" => get_date(dates, "Updated"),
22
22
  "publisher" => publisher,
23
23
  "license" => Array.wrap(rights_list).map { |l| l["rightsUri"] }.compact.unwrap,
@@ -121,7 +121,7 @@ module Bolognese
121
121
  end
122
122
 
123
123
  def date
124
- get_date_parts(date_published)
124
+ get_date(dates, "Issued") ? get_date_parts(get_date(dates, "Issued")) : get_date_parts(publication_year)
125
125
  end
126
126
 
127
127
  def publication_type
@@ -21,7 +21,7 @@ module Bolognese
21
21
  "contentSize" => Array.wrap(sizes).unwrap,
22
22
  "encodingFormat" => Array.wrap(formats).unwrap,
23
23
  "dateCreated" => get_date(dates, "Created"),
24
- "datePublished" => get_date(dates, "Issued"),
24
+ "datePublished" => get_date(dates, "Issued") || publication_year,
25
25
  "dateModified" => get_date(dates, "Updated"),
26
26
  "pageStart" => container.to_h["firstPage"],
27
27
  "pageEnd" => container.to_h["lastPage"],
@@ -57,7 +57,7 @@ describe Bolognese::Metadata, vcr: true do
57
57
  subject = Bolognese::Metadata.new(input: input, from: "datacite")
58
58
  meta = Maremma.from_xml(subject.raw).fetch("resource", {})
59
59
  response = subject.get_one_author(meta.dig("creators", "creator").first)
60
- expect(response).to eq("nameType"=>"Personal", "name"=>"Ollomo, Benjamin", "givenName"=>"Benjamin", "familyName"=>"Ollomo", "nameIdentifiers" => [], "affiliation" => [])
60
+ expect(response).to eq("nameType"=>"Personal", "name"=>"Ollomo, Benjamin", "givenName"=>"Benjamin", "familyName"=>"Ollomo", "nameIdentifiers" => [], "affiliation" => [{"affiliationIdentifier"=>"https://ror.org/01wyqb997", "affiliationIdentifierScheme"=>"ROR", "name"=>"Centre International de Recherches Médicales de Franceville"}])
61
61
  end
62
62
 
63
63
  it "has name in display-order" do
@@ -51,12 +51,12 @@ describe Bolognese::CLI do
51
51
  let(:input) { "10.5061/dryad.8515" }
52
52
 
53
53
  it 'default' do
54
- expect { subject.convert input }.to output(/Phylogeny, Malaria, Parasites, Taxonomy, Mitochondrial genome, Africa, Plasmodium/).to_stdout
54
+ expect { subject.convert input }.to output(/Plasmodium, malaria, taxonomy, mitochondrial genome, phylogeny, Parasites/).to_stdout
55
55
  end
56
56
 
57
57
  it 'to schema_org' do
58
58
  subject.options = { to: "schema_org" }
59
- expect { subject.convert input }.to output(/Phylogeny, Malaria, Parasites, Taxonomy, Mitochondrial genome, Africa, Plasmodium/).to_stdout
59
+ expect { subject.convert input }.to output(/Plasmodium, malaria, taxonomy, mitochondrial genome, phylogeny, Parasites/).to_stdout
60
60
  end
61
61
 
62
62
  it 'to bibtex' do
@@ -19,7 +19,7 @@ describe Bolognese::Metadata, vcr: true do
19
19
  it "insert" do
20
20
  xml = Nokogiri::XML::Builder.new(:encoding => 'UTF-8') { |xml| subject.insert_creators(xml) }.to_xml
21
21
  response = Maremma.from_xml(xml)
22
- expect(response.dig("creators", "creator").first).to eq("creatorName"=>{"__content__"=>"Ollomo, Benjamin", "nameType"=>"Personal"}, "familyName"=>"Ollomo", "givenName"=>"Benjamin")
22
+ expect(response.dig("creators", "creator").first).to eq("affiliation" => {"__content__"=>"Centre International de Recherches Médicales de Franceville", "affiliationIdentifier"=>"https://ror.org/01wyqb997", "affiliationIdentifierScheme"=>"ROR"}, "creatorName"=>{"__content__"=>"Ollomo, Benjamin", "nameType"=>"Personal"}, "familyName"=>"Ollomo", "givenName"=>"Benjamin")
23
23
  end
24
24
  end
25
25
 
@@ -61,7 +61,7 @@ describe Bolognese::Metadata, vcr: true do
61
61
  it "insert" do
62
62
  xml = Nokogiri::XML::Builder.new(:encoding => 'UTF-8') { |xml| subject.insert_publisher(xml) }.to_xml
63
63
  response = Maremma.from_xml(xml)
64
- expect(response["publisher"]).to eq("Dryad Digital Repository")
64
+ expect(response["publisher"]).to eq("Dryad")
65
65
  end
66
66
  end
67
67
 
@@ -77,17 +77,17 @@ describe Bolognese::Metadata, vcr: true do
77
77
  it "insert" do
78
78
  xml = Nokogiri::XML::Builder.new(:encoding => 'UTF-8') { |xml| subject.insert_resource_type(xml) }.to_xml
79
79
  response = Maremma.from_xml(xml)
80
- expect(response["resourceType"]).to eq("resourceTypeGeneral"=>"Dataset", "__content__"=>"DataPackage")
80
+ expect(response["resourceType"]).to eq("resourceTypeGeneral"=>"Dataset", "__content__"=>"dataset")
81
81
  end
82
82
  end
83
83
 
84
- context "insert_alternate_identifiers" do
85
- it "insert" do
86
- xml = Nokogiri::XML::Builder.new(:encoding => 'UTF-8') { |xml| subject.insert_alternate_identifiers(xml) }.to_xml
87
- response = Maremma.from_xml(xml)
88
- expect(response.dig("alternateIdentifiers", "alternateIdentifier")).to eq("alternateIdentifierType"=>"citation", "__content__"=>"Ollomo B, Durand P, Prugnolle F, Douzery EJP, Arnathau C, Nkoghe D, Leroy E, Renaud F (2009) A new malaria agent in African hominids. PLoS Pathogens 5(5): e1000446.")
89
- end
90
- end
84
+ # context "insert_alternate_identifiers" do
85
+ # it "insert" do
86
+ # xml = Nokogiri::XML::Builder.new(:encoding => 'UTF-8') { |xml| subject.insert_alternate_identifiers(xml) }.to_xml
87
+ # response = Maremma.from_xml(xml)
88
+ # expect(response.dig("alternateIdentifiers", "alternateIdentifier").to be_nil)
89
+ # end
90
+ # end
91
91
 
92
92
  context "insert_dates" do
93
93
  it "insert" do
@@ -101,7 +101,7 @@ describe Bolognese::Metadata, vcr: true do
101
101
  it "insert" do
102
102
  xml = Nokogiri::XML::Builder.new(:encoding => 'UTF-8') { |xml| subject.insert_subjects(xml) }.to_xml
103
103
  response = Maremma.from_xml(xml)
104
- expect(response.dig("subjects", "subject")).to eq(["Phylogeny", "Malaria", "Parasites", "Taxonomy", "Mitochondrial genome", "Africa", "Plasmodium"])
104
+ expect(response.dig("subjects", "subject")).to eq(["Plasmodium", "malaria", "taxonomy", "mitochondrial genome", "phylogeny", "Parasites"])
105
105
  end
106
106
  end
107
107
 
@@ -143,15 +143,14 @@ describe Bolognese::Metadata, vcr: true do
143
143
 
144
144
  context "insert_related_identifiers" do
145
145
  it "related_identifier" do
146
- expect(subject.related_identifiers.length).to eq(6)
147
- expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"10.5061/dryad.8515/1", "relatedIdentifierType"=>"DOI", "relationType"=>"HasPart")
146
+ expect(subject.related_identifiers.length).to eq(1)
147
+ expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"10.1371/journal.ppat.1000446", "relatedIdentifierType"=>"DOI", "relationType"=>"IsSupplementTo")
148
148
  end
149
149
 
150
150
  it "insert" do
151
151
  xml = Nokogiri::XML::Builder.new(:encoding => 'UTF-8') { |xml| subject.insert_related_identifiers(xml) }.to_xml
152
152
  response = Maremma.from_xml(xml)
153
- expect(response.dig("relatedIdentifiers", "relatedIdentifier").length).to eq(6)
154
- expect(response.dig("relatedIdentifiers", "relatedIdentifier").first).to eq("__content__"=>"10.5061/dryad.8515/1", "relatedIdentifierType"=>"DOI", "relationType"=>"HasPart")
153
+ expect(response.dig("relatedIdentifiers", "relatedIdentifier")).to eq("__content__"=>"10.1371/journal.ppat.1000446", "relatedIdentifierType"=>"DOI", "relationType"=>"IsSupplementTo")
155
154
  end
156
155
  end
157
156