bolognese 0.9.42 → 0.9.43

Sign up to get free protection for your applications and to get access to all the features.
Files changed (261) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/lib/bolognese/readers/crossref_reader.rb +13 -2
  4. data/lib/bolognese/version.rb +1 -1
  5. data/spec/cli_spec.rb +1 -1
  6. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_file/crossref/default.yml +45 -0
  7. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_file/crossref/to_bibtex.yml +45 -0
  8. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_file/crossref/to_crossref.yml +45 -0
  9. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_file/crossref/to_datacite.yml +45 -0
  10. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_file/crossref/to_schema_org.yml +45 -0
  11. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/default.yml +52 -10
  12. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_bibtex.yml +52 -10
  13. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_citation.yml +56 -11
  14. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_crossref.yml +51 -11
  15. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_datacite.yml +51 -9
  16. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_schema_org.yml +51 -9
  17. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/default.yml +12 -12
  18. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_bibtex.yml +13 -13
  19. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_citation.yml +17 -15
  20. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_datacite.yml +14 -12
  21. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_datacite_json.yml +11 -13
  22. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_schema_org.yml +13 -11
  23. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/default.yml +15 -15
  24. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/to_bibtex.yml +13 -13
  25. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/to_datacite.yml +15 -15
  26. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/schema_org/to_schema_org.yml +16 -16
  27. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/authors_as_string/author.yml +45 -3
  28. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/authors_as_string/no_author.yml +45 -3
  29. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/authors_as_string/single_author.yml +45 -3
  30. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/authors_as_string/with_organization.yml +45 -3
  31. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_datacite_metadata/change_doi.yml +13 -11
  32. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_datacite_metadata/change_title.yml +14 -12
  33. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/validates_against_schema.yml +44 -2
  34. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_metadata_as_datacite_xml/with_data_citation.yml +44 -2
  35. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_from_url/doi.yml +45 -3
  36. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_from_url/not_a_doi.yml +44 -2
  37. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_from_url/sandbox_url.yml +45 -3
  38. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_from_url/url.yml +45 -3
  39. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/crossref.yml +51 -9
  40. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/datacite.yml +51 -9
  41. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/medra.yml +53 -9
  42. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/not_a_valid_prefix.yml +45 -3
  43. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/not_found.yml +52 -10
  44. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/doi.yml +45 -3
  45. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/doi_with_protocol.yml +45 -3
  46. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/dx_doi_org_url.yml +45 -3
  47. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/force_test_resolver.yml +44 -2
  48. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/https_url.yml +45 -3
  49. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/test_resolver.yml +45 -3
  50. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_resolver/test_resolver_http.yml +44 -2
  51. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/crossref.yml +23 -19
  52. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/crossref_doi_not_url.yml +24 -20
  53. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/datacite.yml +19 -21
  54. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/datacite_doi_http.yml +17 -17
  55. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/github.yml +14 -12
  56. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/orcid.yml +12 -12
  57. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/schema_org.yml +14 -14
  58. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/unknown_DOI_registration_agency.yml +21 -21
  59. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/bibtex.yml +11 -13
  60. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/citeproc.yml +14 -12
  61. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/codemeta.yml +14 -14
  62. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/crosscite.yml +13 -13
  63. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/crossref.yml +12 -14
  64. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/datacite.yml +14 -14
  65. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/datacite_json.yml +12 -14
  66. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/ris.yml +14 -12
  67. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/schema_org.yml +13 -11
  68. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_string/crosscite.yml +15 -13
  69. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/from_schema_org/with_id.yml +45 -3
  70. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_codemeta_metadata/maremma.yml +8 -8
  71. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_codemeta_metadata/no_codemeta_json.yml +7 -7
  72. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_codemeta_metadata/not_found_error.yml +7 -7
  73. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/DOI_with_ORCID_ID.yml +50 -8
  74. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/DOI_with_SICI_DOI.yml +51 -12
  75. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/DOI_with_data_citation.yml +52 -10
  76. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/dataset.yml +162 -0
  77. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/date_in_future.yml +51 -11
  78. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_article.yml +54 -10
  79. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/not_found_error.yml +9 -9
  80. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/posted_content.yml +51 -9
  81. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_raw/journal_article.yml +45 -0
  82. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/BlogPosting.yml +14 -14
  83. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_in_test_system.yml +11 -13
  84. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_not_found.yml +11 -11
  85. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Dataset.yml +14 -12
  86. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Funding.yml +11 -11
  87. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Funding_schema_version_4.yml +11 -13
  88. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/author_only_full_name.yml +12 -12
  89. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/author_with_scheme.yml +16 -14
  90. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/author_with_wrong_orcid_scheme.yml +14 -12
  91. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/date.yml +14 -14
  92. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/empty_subject.yml +12 -12
  93. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/funding_schema_version_3.yml +15 -15
  94. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/is_identical_to.yml +15 -13
  95. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/keywords_with_attributes.yml +16 -12
  96. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/multiple_author_names_in_one_creatorName.yml +15 -13
  97. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/multiple_licenses.yml +15 -15
  98. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_date_parts/date.yml +45 -3
  99. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_date_parts/year-month.yml +44 -2
  100. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_from_date_parts/year.yml +45 -3
  101. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_parts/date.yml +45 -3
  102. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_parts/year-month.yml +44 -2
  103. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date_parts/year.yml +45 -3
  104. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_name_identifiers/has_ORCID.yml +15 -11
  105. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_name_identifiers/has_jacow_org_scheme.yml +14 -12
  106. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_name_identifiers/has_multiple_name_identifier.yml +15 -11
  107. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_name_identifiers/has_no_ORCID.yml +12 -12
  108. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_familyName.yml +13 -11
  109. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_multiple_names_in_display-order.yml +13 -9
  110. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_name_in_Thai.yml +13 -11
  111. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_name_in_display-order.yml +14 -10
  112. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_name_in_display-order_with_ORCID.yml +15 -11
  113. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/has_name_in_sort-order.yml +16 -12
  114. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/hyper-authorship.yml +12 -12
  115. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/is_organization.yml +45 -3
  116. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/multiple_author_names_in_one_field.yml +15 -11
  117. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/multiple_name_identifier.yml +11 -9
  118. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/name_with_affiliation.yml +13 -9
  119. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_one_author/name_with_role.yml +11 -9
  120. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/BlogPosting.yml +13 -13
  121. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/BlogPosting_with_new_DOI.yml +16 -16
  122. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_schema_org_metadata/not_found_error.yml +2 -2
  123. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/handle_input/DOI_RA_not_Crossref_or_DataCite.yml +6 -8
  124. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/handle_input/unknown_DOI_prefix.yml +6 -6
  125. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_alternate_identifiers/insert.yml +7 -5
  126. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_contributors/none.yml +7 -5
  127. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_creators/insert.yml +7 -5
  128. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_dates/insert.yml +7 -5
  129. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_descriptions/insert.yml +7 -5
  130. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_identifier/doi.yml +6 -6
  131. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_person/creator_only_name.yml +7 -5
  132. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_publication_year/insert.yml +6 -6
  133. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_publisher/insert.yml +6 -6
  134. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_related_identifiers/insert.yml +7 -5
  135. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_related_identifiers/related_identifier.yml +7 -5
  136. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_resource_type/insert.yml +8 -6
  137. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_rights_list/insert.yml +7 -5
  138. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_subjects/insert.yml +8 -6
  139. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_titles/insert.yml +8 -6
  140. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_version/insert.yml +8 -6
  141. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_comma.yml +45 -3
  142. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_family_name.yml +44 -2
  143. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_id.yml +44 -2
  144. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_known_given_name.yml +45 -3
  145. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_no_info.yml +45 -3
  146. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/is_personal_name_/has_type_organization.yml +45 -3
  147. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/missing_comma.yml +14 -14
  148. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/nil.yml +15 -13
  149. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/overlapping_keys.yml +13 -11
  150. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/valid.yml +13 -11
  151. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/SICI_doi.yml +45 -3
  152. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi.yml +45 -3
  153. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_force_datacite_sandbox.yml +45 -3
  154. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_from_datacite_sandbox.yml +45 -3
  155. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_from_url_without_doi_proxy.yml +44 -2
  156. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_prefix_too_long.yml +45 -3
  157. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_prefix_with_string.yml +45 -3
  158. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/doi_with_protocol.yml +45 -3
  159. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/dx_doi_org_url.yml +44 -2
  160. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/https_url.yml +45 -3
  161. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/not_valid_doi_prefix.yml +44 -2
  162. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_doi/url_with_one_slash.yml +45 -3
  163. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/doi.yml +45 -3
  164. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/doi_as_url.yml +44 -2
  165. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/ftp.yml +45 -3
  166. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/invalid_url.yml +45 -3
  167. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/string.yml +44 -2
  168. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/url.yml +45 -3
  169. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_id/url_with_utf-8.yml +44 -2
  170. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_ids/doi.yml +45 -3
  171. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_ids/url.yml +45 -3
  172. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_url/uri.yml +45 -3
  173. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_url/with_trailing_slash.yml +45 -3
  174. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/array.yml +45 -3
  175. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/array_of_strings.yml +45 -3
  176. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/first.yml +45 -3
  177. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/hash.yml +44 -2
  178. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/nil.yml +45 -3
  179. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/parse_attributes/string.yml +44 -2
  180. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/sanitize/should_only_keep_specific_tags.yml +44 -2
  181. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/sanitize/should_remove_a_tags.yml +45 -3
  182. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/to_schema_org/with_id.yml +45 -3
  183. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid.yml +45 -3
  184. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_https.yml +45 -3
  185. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_id.yml +45 -3
  186. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_with_spaces.yml +45 -3
  187. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_wrong_id.yml +45 -3
  188. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_www.yml +45 -3
  189. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid_scheme/validate_orcid_scheme.yml +44 -2
  190. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid_scheme/validate_orcid_scheme_https.yml +45 -3
  191. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid_scheme/validate_orcid_scheme_trailing_slash.yml +45 -3
  192. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid_scheme/validate_orcid_scheme_www.yml +45 -3
  193. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_prefix/doi.yml +45 -3
  194. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_prefix/doi_as_url.yml +45 -3
  195. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_prefix/doi_with_protocol.yml +45 -3
  196. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_prefix/only_prefix.yml +45 -3
  197. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_url/DOI.yml +45 -3
  198. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_url/ISSN.yml +45 -3
  199. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_url/URL.yml +45 -3
  200. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_url/string.yml +44 -2
  201. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/BlogPosting.yml +7 -5
  202. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/Dataset.yml +8 -6
  203. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/from_schema_org.yml +14 -14
  204. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/maremma.yml +8 -8
  205. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/text.yml +8 -6
  206. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/with_data_citation.yml +45 -3
  207. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_bibtex/with_pages.yml +45 -3
  208. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/Dataset.yml +8 -111
  209. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/Journal_article.yml +48 -5
  210. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/Journal_article_vancouver_style.yml +48 -5
  211. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/BlogPosting.yml +8 -6
  212. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/BlogPosting_schema_org.yml +14 -14
  213. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/Dataset.yml +5 -7
  214. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/container_title.yml +5 -5
  215. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/journal_article.yml +44 -2
  216. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/maremma.yml +8 -8
  217. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/multiple_abstracts.yml +8 -6
  218. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/software.yml +8 -6
  219. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/with_pages.yml +45 -3
  220. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_codemeta/SoftwareSourceCode_DataCite.yml +7 -5
  221. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/datacite_database_attributes.yml +8 -6
  222. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/maremma.yml +10 -10
  223. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/with_ORCID_ID.yml +45 -3
  224. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/with_data_citation.yml +45 -3
  225. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/with_data_citation_schema_org.yml +14 -14
  226. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crossref/from_DataCite.yml +7 -5
  227. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crossref/journal_article.yml +45 -0
  228. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_json/maremma.yml +8 -8
  229. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_json/with_ORCID_ID.yml +45 -3
  230. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_json/with_data_citation.yml +45 -3
  231. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_json/with_data_citation_schema_org.yml +14 -14
  232. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/Dataset_in_schema_4_0.yml +7 -5
  233. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/Text_pass-thru.yml +8 -6
  234. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/maremma.yml +8 -8
  235. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_ORCID_ID.yml +45 -3
  236. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_data_citation.yml +45 -3
  237. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_data_citation_schema_org.yml +14 -14
  238. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_xml/with_editor.yml +44 -2
  239. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/BlogPosting.yml +6 -6
  240. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/BlogPosting_schema_org.yml +15 -15
  241. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/Dataset.yml +7 -5
  242. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/alternate_name.yml +8 -6
  243. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/journal_article.yml +45 -3
  244. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/maremma.yml +8 -8
  245. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/with_pages.yml +45 -3
  246. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Funding.yml +6 -8
  247. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Funding_OpenAIRE.yml +8 -6
  248. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON.yml +6 -6
  249. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON_IsSupplementTo.yml +6 -6
  250. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON_isReferencedBy.yml +7 -5
  251. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/journal_article.yml +45 -3
  252. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/maremma_schema_org_JSON.yml +10 -10
  253. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/BlogPosting.yml +24 -24
  254. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/BlogPosting_Citeproc_JSON.yml +18 -18
  255. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/BlogPosting_DataCite_JSON.yml +18 -18
  256. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/Crossref_DOI.yml +18 -18
  257. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/DataONE.yml +18 -18
  258. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_turtle/Dataset.yml +26 -24
  259. data/spec/readers/crossref_reader_spec.rb +24 -0
  260. data/spec/writers/ris_writer_spec.rb +7 -5
  261. metadata +10 -2
@@ -39,6 +39,7 @@ describe Bolognese::Metadata, vcr: true do
39
39
  {"type"=>"Organization",
40
40
  "id"=>"https://doi.org/10.13039/501100006390",
41
41
  "name"=>"University of Lausanne"}])
42
+ expect(subject.publisher).to eq("eLife Sciences Organisation, Ltd.")
42
43
  expect(subject.provider).to eq("Crossref")
43
44
  end
44
45
 
@@ -59,6 +60,7 @@ describe Bolognese::Metadata, vcr: true do
59
60
  expect(subject.date_modified).to eq("2017-06-17T12:26:15Z")
60
61
  expect(subject.pagination).to eq("e30")
61
62
  expect(subject.is_part_of).to eq("type"=>"Periodical", "title"=>"PLoS ONE", "issn"=>"1932-6203")
63
+ expect(subject.publisher).to eq("Public Library of Science (PLoS)")
62
64
  expect(subject.provider).to eq("Crossref")
63
65
  end
64
66
 
@@ -78,6 +80,7 @@ describe Bolognese::Metadata, vcr: true do
78
80
  expect(subject.date_published).to eq("2016-12-28")
79
81
  expect(subject.date_modified).to eq("2016-12-29T06:10:20Z")
80
82
  expect(subject.is_part_of).to be_nil
83
+ expect(subject.publisher).to eq("Cold Spring Harbor Laboratory")
81
84
  expect(subject.provider).to eq("Crossref")
82
85
  end
83
86
 
@@ -96,6 +99,7 @@ describe Bolognese::Metadata, vcr: true do
96
99
  expect(subject.date_modified).to eq("2017-04-01T06:47:57Z")
97
100
  expect(subject.pagination).to eq("2832-2841")
98
101
  expect(subject.is_part_of).to eq("type"=>"Periodical", "title"=>"Ecology", "issn"=>"0012-9658")
102
+ expect(subject.publisher).to eq("Wiley-Blackwell")
99
103
  expect(subject.provider).to eq("Crossref")
100
104
  end
101
105
 
@@ -115,6 +119,7 @@ describe Bolognese::Metadata, vcr: true do
115
119
  expect(subject.date_modified).to eq("2016-08-02T18:42:41Z")
116
120
  expect(subject.pagination).to eq("1-7")
117
121
  expect(subject.is_part_of).to eq("type"=>"Periodical", "title"=>"Pulmonary Medicine", "issn"=>["2090-1836", "2090-1844"])
122
+ expect(subject.publisher).to eq("Hindawi Limited")
118
123
  expect(subject.provider).to eq("Crossref")
119
124
  end
120
125
 
@@ -132,6 +137,25 @@ describe Bolognese::Metadata, vcr: true do
132
137
  expect(subject.date_published).to eq("2015-07")
133
138
  expect(subject.date_modified).to eq("2017-06-23T08:44:48Z")
134
139
  expect(subject.is_part_of).to eq("type"=>"Periodical", "title"=>"European Journal of Pharmacology", "issn"=>"00142999")
140
+ expect(subject.publisher).to eq("Elsevier BV")
141
+ expect(subject.provider).to eq("Crossref")
142
+ end
143
+
144
+ it "dataset" do
145
+ input = "10.2210/pdb4hhb/pdb"
146
+ subject = Bolognese::Metadata.new(input: input)
147
+ expect(subject.id).to eq("https://doi.org/10.2210/pdb4hhb/pdb")
148
+ expect(subject.url).to eq("ftp://ftp.wwpdb.org/pub/pdb/data/structures/divided/pdb/hh/pdb4hhb.ent.gz")
149
+ expect(subject.type).to eq("ScholarlyArticle")
150
+ expect(subject.additional_type).to eq("SaComponent")
151
+ expect(subject.resource_type_general).to eq("Text")
152
+ expect(subject.author.length).to eq(2)
153
+ expect(subject.author.first).to eq("type"=>"Person", "name"=>"G. Fermi", "givenName"=>"G.", "familyName"=>"Fermi")
154
+ expect(subject.title).to eq("THE CRYSTAL STRUCTURE OF HUMAN DEOXYHAEMOGLOBIN AT 1.74 ANGSTROMS RESOLUTION")
155
+ expect(subject.description).to eq("x-ray diffraction structure")
156
+ expect(subject.date_published).to eq("1984-07-17")
157
+ expect(subject.date_modified).to eq("2014-05-27T16:45:59Z")
158
+ expect(subject.publisher).to eq("Protein Data Bank, Rutgers University")
135
159
  expect(subject.provider).to eq("Crossref")
136
160
  end
137
161
 
@@ -14,8 +14,9 @@ describe Bolognese::Metadata, vcr: true do
14
14
  expect(ris[8]).to eq("DO - 10.7554/elife.01567")
15
15
  expect(ris[9]).to eq("UR - http://elifesciences.org/lookup/doi/10.7554/eLife.01567")
16
16
  expect(ris[10]).to eq("PY - 2014")
17
- expect(ris[11]).to eq("VL - 3")
18
- expect(ris[12]).to eq("ER - ")
17
+ expect(ris[11]).to eq("PB - eLife Sciences Organisation, Ltd.")
18
+ expect(ris[12]).to eq("VL - 3")
19
+ expect(ris[13]).to eq("ER - ")
19
20
  end
20
21
 
21
22
  it "with pages" do
@@ -31,9 +32,10 @@ describe Bolognese::Metadata, vcr: true do
31
32
  expect(ris[11]).to eq("UR - http://www.hindawi.com/journals/pm/2012/291294/")
32
33
  expect(ris[12]).to start_with("AB - . To find a statistically significant separation point for the QuantiFERON")
33
34
  expect(ris[13]).to eq("PY - 2012")
34
- expect(ris[14]).to eq("VL - 2012")
35
- expect(ris[15]).to eq("SP - 1-7")
36
- expect(ris[16]).to eq("ER - ")
35
+ expect(ris[14]).to eq("PB - Hindawi Limited")
36
+ expect(ris[15]).to eq("VL - 2012")
37
+ expect(ris[16]).to eq("SP - 1-7")
38
+ expect(ris[17]).to eq("ER - ")
37
39
  end
38
40
 
39
41
  it "alternate name" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bolognese
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.42
4
+ version: 0.9.43
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fenner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-04 00:00:00.000000000 Z
11
+ date: 2017-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: maremma
@@ -550,6 +550,11 @@ files:
550
550
  - spec/fixtures/datacite_software_overlapping_keys.json
551
551
  - spec/fixtures/maremma/codemeta.json
552
552
  - spec/fixtures/schema_org.json
553
+ - spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_file/crossref/default.yml
554
+ - spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_file/crossref/to_bibtex.yml
555
+ - spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_file/crossref/to_crossref.yml
556
+ - spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_file/crossref/to_datacite.yml
557
+ - spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_file/crossref/to_schema_org.yml
553
558
  - spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/default.yml
554
559
  - spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_bibtex.yml
555
560
  - spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_citation.yml
@@ -615,10 +620,12 @@ files:
615
620
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/DOI_with_ORCID_ID.yml
616
621
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/DOI_with_SICI_DOI.yml
617
622
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/DOI_with_data_citation.yml
623
+ - spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/dataset.yml
618
624
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/date_in_future.yml
619
625
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_article.yml
620
626
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/not_found_error.yml
621
627
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/posted_content.yml
628
+ - spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_raw/journal_article.yml
622
629
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/BlogPosting.yml
623
630
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_in_test_system.yml
624
631
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_not_found.yml
@@ -764,6 +771,7 @@ files:
764
771
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/with_data_citation.yml
765
772
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crosscite/with_data_citation_schema_org.yml
766
773
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crossref/from_DataCite.yml
774
+ - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_crossref/journal_article.yml
767
775
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_json/maremma.yml
768
776
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_json/with_ORCID_ID.yml
769
777
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_datacite_json/with_data_citation.yml