bolognese 1.6.11 → 1.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (463) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +19 -16
  3. data/bolognese.gemspec +5 -5
  4. data/lib/bolognese/doi_utils.rb +1 -1
  5. data/lib/bolognese/metadata.rb +11 -10
  6. data/lib/bolognese/metadata_utils.rb +1 -1
  7. data/lib/bolognese/readers/bibtex_reader.rb +0 -1
  8. data/lib/bolognese/readers/citeproc_reader.rb +2 -14
  9. data/lib/bolognese/readers/codemeta_reader.rb +4 -7
  10. data/lib/bolognese/readers/crossref_reader.rb +3 -5
  11. data/lib/bolognese/readers/datacite_reader.rb +3 -5
  12. data/lib/bolognese/readers/ris_reader.rb +3 -9
  13. data/lib/bolognese/readers/schema_org_reader.rb +13 -6
  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/metadata_spec.rb +1 -1
  427. data/spec/readers/bibtex_reader_spec.rb +3 -3
  428. data/spec/readers/citeproc_reader_spec.rb +3 -3
  429. data/spec/readers/codemeta_reader_spec.rb +4 -4
  430. data/spec/readers/crossref_reader_spec.rb +73 -63
  431. data/spec/readers/datacite_json_reader_spec.rb +3 -2
  432. data/spec/readers/datacite_reader_spec.rb +97 -93
  433. data/spec/readers/ris_reader_spec.rb +4 -4
  434. data/spec/readers/schema_org_reader_spec.rb +44 -38
  435. data/spec/writers/bibtex_writer_spec.rb +2 -2
  436. data/spec/writers/citation_writer_spec.rb +16 -8
  437. data/spec/writers/citeproc_writer_spec.rb +11 -2
  438. data/spec/writers/codemeta_writer_spec.rb +0 -1
  439. data/spec/writers/crosscite_writer_spec.rb +3 -3
  440. data/spec/writers/datacite_writer_spec.rb +25 -15
  441. data/spec/writers/jats_writer_spec.rb +17 -3
  442. data/spec/writers/ris_writer_spec.rb +6 -5
  443. data/spec/writers/schema_org_writer_spec.rb +15 -18
  444. metadata +22 -34
  445. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/error_unknown.yml +0 -88
  446. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/jj.yml +0 -87
  447. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/multiple_t.yml +0 -47
  448. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/xs_string_attributes.yml +0 -93
  449. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datetime_from_timestamp/present.yml +0 -44
  450. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/is_crossrer_organization.yml +0 -44
  451. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/harvard_dataverse_via_identifiers_org.yml +0 -158
  452. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/ornl.yml +0 -706
  453. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_alternate_identifiers/insert.yml +0 -49
  454. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_formats/insert.yml +0 -49
  455. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_person/creator_given_and_family_name.yml +0 -49
  456. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_url/to_https.yml +0 -44
  457. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/hsh_to_spdx_id_lowercase.yml +0 -44
  458. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/name_to_spdx_not_found.yml +0 -44
  459. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/url_to_https/http.yml +0 -44
  460. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/url_to_https/uri.yml +0 -44
  461. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/url_to_https/with_trailing_slash.yml +0 -44
  462. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/dataset_neurophysiology.yml +0 -116
  463. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/with_first_page.yml +0 -46
@@ -46,7 +46,7 @@ describe Bolognese::Metadata, vcr: true do
46
46
  input = fixture_path + "datacite_software_missing_comma.json"
47
47
  subject = Bolognese::Metadata.new(input: input, from: "datacite_json", show_errors: true)
48
48
  expect(subject.valid?).to be false
49
- expect(subject.errors).to eq(["expected comma, not a string (doi) at line 4, column 11 [parse.c:373]"])
49
+ expect(subject.errors).to eq(["expected comma, not a string (after doi) at line 4, column 11 [parse.c:373]"])
50
50
  expect(subject.codemeta).to be_nil
51
51
  end
52
52
 
@@ -66,7 +66,8 @@ describe Bolognese::Metadata, vcr: true do
66
66
  expect(subject.creators.length).to eq(2)
67
67
  expect(subject.creators.first).to eq("affiliation"=>[{"name"=>"University of Washington"}], "familyName"=>"Vanderplas", "givenName"=>"Jake", "name"=>"Vanderplas, Jake", "nameIdentifiers"=>[], "nameType"=>"Personal")
68
68
  expect(subject.titles).to eq([{"title"=>"Supersmoother: Minor Bug Fix Release"}])
69
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.5281/zenodo.28518", "identifierType"=>"DOI"}, {"identifier"=>"https://zenodo.org/record/28518", "identifierType"=>"URL"}])
69
+ expect(subject.id).to eq("https://doi.org/10.5281/zenodo.28518")
70
+ expect(subject.identifiers).to eq([{"identifier"=>"https://zenodo.org/record/28518", "identifierType"=>"URL"}])
70
71
  expect(subject.dates).to eq([{"date"=>"2015-08-19", "dateType"=>"Issued"}])
71
72
  expect(subject.publication_year).to eq("2015")
72
73
  expect(subject.version_info).to eq("v0.3.2")
@@ -18,35 +18,32 @@ describe Bolognese::Metadata, vcr: true do
18
18
  context "get datacite metadata" do
19
19
  it "Dataset" do
20
20
  expect(subject.valid?).to be true
21
- expect(subject.url).to eq("https://datadryad.org/resource/doi:10.5061/dryad.8515")
21
+ expect(subject.url).to eq("http://datadryad.org/stash/dataset/doi:10.5061/dryad.8515")
22
22
  expect(subject.types["schemaOrg"]).to eq("Dataset")
23
- expect(subject.types["resourceType"]).to eq("DataPackage")
23
+ expect(subject.types["resourceType"]).to eq("dataset")
24
24
  expect(subject.types["resourceTypeGeneral"]).to eq("Dataset")
25
25
  expect(subject.types["ris"]).to eq("DATA")
26
26
  expect(subject.types["citeproc"]).to eq("dataset")
27
27
  expect(subject.creators.length).to eq(8)
28
- expect(subject.creators.first).to eq("nameType"=>"Personal", "name"=>"Ollomo, Benjamin", "givenName"=>"Benjamin", "familyName"=>"Ollomo", "nameIdentifiers" => [], "affiliation" => [])
28
+ expect(subject.creators.first).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"}])
29
29
  expect(subject.titles).to eq([{"title"=>"Data from: A new malaria agent in African hominids."}])
30
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.5061/dryad.8515", "identifierType"=>"DOI"},
31
- {"identifier"=>
32
- "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.",
33
- "identifierType"=>"citation"}])
30
+ expect(subject.id).to eq("https://doi.org/10.5061/dryad.8515")
34
31
  expect(subject.rights_list).to eq([{"rights"=>"Creative Commons Zero v1.0 Universal",
35
32
  "rightsIdentifier"=>"cc0-1.0",
36
33
  "rightsIdentifierScheme"=>"SPDX",
37
34
  "rightsUri"=>"https://creativecommons.org/publicdomain/zero/1.0/legalcode",
38
35
  "schemeUri"=>"https://spdx.org/licenses/"}])
39
36
  expect(subject.publication_year).to eq("2011")
40
- expect(subject.related_identifiers.length).to eq(6)
41
- expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"19478877", "relatedIdentifierType"=>"PMID", "relationType"=>"IsSupplementTo")
42
- expect(subject.subjects).to eq([{"subject"=>"Phylogeny"},
43
- {"subject"=>"Malaria"},
44
- {"subject"=>"Parasites"},
45
- {"subject"=>"Taxonomy"},
46
- {"subject"=>"Mitochondrial genome"},
47
- {"subject"=>"Africa"},
48
- {"subject"=>"Plasmodium"}])
49
- expect(subject.publisher).to eq("Dryad Digital Repository")
37
+ expect(subject.related_identifiers.length).to eq(1)
38
+ expect(subject.related_identifiers.last).to eq("relatedIdentifier" => "10.1371/journal.ppat.1000446",
39
+ "relatedIdentifierType" => "DOI","relationType"=>"IsSupplementTo")
40
+ expect(subject.subjects).to eq([{"subject"=>"Plasmodium"},
41
+ {"subject"=>"malaria"},
42
+ {"subject"=>"taxonomy"},
43
+ {"subject"=>"mitochondrial genome"},
44
+ {"subject"=>"phylogeny"},
45
+ {"subject"=>"Parasites"}])
46
+ expect(subject.publisher).to eq("Dryad")
50
47
  expect(subject.agency).to eq("DataCite")
51
48
  expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
52
49
  end
@@ -63,7 +60,8 @@ describe Bolognese::Metadata, vcr: true do
63
60
  expect(subject.types["citeproc"]).to eq("article-journal")
64
61
  expect(subject.creators).to eq([{"nameIdentifiers"=> [{"nameIdentifier"=>"https://orcid.org/0000-0003-1419-2405", "nameIdentifierScheme"=>"ORCID", "schemeUri"=>"https://orcid.org"}], "name"=>"Fenner, Martin", "givenName"=>"Martin", "familyName"=>"Fenner"}])
65
62
  expect(subject.titles).to eq([{"title"=>"Eating your own Dog Food"}])
66
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.5438/4k3m-nyvg", "identifierType"=>"DOI"}, {"identifier"=>"MS-49-3632-5083", "identifierType"=>"Local accession number"}])
63
+ expect(subject.id).to eq("https://doi.org/10.5438/4k3m-nyvg")
64
+ expect(subject.identifiers).to eq([{"identifier"=>"MS-49-3632-5083", "identifierType"=>"Local accession number"}])
67
65
  expect(subject.descriptions.first["description"]).to start_with("Eating your own dog food")
68
66
  expect(subject.dates).to eq([{"date"=>"2016-12-20", "dateType"=>"Created"}, {"date"=>"2016-12-20", "dateType"=>"Issued"}, {"date"=>"2016-12-20", "dateType"=>"Updated"}])
69
67
  expect(subject.publication_year).to eq("2016")
@@ -84,7 +82,7 @@ describe Bolognese::Metadata, vcr: true do
84
82
  expect(subject.types["resourceTypeGeneral"]).to eq("Text")
85
83
  expect(subject.creators).to eq([{"nameType"=>"Personal", "name"=>"Johnston, Nathaniel", "givenName"=>"Nathaniel", "familyName"=>"Johnston", "nameIdentifiers" => [], "affiliation" => []}])
86
84
  expect(subject.titles).to eq([{"title"=>"The Minimum Size of Qubit Unextendible Product Bases"}])
87
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.4230/lipics.tqc.2013.93", "identifierType"=>"DOI"}])
85
+ expect(subject.id).to eq("https://doi.org/10.4230/lipics.tqc.2013.93")
88
86
  expect(subject.descriptions.first["description"]).to start_with("We investigate the problem of constructing unextendible product bases in the qubit case")
89
87
  expect(subject.dates).to eq([{"date"=>"2013-11-05", "dateType"=>"Available"}, {"date"=>"2013", "dateType"=>"Issued"}])
90
88
  expect(subject.subjects).to eq([{"subject"=>"Computer Science"},
@@ -120,9 +118,8 @@ describe Bolognese::Metadata, vcr: true do
120
118
  expect(subject.creators.dig(2, "affiliation")).to eq([{"affiliationIdentifier"=>"https://ror.org/05gq02987",
121
119
  "affiliationIdentifierScheme"=>"ROR", "name"=>"Brown University"}])
122
120
  expect(subject.titles).to eq([{"lang"=>"en-US", "title"=>"Full DataCite XML Example"}, {"lang"=>"en-US", "title"=>"Demonstration of DataCite Properties.", "titleType"=>"Subtitle"}])
123
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.5072/example-full",
124
- "identifierType"=>"DOI"},
125
- {"identifier"=>
121
+ expect(subject.id).to eq("https://doi.org/10.5072/example-full")
122
+ expect(subject.identifiers).to eq([{"identifier"=>
126
123
  "https://schema.datacite.org/meta/kernel-4.2/example/datacite-example-full-v4.2.xml",
127
124
  "identifierType"=>"URL"}])
128
125
  expect(subject.rights_list).to eq([{"lang"=>"en-US", "rights"=>"Creative Commons Zero v1.0 Universal", "rightsIdentifier"=>"cc0-1.0", "rightsIdentifierScheme"=>"SPDX", "rightsUri"=>"https://creativecommons.org/publicdomain/zero/1.0/legalcode", "schemeUri"=>"https://spdx.org/licenses/"}])
@@ -189,7 +186,8 @@ describe Bolognese::Metadata, vcr: true do
189
186
  input = "https://doi.org/10.5281/ZENODO.48440"
190
187
  subject = Bolognese::Metadata.new(input: input)
191
188
  expect(subject.valid?).to be true
192
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.5281/zenodo.48440", "identifierType"=>"DOI"}, {"identifier"=>"https://zenodo.org/record/48440", "identifierType"=>"URL"}])
189
+ expect(subject.id).to eq("https://doi.org/10.5281/zenodo.48440")
190
+ expect(subject.identifiers).to eq([{"identifier"=>"https://zenodo.org/record/48440", "identifierType"=>"URL"}])
193
191
  expect(subject.types["schemaOrg"]).to eq("SoftwareSourceCode")
194
192
  expect(subject.types["resourceTypeGeneral"]).to eq("Software")
195
193
  expect(subject.types["ris"]).to eq("COMP")
@@ -220,7 +218,7 @@ describe Bolognese::Metadata, vcr: true do
220
218
  input = "10.6084/M9.FIGSHARE.4234751.V1"
221
219
  subject = Bolognese::Metadata.new(input: input)
222
220
  expect(subject.valid?).to be true
223
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.6084/m9.figshare.4234751.v1", "identifierType"=>"DOI"}])
221
+ expect(subject.identifiers).to be_empty
224
222
  expect(subject.types["schemaOrg"]).to eq("Dataset")
225
223
  expect(subject.types["resourceType"]).to eq("Dataset")
226
224
  expect(subject.types["resourceTypeGeneral"]).to eq("Dataset")
@@ -252,32 +250,30 @@ describe Bolognese::Metadata, vcr: true do
252
250
  input = "10.6084/m9.figshare.1449060"
253
251
  subject = Bolognese::Metadata.new(input: input)
254
252
  expect(subject.valid?).to be true
255
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.6084/m9.figshare.1449060", "identifierType"=>"DOI"}])
256
- expect(subject.types["schemaOrg"]).to eq("ImageObject")
257
- expect(subject.types["resourceType"]).to eq("Figure")
258
- expect(subject.types["resourceTypeGeneral"]).to eq("Image")
259
- expect(subject.creators.count).to eq(3)
253
+ expect(subject.id).to eq("https://doi.org/10.6084/m9.figshare.1449060")
254
+ expect(subject.types["schemaOrg"]).to eq("Dataset")
255
+ expect(subject.types["resourceType"]).to eq("Dataset")
256
+ expect(subject.types["resourceTypeGeneral"]).to eq("Dataset")
257
+ expect(subject.creators.count).to eq(4)
260
258
  expect(subject.creators.first).to eq("nameType"=>"Personal", "familyName" => "Dworkin",
261
259
  "givenName" => "Ian",
262
260
  "name" => "Dworkin, Ian",
263
261
  "nameIdentifiers" => [{"nameIdentifier"=>"https://orcid.org/0000-0002-2874-287X", "nameIdentifierScheme"=>"ORCID", "schemeUri"=>"https://orcid.org"}], "affiliation" => [])
264
- expect(subject.titles).to eq([{"title"=>"Drosophila melanogaster African Wings"}])
262
+ expect(subject.titles).to eq([{"title"=>"Drosophila melanogaster wing images from low and high altitude populations in Ethiopia and Zambia."}])
265
263
  expect(subject.descriptions.first["description"]).to start_with("These are raw wing images from <i>Drosophila melanogaster</i>")
266
264
  expect(subject.rights_list).to eq([{"rights"=>"Creative Commons Attribution 4.0 International",
267
265
  "rightsIdentifier"=>"cc-by-4.0",
268
266
  "rightsIdentifierScheme"=>"SPDX",
269
267
  "rightsUri"=>"https://creativecommons.org/licenses/by/4.0/legalcode",
270
268
  "schemeUri"=>"https://spdx.org/licenses/"}])
271
- expect(subject.dates).to eq([{"date"=>"2015-06-14", "dateType"=>"Created"},
272
- {"date"=>"2018-03-17", "dateType"=>"Updated"},
273
- {"date"=>"2015", "dateType"=>"Issued"}])
274
- expect(subject.publication_year).to eq("2015")
275
- expect(subject.publisher).to eq("Figshare")
269
+ expect(subject.dates).to eq([{"date"=>"2015-06-14", "dateType"=>"Created"}, {"date"=>"2020-06-02", "dateType"=>"Updated"}, {"date"=>"2020", "dateType"=>"Issued"}])
270
+ expect(subject.publication_year).to eq("2020")
271
+ expect(subject.publisher).to eq("figshare")
276
272
  expect(subject.subjects).to eq([{"subject"=>"Evolutionary Biology"},
277
273
  {"subject"=>"FOS: Biological sciences", "subjectScheme"=>"Fields of Science and Technology (FOS)", "schemeUri"=>"http://www.oecd.org/science/inno/38235147.pdf"},
278
274
  {"subject"=>"60412 Quantitative Genetics (incl. Disease and Trait Mapping Genetics)", "subjectScheme"=>"FOR", "schemeUri"=>"http://www.abs.gov.au/ausstats/abs@.nsf/0/6BB427AB9696C225CA2574180004463E"}])
279
275
  expect(subject.agency).to eq("DataCite")
280
- expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-3")
276
+ expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
281
277
  end
282
278
 
283
279
  it "more subject scheme FOR" do
@@ -303,7 +299,8 @@ describe Bolognese::Metadata, vcr: true do
303
299
  input = "https://doi.org/10.5281/ZENODO.1239"
304
300
  subject = Bolognese::Metadata.new(input: input)
305
301
  expect(subject.valid?).to be true
306
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.5281/zenodo.1239", "identifierType"=>"DOI"}, {"identifier"=>"https://zenodo.org/record/1239", "identifierType"=>"URL"}])
302
+ expect(subject.id).to eq("https://doi.org/10.5281/zenodo.1239")
303
+ expect(subject.identifiers).to eq([{"identifier"=>"https://zenodo.org/record/1239", "identifierType"=>"URL"}])
307
304
  expect(subject.types["schemaOrg"]).to eq("Dataset")
308
305
  expect(subject.types["resourceTypeGeneral"]).to eq("Dataset")
309
306
  expect(subject.creators.length).to eq(4)
@@ -343,11 +340,12 @@ describe Bolognese::Metadata, vcr: true do
343
340
  "funderIdentifier"=>"https://doi.org/10.13039/501100000780",
344
341
  "funderIdentifierType"=>"Crossref Funder ID",
345
342
  "funderName"=>"European Commission"}],
346
- types: { "resourceTypeGeneral" => "Dataset", "schemaOrg" => "Dataset" })
343
+ types: { "resourceTypeGeneral" => "Dataset", "schemaOrg" => "Dataset" },
344
+ "identifiers" => [{ "identifierType"=>"Repository ID", "identifier"=>"123" }])
347
345
 
348
346
  expect(subject.valid?).to be true
349
347
  expect(subject.doi).to eq("10.5281/zenodo.1239")
350
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.5281/zenodo.1239", "identifierType"=>"DOI"}])
348
+ expect(subject.id).to eq("https://doi.org/10.5281/zenodo.1239")
351
349
  expect(subject.types["schemaOrg"]).to eq("Dataset")
352
350
  expect(subject.types["resourceTypeGeneral"]).to eq("Dataset")
353
351
  expect(subject.creators).to eq([{"familyName"=>"Jahn", "givenName"=>"Najko", "name"=>"Jahn, Najko", "nameType"=>"Personal"}])
@@ -362,6 +360,7 @@ describe Bolognese::Metadata, vcr: true do
362
360
  "funderIdentifier"=>"https://doi.org/10.13039/501100000780",
363
361
  "funderIdentifierType"=>"Crossref Funder ID",
364
362
  "funderName"=>"European Commission"}])
363
+ expect(subject.identifiers).to eq([{"identifier"=>"123", "identifierType"=>"Repository ID"}])
365
364
  expect(subject.agency).to eq("DataCite")
366
365
  expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
367
366
  expect(subject.state).to eq("findable")
@@ -437,7 +436,7 @@ describe Bolognese::Metadata, vcr: true do
437
436
  it "wrong attributes" do
438
437
  input = fixture_path + 'nist.xml'
439
438
  subject = Bolognese::Metadata.new(input: input)
440
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.5072/m32163", "identifierType"=>"DOI"}])
439
+ expect(subject.id).to eq("https://doi.org/10.5072/m32163")
441
440
  expect(subject.titles).to eq([{"title"=>"Peter Auto Dataset 501"}])
442
441
  expect(subject.descriptions).to eq([{"description"=>"This is to overturn Einstein's Relativity Theory.", "descriptionType"=>"Abstract"}])
443
442
  expect(subject.valid?).to be false
@@ -449,7 +448,7 @@ describe Bolognese::Metadata, vcr: true do
449
448
  input = fixture_path + 'schema_4.0.xml'
450
449
  subject = Bolognese::Metadata.new(input: input)
451
450
  expect(subject.valid?).to be true
452
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.6071/z7wc73", "identifierType"=>"DOI"}])
451
+ expect(subject.id).to eq("https://doi.org/10.6071/z7wc73")
453
452
  expect(subject.types["schemaOrg"]).to eq("Dataset")
454
453
  expect(subject.types["resourceType"]).to eq("dataset")
455
454
  expect(subject.types["resourceTypeGeneral"]).to eq("Dataset")
@@ -468,7 +467,8 @@ describe Bolognese::Metadata, vcr: true do
468
467
  input = fixture_path + 'datacite-seriesinformation.xml'
469
468
  subject = Bolognese::Metadata.new(input: input)
470
469
  expect(subject.valid?).to be true
471
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.5438/4k3m-nyvg", "identifierType"=>"DOI"}, {"identifier"=>"MS-49-3632-5083", "identifierType"=>"Local accession number"}])
470
+ expect(subject.id).to eq("https://doi.org/10.5438/4k3m-nyvg")
471
+ expect(subject.identifiers).to eq([{"identifier"=>"MS-49-3632-5083", "identifierType"=>"Local accession number"}])
472
472
  expect(subject.creators.length).to eq(1)
473
473
  expect(subject.creators.first).to eq("familyName"=>"Fenner", "givenName"=>"Martin", "nameIdentifiers" => [{"nameIdentifier"=>"https://orcid.org/0000-0003-1419-2405", "nameIdentifierScheme"=>"ORCID", "schemeUri"=>"https://orcid.org"}], "name"=>"Fenner, Martin")
474
474
  expect(subject.titles).to eq([{"title"=>"Eating your own Dog Food"}])
@@ -497,7 +497,7 @@ describe Bolognese::Metadata, vcr: true do
497
497
  doi = "10.5072/geoPointExample"
498
498
  subject = Bolognese::Metadata.new(input: input, doi: doi)
499
499
  expect(subject.valid?).to be true
500
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.5072/geopointexample", "identifierType"=>"DOI"}])
500
+ expect(subject.id).to eq("https://doi.org/10.5072/geopointexample")
501
501
  expect(subject.doi).to eq("10.5072/geopointexample")
502
502
  expect(subject.creators.length).to eq(3)
503
503
  expect(subject.creators.first).to eq("familyName"=>"Schumann", "givenName"=>"Kai", "name"=>"Schumann, Kai", "nameType"=>"Personal", "nameIdentifiers" => [], "affiliation" => [])
@@ -514,7 +514,7 @@ describe Bolognese::Metadata, vcr: true do
514
514
  doi = "10.6071/Z7WC73"
515
515
  subject = Bolognese::Metadata.new(input: input, doi: doi)
516
516
  expect(subject.valid?).to be true
517
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.6071/z7wc73", "identifierType"=>"DOI"}])
517
+ expect(subject.id).to eq("https://doi.org/10.6071/z7wc73")
518
518
  expect(subject.doi).to eq("10.6071/z7wc73")
519
519
  expect(subject.creators.length).to eq(6)
520
520
  expect(subject.creators.first).to eq("familyName"=>"Bales", "givenName"=>"Roger", "name"=>"Bales, Roger", "nameType"=>"Personal", "affiliation" => [{"name"=>"UC Merced"}, {"name"=>"NSF"}], "nameIdentifiers" => [])
@@ -542,7 +542,7 @@ describe Bolognese::Metadata, vcr: true do
542
542
  input = "https://doi.org/10.14457/KMITL.RES.2006.17"
543
543
  subject = Bolognese::Metadata.new(input: input)
544
544
  expect(subject.valid?).to be true
545
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.14457/kmitl.res.2006.17", "identifierType"=>"DOI"}])
545
+ expect(subject.id).to eq("https://doi.org/10.14457/kmitl.res.2006.17")
546
546
  expect(subject.types["schemaOrg"]).to eq("Dataset")
547
547
  expect(subject.creators.length).to eq(1)
548
548
  expect(subject.creators.first).to eq("name" => "กัญจนา แซ่เตียว", "nameIdentifiers" => [], "affiliation" => [])
@@ -552,7 +552,7 @@ describe Bolognese::Metadata, vcr: true do
552
552
  input = "https://doi.org/10.7910/DVN/EQTQYO"
553
553
  subject = Bolognese::Metadata.new(input: input)
554
554
  expect(subject.valid?).to be true
555
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.7910/dvn/eqtqyo", "identifierType"=>"DOI"}])
555
+ expect(subject.id).to eq("https://doi.org/10.7910/dvn/eqtqyo")
556
556
  expect(subject.types["schemaOrg"]).to eq("Dataset")
557
557
  expect(subject.creators).to eq([{"name" => "Enos, Ryan (Harvard University); Fowler, Anthony (University Of Chicago); Vavreck, Lynn (UCLA)", "nameIdentifiers" => [], "affiliation" => []}])
558
558
  end
@@ -561,7 +561,7 @@ describe Bolognese::Metadata, vcr: true do
561
561
  input = "https://doi.org/10.18429/JACOW-IPAC2016-TUPMY003"
562
562
  subject = Bolognese::Metadata.new(input: input)
563
563
  expect(subject.valid?).to be true
564
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.18429/jacow-ipac2016-tupmy003", "identifierType"=>"DOI"}])
564
+ expect(subject.id).to eq("https://doi.org/10.18429/jacow-ipac2016-tupmy003")
565
565
  expect(subject.types["schemaOrg"]).to eq("ScholarlyArticle")
566
566
  expect(subject.creators.length).to eq(12)
567
567
  expect(subject.creators.first).to eq("nameType"=>"Personal", "nameIdentifiers" => [{"nameIdentifier"=>"http://jacow.org/JACoW-00077389", "nameIdentifierScheme"=>"JACoW-ID", "schemeUri"=>"http://jacow.org/"}], "name"=>"Otani, Masashi", "givenName"=>"Masashi", "familyName"=>"Otani", "affiliation" => [{"name"=>"KEK, Tsukuba, Japan"}])
@@ -571,7 +571,7 @@ describe Bolognese::Metadata, vcr: true do
571
571
  input = "https://doi.org/10.2314/COSCV1"
572
572
  subject = Bolognese::Metadata.new(input: input)
573
573
  expect(subject.valid?).to be true
574
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.2314/coscv1", "identifierType"=>"DOI"}])
574
+ expect(subject.id).to eq("https://doi.org/10.2314/coscv1")
575
575
  expect(subject.types["schemaOrg"]).to eq("ScholarlyArticle")
576
576
  expect(subject.creators.length).to eq(14)
577
577
  expect(subject.creators.first).to include("nameType"=>"Personal", "nameIdentifiers" => [{"nameIdentifier"=>"https://orcid.org/0000-0003-0232-7085", "nameIdentifierScheme"=>"ORCID", "schemeUri"=>"https://orcid.org"}], "name"=>"Heller, Lambert", "givenName"=>"Lambert", "familyName"=>"Heller")
@@ -581,7 +581,7 @@ describe Bolognese::Metadata, vcr: true do
581
581
  input = "https://doi.org/10.21233/n34n5q"
582
582
  subject = Bolognese::Metadata.new(input: input)
583
583
  expect(subject.valid?).to be true
584
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.21233/n34n5q", "identifierType"=>"DOI"}])
584
+ expect(subject.id).to eq("https://doi.org/10.21233/n34n5q")
585
585
  expect(subject.subjects).to eq([{"schemeUri"=>"http://id.loc.gov/authorities/subjects", "subject"=>"Paleoecology", "subjectScheme"=>"Library of Congress"}])
586
586
  end
587
587
 
@@ -589,7 +589,8 @@ describe Bolognese::Metadata, vcr: true do
589
589
  input = "https://doi.org/10.15125/BATH-00114"
590
590
  subject = Bolognese::Metadata.new(input: input)
591
591
  expect(subject.valid?).to be true
592
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.15125/bath-00114", "identifierType"=>"DOI"}, {"identifier"=>"http://researchdata.bath.ac.uk/114/", "identifierType"=>"URL"}])
592
+ expect(subject.id).to eq("https://doi.org/10.15125/bath-00114")
593
+ expect(subject.identifiers).to eq([{"identifier"=>"http://researchdata.bath.ac.uk/114/", "identifierType"=>"URL"}])
593
594
  expect(subject.types["schemaOrg"]).to eq("Dataset")
594
595
  expect(subject.types["resourceType"]).to eq("Dataset")
595
596
  expect(subject.types["resourceTypeGeneral"]).to eq("Dataset")
@@ -621,7 +622,7 @@ describe Bolognese::Metadata, vcr: true do
621
622
  input = "https://doi.org/10.5438/6423"
622
623
  subject = Bolognese::Metadata.new(input: input)
623
624
  expect(subject.valid?).to be true
624
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.5438/6423", "identifierType"=>"DOI"}])
625
+ expect(subject.id).to eq("https://doi.org/10.5438/6423")
625
626
  expect(subject.types["schemaOrg"]).to eq("Collection")
626
627
  expect(subject.types["resourceType"]).to eq("Project")
627
628
  expect(subject.types["resourceTypeGeneral"]).to eq("Collection")
@@ -647,7 +648,7 @@ describe Bolognese::Metadata, vcr: true do
647
648
  input = "https://doi.org/10.26102/2310-6018/2019.24.1.006"
648
649
  subject = Bolognese::Metadata.new(input: input)
649
650
  expect(subject.valid?).to be true
650
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.26102/2310-6018/2019.24.1.006", "identifierType"=>"DOI"}])
651
+ expect(subject.id).to eq("https://doi.org/10.26102/2310-6018/2019.24.1.006")
651
652
  expect(subject.types["schemaOrg"]).to eq("ScholarlyArticle")
652
653
  expect(subject.types["resourceType"]).to eq("Journal Article")
653
654
  expect(subject.types["resourceTypeGeneral"]).to eq("Text")
@@ -674,7 +675,8 @@ describe Bolognese::Metadata, vcr: true do
674
675
  expect(subject.types["citeproc"]).to eq("article-journal")
675
676
  expect(subject.creators).to eq([{"nameIdentifiers"=> [{"nameIdentifier"=>"https://orcid.org/0000-0003-1419-2405", "nameIdentifierScheme"=>"ORCID", "schemeUri"=>"https://orcid.org"}], "name"=>"Fenner, Martin", "givenName"=>"Martin", "familyName"=>"Fenner"}])
676
677
  expect(subject.titles).to eq([{"title"=>"Eating your own Dog Food"}])
677
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.5438/4k3m-nyvg", "identifierType"=>"DOI"}, {"identifier"=>"MS-49-3632-5083", "identifierType"=>"Local accession number"}])
678
+ expect(subject.id).to eq("https://doi.org/10.5438/4k3m-nyvg")
679
+ expect(subject.identifiers).to eq([{"identifier"=>"MS-49-3632-5083", "identifierType"=>"Local accession number"}])
678
680
  expect(subject.dates).to eq([{"date"=>"2016-12-20", "dateType"=>"Created"}, {"date"=>"2016-12-20", "dateType"=>"Issued"}, {"date"=>"2016-12-20", "dateType"=>"Updated"}])
679
681
  expect(subject.publication_year).to eq("2016")
680
682
  expect(subject.related_identifiers.length).to eq(3)
@@ -697,7 +699,7 @@ describe Bolognese::Metadata, vcr: true do
697
699
  "schemeUri"=>"http://isni.org/isni/"}],
698
700
  "affiliation" => []}])
699
701
  expect(subject.titles).to eq([{"title"=>"Właściwości rzutowań podprzestrzeniowych"}, {"title"=>"Translation of Polish titles", "titleType"=>"TranslatedTitle"}])
700
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.5072/testpub", "identifierType"=>"DOI"}, {"identifier"=>"937-0-4523-12357-6", "identifierType"=>"ISBN"}])
702
+ expect(subject.identifiers).to eq([{"identifier"=>"937-0-4523-12357-6", "identifierType"=>"ISBN"}])
701
703
  expect(subject.dates).to eq([{"date"=>"2012-12-13", "dateInformation"=>"Correction", "dateType"=>"Other"}, {"date"=>"2010", "dateType"=>"Issued"}])
702
704
  expect(subject.publication_year).to eq("2010")
703
705
  expect(subject.related_identifiers.length).to eq(1)
@@ -728,7 +730,8 @@ describe Bolognese::Metadata, vcr: true do
728
730
  "schemeUri"=>"http://isni.org/isni/"}],
729
731
  "affiliation" => []}])
730
732
  expect(subject.titles).to eq([{"title"=>"Właściwości rzutowań podprzestrzeniowych"}, {"title"=>"Translation of Polish titles", "titleType"=>"TranslatedTitle"}])
731
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.5072/testpub", "identifierType"=>"DOI"}, {"identifier"=>"937-0-4523-12357-6", "identifierType"=>"ISBN"}])
733
+ expect(subject.id).to eq("https://doi.org/10.5072/testpub")
734
+ expect(subject.identifiers).to eq([{"identifier"=>"937-0-4523-12357-6", "identifierType"=>"ISBN"}])
732
735
  expect(subject.publication_year).to eq("2010")
733
736
  expect(subject.related_identifiers.length).to eq(1)
734
737
  expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"10.5272/oldertestpub", "relatedIdentifierType"=>"DOI", "relationType"=>"IsPartOf")
@@ -754,10 +757,10 @@ describe Bolognese::Metadata, vcr: true do
754
757
  expect(subject.creators.length).to eq(8)
755
758
  expect(subject.creators.last).to eq("familyName"=>"Renaud", "givenName"=>"François", "name"=>"Renaud, François", "nameType"=>"Personal", "nameIdentifiers" => [], "affiliation" => [])
756
759
  expect(subject.titles).to eq([{"title"=>"Data from: A new malaria agent in African hominids."}])
757
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.5061/dryad.8515", "identifierType"=>"DOI"},
758
- {"identifier"=>
759
- "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.",
760
- "identifierType"=>"citation"}])
760
+ expect(subject.id).to eq("https://doi.org/10.5061/dryad.8515")
761
+ expect(subject.identifiers).to eq([{"identifier"=>
762
+ "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.",
763
+ "identifierType"=>"citation"}])
761
764
  expect(subject.publication_year).to eq("2011")
762
765
  expect(subject.related_identifiers.length).to eq(4)
763
766
  expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"19478877", "relatedIdentifierType"=>"PMID", "relationType"=>"IsReferencedBy")
@@ -786,7 +789,8 @@ describe Bolognese::Metadata, vcr: true do
786
789
  "schemeUri"=>"http://isni.org/isni/"}],
787
790
  "affiliation" => []}])
788
791
  expect(subject.titles).to eq([{"title"=>"Właściwości rzutowań podprzestrzeniowych"}, {"title"=>"Translation of Polish titles", "titleType"=>"TranslatedTitle"}])
789
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.5072/testpub", "identifierType"=>"DOI"}, {"identifier"=>"937-0-4523-12357-6", "identifierType"=>"ISBN"}])
792
+ expect(subject.id).to eq("https://doi.org/10.5072/testpub")
793
+ expect(subject.identifiers).to eq([{"identifier"=>"937-0-4523-12357-6", "identifierType"=>"ISBN"}])
790
794
  expect(subject.publication_year).to eq("2010")
791
795
  expect(subject.related_identifiers.length).to eq(1)
792
796
  expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"10.5272/oldertestpub", "relatedIdentifierType"=>"DOI", "relationType"=>"IsPartOf")
@@ -814,7 +818,7 @@ describe Bolognese::Metadata, vcr: true do
814
818
  "nameIdentifierScheme"=>"ISNI"}],
815
819
  "affiliation" => []}])
816
820
  expect(subject.titles).to eq([{"title"=>"Właściwości rzutowań podprzestrzeniowych"}, {"title"=>"Translation of Polish titles", "titleType"=>"TranslatedTitle"}])
817
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.5072/testpub", "identifierType"=>"DOI"}, {"identifier"=>"937-0-4523-12357-6", "identifierType"=>"ISBN"}])
821
+ expect(subject.identifiers).to eq([{"identifier"=>"937-0-4523-12357-6", "identifierType"=>"ISBN"}])
818
822
  expect(subject.dates).to eq([{"date"=>"2009-04-29", "dateType"=>"StartDate"}, {"date"=>"2010-01-05", "dateType"=>"EndDate"}, {"date"=>"2010", "dateType"=>"Issued"}])
819
823
  expect(subject.publication_year).to eq("2010")
820
824
  expect(subject.related_identifiers.length).to eq(1)
@@ -837,7 +841,8 @@ describe Bolognese::Metadata, vcr: true do
837
841
  "schemeUri"=>"http://isni.org/isni/"}],
838
842
  "affiliation" => []}])
839
843
  expect(subject.titles).to eq([{"title"=>"Właściwości rzutowań podprzestrzeniowych"}, {"title"=>"Translation of Polish titles", "titleType"=>"TranslatedTitle"}])
840
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.5072/testpub2", "identifierType"=>"DOI"}, {"identifier"=>"937-0-4523-12357-6", "identifierType"=>"ISBN"}])
844
+ expect(subject.id).to eq("https://doi.org/10.5072/testpub2")
845
+ expect(subject.identifiers).to eq([{"identifier"=>"937-0-4523-12357-6", "identifierType"=>"ISBN"}])
841
846
  expect(subject.dates).to eq([{"date"=>"2012-12-13", "dateInformation"=>"Correction", "dateType"=>"Other"}, {"date"=>"2010", "dateType"=>"Issued"}])
842
847
  expect(subject.publication_year).to eq("2010")
843
848
  expect(subject.sizes).to eq(["256 pages"])
@@ -860,7 +865,7 @@ describe Bolognese::Metadata, vcr: true do
860
865
  input = fixture_path + "ns0.xml"
861
866
  subject = Bolognese::Metadata.new(input: input)
862
867
  expect(subject.valid?).to be true
863
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.4231/d38g8fk8b", "identifierType"=>"DOI"}])
868
+ expect(subject.id).to eq("https://doi.org/10.4231/d38g8fk8b")
864
869
  expect(subject.types["schemaOrg"]).to eq("SoftwareSourceCode")
865
870
  expect(subject.types["resourceType"]).to eq("Simulation Tool")
866
871
  expect(subject.types["resourceTypeGeneral"]).to eq("Software")
@@ -878,7 +883,7 @@ describe Bolognese::Metadata, vcr: true do
878
883
  input = "https://doi.org/10.25318/3410014001-fra"
879
884
  subject = Bolognese::Metadata.new(input: input)
880
885
  expect(subject.valid?).to be true
881
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.25318/3410014001-fra", "identifierType"=>"DOI"}])
886
+ expect(subject.id).to eq("https://doi.org/10.25318/3410014001-fra")
882
887
  expect(subject.types["schemaOrg"]).to eq("Dataset")
883
888
  expect(subject.types["resourceType"]).to be_nil
884
889
  expect(subject.types["resourceTypeGeneral"]).to eq("Dataset")
@@ -895,7 +900,7 @@ describe Bolognese::Metadata, vcr: true do
895
900
  input = "10.5067/terra+aqua/ceres/cldtyphist_l3.004"
896
901
  subject = Bolognese::Metadata.new(input: input)
897
902
  expect(subject.valid?).to be true
898
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.5067/terra+aqua/ceres/cldtyphist_l3.004", "identifierType"=>"DOI"}])
903
+ expect(subject.id).to eq("https://doi.org/10.5067/terra+aqua/ceres/cldtyphist_l3.004")
899
904
  expect(subject.types["schemaOrg"]).to eq("Dataset")
900
905
  expect(subject.types["resourceTypeGeneral"]).to eq("Dataset")
901
906
  expect(subject.creators).to eq([{"nameType"=>"Personal", "name"=>"Wong, Takmeng", "givenName"=>"Takmeng", "familyName"=>"Wong", "nameIdentifiers" => [], "affiliation" => []}])
@@ -910,8 +915,8 @@ describe Bolognese::Metadata, vcr: true do
910
915
  input = "https://doi.org/10.4232/1.2745"
911
916
  subject = Bolognese::Metadata.new(input: input)
912
917
  expect(subject.valid?).to be true
913
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.4232/1.2745", "identifierType"=>"DOI"},
914
- {"identifier"=>"ZA2745", "identifierType"=>"ZA-No."},
918
+ expect(subject.id).to eq("https://doi.org/10.4232/1.2745")
919
+ expect(subject.identifiers).to eq([{"identifier"=>"ZA2745", "identifierType"=>"ZA-No."},
915
920
  {"identifier"=>"Internationale Umfrageprogramme", "identifierType"=>"FDZ"}])
916
921
  expect(subject.types["schemaOrg"]).to eq("Dataset")
917
922
  expect(subject.types["resourceTypeGeneral"]).to eq("Dataset")
@@ -931,7 +936,8 @@ describe Bolognese::Metadata, vcr: true do
931
936
  input = "https://doi.org/10.4229/23RDEUPVSEC2008-5CO.8.3"
932
937
  subject = Bolognese::Metadata.new(input: input)
933
938
  expect(subject.valid?).to be true
934
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.4229/23rdeupvsec2008-5co.8.3", "identifierType"=>"DOI"}, {"identifier"=>"3-936338-24-8", "identifierType"=>"ISBN"}])
939
+ expect(subject.id).to eq("https://doi.org/10.4229/23rdeupvsec2008-5co.8.3")
940
+ expect(subject.identifiers).to eq([{"identifier"=>"3-936338-24-8", "identifierType"=>"ISBN"}])
935
941
  expect(subject.types["schemaOrg"]).to eq("ScholarlyArticle")
936
942
  expect(subject.types["resourceType"]).to eq("Article")
937
943
  expect(subject.types["resourceTypeGeneral"]).to eq("Text")
@@ -953,8 +959,11 @@ describe Bolognese::Metadata, vcr: true do
953
959
  subject = Bolognese::Metadata.new(input: input)
954
960
  expect(subject.valid?).to be true
955
961
  expect(subject.doi).to eq("10.23725/8na3-9s47")
956
- expect(subject.identifiers.length).to eq(4)
957
- expect(subject.identifiers[1]).to eq("identifier"=>"ark:/99999/fk41CrU4eszeLUDe", "identifierType"=>"minid")
962
+ expect(subject.id).to eq("https://doi.org/10.23725/8na3-9s47")
963
+ expect(subject.identifiers).to eq([{"identifier"=>"ark:/99999/fk41CrU4eszeLUDe", "identifierType"=>"minid"},
964
+ {"identifier"=>"dg.4503/c3d66dc9-58da-411c-83c4-dd656aa3c4b7",
965
+ "identifierType"=>"dataguid"},
966
+ {"identifier"=>"3b33f6b9338fccab0901b7d317577ea3", "identifierType"=>"md5"}])
958
967
  expect(subject.content_url).to include("s3://cgp-commons-public/topmed_open_access/197bc047-e917-55ed-852d-d563cdbc50e4/NWD165827.recab.cram", "gs://topmed-irc-share/public/NWD165827.recab.cram")
959
968
  end
960
969
 
@@ -962,7 +971,8 @@ describe Bolognese::Metadata, vcr: true do
962
971
  input = "https://doi.org/10.18169/PAPDEOTTX00502"
963
972
  subject = Bolognese::Metadata.new(input: input)
964
973
  expect(subject.valid?).to be true
965
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.18169/papdeottx00502", "identifierType"=>"DOI"}, {"identifier"=>"http://www.priorartregister.com/resolve.php?disclosure=OTTX00502", "identifierType"=>"URL"}])
974
+ expect(subject.id).to eq("https://doi.org/10.18169/papdeottx00502")
975
+ expect(subject.identifiers).to eq([{"identifier"=>"http://www.priorartregister.com/resolve.php?disclosure=OTTX00502", "identifierType"=>"URL"}])
966
976
  expect(subject.types["schemaOrg"]).to eq("Dataset")
967
977
  expect(subject.types["resourceType"]).to eq("Disclosure")
968
978
  expect(subject.types["resourceTypeGeneral"]).to eq("Dataset")
@@ -982,7 +992,7 @@ describe Bolognese::Metadata, vcr: true do
982
992
  expect(subject.valid?).to be true
983
993
  #expect(subject.errors.length).to eq(2)
984
994
  #expect(subject.errors.last).to eq("33:0: ERROR: Element '{http://datacite.org/schema/kernel-4}date': '1970-04-01 / (:tba)' is not a valid value of the atomic type '{http://datacite.org/schema/kernel-4}edtf'.")
985
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.21944/temis-ozone-msr2", "identifierType"=>"DOI"}])
995
+ expect(subject.id).to eq("https://doi.org/10.21944/temis-ozone-msr2")
986
996
  expect(subject.types["schemaOrg"]).to eq("Dataset")
987
997
  expect(subject.types["resourceType"]).to eq("Satellite data")
988
998
  expect(subject.types["resourceTypeGeneral"]).to eq("Dataset")
@@ -1019,7 +1029,7 @@ describe Bolognese::Metadata, vcr: true do
1019
1029
  input = "https://doi.org/10.4124/05F6C379-DD68-4CDB-880D-33D3E9576D52/1"
1020
1030
  subject = Bolognese::Metadata.new(input: input)
1021
1031
  expect(subject.valid?).to be false
1022
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.4124/05f6c379-dd68-4cdb-880d-33d3e9576d52/1", "identifierType"=>"DOI"}])
1032
+ expect(subject.id).to eq("https://doi.org/10.4124/05f6c379-dd68-4cdb-880d-33d3e9576d52/1")
1023
1033
  expect(subject.doi).to eq("10.4124/05f6c379-dd68-4cdb-880d-33d3e9576d52/1")
1024
1034
  expect(subject.agency).to eq("DataCite")
1025
1035
  expect(subject.state).to eq("not_found")
@@ -1029,7 +1039,7 @@ describe Bolognese::Metadata, vcr: true do
1029
1039
  input = "https://handle.test.datacite.org/10.22002/d1.694"
1030
1040
  subject = Bolognese::Metadata.new(input: input, sandbox: true)
1031
1041
  expect(subject.valid?).to be true
1032
- expect(subject.identifiers).to eq([{"identifier"=>"https://handle.test.datacite.org/10.22002/d1.694", "identifierType"=>"DOI"}])
1042
+ expect(subject.id).to eq("https://handle.test.datacite.org/10.22002/d1.694")
1033
1043
  expect(subject.types["schemaOrg"]).to eq("Dataset")
1034
1044
  expect(subject.types["resourceTypeGeneral"]).to eq("Dataset")
1035
1045
  expect(subject.creators).to eq([{"affiliation"=>[{"name"=>"Caltech"}], "name"=>"Tester", "nameIdentifiers" => []}])
@@ -1046,7 +1056,7 @@ describe Bolognese::Metadata, vcr: true do
1046
1056
  input = "10.21956/wellcomeopenres.25947.r17364"
1047
1057
  subject = Bolognese::Metadata.new(input: input, doi: input, sandbox: true)
1048
1058
  expect(subject.valid?).to be true
1049
- expect(subject.identifiers).to eq([{"identifier"=>"https://handle.test.datacite.org/10.21956/wellcomeopenres.25947.r17364", "identifierType"=>"DOI"}])
1059
+ expect(subject.id).to eq("https://handle.test.datacite.org/10.21956/wellcomeopenres.25947.r17364")
1050
1060
  expect(subject.types["schemaOrg"]).to eq("ScholarlyArticle")
1051
1061
  expect(subject.types["resourceTypeGeneral"]).to eq("Text")
1052
1062
  expect(subject.creators).to eq([{"name"=>"Fran2 Levy", "nameIdentifiers" => [], "affiliation" => []}])
@@ -1063,7 +1073,7 @@ describe Bolognese::Metadata, vcr: true do
1063
1073
  input = "10.21956/gatesopenres.530.r190"
1064
1074
  subject = Bolognese::Metadata.new(input: input, sandbox: true)
1065
1075
  expect(subject.valid?).to be true
1066
- expect(subject.identifiers).to eq([{"identifier"=>"https://handle.test.datacite.org/10.21956/gatesopenres.530.r190", "identifierType"=>"DOI"}])
1076
+ expect(subject.id).to eq("https://handle.test.datacite.org/10.21956/gatesopenres.530.r190")
1067
1077
  expect(subject.types["schemaOrg"]).to eq("ScholarlyArticle")
1068
1078
  expect(subject.types["resourceTypeGeneral"]).to eq("Text")
1069
1079
  expect(subject.types["ris"]).to eq("RPRT")
@@ -1153,7 +1163,7 @@ describe Bolognese::Metadata, vcr: true do
1153
1163
  input = "10.3204/desy-2014-01645"
1154
1164
  subject = Bolognese::Metadata.new(input: input)
1155
1165
  expect(subject.valid?).to be true
1156
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.3204/desy-2014-01645", "identifierType"=>"DOI"}])
1166
+ expect(subject.id).to eq("https://doi.org/10.3204/desy-2014-01645")
1157
1167
  expect(subject.types["resourceTypeGeneral"]).to eq("Text")
1158
1168
  expect(subject.types["resourceType"]).to eq("Dissertation")
1159
1169
  expect(subject.types["schemaOrg"]).to eq("Thesis")
@@ -1174,7 +1184,7 @@ describe Bolognese::Metadata, vcr: true do
1174
1184
  input = "10.26102/2310-6018/2019.24.1.006"
1175
1185
  subject = Bolognese::Metadata.new(input: input)
1176
1186
  expect(subject.valid?).to be true
1177
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.26102/2310-6018/2019.24.1.006", "identifierType"=>"DOI"}])
1187
+ expect(subject.id).to eq("https://doi.org/10.26102/2310-6018/2019.24.1.006")
1178
1188
  expect(subject.types["resourceTypeGeneral"]).to eq("Text")
1179
1189
  expect(subject.types["resourceType"]).to eq("Journal Article")
1180
1190
  expect(subject.types["schemaOrg"]).to eq("ScholarlyArticle")
@@ -1201,7 +1211,7 @@ describe Bolognese::Metadata, vcr: true do
1201
1211
  input = "https://doi.org/10.4121/uuid:3926db30-f712-4394-aebc-75976070e91f"
1202
1212
  subject = Bolognese::Metadata.new(input: input)
1203
1213
  expect(subject.valid?).to be true
1204
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.4121/uuid:3926db30-f712-4394-aebc-75976070e91f", "identifierType"=>"DOI"}])
1214
+ expect(subject.id).to eq("https://doi.org/10.4121/uuid:3926db30-f712-4394-aebc-75976070e91f")
1205
1215
  expect(subject.types["schemaOrg"]).to eq("Dataset")
1206
1216
  expect(subject.types["resourceTypeGeneral"]).to eq("Dataset")
1207
1217
  expect(subject.titles).to eq([{"title"=>"BPI Challenge 2012"}])
@@ -1215,12 +1225,9 @@ describe Bolognese::Metadata, vcr: true do
1215
1225
  it "change title" do
1216
1226
  subject.titles = [{"title"=> "A new malaria agent in African hominids." }]
1217
1227
  expect(subject.valid?).to be true
1218
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.5061/dryad.8515", "identifierType"=>"DOI"},
1219
- {"identifier"=>
1220
- "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.",
1221
- "identifierType"=>"citation"}])
1228
+ expect(subject.id).to eq("https://doi.org/10.5061/dryad.8515")
1222
1229
  expect(subject.doi).to eq("10.5061/dryad.8515")
1223
- expect(subject.url).to eq("https://datadryad.org/resource/doi:10.5061/dryad.8515")
1230
+ expect(subject.url).to eq("http://datadryad.org/stash/dataset/doi:10.5061/dryad.8515")
1224
1231
  expect(subject.types["schemaOrg"]).to eq("Dataset")
1225
1232
  expect(subject.titles).to eq([{"title"=> "A new malaria agent in African hominids." }])
1226
1233
  end
@@ -1228,12 +1235,9 @@ describe Bolognese::Metadata, vcr: true do
1228
1235
  it "change state" do
1229
1236
  subject.state = "registered"
1230
1237
  expect(subject.valid?).to be true
1231
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.5061/dryad.8515", "identifierType"=>"DOI"},
1232
- {"identifier"=>
1233
- "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.",
1234
- "identifierType"=>"citation"}])
1238
+ expect(subject.id).to eq("https://doi.org/10.5061/dryad.8515")
1235
1239
  expect(subject.doi).to eq("10.5061/dryad.8515")
1236
- expect(subject.url).to eq("https://datadryad.org/resource/doi:10.5061/dryad.8515")
1240
+ expect(subject.url).to eq("http://datadryad.org/stash/dataset/doi:10.5061/dryad.8515")
1237
1241
  expect(subject.types["schemaOrg"]).to eq("Dataset")
1238
1242
  expect(subject.titles).to eq([{"title"=>"Data from: A new malaria agent in African hominids."}])
1239
1243
  expect(subject.state).to eq("registered")
@@ -1246,8 +1250,8 @@ describe Bolognese::Metadata, vcr: true do
1246
1250
  doi = "10.5061/dryad.8515"
1247
1251
  subject = Bolognese::Metadata.new(input: input, doi: doi)
1248
1252
  expect(subject.valid?).to be true
1249
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.5061/dryad.8515", "identifierType"=>"DOI"},
1250
- {"identifier"=>"MS-49-3632-5083", "identifierType"=>"Local accession number"}])
1253
+ expect(subject.id).to eq("https://doi.org/10.5061/dryad.8515")
1254
+ expect(subject.identifiers).to eq([{"identifier"=>"MS-49-3632-5083", "identifierType"=>"Local accession number"}])
1251
1255
  expect(subject.doi).to eq("10.5061/dryad.8515")
1252
1256
  expect(subject.creators).to eq([{"nameIdentifiers"=> [{"nameIdentifier"=>"https://orcid.org/0000-0003-1419-2405", "nameIdentifierScheme"=>"ORCID", "schemeUri"=>"https://orcid.org"}], "name"=>"Fenner, Martin", "givenName"=>"Martin", "familyName"=>"Fenner"}])
1253
1257
  expect(subject.titles).to eq([{"title"=>"Eating your own Dog Food"}])
@@ -1263,7 +1267,7 @@ describe Bolognese::Metadata, vcr: true do
1263
1267
  subject = Bolognese::Metadata.new(input: input, from: 'datacite', url: url, content_url: content_url)
1264
1268
 
1265
1269
  expect(subject.valid?).to be true
1266
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.25491/9hx8-ke93", "identifierType"=>"DOI"}])
1270
+ expect(subject.id).to eq("https://doi.org/10.25491/9hx8-ke93")
1267
1271
  expect(subject.url).to eq("https://ors.datacite.org/doi:/10.25491/9hx8-ke93")
1268
1272
  expect(subject.content_url).to eq("https://storage.googleapis.com/gtex_analysis_v7/single_tissue_eqtl_data/GTEx_Analysis_v7_eQTL_expression_matrices.tar.gz")
1269
1273
  expect(subject.types["schemaOrg"]).to eq("Dataset")
@@ -1286,7 +1290,7 @@ describe Bolognese::Metadata, vcr: true do
1286
1290
  it "geo_location_polygon" do
1287
1291
  input = fixture_path + 'datacite-example-polygon-v4.1.xml'
1288
1292
  subject = Bolognese::Metadata.new(input: input)
1289
- expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.5072/example-polygon", "identifierType"=>"DOI"}])
1293
+ expect(subject.id).to eq("https://doi.org/10.5072/example-polygon")
1290
1294
  expect(subject.types["schemaOrg"]).to eq("Dataset")
1291
1295
  expect(subject.types["resourceType"]).to eq("Dataset")
1292
1296
  expect(subject.types["resourceTypeGeneral"]).to eq("Dataset")