commonmeta-ruby 3.5.5 → 3.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (274) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +16 -5
  3. data/lib/commonmeta/readers/crossref_xml_reader.rb +1 -1
  4. data/lib/commonmeta/utils.rb +6 -6
  5. data/lib/commonmeta/version.rb +1 -1
  6. data/spec/cli_spec.rb +8 -8
  7. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_file/crossref/default.yml +13 -13
  8. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_file/crossref/to_bibtex.yml +13 -13
  9. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_file/crossref/to_crossref_xml.yml +25 -25
  10. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_file/crossref/to_datacite.yml +13 -13
  11. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_file/crossref/to_schema_org.yml +13 -13
  12. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_file/crossref_xml/default.yml +7 -7
  13. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_file/crossref_xml/to_bibtex.yml +7 -7
  14. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_file/crossref_xml/to_crossref_xml.yml +7 -59
  15. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_file/crossref_xml/to_datacite.yml +7 -7
  16. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_file/crossref_xml/to_schema_org.yml +7 -7
  17. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/crossref/default.yml +24 -24
  18. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/crossref/to_bibtex.yml +24 -24
  19. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/crossref/to_citation.yml +24 -24
  20. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/crossref/to_crossref_xml.yml +24 -24
  21. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/crossref/to_datacite.yml +24 -24
  22. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/crossref/to_jats.yml +24 -24
  23. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/crossref/to_schema_org.yml +24 -24
  24. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/datacite/default.yml +16 -16
  25. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/datacite/to_bibtex.yml +16 -16
  26. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/datacite/to_citation.yml +16 -16
  27. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/datacite/to_datacite.yml +16 -16
  28. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/datacite/to_jats.yml +16 -16
  29. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/datacite/to_schema_org.yml +16 -16
  30. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/schema_org/default.yml +479 -946
  31. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/schema_org/to_crossref_xml.yml +957 -1891
  32. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/schema_org/to_datacite.yml +479 -946
  33. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_from_id/schema_org/to_schema_org.yml +481 -950
  34. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/encode/by_blog.yml +5540 -968
  35. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/encode/by_blog_unknown_blog_id.yml +22 -29
  36. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/encode/by_id.yml +25 -39
  37. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/encode/by_id_unknown_uuid.yml +18 -28
  38. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/find_from_format_by_id/crossref.yml +7 -7
  39. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/find_from_format_by_id/datacite.yml +7 -7
  40. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/find_from_format_by_id/jalc.yml +7 -7
  41. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/find_from_format_by_id/kisti.yml +7 -7
  42. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/find_from_format_by_id/medra.yml +7 -7
  43. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/find_from_format_by_id/op.yml +7 -7
  44. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/json_feed/json_feed_blog_id.yml +19 -90
  45. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/json_feed/json_feed_by_blog.yml +5578 -246
  46. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/json_feed/json_feed_not_indexed.yml +13 -2201
  47. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/json_feed/json_feed_unregistered.yml +176 -72
  48. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/change_metadata_as_datacite_xml/with_data_citation.yml +16 -16
  49. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/doi_registration_agency/crossref.yml +6 -6
  50. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/doi_registration_agency/datacite.yml +6 -6
  51. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/doi_registration_agency/jalc.yml +6 -6
  52. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/doi_registration_agency/kisti.yml +6 -6
  53. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/doi_registration_agency/medra.yml +6 -6
  54. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/doi_registration_agency/not_found.yml +6 -6
  55. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/doi_registration_agency/op.yml +6 -6
  56. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/find_from_format_by_ID/crossref.yml +6 -6
  57. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/find_from_format_by_ID/crossref_doi_not_url.yml +6 -6
  58. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/find_from_format_by_ID/datacite.yml +6 -6
  59. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/find_from_format_by_ID/datacite_doi_http.yml +6 -6
  60. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/find_from_format_by_ID/unknown_DOI_registration_agency.yml +6 -6
  61. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_blog_id_for_json_feed_item_id/by_blog_post_id.yml +27 -105
  62. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_blog_id_for_json_feed_item_id/not_found.yml +20 -27
  63. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_cff_metadata/cff-converter-python.yml +51 -25
  64. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_cff_metadata/ruby-cff.yml +12 -12
  65. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_cff_metadata/ruby-cff_repository_url.yml +9 -9
  66. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_codemeta_metadata/maremma.yml +10 -10
  67. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_codemeta_metadata/metadata_reports.yml +11 -11
  68. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/DOI_with_ORCID_ID.yml +78 -78
  69. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/DOI_with_SICI_DOI.yml +76 -76
  70. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/DOI_with_data_citation.yml +35 -35
  71. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/JaLC.yml +162 -162
  72. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/KISTI.yml +131 -131
  73. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/OP.yml +75 -75
  74. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/affiliation_is_space.yml +76 -76
  75. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/another_book.yml +113 -113
  76. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/another_book_chapter.yml +74 -74
  77. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/article_id_as_page_number.yml +77 -77
  78. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/author_literal.yml +84 -84
  79. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/book.yml +77 -77
  80. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/book_chapter.yml +75 -75
  81. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/book_chapter_with_RDF_for_container.yml +73 -73
  82. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/book_oup.yml +72 -72
  83. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/component.yml +94 -94
  84. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/dataset.yml +104 -104
  85. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/dataset_usda.yml +136 -136
  86. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/date_in_future.yml +80 -80
  87. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/dissertation.yml +103 -103
  88. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/empty_given_name.yml +75 -75
  89. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/invalid_date.yml +77 -77
  90. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/journal_article.yml +76 -76
  91. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/journal_article_original_language_title.yml +73 -73
  92. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/journal_article_with.yml +128 -210
  93. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/journal_article_with_RDF_for_container.yml +74 -74
  94. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/journal_article_with_funding.yml +76 -76
  95. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/journal_issue.yml +72 -72
  96. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/mEDRA.yml +72 -72
  97. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/markup.yml +81 -81
  98. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/missing_contributor.yml +71 -71
  99. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/multiple_issn.yml +75 -75
  100. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/multiple_titles.yml +71 -71
  101. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/multiple_titles_with_missing.yml +573 -573
  102. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/not_found_error.yml +65 -65
  103. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/peer_review.yml +77 -77
  104. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/posted_content.yml +74 -74
  105. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/posted_content_copernicus.yml +76 -76
  106. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/report_osti.yml +120 -120
  107. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/vor_with_url.yml +78 -78
  108. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/yet_another_book.yml +74 -74
  109. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/yet_another_book_chapter.yml +73 -73
  110. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_raw/journal_article.yml +59 -59
  111. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_datacite_metadata/SoftwareSourceCode.yml +4 -4
  112. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_datacite_metadata/dissertation.yml +13 -13
  113. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_datacite_metadata/funding_references.yml +15 -15
  114. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_datacite_metadata/subject_scheme.yml +120 -120
  115. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_doi_prefix_for_blog/by_blog_id.yml +5540 -555
  116. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_doi_prefix_for_blog/by_blog_post_id.yml +31 -42
  117. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_doi_prefix_for_blog/by_blog_post_id_specific_prefix.yml +25 -39
  118. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed/by_blog_id.yml +5540 -247
  119. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed/not_indexed_posts.yml +14 -26
  120. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed/unregistered_posts.yml +176 -72
  121. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/archived_wordpress_post.yml +27 -95
  122. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/blog_post_with_non-url_id.yml +28 -106
  123. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/blogger_post.yml +21 -65
  124. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/ghost_post_with_author_name_suffix.yml +20 -208
  125. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/ghost_post_with_doi.yml +26 -97
  126. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/ghost_post_with_institutional_author.yml +24 -55
  127. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/ghost_post_with_organizational_author.yml +27 -70
  128. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/ghost_post_with_related_identifiers.yml +41 -143
  129. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/ghost_post_with_related_identifiers_and_funding.yml +54 -132
  130. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/ghost_post_with_related_identifiers_and_link_to_peer-reviewed_article.yml +304 -818
  131. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/ghost_post_without_doi.yml +24 -169
  132. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/jekyll_post.yml +24 -63
  133. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/jekyll_post_with_anonymous_author.yml +25 -40
  134. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/substack_post_with_broken_reference.yml +278 -591
  135. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/syldavia_gazette_post_with_references.yml +59 -101
  136. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/upstream_post_with_references.yml +135 -331
  137. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/wordpress_post.yml +24 -134
  138. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/wordpress_post_with_many_references.yml +578 -2967
  139. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/wordpress_post_with_references.yml +44 -205
  140. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/wordpress_post_with_tracking_code_on_url.yml +26 -160
  141. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_one_author/affiliation_is_space.yml +21 -21
  142. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_one_author/has_familyName.yml +15 -15
  143. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_one_author/has_name_in_display-order_with_ORCID.yml +13 -13
  144. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_one_author/name_with_affiliation_crossref.yml +16 -16
  145. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_one_author/only_familyName_and_givenName.yml +66 -61
  146. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_schema_org_metadata/BlogPosting.yml +145 -146
  147. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_schema_org_metadata/BlogPosting_with_new_DOI.yml +149 -150
  148. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_schema_org_metadata/get_schema_org_metadata_front_matter/BlogPosting.yml +114 -115
  149. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_schema_org_metadata/harvard_dataverse.yml +300 -289
  150. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_schema_org_metadata/pangaea.yml +66 -61
  151. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_schema_org_metadata/upstream_blog.yml +64 -57
  152. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_schema_org_metadata/zenodo.yml +27 -24
  153. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/handle_input/DOI_RA_not_Crossref_or_DataCite.yml +6 -6
  154. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/handle_input/unknown_DOI_prefix.yml +6 -6
  155. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/json_schema_errors/is_valid.yml +16 -16
  156. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_bibtex/BlogPosting.yml +10 -10
  157. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_bibtex/Dataset.yml +10 -10
  158. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_bibtex/authors_with_affiliations.yml +16 -16
  159. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_bibtex/climate_data.yml +10 -10
  160. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_bibtex/from_schema_org.yml +145 -146
  161. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_bibtex/keywords_subject_scheme.yml +8 -8
  162. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_bibtex/maremma.yml +12 -12
  163. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_bibtex/text.yml +8 -8
  164. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_bibtex/with_data_citation.yml +16 -16
  165. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_bibtex/with_pages.yml +16 -16
  166. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_cff/Collection_of_Jupyter_notebooks.yml +13 -13
  167. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_cff/SoftwareSourceCode_Zenodo.yml +13 -13
  168. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_cff/SoftwareSourceCode_also_Zenodo.yml +8 -8
  169. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_cff/ruby-cff.yml +10 -10
  170. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_citation/Dataset.yml +10 -10
  171. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_citation/Journal_article.yml +16 -16
  172. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_citation/Journal_article_vancouver_style.yml +21 -21
  173. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_citation/Missing_author.yml +15 -15
  174. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_citation/interactive_resource_without_dates.yml +8 -8
  175. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_citation/software_w/version.yml +8 -8
  176. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_codemeta/SoftwareSourceCode_DataCite.yml +8 -8
  177. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_codemeta/SoftwareSourceCode_DataCite_check_codemeta_v2.yml +8 -8
  178. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_commonmeta/with_data_citation.yml +12 -12
  179. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/another_schema_org_from_front-matter.yml +32 -32
  180. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/journal_article.yml +5 -5
  181. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/journal_article_from_datacite.yml +5 -5
  182. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/journal_article_plos.yml +16 -16
  183. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/json_feed_item_from_rogue_scholar_with_anonymous_author.yml +25 -40
  184. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/json_feed_item_from_rogue_scholar_with_doi.yml +24 -134
  185. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/json_feed_item_from_rogue_scholar_with_organizational_author.yml +27 -70
  186. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/json_feed_item_from_rogue_scholar_with_relations.yml +41 -143
  187. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/json_feed_item_from_rogue_scholar_with_relations_and_funding.yml +55 -133
  188. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/json_feed_item_from_upstream_blog.yml +21 -224
  189. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/json_feed_item_with_references.yml +134 -330
  190. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/posted_content.yml +19 -19
  191. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/schema_org_from_another_science_blog.yml +9 -9
  192. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/schema_org_from_front_matter.yml +92 -91
  193. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/schema_org_from_upstream_blog.yml +6 -6
  194. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csl/Another_dataset.yml +8 -8
  195. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csl/BlogPosting.yml +10 -10
  196. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csl/BlogPosting_schema_org.yml +146 -147
  197. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csl/Dataset.yml +10 -10
  198. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csl/container_title.yml +16 -21
  199. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csl/interactive_resource_without_dates.yml +8 -8
  200. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csl/journal_article.yml +16 -16
  201. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csl/keywords_subject_scheme.yml +8 -8
  202. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csl/maremma.yml +10 -10
  203. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csl/missing_creator.yml +15 -15
  204. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csl/multiple_abstracts.yml +8 -8
  205. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csl/organization_author.yml +22 -22
  206. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csl/software.yml +8 -8
  207. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csl/software_w/version.yml +8 -8
  208. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csl/with_only_first_page.yml +16 -16
  209. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csl/with_pages.yml +16 -16
  210. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csv/climate_data.yml +10 -10
  211. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csv/maremma.yml +10 -10
  212. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csv/text.yml +8 -8
  213. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csv/with_data_citation.yml +16 -16
  214. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_csv/with_pages.yml +16 -16
  215. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_datacite/dissertation.yml +20 -20
  216. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_datacite/from_schema_org.yml +146 -147
  217. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_datacite/journal_article.yml +22 -22
  218. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_datacite/maremma.yml +10 -10
  219. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_datacite/with_ORCID_ID.yml +16 -16
  220. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_datacite/with_data_citation.yml +16 -16
  221. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_jats_xml/Dataset_in_schema_4_0.yml +10 -10
  222. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_jats_xml/Text_pass-thru.yml +8 -8
  223. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_jats_xml/book_chapter.yml +15 -15
  224. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_jats_xml/from_schema_org.yml +146 -147
  225. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_jats_xml/interactive_resource_without_dates.yml +8 -8
  226. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_jats_xml/maremma.yml +10 -10
  227. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_jats_xml/with_ORCID_ID.yml +16 -16
  228. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_jats_xml/with_data_citation.yml +16 -16
  229. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_jats_xml/with_editor.yml +17 -17
  230. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_ris/BlogPosting.yml +10 -10
  231. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_ris/BlogPosting_schema_org.yml +145 -146
  232. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_ris/Dataset.yml +10 -10
  233. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_ris/alternate_name.yml +8 -8
  234. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_ris/journal_article.yml +9 -9
  235. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_ris/keywords_with_subject_scheme.yml +8 -8
  236. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_ris/maremma.yml +10 -10
  237. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_ris/with_pages.yml +10 -10
  238. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_schema_org/Another_Schema_org_JSON.yml +10 -10
  239. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_schema_org/Funding.yml +13 -13
  240. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_schema_org/Funding_OpenAIRE.yml +13 -13
  241. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_schema_org/Schema_org_JSON.yml +8 -8
  242. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_schema_org/Schema_org_JSON_Cyark.yml +13 -13
  243. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_schema_org/alternate_identifiers.yml +13 -13
  244. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_schema_org/data_catalog.yml +13 -13
  245. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_schema_org/geo_location_box.yml +13 -13
  246. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_schema_org/interactive_resource_without_dates.yml +13 -13
  247. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_schema_org/journal_article.yml +16 -16
  248. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_schema_org/maremma_schema_org_JSON.yml +11 -11
  249. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_schema_org/series_information.yml +17 -16
  250. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_schema_org/subject_scheme.yml +15 -15
  251. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_schema_org/subject_scheme_multiple_keywords.yml +13 -13
  252. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_turtle/BlogPosting.yml +10 -10
  253. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_turtle/Dataset.yml +10 -10
  254. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_turtle/journal_article.yml +16 -16
  255. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_turtle/with_pages.yml +16 -16
  256. data/spec/readers/cff_reader_spec.rb +2 -20
  257. data/spec/readers/crossref_reader_spec.rb +10 -16
  258. data/spec/readers/crossref_xml_reader_spec.rb +61 -64
  259. data/spec/readers/json_feed_reader_spec.rb +56 -56
  260. data/spec/readers/schema_org_reader_spec.rb +1 -1
  261. data/spec/utils_spec.rb +1 -1
  262. data/spec/writers/crossref_xml_writer_spec.rb +9 -8
  263. data/spec/writers/csv_writer_spec.rb +1 -1
  264. data/spec/writers/ris_writer_spec.rb +2 -2
  265. metadata +2 -11
  266. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/convert_file/crossref_xml/to_crossref_xml_refresh.yml +0 -107
  267. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/doi_prefix/doi_prefix_by_blog.yml +0 -997
  268. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/doi_prefix/doi_prefix_by_uuid.yml +0 -256
  269. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/encode/by_uuid.yml +0 -256
  270. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/encode/by_uuid_unknown_uuid.yml +0 -49
  271. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/missing_creator.yml +0 -307
  272. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_doi_prefix_for_blog/by_blog_post_uuid.yml +0 -136
  273. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_doi_prefix_for_blog/by_blog_post_uuid_specific_prefix.yml +0 -256
  274. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/book_oup.yml +0 -107
@@ -15,7 +15,7 @@ describe Commonmeta::Metadata, vcr: true do
15
15
  it "DOI with data citation" do
16
16
  input = "10.7554/eLife.01567"
17
17
  subject = described_class.new(input: input, from: "crossref_xml")
18
- # expect(subject.valid?).to be true
18
+ expect(subject.valid?).to be true
19
19
  expect(subject.id).to eq("https://doi.org/10.7554/elife.01567")
20
20
  expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "e01567",
21
21
  "alternateIdentifierType" => "article_number" }])
@@ -58,7 +58,7 @@ describe Commonmeta::Metadata, vcr: true do
58
58
  it "journal article" do
59
59
  input = "https://doi.org/10.1371/journal.pone.0000030"
60
60
  subject = described_class.new(input: input, from: "crossref_xml")
61
- # expect(subject.valid?).to be true
61
+ expect(subject.valid?).to be true
62
62
  expect(subject.id).to eq("https://doi.org/10.1371/journal.pone.0000030")
63
63
  expect(subject.url).to eq("https://dx.plos.org/10.1371/journal.pone.0000030")
64
64
  expect(subject.type).to eq("JournalArticle")
@@ -91,7 +91,7 @@ describe Commonmeta::Metadata, vcr: true do
91
91
  it "journal article with funding" do
92
92
  input = "https://doi.org/10.3389/fpls.2019.00816"
93
93
  subject = described_class.new(input: input, from: "crossref_xml")
94
- # expect(subject.valid?).to be true
94
+ expect(subject.valid?).to be true
95
95
  expect(subject.id).to eq("https://doi.org/10.3389/fpls.2019.00816")
96
96
  expect(subject.url).to eq("https://www.frontiersin.org/article/10.3389/fpls.2019.00816/full")
97
97
  expect(subject.type).to eq("JournalArticle")
@@ -124,7 +124,7 @@ describe Commonmeta::Metadata, vcr: true do
124
124
  it "journal article original language title" do
125
125
  input = "https://doi.org/10.7600/jspfsm.56.60"
126
126
  subject = described_class.new(input: input, from: "crossref_xml")
127
- # expect(subject.valid?).to be true
127
+ expect(subject.valid?).to be true
128
128
  expect(subject.id).to eq("https://doi.org/10.7600/jspfsm.56.60")
129
129
  expect(subject.url).to eq("https://www.jstage.jst.go.jp/article/jspfsm/56/1/56_1_60/_article/-char/ja")
130
130
  expect(subject.type).to eq("JournalArticle")
@@ -145,7 +145,7 @@ describe Commonmeta::Metadata, vcr: true do
145
145
  it "journal article with RDF for container" do
146
146
  input = "https://doi.org/10.1163/1937240X-00002096"
147
147
  subject = described_class.new(input: input, from: "crossref_xml")
148
- # expect(subject.valid?).to be true
148
+ expect(subject.valid?).to be true
149
149
  expect(subject.id).to eq("https://doi.org/10.1163/1937240x-00002096")
150
150
  expect(subject.url).to eq("https://academic.oup.com/jcb/article-lookup/doi/10.1163/1937240X-00002096")
151
151
  expect(subject.type).to eq("JournalArticle")
@@ -170,7 +170,7 @@ describe Commonmeta::Metadata, vcr: true do
170
170
  it "book chapter with RDF for container" do
171
171
  input = "10.1007/978-3-642-33191-6_49"
172
172
  subject = described_class.new(input: input, from: "crossref_xml")
173
- # expect(subject.valid?).to be true
173
+ expect(subject.valid?).to be true
174
174
  expect(subject.id).to eq("https://doi.org/10.1007/978-3-642-33191-6_49")
175
175
  expect(subject.url).to eq("http://link.springer.com/10.1007/978-3-642-33191-6_49")
176
176
  expect(subject.type).to eq("BookChapter")
@@ -185,14 +185,14 @@ describe Commonmeta::Metadata, vcr: true do
185
185
  expect(subject.references.length).to eq(11)
186
186
  expect(subject.references.first).to eq("key" => "49_CR1")
187
187
  expect(subject.container).to eq("identifier" => "1611-3349", "identifierType" => "ISSN",
188
- "title" => "Lecture Notes in Computer Science", "type" => "Book Series")
188
+ "title" => "Lecture Notes in Computer Science", "type" => "BookSeries")
189
189
  expect(subject.provider).to eq("Crossref")
190
190
  end
191
191
 
192
192
  it "posted_content" do
193
193
  input = "https://doi.org/10.1101/097196"
194
194
  subject = described_class.new(input: input, from: "crossref_xml")
195
- # expect(subject.valid?).to be true
195
+ expect(subject.valid?).to be true
196
196
  expect(subject.url).to eq("http://biorxiv.org/lookup/doi/10.1101/097196")
197
197
  expect(subject.type).to eq("Article")
198
198
  expect(subject.contributors.count).to eq(11)
@@ -206,7 +206,7 @@ describe Commonmeta::Metadata, vcr: true do
206
206
  expect(subject.descriptions.first["description"]).to start_with("This article presents a practical roadmap")
207
207
  expect(subject.date).to include("published" => "2017-10-09",
208
208
  "registered" => "2019-07-16",
209
- "updated" => "2020-01-18")
209
+ "updated" => "2020-01-17")
210
210
  expect(subject.publisher).to eq("name" => "Cold Spring Harbor Laboratory")
211
211
  expect(subject.provider).to eq("Crossref")
212
212
  end
@@ -214,7 +214,7 @@ describe Commonmeta::Metadata, vcr: true do
214
214
  it "peer review" do
215
215
  input = "https://doi.org/10.7554/elife.55167.sa2"
216
216
  subject = described_class.new(input: input, from: "crossref_xml")
217
- # expect(subject.valid?).to be true
217
+ expect(subject.valid?).to be true
218
218
  expect(subject.id).to eq("https://doi.org/10.7554/elife.55167.sa2")
219
219
  expect(subject.url).to eq("https://elifesciences.org/articles/55167#sa2")
220
220
  expect(subject.type).to eq("PeerReview")
@@ -234,7 +234,7 @@ describe Commonmeta::Metadata, vcr: true do
234
234
  it "dissertation" do
235
235
  input = "https://doi.org/10.14264/uql.2020.791"
236
236
  subject = described_class.new(input: input, from: "crossref_xml")
237
- # expect(subject.valid?).to be true
237
+ expect(subject.valid?).to be true
238
238
  expect(subject.url).to eq("http://espace.library.uq.edu.au/view/UQ:23a1e74")
239
239
  expect(subject.type).to eq("Dissertation")
240
240
  expect(subject.contributors).to eq([{ "familyName" => "Collingwood",
@@ -253,7 +253,7 @@ describe Commonmeta::Metadata, vcr: true do
253
253
  it "DOI with SICI DOI" do
254
254
  input = "https://doi.org/10.1890/0012-9658(2006)87[2832:tiopma]2.0.co;2"
255
255
  subject = described_class.new(input: input, from: "crossref_xml")
256
- # expect(subject.valid?).to be true
256
+ expect(subject.valid?).to be true
257
257
  expect(subject.id).to eq("https://doi.org/10.1890/0012-9658(2006)87%255b2832:tiopma%255d2.0.co;2")
258
258
  expect(subject.url).to eq("http://doi.wiley.com/10.1890/0012-9658(2006)87%5B2832:TIOPMA%5D2.0.CO;2")
259
259
  expect(subject.type).to eq("JournalArticle")
@@ -277,7 +277,7 @@ describe Commonmeta::Metadata, vcr: true do
277
277
  it "DOI with ORCID ID" do
278
278
  input = "https://doi.org/10.1155/2012/291294"
279
279
  subject = described_class.new(input: input, from: "crossref_xml")
280
- # expect(subject.valid?).to be true
280
+ expect(subject.valid?).to be true
281
281
  expect(subject.id).to eq("https://doi.org/10.1155/2012/291294")
282
282
  expect(subject.url).to eq("http://www.hindawi.com/journals/pm/2012/291294")
283
283
  expect(subject.type).to eq("JournalArticle")
@@ -303,7 +303,7 @@ describe Commonmeta::Metadata, vcr: true do
303
303
  it "date in future" do
304
304
  input = "https://doi.org/10.1016/j.ejphar.2015.03.018"
305
305
  subject = described_class.new(input: input, from: "crossref_xml")
306
- # expect(subject.valid?).to be true
306
+ expect(subject.valid?).to be true
307
307
  expect(subject.id).to eq("https://doi.org/10.1016/j.ejphar.2015.03.018")
308
308
  expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "S0014299915002332",
309
309
  "alternateIdentifierType" => "sequence-number" }])
@@ -315,7 +315,7 @@ describe Commonmeta::Metadata, vcr: true do
315
315
  expect(subject.titles).to eq([{ "title" => "Paving the path to HIV neurotherapy: Predicting SIV CNS disease" }])
316
316
  expect(subject.date).to include("published" => "2015-07",
317
317
  "registered" => "2016-08-16",
318
- "updated" => "2020-08-31")
318
+ "updated" => "2023-08-09")
319
319
  expect(subject.publisher).to eq("name" => "Elsevier BV")
320
320
  expect(subject.references.length).to eq(98)
321
321
  expect(subject.references.last).to eq("containerTitle" => "HIV Med.",
@@ -334,7 +334,7 @@ describe Commonmeta::Metadata, vcr: true do
334
334
  it "vor with url" do
335
335
  input = "https://doi.org/10.1038/hdy.2013.26"
336
336
  subject = described_class.new(input: input, from: "crossref_xml")
337
- # expect(subject.valid?).to be true
337
+ expect(subject.valid?).to be true
338
338
  expect(subject.id).to eq("https://doi.org/10.1038/hdy.2013.26")
339
339
  expect(subject.url).to eq("https://www.nature.com/articles/hdy201326")
340
340
  expect(subject.type).to eq("JournalArticle")
@@ -362,7 +362,7 @@ describe Commonmeta::Metadata, vcr: true do
362
362
  it "dataset" do
363
363
  input = "10.2210/pdb4hhb/pdb"
364
364
  subject = described_class.new(input: input, from: "crossref_xml")
365
- # expect(subject.valid?).to be true
365
+ expect(subject.valid?).to be true
366
366
  expect(subject.id).to eq("https://doi.org/10.2210/pdb4hhb/pdb")
367
367
  expect(subject.url).to eq("https://www.wwpdb.org/pdb?id=pdb_00004hhb")
368
368
  expect(subject.type).to eq("Other")
@@ -382,7 +382,7 @@ describe Commonmeta::Metadata, vcr: true do
382
382
  it "component" do
383
383
  input = "10.1371/journal.pmed.0030277.g001"
384
384
  subject = described_class.new(input: input, from: "crossref_xml")
385
- # expect(subject.valid?).to be true
385
+ expect(subject.valid?).to be true
386
386
  expect(subject.id).to eq("https://doi.org/10.1371/journal.pmed.0030277.g001")
387
387
  expect(subject.url).to eq("https://dx.plos.org/10.1371/journal.pmed.0030277.g001")
388
388
  expect(subject.type).to eq("Other")
@@ -397,7 +397,7 @@ describe Commonmeta::Metadata, vcr: true do
397
397
  it "dataset usda" do
398
398
  input = "https://doi.org/10.2737/RDS-2018-0001"
399
399
  subject = described_class.new(input: input, from: "crossref_xml")
400
- # # expect(subject.valid?).to be true
400
+ # expect(subject.valid?).to be true
401
401
  expect(subject.id).to eq("https://doi.org/10.2737/rds-2018-0001")
402
402
  expect(subject.url).to eq("https://www.fs.usda.gov/rds/archive/Catalog/RDS-2018-0001")
403
403
  expect(subject.type).to eq("Dataset")
@@ -416,7 +416,7 @@ describe Commonmeta::Metadata, vcr: true do
416
416
  it "book chapter" do
417
417
  input = "https://doi.org/10.1007/978-3-662-46370-3_13"
418
418
  subject = described_class.new(input: input, from: "crossref_xml")
419
- # expect(subject.valid?).to be true
419
+ expect(subject.valid?).to be true
420
420
  expect(subject.id).to eq("https://doi.org/10.1007/978-3-662-46370-3_13")
421
421
  expect(subject.url).to eq("https://link.springer.com/10.1007/978-3-662-46370-3_13")
422
422
  expect(subject.type).to eq("BookChapter")
@@ -440,7 +440,8 @@ describe Commonmeta::Metadata, vcr: true do
440
440
  it "another book chapter" do
441
441
  input = "https://doi.org/10.1007/978-3-319-75889-3_1"
442
442
  subject = described_class.new(input: input, from: "crossref_xml")
443
- # expect(subject.valid?).to be true
443
+ puts subject.errors unless subject.valid?
444
+ expect(subject.valid?).to be true
444
445
  expect(subject.id).to eq("https://doi.org/10.1007/978-3-319-75889-3_1")
445
446
  expect(subject.url).to eq("http://link.springer.com/10.1007/978-3-319-75889-3_1")
446
447
  expect(subject.type).to eq("BookChapter")
@@ -452,7 +453,7 @@ describe Commonmeta::Metadata, vcr: true do
452
453
  "updated" => "2019-10-16")
453
454
  expect(subject.publisher).to eq("name" => "Springer Science and Business Media LLC")
454
455
  expect(subject.provider).to eq("Crossref")
455
- expect(subject.container["type"]).to eq("Book Series")
456
+ expect(subject.container["type"]).to eq("BookSeries")
456
457
  expect(subject.container["title"]).to eq("SpringerBriefs in Medical Earth Sciences")
457
458
  expect(subject.container["identifier"]).to eq("2523-3629")
458
459
  expect(subject.container["identifierType"]).to eq("ISSN")
@@ -461,7 +462,7 @@ describe Commonmeta::Metadata, vcr: true do
461
462
  it "yet another book chapter" do
462
463
  input = "https://doi.org/10.4018/978-1-4666-1891-6.ch004"
463
464
  subject = described_class.new(input: input, from: "crossref_xml")
464
- # expect(subject.valid?).to be true
465
+ expect(subject.valid?).to be true
465
466
  expect(subject.id).to eq("https://doi.org/10.4018/978-1-4666-1891-6.ch004")
466
467
  expect(subject.url).to eq("http://services.igi-global.com/resolvedoi/resolve.aspx?doi=10.4018/978-1-4666-1891-6.ch004")
467
468
  expect(subject.type).to eq("BookChapter")
@@ -482,7 +483,7 @@ describe Commonmeta::Metadata, vcr: true do
482
483
  it "missing contributor" do
483
484
  input = "https://doi.org/10.3390/publications6020015"
484
485
  subject = described_class.new(input: input, from: "crossref_xml")
485
- # expect(subject.valid?).to be true
486
+ expect(subject.valid?).to be true
486
487
  expect(subject.id).to eq("https://doi.org/10.3390/publications6020015")
487
488
  expect(subject.url).to eq("https://www.mdpi.com/2304-6775/6/2/15")
488
489
  expect(subject.type).to eq("JournalArticle")
@@ -505,7 +506,7 @@ describe Commonmeta::Metadata, vcr: true do
505
506
  it "book" do
506
507
  input = "https://doi.org/10.1017/9781108348843"
507
508
  subject = described_class.new(input: input, from: "crossref_xml")
508
- # expect(subject.valid?).to be true
509
+ expect(subject.valid?).to be true
509
510
  expect(subject.id).to eq("https://doi.org/10.1017/9781108348843")
510
511
  expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "9781108348843",
511
512
  "alternateIdentifierType" => "ISBN" }])
@@ -516,7 +517,7 @@ describe Commonmeta::Metadata, vcr: true do
516
517
  expect(subject.titles).to eq([{ "title" => "The Politics of the Past in Early China" }])
517
518
  expect(subject.date).to eq("published" => "2019-07-01",
518
519
  "registered" => "2019-07-06",
519
- "updated" => "2022-09-22")
520
+ "updated" => "2023-09-17")
520
521
  expect(subject.publisher).to eq("name" => "Cambridge University Press (CUP)")
521
522
  expect(subject.provider).to eq("Crossref")
522
523
  end
@@ -524,7 +525,7 @@ describe Commonmeta::Metadata, vcr: true do
524
525
  it "another book" do
525
526
  input = "https://doi.org/10.2973/odp.proc.ir.180.2000"
526
527
  subject = described_class.new(input: input, from: "crossref_xml")
527
- # expect(subject.valid?).to be true
528
+ expect(subject.valid?).to be true
528
529
  expect(subject.id).to eq("https://doi.org/10.2973/odp.proc.ir.180.2000")
529
530
  expect(subject.url).to eq("http://www-odp.tamu.edu/publications/180_IR/180TOC.HTM")
530
531
  expect(subject.type).to eq("Book")
@@ -542,7 +543,8 @@ describe Commonmeta::Metadata, vcr: true do
542
543
  it "yet another book" do
543
544
  input = "https://doi.org/10.1029/ar035"
544
545
  subject = described_class.new(input: input, from: "crossref_xml")
545
- # expect(subject.valid?).to be true
546
+ puts subject.errors unless subject.valid?
547
+ expect(subject.valid?).to be true
546
548
  expect(subject.id).to eq("https://doi.org/10.1029/ar035")
547
549
  expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "0-87590-181-6",
548
550
  "alternateIdentifierType" => "ISBN" }])
@@ -563,14 +565,14 @@ describe Commonmeta::Metadata, vcr: true do
563
565
  "title" => "Latitudinal gradients in tertiary mol-luscan faunas of the Pacific coast",
564
566
  "volume" => "8")
565
567
  expect(subject.container).to eq("identifier" => "0066-4634", "identifierType" => "ISSN",
566
- "title" => "Antarctic Research Series", "type" => "Book Series", "volume" => "35")
568
+ "title" => "Antarctic Research Series", "type" => "BookSeries", "volume" => "35")
567
569
  expect(subject.provider).to eq("Crossref")
568
570
  end
569
571
 
570
572
  it "mEDRA" do
571
573
  input = "https://doi.org/10.3280/ecag2018-001005"
572
574
  subject = described_class.new(input: input, from: "crossref_xml")
573
- # expect(subject.valid?).to be true
575
+ expect(subject.valid?).to be true
574
576
  expect(subject.id).to eq("https://doi.org/10.3280/ecag2018-001005")
575
577
  expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "5",
576
578
  "alternateIdentifierType" => "article_number" }])
@@ -589,7 +591,7 @@ describe Commonmeta::Metadata, vcr: true do
589
591
  it "KISTI" do
590
592
  input = "https://doi.org/10.5012/bkcs.2013.34.10.2889"
591
593
  subject = described_class.new(input: input, from: "crossref_xml")
592
- # expect(subject.valid?).to be true
594
+ expect(subject.valid?).to be true
593
595
  expect(subject.id).to eq("https://doi.org/10.5012/bkcs.2013.34.10.2889")
594
596
  expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "JCGMCS_2013_v34n10_2889",
595
597
  "alternateIdentifierType" => "Publisher ID" }])
@@ -601,7 +603,7 @@ describe Commonmeta::Metadata, vcr: true do
601
603
  expect(subject.titles).to eq([{ "title" => "Synthesis, Crystal Structure and Theoretical Calculation of a Novel Nickel(II) Complex with Dibromotyrosine and 1,10-Phenanthroline" }])
602
604
  expect(subject.date).to eq("published" => "2013-10-20",
603
605
  "registered" => "2013-11-25",
604
- "updated" => "2016-12-14")
606
+ "updated" => "2016-12-15")
605
607
  expect(subject.publisher).to eq("name" => "Korean Chemical Society")
606
608
  expect(subject.provider).to eq("KISTI")
607
609
  end
@@ -609,7 +611,7 @@ describe Commonmeta::Metadata, vcr: true do
609
611
  it "JaLC" do
610
612
  input = "https://doi.org/10.1241/johokanri.39.979"
611
613
  subject = described_class.new(input: input, from: "crossref_xml")
612
- # expect(subject.valid?).to be true
614
+ expect(subject.valid?).to be true
613
615
  expect(subject.id).to eq("https://doi.org/10.1241/johokanri.39.979")
614
616
  expect(subject.url).to eq("http://joi.jlc.jst.go.jp/JST.JSTAGE/johokanri/39.979?from=CrossRef")
615
617
  expect(subject.type).to eq("JournalArticle")
@@ -625,7 +627,7 @@ describe Commonmeta::Metadata, vcr: true do
625
627
  it "OP" do
626
628
  input = "https://doi.org/10.2903/j.efsa.2018.5239"
627
629
  subject = described_class.new(input: input, from: "crossref_xml")
628
- # expect(subject.valid?).to be true
630
+ expect(subject.valid?).to be true
629
631
  expect(subject.id).to eq("https://doi.org/10.2903/j.efsa.2018.5239")
630
632
  expect(subject.url).to eq("http://doi.wiley.com/10.2903/j.efsa.2018.5239")
631
633
  expect(subject.type).to eq("JournalArticle")
@@ -643,7 +645,7 @@ describe Commonmeta::Metadata, vcr: true do
643
645
  it "multiple titles" do
644
646
  input = "https://doi.org/10.4000/dms.865"
645
647
  subject = described_class.new(input: input, from: "crossref_xml")
646
- # expect(subject.valid?).to be true
648
+ expect(subject.valid?).to be true
647
649
  expect(subject.id).to eq("https://doi.org/10.4000/dms.865")
648
650
  expect(subject.url).to eq("http://journals.openedition.org/dms/865")
649
651
  expect(subject.type).to eq("JournalArticle")
@@ -691,7 +693,7 @@ describe Commonmeta::Metadata, vcr: true do
691
693
  it "markup" do
692
694
  input = "https://doi.org/10.1098/rspb.2017.0132"
693
695
  subject = described_class.new(input: input, from: "crossref_xml")
694
- # expect(subject.valid?).to be true
696
+ expect(subject.valid?).to be true
695
697
  expect(subject.id).to eq("https://doi.org/10.1098/rspb.2017.0132")
696
698
  expect(subject.url).to eq("https://royalsocietypublishing.org/doi/10.1098/rspb.2017.0132")
697
699
  expect(subject.type).to eq("JournalArticle")
@@ -711,7 +713,7 @@ describe Commonmeta::Metadata, vcr: true do
711
713
  it "empty given name" do
712
714
  input = "https://doi.org/10.1111/J.1865-1682.2010.01171.X"
713
715
  subject = described_class.new(input: input, from: "crossref_xml")
714
- # expect(subject.valid?).to be true
716
+ expect(subject.valid?).to be true
715
717
  expect(subject.id).to eq("https://doi.org/10.1111/j.1865-1682.2010.01171.x")
716
718
  expect(subject.url).to eq("https://onlinelibrary.wiley.com/doi/10.1111/j.1865-1682.2010.01171.x")
717
719
  expect(subject.type).to eq("JournalArticle")
@@ -728,7 +730,8 @@ describe Commonmeta::Metadata, vcr: true do
728
730
  it "invalid date" do
729
731
  input = "https://doi.org/10.1055/s-0039-1690894"
730
732
  subject = described_class.new(input: input, from: "crossref_xml")
731
- # expect(subject.valid?).to be true
733
+ puts subject.errors unless subject.valid?
734
+ expect(subject.valid?).to be true
732
735
  expect(subject.id).to eq("https://doi.org/10.1055/s-0039-1690894")
733
736
  expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "s-0039-1690894",
734
737
  "alternateIdentifierType" => "sequence-number" }])
@@ -748,30 +751,24 @@ describe Commonmeta::Metadata, vcr: true do
748
751
  it "journal article with" do
749
752
  input = "https://doi.org/10.1111/nph.14619"
750
753
  subject = described_class.new(input: input, from: "crossref_xml")
751
- # expect(subject.valid?).to be true
754
+ # puts subject.errors unless subject.valid?
755
+ expect(subject.valid?).to be false
752
756
  expect(subject.id).to eq("https://doi.org/10.1111/nph.14619")
753
- expect(subject.url).to eq("https://onlinelibrary.wiley.com/doi/10.1111/nph.14619")
757
+ expect(subject.url).to eq("https://nph.onlinelibrary.wiley.com/doi/10.1111/nph.14619")
754
758
  expect(subject.type).to eq("JournalArticle")
755
759
  expect(subject.contributors.length).to eq(3)
756
760
  expect(subject.contributors.first).to eq("type" => "Person", "contributorRoles" => ["Author"],
757
761
  "id" => "https://orcid.org/0000-0002-4156-3761",
758
- "givenName" => "Nico", "familyName" => "Dissmeyer", "affiliation" => [{ "name" => "Independent Junior Research Group on Protein Recognition and Degradation; Leibniz Institute of Plant Biochemistry (IPB); Weinberg 3 Halle (Saale) D-06120 Germany" }, { "name" => "ScienceCampus Halle - Plant-based Bioeconomy; Betty-Heimann-Strasse 3 Halle (Saale) D-06120 Germany" }])
759
- expect(subject.titles).to eq([{ "title" => "Life and death of proteins after protease cleavage: protein degradation by the N-end rule pathway" }])
762
+ "givenName" => "Nico", "familyName" => "Dissmeyer", "affiliation" => [{ "name" => "Independent Junior Research Group on Protein Recognition and Degradation Leibniz Institute of Plant Biochemistry (IPB) Weinberg 3 Halle (Saale) D06120 Germany" }, { "name" => "ScienceCampus Halle Plantbased Bioeconomy BettyHeimannStrasse 3 Halle (Saale) D06120 Germany" }])
763
+ expect(subject.titles).to eq([{ "title" => "Life and death of proteins after protease cleavage: protein degradation by the Nend rule pathway" }])
760
764
  expect(subject.license).to eq("url" => "http://onlinelibrary.wiley.com/termsAndConditions#vor")
761
- expect(subject.date).to include("published" => "2018-05",
762
- "registered" => "2018-08-03",
763
- "updated" => "2021-07-07")
765
+ expect(subject.date).to include("published" => "2017-06-05",
766
+ "registered" => "2023-09-10",
767
+ "updated" => "2023-09-12")
764
768
  expect(subject.publisher).to eq("name" => "Wiley")
765
769
  expect(subject.references.length).to eq(49)
766
- expect(subject.references.last).to eq("containerTitle" => "Proteomics",
767
- "contributor" => "Zhang",
768
- "doi" => "https://doi.org/10.1002/pmic.201400530",
769
- "firstPage" => "2447",
770
- "key" => "10.1111/nph.14619-BIB0049|nph14619-cit-0049",
771
- "publicationYear" => "2015",
772
- "title" => "Quantitative proteomics analysis of the Arg/N-end rule pathway of targeted degradation in Arabidopsis roots",
773
- "volume" => "15")
774
- expect(subject.container).to eq("firstPage" => "929", "identifier" => "0028-646X",
770
+ expect(subject.references.last).to eq("doi"=>"https://doi.org/10.1002/pmic.201400530", "key"=>"e_1_2_7_50_1")
771
+ expect(subject.container).to eq("firstPage" => "929", "identifier" => "1469-8137",
775
772
  "identifierType" => "ISSN", "issue" => "3", "lastPage" => "935", "title" => "New Phytologist", "type" => "Journal", "volume" => "218")
776
773
  expect(subject.provider).to eq("Crossref")
777
774
  end
@@ -779,7 +776,7 @@ describe Commonmeta::Metadata, vcr: true do
779
776
  it "author literal" do
780
777
  input = "https://doi.org/10.1038/ng.3834"
781
778
  subject = described_class.new(input: input, from: "crossref_xml")
782
- # expect(subject.valid?).to be true
779
+ expect(subject.valid?).to be true
783
780
  expect(subject.id).to eq("https://doi.org/10.1038/ng.3834")
784
781
  expect(subject.url).to eq("https://www.nature.com/articles/ng.3834")
785
782
  expect(subject.type).to eq("JournalArticle")
@@ -796,7 +793,7 @@ describe Commonmeta::Metadata, vcr: true do
796
793
  it "affiliation is space" do
797
794
  input = "https://doi.org/10.1177/0042098011428175"
798
795
  subject = described_class.new(input: input, from: "crossref_xml")
799
- # expect(subject.valid?).to be true
796
+ expect(subject.valid?).to be true
800
797
  expect(subject.id).to eq("https://doi.org/10.1177/0042098011428175")
801
798
  expect(subject.url).to eq("http://journals.sagepub.com/doi/10.1177/0042098011428175")
802
799
  expect(subject.type).to eq("JournalArticle")
@@ -814,7 +811,7 @@ describe Commonmeta::Metadata, vcr: true do
814
811
  it "multiple issn" do
815
812
  input = "https://doi.org/10.1007/978-3-642-34922-5_19"
816
813
  subject = described_class.new(input: input, from: "crossref_xml")
817
- # expect(subject.valid?).to be true
814
+ expect(subject.valid?).to be true
818
815
  expect(subject.id).to eq("https://doi.org/10.1007/978-3-642-34922-5_19")
819
816
  expect(subject.url).to eq("https://link.springer.com/10.1007/978-3-642-34922-5_19")
820
817
  expect(subject.type).to eq("BookChapter")
@@ -827,14 +824,14 @@ describe Commonmeta::Metadata, vcr: true do
827
824
  "updated" => "2023-02-17")
828
825
  expect(subject.publisher).to eq("name" => "Springer Science and Business Media LLC")
829
826
  expect(subject.container).to eq("identifier" => "1860-0808", "identifierType" => "ISSN",
830
- "title" => "Studies in Fuzziness and Soft Computing", "type" => "Book Series")
827
+ "title" => "Studies in Fuzziness and Soft Computing", "type" => "BookSeries")
831
828
  expect(subject.provider).to eq("Crossref")
832
829
  end
833
830
 
834
831
  it "article id as page number" do
835
832
  input = "https://doi.org/10.1103/physrevlett.120.117701"
836
833
  subject = described_class.new(input: input, from: "crossref_xml")
837
- # expect(subject.valid?).to be true
834
+ expect(subject.valid?).to be true
838
835
  expect(subject.id).to eq("https://doi.org/10.1103/physrevlett.120.117701")
839
836
  expect(subject.url).to eq("https://link.aps.org/doi/10.1103/PhysRevLett.120.117701")
840
837
  expect(subject.type).to eq("JournalArticle")
@@ -854,7 +851,7 @@ describe Commonmeta::Metadata, vcr: true do
854
851
  it "posted content copernicus" do
855
852
  input = "https://doi.org/10.5194/CP-2020-95"
856
853
  subject = described_class.new(input: input, from: "crossref_xml")
857
- # expect(subject.valid?).to be true
854
+ expect(subject.valid?).to be true
858
855
  expect(subject.url).to eq("https://cp.copernicus.org/preprints/cp-2020-95/cp-2020-95.pdf")
859
856
  expect(subject.type).to eq("Article")
860
857
  expect(subject.contributors.count).to eq(6)
@@ -873,7 +870,7 @@ describe Commonmeta::Metadata, vcr: true do
873
870
  it "book oup" do
874
871
  input = "10.1093/oxfordhb/9780198746140.013.5"
875
872
  subject = described_class.new(input: input, from: "crossref_xml")
876
- # expect(subject.valid?).to be true
873
+ expect(subject.valid?).to be true
877
874
  expect(subject.url).to eq("https://academic.oup.com/edited-volume/28081/chapter/212116415")
878
875
  expect(subject.type).to eq("Book")
879
876
  expect(subject.contributors.count).to eq(3)
@@ -897,7 +894,7 @@ describe Commonmeta::Metadata, vcr: true do
897
894
  it "report osti" do
898
895
  input = "10.2172/972169"
899
896
  subject = described_class.new(input: input, from: "crossref_xml")
900
- # expect(subject.valid?).to be true
897
+ expect(subject.valid?).to be true
901
898
  expect(subject.url).to eq("http://www.osti.gov/servlets/purl/972169-1QXROM")
902
899
  expect(subject.type).to eq("Report")
903
900
  expect(subject.contributors.count).to eq(4)
@@ -912,7 +909,7 @@ describe Commonmeta::Metadata, vcr: true do
912
909
  expect(subject.descriptions.empty?).to be(true)
913
910
  expect(subject.date).to include("published" => "2010-01-01",
914
911
  "registered" => "2010-02-18",
915
- "updated" => "2010-02-18")
912
+ "updated" => "2010-02-19")
916
913
  expect(subject.publisher).to eq("name" => "Office of Scientific and Technical Information (OSTI)")
917
914
  expect(subject.provider).to eq("Crossref")
918
915
  end
@@ -920,7 +917,7 @@ describe Commonmeta::Metadata, vcr: true do
920
917
  it "journal issue" do
921
918
  input = "https://doi.org/10.6002/ect.2015.0371"
922
919
  subject = described_class.new(input: input, from: "crossref_xml")
923
- # expect(subject.valid?).to be true
920
+ expect(subject.valid?).to be true
924
921
  expect(subject.id).to eq("https://doi.org/10.6002/ect.2015.0371")
925
922
  expect(subject.url).to eq("http://ectrx.org/forms/ectrxcontentshow.php?doi_id=10.6002/ect.2015.0371")
926
923
  expect(subject.type).to eq("JournalIssue")