commonmeta-ruby 3.2.14 → 3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/bin/commonmeta +1 -1
  4. data/lib/commonmeta/author_utils.rb +1 -1
  5. data/lib/commonmeta/cli.rb +14 -0
  6. data/lib/commonmeta/crossref_utils.rb +56 -14
  7. data/lib/commonmeta/readers/json_feed_reader.rb +30 -2
  8. data/lib/commonmeta/utils.rb +34 -0
  9. data/lib/commonmeta/version.rb +1 -1
  10. data/spec/cli_spec.rb +12 -3
  11. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/doi_prefix/doi_prefix_by_blog.yml +997 -0
  12. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/doi_prefix/doi_prefix_by_uuid.yml +256 -0
  13. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/encode/by_blog.yml +997 -0
  14. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/encode/by_uuid.yml +256 -0
  15. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_doi_prefix_for_blog/by_blog_id.yml +997 -0
  16. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_doi_prefix_for_blog/by_blog_post_uuid.yml +389 -0
  17. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_doi_prefix_for_blog/by_blog_post_uuid_specific_prefix.yml +389 -0
  18. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item/by_uuid.yml +136 -0
  19. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/blog_post_with_non-url_id.yml +136 -0
  20. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/ghost_post_with_organizational_author.yml +91 -0
  21. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/substack_post_with_broken_reference.yml +1316 -0
  22. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/json_feed_item_from_rogue_scholar_with_organizational_author.yml +91 -0
  23. data/spec/readers/json_feed_reader_spec.rb +280 -186
  24. data/spec/utils_spec.rb +8 -0
  25. data/spec/writers/crossref_xml_writer_spec.rb +28 -0
  26. metadata +14 -2
@@ -0,0 +1,91 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://rogue-scholar.org/api/posts/5561f8e4-2ff1-4186-a8d5-8dacb3afe414
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ Connection:
11
+ - close
12
+ Host:
13
+ - rogue-scholar.org
14
+ User-Agent:
15
+ - http.rb/5.1.1
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Age:
22
+ - '0'
23
+ Cache-Control:
24
+ - public, max-age=0, must-revalidate
25
+ Content-Length:
26
+ - '4357'
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Date:
30
+ - Sat, 17 Jun 2023 21:53:20 GMT
31
+ Etag:
32
+ - '"wi68ur4zhx3d1"'
33
+ Server:
34
+ - Vercel
35
+ Strict-Transport-Security:
36
+ - max-age=63072000
37
+ X-Matched-Path:
38
+ - "/api/posts/[slug]"
39
+ X-Vercel-Cache:
40
+ - MISS
41
+ X-Vercel-Id:
42
+ - fra1::iad1::m9bzn-1687038797323-61355f142315
43
+ Connection:
44
+ - close
45
+ body:
46
+ encoding: UTF-8
47
+ string: '{"id":"https://libscie.org/ku-leuven-supports-researchequals/","uuid":"5561f8e4-2ff1-4186-a8d5-8dacb3afe414","url":"https://libscie.org/ku-leuven-supports-researchequals/","title":"KU
48
+ Leuven supports ResearchEquals","summary":"KU Leuven is now an inaugural supporting
49
+ member of ResearchEquals, sustaining and governing the development of modular
50
+ publishing.As part of their commitment to Open Science, KU Leuven supports
51
+ sustainable implementations of Open Access and Open Science through the KU
52
+ Leuven Fund for Fair OA. The fund is usually only","date_published":"2023-05-09T06:43:26Z","date_modified":null,"date_indexed":"1970-01-01T00:00:00+00:00","authors":[{"url":"https://ror.org/0342dzm54","name":"Liberate
53
+ Science"}],"image":"https://libscie.org/content/images/2023/04/thank-you-1-.jpg","content_html":"<img
54
+ src=\"https://libscie.org/content/images/2023/04/thank-you-1-.jpg\" alt=\"KU
55
+ Leuven supports ResearchEquals\"><p>KU Leuven is now an inaugural supporting
56
+ member of ResearchEquals, sustaining and governing the development of modular
57
+ publishing.</p><p>As part of their commitment to Open Science, KU Leuven supports
58
+ sustainable implementations of Open Access and Open Science through the <a
59
+ href=\"https://www.kuleuven.be/open-science/what-is-open-science/scholarly-publishing-and-open-access/open-access-kuleuven/OS-services?ref=libscie.org\">KU
60
+ Leuven Fund for Fair OA</a>. The fund is usually only available to non-profits,
61
+ but ResearchEquals&#x2019; governance convinced KU Leuven to support a for-profit
62
+ initiative.</p><p>&#x201C;We don&#x2019;t want to be too rigid in our approach
63
+ and understand that publishing or other research infrastructures can work
64
+ according to different sustainability models. What matters to us is that,
65
+ if profits are made, they are reinvested in the academic community and that
66
+ researchers remain firmly in control.&#x201D; Demmy Verbeke said.</p><p>Supporting
67
+ members help sustain operations and receive additional governance rights for
68
+ <a href=\"https://researchequals.com/?ref=libscie.org\">ResearchEquals</a>.
69
+ These rights include the option to participate in quarterly assemblies, strategy
70
+ and decision making processes, the power to block acquisitions, and to request
71
+ more information around business operations. As a result, supporting members
72
+ shape how ResearchEquals evolves. Individuals can become supporting members
73
+ for 79.99 euro&#x2019;s per year. Institutions can become supporting members
74
+ for a yearly contribution of at least 2500 euro&#x2019;s. </p><p>ResearchEquals
75
+ is an open source, open access publishing platform for research modules. ResearchEquals
76
+ realized the first modular publishing platform (launched February 1st, 2022),
77
+ which revolves around sharing the research process, step by step, instead
78
+ of only the final report.</p><p>&#x201C;It is great to see KU Leuven support
79
+ generative projects, regardless of whether they are for-profit or not&#x201D;
80
+ Chris Hartgerink said.</p><p>KU Leuven is one of the first institutional supporting
81
+ members of ResearchEquals.</p><hr><p>KU Leuven is one of the largest universities
82
+ in Belgium, with a strong commitment to open access and open science. Demmy
83
+ Verbeke and Laura Mesotten manage the Fund for Fair OA of KU Leuven Libraries.</p><p>Liberate
84
+ Science GmbH (est. 2019) cultivates alternative publishing formats that work
85
+ for researchers everywhere. ResearchEquals is a Liberate Science GmbH project.
86
+ For more information view the <a href=\"https://www.researchequals.com/supporting-member?ref=libscie.org\">supporting
87
+ member page</a> or contact CEO Chris Hartgerink (<a href=\"mailto:ceo@libscie.org\">ceo@libscie.org</a>).</p>","tags":["ResearchEquals"],"language":"en","references":null,"blog_id":"h49ct36","blog":{"id":"h49ct36","title":"Liberate
88
+ Science","description":"Research as a commons","language":"en","favicon":"https://libscie.org/favicon.png","feed_url":"https://libscie.org/rss/","home_page_url":"https://libscie.org/","user_id":"8498eaf6-8c58-4b58-bc15-27eda292b1aa","created_at":"2023-05-31T14:08:03+00:00","indexed_at":"2023-01-04","feed_format":"application/rss+xml","license":"https://creativecommons.org/licenses/by/4.0/legalcode","generator":"Ghost
89
+ 5.49","category":"Social Sciences","prefix":null,"modified_at":"2023-06-13T06:48:37+00:00","version":"https://jsonfeed.org/version/1.1","backlog":true,"authors":null}}'
90
+ recorded_at: Sat, 17 Jun 2023 21:53:21 GMT
91
+ recorded_with: VCR 6.1.0