commonmeta-ruby 3.2.5 → 3.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +16 -2
- data/commonmeta.gemspec +1 -0
- data/lib/commonmeta/author_utils.rb +20 -3
- data/lib/commonmeta/cli.rb +17 -21
- data/lib/commonmeta/crossref_utils.rb +22 -18
- data/lib/commonmeta/readers/json_feed_reader.rb +31 -11
- data/lib/commonmeta/utils.rb +13 -3
- data/lib/commonmeta/version.rb +1 -1
- data/resources/crossref/common5.3.1.xsd +43 -35
- data/spec/author_utils_spec.rb +38 -0
- data/spec/cli_spec.rb +5 -7
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/json_feed/blog_post_uuid.yml +980 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/json_feed_unregistered/blog_post_uuid.yml +49 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed/unregistered_posts.yml +215 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/blogger_post.yml +20 -11
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/ghost_post_with_author_name_suffix.yml +215 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/ghost_post_with_doi.yml +14 -9
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/ghost_post_without_doi.yml +9 -8
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/jekyll_post.yml +15 -10
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/syldavia_gazette_post_with_references.yml +328 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/upstream_post_with_references.yml +824 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/wordpress_post.yml +14 -9
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/wordpress_post_with_references.yml +390 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/{json_feed_url → json_feed_unregistered_url}/all_posts.yml +11 -11
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/another_schema_org_from_front-matter.yml +103 -105
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/journal_article.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/journal_article_from_datacite.yml +4 -4
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/json_feed_item_from_rogue_scholar_with_doi.yml +60 -9
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/json_feed_item_from_upstream_blog.yml +55 -7
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/json_feed_item_with_references.yml +824 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/posted_content.yml +17 -17
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/schema_org_from_another_science_blog.yml +12 -8
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/schema_org_from_front_matter.yml +178 -181
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/schema_org_from_upstream_blog.yml +104 -92
- data/spec/readers/json_feed_reader_spec.rb +106 -30
- data/spec/utils_spec.rb +23 -11
- data/spec/writers/crossref_xml_writer_spec.rb +31 -3
- metadata +25 -8
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/json_feed_url/front-matter_blog.yml +0 -221
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/json_item_from_rogue_scholar_with_doi.yml +0 -163
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/json_item_from_upstream_blog.yml +0 -243
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/json_post_from_rogue_scholar_with_doi.yml +0 -210
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/json_post_from_upstream_blog.yml +0 -290
@@ -21,7 +21,7 @@ http_interactions:
|
|
21
21
|
Server:
|
22
22
|
- nginx/1.14.0 (Ubuntu)
|
23
23
|
Date:
|
24
|
-
-
|
24
|
+
- Wed, 14 Jun 2023 08:10:50 GMT
|
25
25
|
Transfer-Encoding:
|
26
26
|
- chunked
|
27
27
|
Connection:
|
@@ -35,7 +35,7 @@ http_interactions:
|
|
35
35
|
body:
|
36
36
|
encoding: ASCII-8BIT
|
37
37
|
string: ''
|
38
|
-
recorded_at:
|
38
|
+
recorded_at: Wed, 14 Jun 2023 08:10:50 GMT
|
39
39
|
- request:
|
40
40
|
method: get
|
41
41
|
uri: https://upstream.force11.org/deep-dive-into-ethics-of-contributor-roles/
|
@@ -57,11 +57,11 @@ http_interactions:
|
|
57
57
|
Server:
|
58
58
|
- nginx/1.14.0 (Ubuntu)
|
59
59
|
Date:
|
60
|
-
-
|
60
|
+
- Wed, 14 Jun 2023 08:10:51 GMT
|
61
61
|
Content-Type:
|
62
62
|
- text/html; charset=utf-8
|
63
63
|
Content-Length:
|
64
|
-
- '
|
64
|
+
- '130693'
|
65
65
|
Connection:
|
66
66
|
- close
|
67
67
|
X-Powered-By:
|
@@ -69,7 +69,7 @@ http_interactions:
|
|
69
69
|
Cache-Control:
|
70
70
|
- public, max-age=0
|
71
71
|
Etag:
|
72
|
-
- W/"
|
72
|
+
- W/"1fe85-gizdaJBZu/EnYgVEsbZCexoGQ2o"
|
73
73
|
Vary:
|
74
74
|
- Accept-Encoding
|
75
75
|
body:
|
@@ -470,38 +470,37 @@ http_interactions:
|
|
470
470
|
/>\n <meta name=\"dc.type\" content=\"article\" />\n <meta name=\"dc.rights\"
|
471
471
|
content=\"https://creativecommons.org/licenses/by/4.0/legalcode\" />\n\n <link
|
472
472
|
rel=\"icon\" href=\"https://upstream.force11.org/content/images/size/w256h256/2022/09/force11-avatar.png\"
|
473
|
-
type=\"image/png\"
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
property=\"og:type\" content=\"article\"
|
473
|
+
type=\"image/png\">\n <link rel=\"canonical\" href=\"http://doi.org/10.54900/rf84ag3-98f00rt-0phta\">\n
|
474
|
+
\ <meta name=\"referrer\" content=\"no-referrer-when-downgrade\">\n <link
|
475
|
+
rel=\"amphtml\" href=\"https://upstream.force11.org/deep-dive-into-ethics-of-contributor-roles/amp/\">\n
|
476
|
+
\ \n <meta property=\"og:site_name\" content=\"Upstream\">\n <meta
|
477
|
+
property=\"og:type\" content=\"article\">\n <meta property=\"og:title\"
|
478
478
|
content=\"Deep dive into ethics of Contributor Roles: report of a FORCE11
|
479
|
-
workshop\"
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
content=\"
|
504
|
-
/>\n \n <script type=\"application/ld+json\">\n{\n \"@context\":
|
479
|
+
workshop\">\n <meta property=\"og:description\" content=\"The FORCE11 attribution
|
480
|
+
working group held a workshop during the 2021 FORCE conference to explore
|
481
|
+
some ethical aspects of using Contributor Roles (CRs). This workshop provided
|
482
|
+
an overview of various CRs and their practical values in terms of providing
|
483
|
+
a better recognition of the wide range of scholarly contributions.\n\nAmong\">\n
|
484
|
+
\ <meta property=\"og:url\" content=\"http://doi.org/10.54900/rf84ag3-98f00rt-0phta\">\n
|
485
|
+
\ <meta property=\"og:image\" content=\"https://upstream.force11.org/content/images/2022/08/nick-fewings-GoXNygZlftg-unsplash.jpg\">\n
|
486
|
+
\ <meta property=\"article:published_time\" content=\"2022-01-20T09:00:00.000Z\">\n
|
487
|
+
\ <meta property=\"article:modified_time\" content=\"2023-01-06T21:14:26.000Z\">\n
|
488
|
+
\ <meta property=\"article:tag\" content=\"News\">\n \n <meta name=\"twitter:card\"
|
489
|
+
content=\"summary_large_image\">\n <meta name=\"twitter:title\" content=\"Deep
|
490
|
+
dive into ethics of Contributor Roles: report of a FORCE11 workshop\">\n <meta
|
491
|
+
name=\"twitter:description\" content=\"The FORCE11 attribution working group
|
492
|
+
held a workshop during the 2021 FORCE conference to explore some ethical aspects
|
493
|
+
of using Contributor Roles (CRs). This workshop provided an overview of various
|
494
|
+
CRs and their practical values in terms of providing a better recognition
|
495
|
+
of the wide range of scholarly contributions.\n\nAmong\">\n <meta name=\"twitter:url\"
|
496
|
+
content=\"http://doi.org/10.54900/rf84ag3-98f00rt-0phta\">\n <meta name=\"twitter:image\"
|
497
|
+
content=\"https://upstream.force11.org/content/images/2022/08/nick-fewings-GoXNygZlftg-unsplash.jpg\">\n
|
498
|
+
\ <meta name=\"twitter:label1\" content=\"Written by\">\n <meta name=\"twitter:data1\"
|
499
|
+
content=\"Mohammad Hosseini\">\n <meta name=\"twitter:label2\" content=\"Filed
|
500
|
+
under\">\n <meta name=\"twitter:data2\" content=\"News\">\n <meta name=\"twitter:site\"
|
501
|
+
content=\"@UpstreamBlog\">\n <meta name=\"twitter:creator\" content=\"@mhmd_hosseini\">\n
|
502
|
+
\ <meta property=\"og:image:width\" content=\"2000\">\n <meta property=\"og:image:height\"
|
503
|
+
content=\"1333\">\n \n <script type=\"application/ld+json\">\n{\n \"@context\":
|
505
504
|
\"https://schema.org\",\n \"@type\": \"Article\",\n \"publisher\": {\n
|
506
505
|
\ \"@type\": \"Organization\",\n \"name\": \"Upstream\",\n \"url\":
|
507
506
|
\"https://upstream.force11.org/\",\n \"logo\": {\n \"@type\":
|
@@ -525,12 +524,11 @@ http_interactions:
|
|
525
524
|
of the wide range of scholarly contributions.\\n\\nAmong developed CRs, the
|
526
525
|
CRediT taxonomy has been the most successful in terms of adoption by journals
|
527
526
|
and prominence among the scholarly community. CASRAI and its community engage\",\n
|
528
|
-
\ \"mainEntityOfPage\":
|
529
|
-
\
|
530
|
-
|
531
|
-
|
532
|
-
\
|
533
|
-
data-ghost=\"https://upstream.force11.org/\" data-key=\"5c1b6ee01f44f70c7feb624aab\"
|
527
|
+
\ \"mainEntityOfPage\": \"https://upstream.force11.org/deep-dive-into-ethics-of-contributor-roles/\"\n}\n
|
528
|
+
\ </script>\n\n <meta name=\"generator\" content=\"Ghost 5.49\">\n <link
|
529
|
+
rel=\"alternate\" type=\"application/rss+xml\" title=\"Upstream\" href=\"https://upstream.force11.org/latest/rss/\">\n
|
530
|
+
\ <script defer src=\"https://cdn.jsdelivr.net/ghost/portal@~2.33/umd/portal.min.js\"
|
531
|
+
data-i18n=\"false\" data-ghost=\"https://upstream.force11.org/\" data-key=\"5c1b6ee01f44f70c7feb624aab\"
|
534
532
|
data-api=\"https://upstream.force11.org/ghost/api/content/\" crossorigin=\"anonymous\"></script><style
|
535
533
|
id=\"gh-members-styles\">.gh-post-upgrade-cta-content,\n.gh-post-upgrade-cta
|
536
534
|
{\n display: flex;\n flex-direction: column;\n align-items: center;\n
|
@@ -551,9 +549,10 @@ http_interactions:
|
|
551
549
|
{\n opacity: 0.92;\n}</style>\n <script defer src=\"https://cdn.jsdelivr.net/ghost/sodo-search@~1.1/umd/sodo-search.min.js\"
|
552
550
|
data-key=\"5c1b6ee01f44f70c7feb624aab\" data-styles=\"https://cdn.jsdelivr.net/ghost/sodo-search@~1.1/umd/main.css\"
|
553
551
|
data-sodo-search=\"https://upstream.force11.org/\" crossorigin=\"anonymous\"></script>\n
|
554
|
-
\ <
|
555
|
-
rel=\"
|
556
|
-
\ <
|
552
|
+
\ \n <link href=\"https://upstream.force11.org/webmentions/receive/\"
|
553
|
+
rel=\"webmention\">\n <script defer src=\"/public/cards.min.js?v=250d1aa540\"></script>\n
|
554
|
+
\ <link rel=\"stylesheet\" type=\"text/css\" href=\"/public/cards.min.css?v=250d1aa540\">\n
|
555
|
+
\ <script defer src=\"/public/comment-counts.min.js?v=250d1aa540\" data-ghost-comments-counts-api=\"https://upstream.force11.org/members/api/comments/counts/\"></script>\n
|
557
556
|
\ <script async=\"\" defer=\"\" data-domain=\"upstream.force11.org\" src=\"https://plausible.io/js/plausible.js\"></script>\n<script>window.plausible
|
558
557
|
= window.plausible || function() { (window.plausible.q = window.plausible.q
|
559
558
|
|| []).push(arguments) }</script><style>:root {--ghost-accent-color: #8cbfd0;}</style>\n</head>\n
|
@@ -911,6 +910,19 @@ http_interactions:
|
|
911
910
|
\ <span class='u-hidden u-block'> and </span>\n\n <a href='/author/jeroen-bosman/'>Jeroen
|
912
911
|
Bosman</a>\n</div>\n <time class='c-timestamp c-card__timestamp' datetime='2022-10-25'>\n
|
913
912
|
\ October 25, 2022\n\n</time> </div>\n </div>\n</article> <article
|
913
|
+
class='js-card c-card c-card-- c-card-- post tag-news'>\n <a href='/the-research-software-alliance-resa/'
|
914
|
+
class='c-card__media'>\n <img\n class='c-card__image lazyload'\n
|
915
|
+
\ alt=\"The Research Software Alliance (ReSA)\"\n data-src='/content/images/size/w1304/2023/04/resa-logo-7.png'\n
|
916
|
+
\ >\n </a>\n\n <div class='c-card__content'>\n <div class='c-card__tag
|
917
|
+
c-tag'>\n <a href=\"/tag/news/\">News</a>\n </div>\n\n <h3
|
918
|
+
class='c-card__headline'><a href='/the-research-software-alliance-resa/' class='c-card__link'>The
|
919
|
+
Research Software Alliance (ReSA)</a></h3>\n\n\n <div class='c-card__meta'>\n
|
920
|
+
\ <div class='c-byline c-card__byline'>\n <span class='u-hidden '>, </span>\n
|
921
|
+
\ <span class='u-hidden '> and </span>\n\n <a href='/author/danielskatz/'>Daniel
|
922
|
+
S. Katz</a>\n <span class=' u-hidden'>, </span>\n <span class='u-hidden
|
923
|
+
u-block'> and </span>\n\n <a href='/author/michelle/'>Michelle
|
924
|
+
Barker</a>\n</div>\n <time class='c-timestamp c-card__timestamp' datetime='2023-04-18'>\n
|
925
|
+
\ April 18, 2023\n\n</time> </div>\n </div>\n</article> <article
|
914
926
|
class='js-card c-card c-card-- c-card-- post tag-news'>\n <a href='/rogue-scholar/'
|
915
927
|
class='c-card__media'>\n <img\n class='c-card__image lazyload'\n
|
916
928
|
\ alt=\"The Rogue Scholar: An Archive for Scholarly blogs\"\n data-src='https://images.unsplash.com/photo-1528590005476-4f5a6f2bdd9e?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDV8fHJlY29yZHxlbnwwfHx8fDE2NzUxNzg3Mjk&ixlib=rb-4.0.3&q=80&w=1304'\n
|
@@ -944,59 +956,59 @@ http_interactions:
|
|
944
956
|
\ <div class='c-section-heading'>\n <h2 class='c-section-heading__title'>Latest</h2>\n
|
945
957
|
\ </div>\n </div>\n\n <div class='o-grid o-grid--4-columns'>\n
|
946
958
|
\ <article class='js-card c-card c-card-- c-card-- post tag-thought-pieces
|
947
|
-
featured'>\n <a href='/
|
948
|
-
|
949
|
-
|
959
|
+
featured'>\n <a href='/navigating-data-intensive-innovation-the-transition-from-research-data-management-to-research-data-governance/'
|
960
|
+
class='c-card__media'>\n <img\n class='c-card__image lazyload'\n
|
961
|
+
\ alt=\"Navigating data-intensive innovation: The transition from research
|
962
|
+
data management to research data governance\"\n data-src='/content/images/size/w1304/2023/06/alina-grubnyak-ZiQkhI7417A-unsplash.jpg'\n
|
950
963
|
\ >\n </a>\n\n <div class='c-card__content'>\n <div class='c-card__tag
|
951
964
|
c-tag'>\n <a href=\"/tag/thought-pieces/\">Thought Pieces</a>\n </div>\n\n
|
952
|
-
\ <h3 class='c-card__headline'><a href='/
|
953
|
-
class='c-card__link'>
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
\ <
|
958
|
-
|
959
|
-
\
|
960
|
-
|
961
|
-
\ <a href='/the-preprint-revolution-implications-for-bibliographic-databases/'
|
965
|
+
\ <h3 class='c-card__headline'><a href='/navigating-data-intensive-innovation-the-transition-from-research-data-management-to-research-data-governance/'
|
966
|
+
class='c-card__link'>Navigating data-intensive innovation: The transition
|
967
|
+
from research data management to research data governance</a></h3>\n\n\n <div
|
968
|
+
class='c-card__meta'>\n <div class='c-byline c-card__byline'>\n <span
|
969
|
+
class='u-hidden u-hidden'>, </span>\n <span class='u-hidden '> and </span>\n\n
|
970
|
+
\ <a href='/author/andrea/'>Andrea Chiarelli</a>\n</div>\n <time class='c-timestamp
|
971
|
+
c-card__timestamp' datetime='2023-06-06'>\n June 6, 2023\n\n</time> </div>\n
|
972
|
+
\ </div>\n</article> <article class='js-card c-card c-card-- c-card--
|
973
|
+
post tag-original-research'>\n <a href='/attempts-at-automating-journal-subject-classification/'
|
962
974
|
class='c-card__media'>\n <img\n class='c-card__image lazyload'\n
|
963
|
-
\ alt=\"
|
964
|
-
\ data-src='https://images.unsplash.com/photo-1673124247113-a44d3c6ccbc5?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDEzMnx8c3RhcnMlMjBhYnN0cmFjdHxlbnwwfHx8fDE2NzY1NzYyMTU&ixlib=rb-4.0.3&q=80&w=1304'\n
|
975
|
+
\ alt=\"Fiber optics with lightbulbs on black background\"\n data-src='/content/images/size/w1304/2023/05/esha-subject-blog.jpg'\n
|
965
976
|
\ >\n </a>\n\n <div class='c-card__content'>\n <div class='c-card__tag
|
966
977
|
c-tag'>\n <a href=\"/tag/original-research/\">Original Research</a>\n
|
967
|
-
\ </div>\n\n <h3 class='c-card__headline'><a href='/
|
968
|
-
class='c-card__link'>
|
969
|
-
|
970
|
-
|
971
|
-
'> and </span>\n\n <a href='/author/
|
972
|
-
\
|
973
|
-
\
|
974
|
-
c-
|
975
|
-
\
|
976
|
-
c-
|
977
|
-
|
978
|
-
|
978
|
+
\ </div>\n\n <h3 class='c-card__headline'><a href='/attempts-at-automating-journal-subject-classification/'
|
979
|
+
class='c-card__link'>Attempts at automating journal subject classification</a></h3>\n\n\n
|
980
|
+
\ <div class='c-card__meta'>\n <div class='c-byline c-card__byline'>\n
|
981
|
+
\ <span class='u-hidden u-hidden'>, </span>\n <span class='u-hidden
|
982
|
+
'> and </span>\n\n <a href='/author/esha/'>Esha Datta</a>\n</div>\n
|
983
|
+
\ <time class='c-timestamp c-card__timestamp' datetime='2023-05-23'>\n
|
984
|
+
\ May 23, 2023\n\n</time> </div>\n </div>\n</article> <article
|
985
|
+
class='js-card c-card c-card-- c-card-- post tag-thought-pieces featured'>\n
|
986
|
+
\ <a href='/opening-new-paths-to-technology-transfer/' class='c-card__media'>\n
|
987
|
+
\ <img\n class='c-card__image lazyload'\n alt=\"Opening
|
988
|
+
New Paths to Technology Transfer: Open Science, Intellectual Property, and
|
989
|
+
Technology Transfer\"\n data-src='https://images.unsplash.com/photo-1512314889357-e157c22f938d?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDN8fGlkZWF8ZW58MHx8fHwxNjgzNTMyNjc1&ixlib=rb-4.0.3&q=80&w=1304'\n
|
979
990
|
\ >\n </a>\n\n <div class='c-card__content'>\n <div class='c-card__tag
|
980
991
|
c-tag'>\n <a href=\"/tag/thought-pieces/\">Thought Pieces</a>\n </div>\n\n
|
981
|
-
\ <h3 class='c-card__headline'><a href='/
|
982
|
-
|
983
|
-
|
984
|
-
\ <span class='u-hidden '> and </span>\n\n <a href='/author/carolina/'>Carolina
|
985
|
-
Tanigushi</a>\n <span class=' u-hidden'>, </span>\n <span class='u-hidden
|
986
|
-
u-block'> and </span>\n\n <a href='/author/gabi/'>Gabi Mejias</a>\n</div>\n
|
987
|
-
\ <time class='c-timestamp c-card__timestamp' datetime='2023-02-07'>\n
|
988
|
-
\ February 7, 2023\n\n</time> </div>\n </div>\n</article> <article
|
989
|
-
class='js-card c-card c-card-- c-card-- post tag-news'>\n <a href='/rogue-scholar/'
|
990
|
-
class='c-card__media'>\n <img\n class='c-card__image lazyload'\n
|
991
|
-
\ alt=\"The Rogue Scholar: An Archive for Scholarly blogs\"\n data-src='https://images.unsplash.com/photo-1528590005476-4f5a6f2bdd9e?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDV8fHJlY29yZHxlbnwwfHx8fDE2NzUxNzg3Mjk&ixlib=rb-4.0.3&q=80&w=1304'\n
|
992
|
-
\ >\n </a>\n\n <div class='c-card__content'>\n <div class='c-card__tag
|
993
|
-
c-tag'>\n <a href=\"/tag/news/\">News</a>\n </div>\n\n <h3
|
994
|
-
class='c-card__headline'><a href='/rogue-scholar/' class='c-card__link'>The
|
995
|
-
Rogue Scholar: An Archive for Scholarly blogs</a></h3>\n\n\n <div class='c-card__meta'>\n
|
992
|
+
\ <h3 class='c-card__headline'><a href='/opening-new-paths-to-technology-transfer/'
|
993
|
+
class='c-card__link'>Opening New Paths to Technology Transfer: Open Science,
|
994
|
+
Intellectual Property, and Technology Transfer</a></h3>\n\n\n <div class='c-card__meta'>\n
|
996
995
|
\ <div class='c-byline c-card__byline'>\n <span class='u-hidden u-hidden'>, </span>\n
|
997
|
-
\ <span class='u-hidden '> and </span>\n\n <a href='/author/
|
998
|
-
|
999
|
-
|
996
|
+
\ <span class='u-hidden '> and </span>\n\n <a href='/author/dylan/'>Dylan
|
997
|
+
Roskams-Edris</a>\n</div>\n <time class='c-timestamp c-card__timestamp'
|
998
|
+
datetime='2023-05-09'>\n May 9, 2023\n\n</time> </div>\n </div>\n</article>
|
999
|
+
\ <article class='js-card c-card c-card-- c-card-- post tag-open-tabs
|
1000
|
+
featured'>\n <a href='/patricio-panataleo-open-tabs/' class='c-card__media'>\n
|
1001
|
+
\ <img\n class='c-card__image lazyload'\n alt=\"Patricio
|
1002
|
+
Pantaleo is Keeping Tabs on Open Research\"\n data-src='/content/images/size/w1304/2023/04/alice-donovan-rouse-yu68fUQDvOI-unsplash.jpg'\n
|
1003
|
+
\ >\n </a>\n\n <div class='c-card__content'>\n <div class='c-card__tag
|
1004
|
+
c-tag'>\n <a href=\"/tag/open-tabs/\">Open Tabs</a>\n </div>\n\n
|
1005
|
+
\ <h3 class='c-card__headline'><a href='/patricio-panataleo-open-tabs/'
|
1006
|
+
class='c-card__link'>Patricio Pantaleo is Keeping Tabs on Open Research</a></h3>\n\n\n
|
1007
|
+
\ <div class='c-card__meta'>\n <div class='c-byline c-card__byline'>\n
|
1008
|
+
\ <span class='u-hidden u-hidden'>, </span>\n <span class='u-hidden
|
1009
|
+
'> and </span>\n\n <a href='/author/patricio_pantaleo/'>Patricio
|
1010
|
+
Pantaleo</a>\n</div>\n <time class='c-timestamp c-card__timestamp' datetime='2023-04-25'>\n
|
1011
|
+
\ April 25, 2023\n\n</time> </div>\n </div>\n</article> </div>\n
|
1000
1012
|
\ </div>\n\n </main>\n\n <footer class='c-footer'>\n <div class='o-grid
|
1001
1013
|
c-footer__content'>\n <div class='c-logo'>\n <div class='c-logo__dark'>\n
|
1002
1014
|
\ <a href='https://upstream.force11.org' class='u-block'>\n <img
|
@@ -1019,7 +1031,7 @@ http_interactions:
|
|
1019
1031
|
\ <span class='u-screenreader'>RSS</span>\n </a>\n </li>\n</ul>\n\n
|
1020
1032
|
\ <div class='c-footer-copy'>\n © 2023 Upstream\n <span>
|
1021
1033
|
– Published with <a href='https://ghost.org'>Ghost</a> & <a href='https://aspirethemes.com/themes/tripoli'>Tripoli</a></span>\n
|
1022
|
-
\ </div>\n </div>\n</footer>\n <script src='/assets/js/app.min.js?v=
|
1034
|
+
\ </div>\n </div>\n</footer>\n <script src='/assets/js/app.min.js?v=250d1aa540'></script>\n
|
1023
1035
|
\ \n </body>\n</html>"
|
1024
|
-
recorded_at:
|
1036
|
+
recorded_at: Wed, 14 Jun 2023 08:10:51 GMT
|
1025
1037
|
recorded_with: VCR 6.1.0
|
@@ -12,6 +12,7 @@ describe Commonmeta::Metadata, vcr: true do
|
|
12
12
|
expect(subject.valid?).to be true
|
13
13
|
expect(subject.id).to eq('https://iphylo.blogspot.com/2023/05/ten-years-and-million-links.html')
|
14
14
|
expect(subject.url).to eq('https://iphylo.blogspot.com/2023/05/ten-years-and-million-links.html')
|
15
|
+
expect(subject.alternate_identifiers).to eq([{"alternateIdentifier"=>"f3629c86-06e0-42c0-844a-266b03a91ef1", "alternateIdentifierType"=>"UUID"}])
|
15
16
|
expect(subject.type).to eq('Article')
|
16
17
|
expect(subject.creators.length).to eq(1)
|
17
18
|
expect(subject.creators.first).to eq("familyName"=>"Page", "givenName"=>"Roderic", "type"=>"Person")
|
@@ -19,7 +20,7 @@ describe Commonmeta::Metadata, vcr: true do
|
|
19
20
|
expect(subject.license).to eq('id' => 'CC-BY-4.0',
|
20
21
|
'url' => 'https://creativecommons.org/licenses/by/4.0/legalcode')
|
21
22
|
expect(subject.date).to eq('published' => '2023-05-31')
|
22
|
-
expect(subject.descriptions).to
|
23
|
+
expect(subject.descriptions.first['description']).to start_with("As trailed on a Twitter thread last week I’ve been working on a manuscript describing the efforts to map taxonomic names to their original descriptions in the taxonomic literature.")
|
23
24
|
expect(subject.publisher).to eq('name' => 'iPhylo')
|
24
25
|
expect(subject.subjects).to be_nil
|
25
26
|
expect(subject.language).to eq('en')
|
@@ -32,6 +33,7 @@ describe Commonmeta::Metadata, vcr: true do
|
|
32
33
|
expect(subject.valid?).to be true
|
33
34
|
expect(subject.id).to eq('https://doi.org/10.53731/4nwxn-frt36')
|
34
35
|
expect(subject.url).to eq('https://blog.front-matter.io/posts/does-it-compose')
|
36
|
+
expect(subject.alternate_identifiers).to eq([{"alternateIdentifier"=>"5bb66e92-5cb9-4659-8aca-20e486b695c9", "alternateIdentifierType"=>"UUID"}])
|
35
37
|
expect(subject.type).to eq('Article')
|
36
38
|
expect(subject.creators.length).to eq(1)
|
37
39
|
expect(subject.creators.first).to eq("id" => "https://orcid.org/0000-0003-1419-2405", "familyName"=>"Fenner", "givenName"=>"Martin", "type"=>"Person")
|
@@ -39,11 +41,11 @@ describe Commonmeta::Metadata, vcr: true do
|
|
39
41
|
expect(subject.license).to eq('id' => 'CC-BY-4.0',
|
40
42
|
'url' => 'https://creativecommons.org/licenses/by/4.0/legalcode')
|
41
43
|
expect(subject.date).to eq('published' => '2023-05-16', 'updated' => '2023-05-16')
|
42
|
-
expect(subject.descriptions).to
|
44
|
+
expect(subject.descriptions.first['description']).to start_with("One question I have increasingly asked myself in the past few years. Meaning Can I run this open source software using Docker containers and a Docker Compose file?")
|
43
45
|
expect(subject.publisher).to eq('name' => 'Front Matter')
|
44
46
|
expect(subject.subjects).to eq([{"subject"=>"news"}])
|
45
47
|
expect(subject.language).to eq('en')
|
46
|
-
expect(subject.container).to eq("identifier"=>"https://blog.front-matter.io
|
48
|
+
expect(subject.container).to eq("identifier"=>"https://blog.front-matter.io", "identifierType"=>"URL", "title"=>"Front Matter", "type"=>"Periodical")
|
47
49
|
end
|
48
50
|
|
49
51
|
it 'ghost post without doi' do
|
@@ -52,6 +54,7 @@ describe Commonmeta::Metadata, vcr: true do
|
|
52
54
|
expect(subject.valid?).to be true
|
53
55
|
expect(subject.id).to eq('https://www.ideasurg.pub/residency-visual-abstract')
|
54
56
|
expect(subject.url).to eq('https://www.ideasurg.pub/residency-visual-abstract')
|
57
|
+
expect(subject.alternate_identifiers).to eq([{"alternateIdentifier"=>"c3095752-2af0-40a4-a229-3ceb7424bce2", "alternateIdentifierType"=>"UUID"}])
|
55
58
|
expect(subject.type).to eq('Article')
|
56
59
|
expect(subject.creators.length).to eq(1)
|
57
60
|
expect(subject.creators.first).to eq("familyName"=>"Sathe", "givenName"=>"Tejas S.", "type"=>"Person")
|
@@ -59,19 +62,65 @@ describe Commonmeta::Metadata, vcr: true do
|
|
59
62
|
expect(subject.license).to eq('id' => 'CC-BY-4.0',
|
60
63
|
'url' => 'https://creativecommons.org/licenses/by/4.0/legalcode')
|
61
64
|
expect(subject.date).to eq('published' => '2023-04-08')
|
62
|
-
expect(subject.descriptions).to
|
65
|
+
expect(subject.descriptions.first['description']).to start_with("A graphical, user-friendly tool for programs to highlight important data to prospective applicants")
|
63
66
|
expect(subject.publisher).to eq('name' => 'I.D.E.A.S.')
|
64
67
|
expect(subject.subjects).to be_nil
|
65
68
|
expect(subject.language).to eq('en')
|
66
69
|
expect(subject.container).to eq("identifier"=>"https://www.ideasurg.pub/", "identifierType"=>"URL", "title"=>"I.D.E.A.S.", "type"=>"Periodical")
|
67
70
|
end
|
68
71
|
|
72
|
+
it 'ghost post with author name suffix' do
|
73
|
+
input = 'https://rogue-scholar.org/api/posts/6179ad80-cc7f-4904-9260-0ecb3c3a90ba'
|
74
|
+
subject = described_class.new(input: input)
|
75
|
+
expect(subject.valid?).to be true
|
76
|
+
expect(subject.id).to eq('https://www.ideasurg.pub/academic-powerhouse')
|
77
|
+
expect(subject.url).to eq('https://www.ideasurg.pub/academic-powerhouse')
|
78
|
+
expect(subject.alternate_identifiers).to eq([{"alternateIdentifier"=>"6179ad80-cc7f-4904-9260-0ecb3c3a90ba", "alternateIdentifierType"=>"UUID"}])
|
79
|
+
expect(subject.type).to eq('Article')
|
80
|
+
expect(subject.creators.length).to eq(1)
|
81
|
+
expect(subject.creators.first).to eq("familyName"=>"Sathe", "givenName"=>"Tejas S.", "type"=>"Person")
|
82
|
+
expect(subject.titles).to eq([{"title"=>"How to Build an Academic Powerhouse: Let's Study Who's Doing it"}])
|
83
|
+
expect(subject.license).to eq('id' => 'CC-BY-4.0',
|
84
|
+
'url' => 'https://creativecommons.org/licenses/by/4.0/legalcode')
|
85
|
+
expect(subject.date).to eq('published' => '2023-06-03')
|
86
|
+
expect(subject.descriptions.first['description']).to start_with("A Data Exploration with Public Data from the Academic Surgical Congress")
|
87
|
+
expect(subject.publisher).to eq('name' => 'I.D.E.A.S.')
|
88
|
+
expect(subject.subjects).to eq([{"subject"=>"pre-print"}])
|
89
|
+
expect(subject.language).to eq('en')
|
90
|
+
expect(subject.container).to eq("identifier"=>"https://www.ideasurg.pub/", "identifierType"=>"URL", "title"=>"I.D.E.A.S.", "type"=>"Periodical")
|
91
|
+
expect(subject.references).to be_nil
|
92
|
+
end
|
93
|
+
|
94
|
+
it 'syldavia gazette post with references' do
|
95
|
+
input = 'https://rogue-scholar.org/api/posts/0022b9ef-525a-4a79-81ad-13411697f58a'
|
96
|
+
subject = described_class.new(input: input)
|
97
|
+
expect(subject.valid?).to be true
|
98
|
+
expect(subject.id).to eq('https://doi.org/10.53731/ffbx660-083tnag')
|
99
|
+
expect(subject.url).to eq('https://syldavia-gazette.org/guinea-worms-chatgpt-neanderthals')
|
100
|
+
expect(subject.alternate_identifiers).to eq([{"alternateIdentifier"=>"0022b9ef-525a-4a79-81ad-13411697f58a", "alternateIdentifierType"=>"UUID"}])
|
101
|
+
expect(subject.type).to eq('Article')
|
102
|
+
expect(subject.creators.length).to eq(1)
|
103
|
+
expect(subject.creators.first).to eq("familyName"=>"Fenner", "givenName"=>"Martin", "id"=>"https://orcid.org/0000-0003-1419-2405", "type"=>"Person")
|
104
|
+
expect(subject.titles).to eq([{"title"=>"Guinea Worms, ChatGPT, Neanderthals, Plagiarism, Tidyverse"}])
|
105
|
+
expect(subject.license).to eq('id' => 'CC-BY-4.0',
|
106
|
+
'url' => 'https://creativecommons.org/licenses/by/4.0/legalcode')
|
107
|
+
expect(subject.date).to eq('published' => '2023-02-01', 'updated' => '2023-04-13')
|
108
|
+
expect(subject.descriptions.first['description']).to start_with("Guinea worm disease reaches all-time low: only 13* human cases reported in 2022")
|
109
|
+
expect(subject.publisher).to eq('name' => 'Syldavia Gazette')
|
110
|
+
expect(subject.subjects).to be_nil
|
111
|
+
expect(subject.language).to eq('en')
|
112
|
+
expect(subject.container).to eq("identifier"=>"https://syldavia-gazette.org", "identifierType"=>"URL", "title"=>"Syldavia Gazette", "type"=>"Periodical")
|
113
|
+
expect(subject.references.length).to eq(5)
|
114
|
+
expect(subject.references.first).to eq("key"=>"ref1", "url"=>"https://cartercenter.org/news/pr/2023/2022-guinea-worm-worldwide-cases-announcement.html")
|
115
|
+
end
|
116
|
+
|
69
117
|
it 'wordpress post' do
|
70
118
|
input = 'https://rogue-scholar.org/api/posts/1c578558-1324-4493-b8af-84c49eabc52f'
|
71
119
|
subject = described_class.new(input: input)
|
72
120
|
expect(subject.valid?).to be true
|
73
|
-
expect(subject.id).to eq('
|
121
|
+
expect(subject.id).to eq('http://wisspub.net/?p=20455')
|
74
122
|
expect(subject.url).to eq('https://wisspub.net/2023/05/23/eu-mitgliedstaaten-betonen-die-rolle-von-wissenschaftsgeleiteten-open-access-modellen-jenseits-von-apcs')
|
123
|
+
expect(subject.alternate_identifiers).to eq([{"alternateIdentifier"=>"1c578558-1324-4493-b8af-84c49eabc52f", "alternateIdentifierType"=>"UUID"}])
|
75
124
|
expect(subject.type).to eq('Article')
|
76
125
|
expect(subject.creators.length).to eq(1)
|
77
126
|
expect(subject.creators.first).to eq("familyName"=>"Pampel", "givenName"=>"Heinz", "id"=>"https://orcid.org/0000-0003-3334-2771", "type"=>"Person")
|
@@ -79,20 +128,65 @@ describe Commonmeta::Metadata, vcr: true do
|
|
79
128
|
expect(subject.license).to eq('id' => 'CC-BY-4.0',
|
80
129
|
'url' => 'https://creativecommons.org/licenses/by/4.0/legalcode')
|
81
130
|
expect(subject.date).to eq('published' => '2023-05-23', 'updated' => '2023-05-23')
|
82
|
-
expect(subject.descriptions).to
|
131
|
+
expect(subject.descriptions.first['description']).to start_with("Die EU-Wissenschaftsministerien haben sich auf ihrer heutigen Sitzung in Brüssel unter dem Titel “Council conclusions on high-quality, transparent, open, trustworthy and equitable scholarly publishing”")
|
83
132
|
expect(subject.publisher).to eq('name' => 'wisspub.net')
|
84
133
|
expect(subject.subjects).to eq([{"subject"=>"open access"}, {"subject"=>"open access transformation"}, {"subject"=>"open science"}, {"subject"=>"eu"}])
|
85
134
|
expect(subject.language).to eq('de')
|
86
|
-
expect(subject.container).to eq("identifier"=>"https://wisspub.net
|
135
|
+
expect(subject.container).to eq("identifier"=>"https://wisspub.net", "identifierType"=>"URL", "title"=>"wisspub.net", "type"=>"Periodical")
|
136
|
+
end
|
137
|
+
|
138
|
+
it 'wordpress post with references' do
|
139
|
+
input = 'https://rogue-scholar.org/api/posts/4e4bf150-751f-4245-b4ca-fe69e3c3bb24'
|
140
|
+
subject = described_class.new(input: input)
|
141
|
+
expect(subject.valid?).to be true
|
142
|
+
expect(subject.id).to eq('http://svpow.com/?p=20992')
|
143
|
+
expect(subject.url).to eq('https://svpow.com/2023/06/09/new-paper-curtice-et-al-2023-on-the-first-haplocanthosaurus-from-dry-mesa')
|
144
|
+
expect(subject.type).to eq('Article')
|
145
|
+
expect(subject.creators.length).to eq(1)
|
146
|
+
expect(subject.creators.first).to eq("familyName"=>"Wedel", "givenName"=>"Matt", "type"=>"Person")
|
147
|
+
expect(subject.titles).to eq([{"title"=>"New paper: Curtice et al. (2023) on the first Haplocanthosaurus from Dry Mesa"}])
|
148
|
+
expect(subject.license).to eq('id' => 'CC-BY-4.0',
|
149
|
+
'url' => 'https://creativecommons.org/licenses/by/4.0/legalcode')
|
150
|
+
expect(subject.date).to eq('published' => '2023-06-09', 'updated' => '2023-06-09')
|
151
|
+
expect(subject.descriptions.first['description']).to start_with("Haplocanthosaurus tibiae and dorsal vertebrae.")
|
152
|
+
expect(subject.publisher).to eq('name' => 'Sauropod Vertebra Picture of the Week')
|
153
|
+
expect(subject.subjects).to eq([{"subject"=>"#mte14"}, {"subject"=>"barosaurus"}, {"subject"=>"cervical"}, {"subject"=>"conferences"}, {"subject"=>"diplodocids"}])
|
154
|
+
expect(subject.language).to eq('en')
|
155
|
+
expect(subject.container).to eq("identifier"=>"https://svpow.com", "identifierType"=>"URL", "title"=>"Sauropod Vertebra Picture of the Week", "type"=>"Periodical")
|
156
|
+
expect(subject.references.length).to eq(3)
|
157
|
+
expect(subject.references.first).to eq("key"=>"ref1", "url"=>"https://sauroposeidon.files.wordpress.com/2010/04/foster-and-wedel-2014-haplocanthosaurus-from-snowmass-colorado.pdf")
|
158
|
+
end
|
159
|
+
|
160
|
+
it 'upstream post with references' do
|
161
|
+
input = 'https://rogue-scholar.org/api/posts/954f8138-0ecd-4090-87c5-cef1297f1470'
|
162
|
+
subject = described_class.new(input: input)
|
163
|
+
expect(subject.valid?).to be true
|
164
|
+
expect(subject.id).to eq('https://doi.org/10.54900/zwm7q-vet94')
|
165
|
+
expect(subject.url).to eq('https://upstream.force11.org/the-research-software-alliance-resa')
|
166
|
+
expect(subject.alternate_identifiers).to eq([{"alternateIdentifier"=>"954f8138-0ecd-4090-87c5-cef1297f1470", "alternateIdentifierType"=>"UUID"}])
|
167
|
+
expect(subject.type).to eq('Article')
|
168
|
+
expect(subject.creators.length).to eq(2)
|
169
|
+
expect(subject.creators.first).to eq("familyName"=>"Katz", "givenName"=>"Daniel S.", "id"=>"https://orcid.org/0000-0001-5934-7525", "type"=>"Person")
|
170
|
+
expect(subject.titles).to eq([{"title"=>"The Research Software Alliance (ReSA)"}])
|
171
|
+
expect(subject.license).to eq('id' => 'CC-BY-4.0',
|
172
|
+
'url' => 'https://creativecommons.org/licenses/by/4.0/legalcode')
|
173
|
+
expect(subject.date).to eq('published' => '2023-04-18', 'updated' => '2023-04-18')
|
174
|
+
expect(subject.descriptions.first['description']).to start_with("Research software is a key part of most research today. As University of Manchester Professor Carole Goble has said, \"software is the ubiquitous instrument of science.\"")
|
175
|
+
expect(subject.publisher).to eq('name' => 'Upstream')
|
176
|
+
expect(subject.subjects).to eq([{"subject"=>"news"}])
|
177
|
+
expect(subject.language).to eq('en')
|
178
|
+
expect(subject.container).to eq("identifier"=>"https://upstream.force11.org", "identifierType"=>"URL", "title"=>"Upstream", "type"=>"Periodical")
|
179
|
+
expect(subject.references.length).to eq(11)
|
180
|
+
expect(subject.references.first).to eq("key"=>"ref1", "url"=>"https://software.ac.uk/blog/2014-12-04-its-impossible-conduct-research-without-software-say-7-out-10-uk-researchers")
|
87
181
|
end
|
88
182
|
|
89
183
|
it 'jekyll post' do
|
90
184
|
input = 'https://rogue-scholar.org/api/posts/efdacb04-bcec-49d7-b689-ab3eab0634bf'
|
91
185
|
subject = described_class.new(input: input)
|
92
|
-
puts subject.errors
|
93
186
|
expect(subject.valid?).to be true
|
94
187
|
expect(subject.id).to eq('https://citationstyles.org/2020/07/11/seeking-public-comment-on-CSL-1-0-2')
|
95
188
|
expect(subject.url).to eq('https://citationstyles.org/2020/07/11/seeking-public-comment-on-CSL-1-0-2')
|
189
|
+
expect(subject.alternate_identifiers).to eq([{"alternateIdentifier"=>"efdacb04-bcec-49d7-b689-ab3eab0634bf", "alternateIdentifierType"=>"UUID"}])
|
96
190
|
expect(subject.type).to eq('Article')
|
97
191
|
expect(subject.creators.length).to eq(1)
|
98
192
|
expect(subject.creators.first).to eq("familyName"=>"Karcher", "givenName"=>"Sebastian", "type"=>"Person")
|
@@ -100,7 +194,7 @@ describe Commonmeta::Metadata, vcr: true do
|
|
100
194
|
expect(subject.license).to eq('id' => 'CC-BY-4.0',
|
101
195
|
'url' => 'https://creativecommons.org/licenses/by/4.0/legalcode')
|
102
196
|
expect(subject.date).to eq('published' => '2020-07-11', 'updated' => '2020-07-11')
|
103
|
-
expect(subject.descriptions).to
|
197
|
+
expect(subject.descriptions.first['description']).to start_with("Over the past few months, Citation Style Language developers have worked to address a backlog of feature requests. This work will be reflected in two upcoming releases.")
|
104
198
|
expect(subject.publisher).to eq('name' => 'Citation Style Language')
|
105
199
|
expect(subject.subjects).to be_nil
|
106
200
|
expect(subject.language).to eq('en')
|
@@ -109,27 +203,9 @@ describe Commonmeta::Metadata, vcr: true do
|
|
109
203
|
end
|
110
204
|
|
111
205
|
context 'get json_feed' do
|
112
|
-
it '
|
113
|
-
|
114
|
-
response
|
115
|
-
expect(response).to be_nil
|
116
|
-
end
|
117
|
-
|
118
|
-
it 'upstream' do
|
119
|
-
id = 'pm0p222'
|
120
|
-
response = subject.get_json_feed(id)
|
121
|
-
expect(response).to be_nil
|
122
|
-
end
|
123
|
-
|
124
|
-
it 'behind the science' do
|
125
|
-
id = '468ap65'
|
126
|
-
response = subject.get_json_feed(id)
|
127
|
-
expect(response).to eq("84651758-f820-4e18-ae5f-4483ff4f4e92")
|
128
|
-
end
|
129
|
-
|
130
|
-
it 'all posts' do
|
131
|
-
response = subject.get_json_feed
|
132
|
-
expect(response).to eq("e4872b3e-cd15-407d-8406-33642c1a98b0")
|
206
|
+
it 'unregistered posts' do
|
207
|
+
response = subject.get_json_feed_unregistered
|
208
|
+
expect(response).to eq("ca2a7df4-f3b9-487c-82e9-27f54de75ea8")
|
133
209
|
end
|
134
210
|
end
|
135
211
|
end
|
data/spec/utils_spec.rb
CHANGED
@@ -3,9 +3,7 @@
|
|
3
3
|
require "spec_helper"
|
4
4
|
|
5
5
|
describe Commonmeta::Metadata, vcr: true do
|
6
|
-
subject { described_class.new
|
7
|
-
|
8
|
-
let(:input) { "https://doi.org/10.1101/097196" }
|
6
|
+
subject { described_class.new }
|
9
7
|
|
10
8
|
context "validate url" do
|
11
9
|
it "DOI" do
|
@@ -33,6 +31,26 @@ describe Commonmeta::Metadata, vcr: true do
|
|
33
31
|
end
|
34
32
|
end
|
35
33
|
|
34
|
+
context "validate_email" do
|
35
|
+
it "validate email" do
|
36
|
+
str = "noreply@blogger.com"
|
37
|
+
response = subject.validate_email(str)
|
38
|
+
expect(response).to eq("noreply@blogger.com")
|
39
|
+
end
|
40
|
+
|
41
|
+
it "validate email with name" do
|
42
|
+
str = "Roderic Page <noreply@blogger.com>"
|
43
|
+
response = subject.validate_email(str)
|
44
|
+
expect(response).to eq("noreply@blogger.com")
|
45
|
+
end
|
46
|
+
|
47
|
+
it "validate blogger email format" do
|
48
|
+
str = "noreply@blogger.com (Roderic Page)"
|
49
|
+
response = subject.validate_email(str)
|
50
|
+
expect(response).to eq("noreply@blogger.com")
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
36
54
|
context "validate_orcid" do
|
37
55
|
it "validate_orcid" do
|
38
56
|
orcid = "http://orcid.org/0000-0002-2590-225X"
|
@@ -665,15 +683,9 @@ describe Commonmeta::Metadata, vcr: true do
|
|
665
683
|
end
|
666
684
|
end
|
667
685
|
|
668
|
-
context '
|
669
|
-
it 'front-matter blog' do
|
670
|
-
id = 'f0m0e38'
|
671
|
-
response = subject.json_feed_url(id)
|
672
|
-
expect(response).to eq("https://rogue-scholar.org/api/blogs/f0m0e38")
|
673
|
-
end
|
674
|
-
|
686
|
+
context 'json_feed_unregistered_url' do
|
675
687
|
it 'all posts' do
|
676
|
-
response = subject.
|
688
|
+
response = subject.json_feed_unregistered_url
|
677
689
|
expect(response).to eq("https://rogue-scholar.org/api/posts/unregistered")
|
678
690
|
end
|
679
691
|
end
|