bolognese 0.9.33 → 0.9.34

Sign up to get free protection for your applications and to get access to all the features.
Files changed (240) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/lib/bolognese/metadata.rb +14 -4
  4. data/lib/bolognese/readers/datacite_reader.rb +4 -3
  5. data/lib/bolognese/version.rb +1 -1
  6. data/lib/bolognese/writers/crosscite_writer.rb +2 -0
  7. data/lib/bolognese/writers/datacite_json_writer.rb +2 -0
  8. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/default.yml +10 -12
  9. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_bibtex.yml +10 -10
  10. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_crossref.yml +9 -9
  11. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_datacite.yml +10 -10
  12. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_schema_org.yml +10 -12
  13. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/default.yml +15 -15
  14. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_bibtex.yml +14 -16
  15. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_datacite.yml +15 -15
  16. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_datacite_json.yml +16 -14
  17. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_schema_org.yml +14 -14
  18. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/default.yml +12 -12
  19. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/to_bibtex.yml +13 -13
  20. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/to_datacite.yml +12 -12
  21. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/to_schema_org.yml +13 -13
  22. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/authors_as_string/author.yml +3 -3
  23. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/authors_as_string/no_author.yml +3 -3
  24. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/authors_as_string/single_author.yml +3 -3
  25. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/authors_as_string/with_organization.yml +3 -3
  26. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_from_url/doi.yml +3 -3
  27. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_from_url/not_a_doi.yml +3 -3
  28. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_from_url/url.yml +3 -3
  29. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/crossref.yml +10 -12
  30. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/datacite.yml +9 -9
  31. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/medra.yml +10 -10
  32. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/not_a_valid_prefix.yml +2 -2
  33. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/not_found.yml +9 -9
  34. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/crossref.yml +21 -23
  35. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/crossref_doi_not_url.yml +19 -21
  36. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/datacite.yml +22 -22
  37. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/datacite_doi_http.yml +22 -22
  38. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/github.yml +15 -17
  39. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/orcid.yml +13 -15
  40. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/schema_org.yml +14 -14
  41. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/unknown_DOI_registration_agency.yml +20 -22
  42. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/bibtex.yml +15 -15
  43. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/citeproc.yml +15 -15
  44. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/codemeta.yml +15 -15
  45. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/crosscite.yml +14 -16
  46. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/crossref.yml +15 -15
  47. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/datacite.yml +15 -17
  48. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/datacite_json.yml +15 -15
  49. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/ris.yml +14 -14
  50. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/schema_org.yml +15 -15
  51. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_string/crosscite.yml +15 -17
  52. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/from_schema_org/with_id.yml +3 -3
  53. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_codemeta_metadata/maremma.yml +8 -8
  54. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_codemeta_metadata/no_codemeta_json.yml +7 -7
  55. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_codemeta_metadata/not_found_error.yml +7 -7
  56. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/DOI_with_ORCID_ID.yml +10 -10
  57. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/DOI_with_SICI_DOI.yml +11 -9
  58. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/DOI_with_data_citation.yml +9 -9
  59. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/date_in_future.yml +10 -10
  60. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_article.yml +11 -9
  61. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/not_found_error.yml +9 -9
  62. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/posted_content.yml +12 -10
  63. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/BlogPosting.yml +14 -16
  64. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_in_test_system.yml +13 -13
  65. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_not_found.yml +9 -9
  66. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Dataset.yml +15 -17
  67. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Funding.yml +15 -17
  68. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Funding_schema_version_4.yml +13 -13
  69. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/author_only_full_name.yml +15 -15
  70. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/author_with_scheme.yml +15 -15
  71. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/author_with_wrong_orcid_scheme.yml +14 -14
  72. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/date.yml +14 -16
  73. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/empty_subject.yml +15 -17
  74. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/funding_schema_version_3.yml +15 -15
  75. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/is_identical_to.yml +16 -16
  76. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/keywords_with_attributes.yml +14 -16
  77. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/multiple_author_names_in_one_creatorName.yml +13 -15
  78. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/multiple_licenses.yml +13 -15
  79. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_date_parts/date.yml +2 -2
  80. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_date_parts/year-month.yml +2 -2
  81. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_date_parts/year.yml +3 -3
  82. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_parts/date.yml +3 -3
  83. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_parts/year-month.yml +3 -3
  84. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_parts/year.yml +2 -2
  85. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_name_identifiers/has_ORCID.yml +16 -16
  86. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_name_identifiers/has_jacow_org_scheme.yml +15 -17
  87. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_name_identifiers/has_multiple_name_identifier.yml +16 -16
  88. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_name_identifiers/has_no_ORCID.yml +15 -17
  89. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_familyName.yml +16 -16
  90. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_multiple_names_in_display-order.yml +13 -13
  91. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_name_in_Thai.yml +15 -17
  92. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_name_in_display-order.yml +16 -16
  93. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_name_in_display-order_with_ORCID.yml +16 -16
  94. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_name_in_sort-order.yml +16 -16
  95. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/hyper-authorship.yml +14 -14
  96. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/is_organization.yml +3 -3
  97. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/multiple_author_names_in_one_field.yml +16 -16
  98. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/multiple_name_identifier.yml +13 -13
  99. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/name_with_affiliation.yml +14 -12
  100. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/name_with_role.yml +12 -14
  101. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/BlogPosting.yml +11 -11
  102. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/BlogPosting_with_new_DOI.yml +13 -13
  103. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/not_found_error.yml +2 -2
  104. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/handle_input/DOI_RA_not_Crossref_or_DataCite.yml +8 -6
  105. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/handle_input/unknown_DOI_prefix.yml +7 -9
  106. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_alternate_identifiers/insert.yml +8 -8
  107. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_contributors/none.yml +7 -9
  108. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_creators/insert.yml +8 -8
  109. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_dates/insert.yml +9 -7
  110. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_descriptions/insert.yml +8 -8
  111. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_identifier/doi.yml +8 -8
  112. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_person/creator_only_name.yml +8 -8
  113. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_publication_year/insert.yml +8 -8
  114. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_publisher/insert.yml +8 -8
  115. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_related_identifiers/insert.yml +8 -8
  116. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_related_identifiers/related_identifier.yml +8 -8
  117. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_resource_type/insert.yml +8 -8
  118. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_rights_list/insert.yml +9 -7
  119. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_subjects/insert.yml +8 -8
  120. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_titles/insert.yml +9 -7
  121. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_version/insert.yml +8 -8
  122. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_comma.yml +3 -3
  123. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_family_name.yml +3 -3
  124. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_id.yml +3 -3
  125. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_known_given_name.yml +2 -2
  126. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_no_info.yml +2 -2
  127. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_type_organization.yml +3 -3
  128. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/missing_comma.yml +13 -15
  129. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/nil.yml +15 -17
  130. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/overlapping_keys.yml +14 -16
  131. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/valid.yml +14 -14
  132. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/SICI_doi.yml +2 -2
  133. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi.yml +2 -2
  134. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_from_url_without_doi_proxy.yml +3 -3
  135. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_prefix_too_long.yml +3 -3
  136. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_prefix_with_string.yml +3 -3
  137. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_with_protocol.yml +3 -3
  138. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/dx_doi_org_url.yml +3 -3
  139. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/https_url.yml +3 -3
  140. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/not_valid_doi_prefix.yml +3 -3
  141. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/url_with_one_slash.yml +3 -3
  142. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/doi.yml +3 -3
  143. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/doi_as_url.yml +2 -2
  144. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/ftp.yml +3 -3
  145. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/invalid_url.yml +2 -2
  146. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/string.yml +2 -2
  147. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/url.yml +3 -3
  148. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/url_with_utf-8.yml +3 -3
  149. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_ids/doi.yml +3 -3
  150. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_ids/url.yml +2 -2
  151. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_url/uri.yml +2 -2
  152. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_url/with_trailing_slash.yml +3 -3
  153. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/array.yml +3 -3
  154. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/array_of_strings.yml +3 -3
  155. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/first.yml +3 -3
  156. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/hash.yml +3 -3
  157. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/nil.yml +3 -3
  158. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/string.yml +3 -3
  159. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/sanitize/should_only_keep_specific_tags.yml +3 -3
  160. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/sanitize/should_remove_a_tags.yml +3 -3
  161. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/to_schema_org/with_id.yml +3 -3
  162. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid.yml +3 -3
  163. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_https.yml +3 -3
  164. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_id.yml +3 -3
  165. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_with_spaces.yml +2 -2
  166. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_wrong_id.yml +2 -2
  167. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_www.yml +3 -3
  168. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid_scheme/validate_orcid_scheme.yml +3 -3
  169. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid_scheme/validate_orcid_scheme_https.yml +3 -3
  170. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid_scheme/validate_orcid_scheme_trailing_slash.yml +3 -3
  171. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid_scheme/validate_orcid_scheme_www.yml +3 -3
  172. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_url/DOI.yml +3 -3
  173. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_url/ISSN.yml +3 -3
  174. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_url/URL.yml +3 -3
  175. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_url/string.yml +3 -3
  176. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/BlogPosting.yml +8 -8
  177. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/Dataset.yml +8 -8
  178. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/from_schema_org.yml +12 -12
  179. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/maremma.yml +8 -8
  180. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/text.yml +8 -8
  181. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/with_data_citation.yml +2 -2
  182. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/with_pages.yml +2 -2
  183. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/BlogPosting.yml +8 -8
  184. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/BlogPosting_schema_org.yml +12 -12
  185. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/Dataset.yml +8 -8
  186. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/container_title.yml +8 -8
  187. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/journal_article.yml +3 -3
  188. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/maremma.yml +8 -8
  189. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/multiple_abstracts.yml +8 -8
  190. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/with_pages.yml +3 -3
  191. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_codemeta/SoftwareSourceCode_DataCite.yml +8 -8
  192. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/datacite_database_attributes.yml +75 -0
  193. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/maremma.yml +8 -8
  194. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/with_ORCID_ID.yml +3 -3
  195. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/with_data_citation.yml +2 -2
  196. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/with_data_citation_schema_org.yml +13 -13
  197. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crossref/from_DataCite.yml +8 -8
  198. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_json/maremma.yml +7 -7
  199. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_json/with_ORCID_ID.yml +3 -3
  200. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_json/with_data_citation.yml +3 -3
  201. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_json/with_data_citation_schema_org.yml +12 -12
  202. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/Dataset_in_schema_4_0.yml +7 -9
  203. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/Text_pass-thru.yml +73 -0
  204. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/maremma.yml +8 -8
  205. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_ORCID_ID.yml +3 -3
  206. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_data_citation.yml +3 -3
  207. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_data_citation_schema_org.yml +13 -13
  208. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_editor.yml +3 -3
  209. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/BlogPosting.yml +8 -8
  210. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/BlogPosting_schema_org.yml +12 -12
  211. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/Dataset.yml +7 -9
  212. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/alternate_name.yml +8 -8
  213. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/journal_article.yml +2 -2
  214. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/maremma.yml +8 -8
  215. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/with_pages.yml +3 -3
  216. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Funding.yml +7 -7
  217. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Funding_OpenAIRE.yml +8 -8
  218. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON.yml +8 -8
  219. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON_IsSupplementTo.yml +8 -8
  220. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON_isReferencedBy.yml +8 -8
  221. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/journal_article.yml +3 -3
  222. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/maremma_schema_org_JSON.yml +8 -8
  223. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/BlogPosting.yml +26 -26
  224. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/BlogPosting_Citeproc_JSON.yml +18 -18
  225. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/BlogPosting_DataCite_JSON.yml +18 -18
  226. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/Crossref_DOI.yml +18 -18
  227. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/DataONE.yml +18 -18
  228. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/Dataset.yml +26 -26
  229. data/spec/readers/bibtex_reader_spec.rb +1 -1
  230. data/spec/readers/citeproc_reader_spec.rb +1 -1
  231. data/spec/readers/codemeta_reader_spec.rb +1 -1
  232. data/spec/readers/crosscite_reader_spec.rb +1 -1
  233. data/spec/readers/crossref_reader_spec.rb +1 -1
  234. data/spec/readers/datacite_json_reader_spec.rb +1 -1
  235. data/spec/readers/datacite_reader_spec.rb +1 -1
  236. data/spec/readers/ris_reader_spec.rb +1 -1
  237. data/spec/readers/schema_org_reader_spec.rb +1 -1
  238. data/spec/writers/crosscite_writer_spec.rb +14 -0
  239. data/spec/writers/datacite_writer_spec.rb +19 -0
  240. metadata +3 -1
@@ -7,7 +7,7 @@ describe Bolognese::Metadata, vcr: true do
7
7
 
8
8
  context "get bibtex raw" do
9
9
  it "Crossref DOI" do
10
- expect(subject.raw).to eq(IO.read(input))
10
+ expect(subject.raw).to eq(IO.read(input).strip)
11
11
  end
12
12
  end
13
13
 
@@ -7,7 +7,7 @@ describe Bolognese::Metadata, vcr: true do
7
7
 
8
8
  context "get bibtex raw" do
9
9
  it "BlogPosting" do
10
- expect(subject.raw).to eq(IO.read(input))
10
+ expect(subject.raw).to eq(IO.read(input).strip)
11
11
  end
12
12
  end
13
13
 
@@ -9,7 +9,7 @@ describe Bolognese::Metadata, vcr: true do
9
9
  it "rdataone" do
10
10
  input = fixture_path + 'codemeta.json'
11
11
  subject = Bolognese::Metadata.new(input: input)
12
- expect(subject.raw).to eq(IO.read(input))
12
+ expect(subject.raw).to eq(IO.read(input).strip)
13
13
  end
14
14
  end
15
15
 
@@ -7,7 +7,7 @@ describe Bolognese::Metadata, vcr: true do
7
7
 
8
8
  context "get crosscite raw" do
9
9
  it "SoftwareSourceCode" do
10
- expect(subject.raw).to eq(IO.read(input))
10
+ expect(subject.raw).to eq(IO.read(input).strip)
11
11
  end
12
12
  end
13
13
 
@@ -9,7 +9,7 @@ describe Bolognese::Metadata, vcr: true do
9
9
  it "journal article" do
10
10
  input = fixture_path + 'crossref.xml'
11
11
  subject = Bolognese::Metadata.new(input: input)
12
- expect(subject.raw).to eq(IO.read(input))
12
+ expect(subject.raw).to eq(IO.read(input).strip)
13
13
  end
14
14
  end
15
15
 
@@ -7,7 +7,7 @@ describe Bolognese::Metadata, vcr: true do
7
7
 
8
8
  context "get datacite_json raw" do
9
9
  it "BlogPosting" do
10
- expect(subject.raw).to eq(IO.read(input))
10
+ expect(subject.raw).to eq(IO.read(input).strip)
11
11
  end
12
12
  end
13
13
 
@@ -9,7 +9,7 @@ describe Bolognese::Metadata, vcr: true do
9
9
  it "BlogPosting" do
10
10
  input = fixture_path + 'datacite.xml'
11
11
  subject = Bolognese::Metadata.new(input: input)
12
- expect(subject.raw).to eq(IO.read(input))
12
+ expect(subject.raw).to eq(IO.read(input).strip)
13
13
  end
14
14
  end
15
15
 
@@ -7,7 +7,7 @@ describe Bolognese::Metadata, vcr: true do
7
7
 
8
8
  context "get ris raw" do
9
9
  it "Crossref DOI" do
10
- expect(subject.raw).to eq(IO.read(input))
10
+ expect(subject.raw).to eq(IO.read(input).strip)
11
11
  end
12
12
  end
13
13
 
@@ -10,7 +10,7 @@ describe Bolognese::Metadata, vcr: true do
10
10
  it "BlogPosting" do
11
11
  input = fixture_path + 'schema_org.json'
12
12
  subject = Bolognese::Metadata.new(input: input)
13
- expect(subject.raw).to eq(IO.read(input))
13
+ expect(subject.raw).to eq(IO.read(input).strip)
14
14
  end
15
15
  end
16
16
 
@@ -61,6 +61,20 @@ describe Bolognese::Metadata, vcr: true do
61
61
  expect(crosscite["version"]).to eq("2.0.0")
62
62
  end
63
63
 
64
+ it "datacite database attributes" do
65
+ input = "https://doi.org/10.5061/DRYAD.8515"
66
+ subject = Bolognese::Metadata.new(input: input, from: "datacite")
67
+ crosscite = JSON.parse(subject.crosscite)
68
+ expect(crosscite.fetch("url")).to eq("http://datadryad.org/resource/doi:10.5061/dryad.8515")
69
+ expect(crosscite.fetch("title")).to eq("Data from: A new malaria agent in African hominids.")
70
+ expect(crosscite.fetch("author").length).to eq(8)
71
+ expect(crosscite.fetch("author").first).to eq("type"=>"Person", "familyName" => "Ollomo", "givenName" => "Benjamin", "name" => "Benjamin Ollomo")
72
+ expect(crosscite.fetch("date_registered")).to eq("2011-02-01T17:32:02Z")
73
+ expect(crosscite.fetch("date_updated")).to eq("2017-07-14T01:32:56Z")
74
+ expect(crosscite.fetch("member_id")).to eq("CDL")
75
+ expect(crosscite.fetch("data_center_id")).to eq("CDL.DRYAD")
76
+ end
77
+
64
78
  it "maremma" do
65
79
  input = "https://github.com/datacite/maremma"
66
80
  subject = Bolognese::Metadata.new(input: input, from: "codemeta")
@@ -87,6 +87,25 @@ describe Bolognese::Metadata, vcr: true do
87
87
  expect(datacite.dig("creators", "creator")).to eq("creatorName"=>"Fenner, Martin", "givenName"=>"Martin", "familyName"=>"Fenner", "nameIdentifier"=>{"schemeURI"=>"http://orcid.org/", "nameIdentifierScheme"=>"ORCID", "__content__"=>"http://orcid.org/0000-0003-0077-4738"})
88
88
  end
89
89
 
90
+ it "Text pass-thru" do
91
+ input = "https://doi.org/10.23640/07243.5153971"
92
+ subject = Bolognese::Metadata.new(input: input, from: "datacite")
93
+ expect(subject.valid?).to be true
94
+ expect(subject.id).to eq("https://doi.org/10.23640/07243.5153971")
95
+ expect(subject.type).to eq("ScholarlyArticle")
96
+ expect(subject.additional_type).to eq("Paper")
97
+ expect(subject.resource_type_general).to eq("Text")
98
+ expect(subject.author.length).to eq(20)
99
+ expect(subject.author.first).to eq("type"=>"Person", "familyName" => "Paglione", "givenName" => "Laura", "id" => "https://orcid.org/0000-0003-3188-6273", "name" => "Laura Paglione")
100
+ expect(subject.title).to eq("Recommendation of: ORCID Works Metadata Working Group")
101
+ expect(subject.license).to eq("id"=>"https://creativecommons.org/publicdomain/zero/1.0", "name"=>"CC-0")
102
+ expect(subject.date_published).to eq("2017")
103
+ expect(subject.publisher).to eq("Figshare")
104
+ expect(subject.provider).to eq("DataCite")
105
+ expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-3")
106
+ expect(subject.datacite).to end_with("</resource>")
107
+ end
108
+
90
109
  it "Dataset in schema 4.0" do
91
110
  input = "https://doi.org/10.5061/DRYAD.8515"
92
111
  subject = Bolognese::Metadata.new(input: input, from: "datacite", regenerate: true)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bolognese
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.33
4
+ version: 0.9.34
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fenner
@@ -718,6 +718,7 @@ files:
718
718
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/multiple_abstracts.yml
719
719
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/with_pages.yml
720
720
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_codemeta/SoftwareSourceCode_DataCite.yml
721
+ - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/datacite_database_attributes.yml
721
722
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/maremma.yml
722
723
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/with_ORCID_ID.yml
723
724
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/with_data_citation.yml
@@ -728,6 +729,7 @@ files:
728
729
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_json/with_data_citation.yml
729
730
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_json/with_data_citation_schema_org.yml
730
731
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/Dataset_in_schema_4_0.yml
732
+ - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/Text_pass-thru.yml
731
733
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/maremma.yml
732
734
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_ORCID_ID.yml
733
735
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_data_citation.yml