commonmeta-ruby 3.7.2 → 3.8.0
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.
- checksums.yaml +4 -4
- data/.github/workflows/publish.yml +23 -0
- data/Gemfile.lock +30 -29
- data/bin/commonmeta +1 -1
- data/docs/.gitignore +1 -0
- data/docs/_publish.yml +4 -0
- data/docs/_quarto.yml +46 -0
- data/docs/_site/favicon.ico +0 -0
- data/docs/_site/images/icon.png +0 -0
- data/docs/_site/index.html +947 -0
- data/docs/_site/readers/bibtex_reader.html +802 -0
- data/docs/_site/search.json +74 -0
- data/docs/_site/site_libs/bootstrap/bootstrap-dark.min.css +9 -0
- data/docs/_site/site_libs/bootstrap/bootstrap-icons.css +2078 -0
- data/docs/_site/site_libs/bootstrap/bootstrap-icons.woff +0 -0
- data/docs/_site/site_libs/bootstrap/bootstrap.min.css +9 -0
- data/docs/_site/site_libs/bootstrap/bootstrap.min.js +7 -0
- data/docs/_site/site_libs/clipboard/clipboard.min.js +7 -0
- data/docs/_site/site_libs/quarto-html/anchor.min.js +9 -0
- data/docs/_site/site_libs/quarto-html/popper.min.js +6 -0
- data/docs/_site/site_libs/quarto-html/quarto-syntax-highlighting-dark.css +179 -0
- data/docs/_site/site_libs/quarto-html/quarto-syntax-highlighting.css +179 -0
- data/docs/_site/site_libs/quarto-html/quarto.js +889 -0
- data/docs/_site/site_libs/quarto-html/tippy.css +1 -0
- data/docs/_site/site_libs/quarto-html/tippy.umd.min.js +2 -0
- data/docs/_site/site_libs/quarto-nav/headroom.min.js +7 -0
- data/docs/_site/site_libs/quarto-nav/quarto-nav.js +288 -0
- data/docs/_site/site_libs/quarto-search/autocomplete.umd.js +3 -0
- data/docs/_site/site_libs/quarto-search/fuse.min.js +9 -0
- data/docs/_site/site_libs/quarto-search/quarto-search.js +1241 -0
- data/docs/_site/utils/doi_utils.html +787 -0
- data/docs/_site/writers/bibtex_writer.html +803 -0
- data/docs/favicon.ico +0 -0
- data/docs/images/icon.png +0 -0
- data/docs/index.qmd +83 -0
- data/docs/readers/bibtex_reader.ipynb +37 -0
- data/docs/theme.scss +7 -0
- data/docs/utils/doi_utils.ipynb +28 -0
- data/docs/writers/bibtex_writer.ipynb +39 -0
- data/lib/commonmeta/cli.rb +5 -5
- data/lib/commonmeta/crossref_utils.rb +7 -1
- data/lib/commonmeta/doi_utils.rb +5 -0
- data/lib/commonmeta/metadata.rb +66 -62
- data/lib/commonmeta/readers/json_feed_reader.rb +15 -5
- data/lib/commonmeta/version.rb +1 -1
- data/spec/cli_spec.rb +2 -2
- data/spec/doi_utils_spec.rb +14 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/json_feed/json_feed_blog_slug.yml +71 -0
- data/spec/readers/json_feed_reader_spec.rb +40 -8
- data/spec/writers/crossref_xml_writer_spec.rb +25 -8
- metadata +40 -3
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: get
|
|
5
|
+
uri: https://api.rogue-scholar.org/posts/01a92f9a-f8e0-442b-86e2-11530d9d5635
|
|
6
|
+
body:
|
|
7
|
+
encoding: ASCII-8BIT
|
|
8
|
+
string: ''
|
|
9
|
+
headers:
|
|
10
|
+
Connection:
|
|
11
|
+
- close
|
|
12
|
+
Host:
|
|
13
|
+
- api.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
|
+
Content-Type:
|
|
22
|
+
- application/json
|
|
23
|
+
Content-Length:
|
|
24
|
+
- '3313'
|
|
25
|
+
Ratelimit-Limit:
|
|
26
|
+
- '15'
|
|
27
|
+
Ratelimit-Remaining:
|
|
28
|
+
- '14'
|
|
29
|
+
Ratelimit-Reset:
|
|
30
|
+
- '3'
|
|
31
|
+
Date:
|
|
32
|
+
- Mon, 25 Dec 2023 10:38:50 GMT
|
|
33
|
+
Server:
|
|
34
|
+
- Fly/9e37a80f (2023-12-22)
|
|
35
|
+
Via:
|
|
36
|
+
- 1.1 fly.io
|
|
37
|
+
Fly-Request-Id:
|
|
38
|
+
- 01HJG8WMFGNRM35PXT9HSQJYJH-fra
|
|
39
|
+
body:
|
|
40
|
+
encoding: UTF-8
|
|
41
|
+
string: '{"archive_url":"https://wayback.archive-it.org/22123/20231101171300/https://eve.gd/2017/05/07/an-important-note-if-you-have-a-lenovo-g580","authors":[{"name":"Martin
|
|
42
|
+
Paul Eve","url":"https://orcid.org/0000-0002-5589-8511"}],"blog":{"api":false,"archive_prefix":"https://wayback.archive-it.org/22123/20231101171300/","authors":[{"name":"Martin
|
|
43
|
+
Paul Eve","url":null}],"backlog":0,"canonical_url":null,"category":"languagesAndLiterature","created_at":1690329600,"current_feed_url":"https://eve.gd/feed/feed.atom","description":null,"favicon":"https://eve.gd/favicon.png","feed_format":"application/atom+xml","feed_url":"https://eve.gd/feed_all.xml","filter":null,"funding":null,"generator":"Jekyll","generator_raw":"Jekyll","home_page_url":"https://eve.gd","id":"z4b9d78","indexed":false,"issn":null,"language":"en","license":"https://creativecommons.org/licenses/by/4.0/legalcode","plan":"Team","prefix":"10.59348","relative_url":"blog","secure":true,"slug":"eve","status":"active","title":"Martin
|
|
44
|
+
Paul Eve","updated_at":1702425600,"use_api":null,"use_mastodon":false,"user_id":"eb3f6a26-3e38-42ad-b752-250eb2c0bf89","version":"https://jsonfeed.org/version/1.1"},"blog_name":"Martin
|
|
45
|
+
Paul Eve","blog_slug":"eve","content_text":"The Lenovo G580 comes with Windows
|
|
46
|
+
8. It is possible to permanently lock\nyourself out of the operating system
|
|
47
|
+
if you begin with a Microsoft\naccount and migrate this to a local account.
|
|
48
|
+
Further, you won''t be able\nto rescue the system since *it is impossible
|
|
49
|
+
to enter the BIOS setup in\nthe machine''s default state if you cannot login
|
|
50
|
+
to Windows*.\n\nTo fix this:\n\n1. Disable \"fast boot\" mode in Windows
|
|
51
|
+
8. You can do this in \"Power\n Settings\". If you don''t do this, you
|
|
52
|
+
can''t modify the Windows disk\n partition when booting from a recovery
|
|
53
|
+
USB.\n2. [Update your\n BIOS](https://download.lenovo.com/consumer/mobiles/62cn97ww_64.exe).\n Do
|
|
54
|
+
it now or you won''t be able to unless you can still login to\n Windows
|
|
55
|
+
8.\n3. Go into the BIOS (shutdown the machine then press the small button\n next
|
|
56
|
+
to the power button and select \"BIOS setup\"). Then, set an\n administrator
|
|
57
|
+
password in the BIOS settings. Then, \"disable secure\n boot\". This will
|
|
58
|
+
allow you to boot from a recovery USB stick such as\n Kali or Ubuntu.\n\nUrgh.
|
|
59
|
+
A Catch-22 where Microsoft Windows corrupted a login (thanks,\nMicrosoft)
|
|
60
|
+
and a hardware defect stops you booting into a recovery\nmedium (thanks, Lenovo).\n\n[An
|
|
61
|
+
important note if you have a Lenovo\nG580](https://eve.gd/2017/05/07/an-important-note-if-you-have-a-lenovo-g580/)\nwas
|
|
62
|
+
originally published by Martin Paul Eve at [Martin Paul\nEve](https://eve.gd)
|
|
63
|
+
on May 07, 2017.\n","doi":"https://doi.org/10.59348/dmq66-f5d26","guid":"https://eve.gd/2017/05/07/an-important-note-if-you-have-a-lenovo-g580","id":"01a92f9a-f8e0-442b-86e2-11530d9d5635","image":null,"indexed_at":1696162656,"language":"en","published_at":1494172558,"reference":[],"relationships":[],"summary":"The
|
|
64
|
+
Lenovo G580 comes with Windows 8. It is possible to permanently lock yourself
|
|
65
|
+
out of the operating system if you begin with a Microsoft account and migrate
|
|
66
|
+
this to a local account.\n","tags":[],"title":"An important note if you have
|
|
67
|
+
a Lenovo G580","updated_at":1494115200,"url":"https://eve.gd/2017/05/07/an-important-note-if-you-have-a-lenovo-g580"}
|
|
68
|
+
|
|
69
|
+
'
|
|
70
|
+
recorded_at: Mon, 25 Dec 2023 10:38:50 GMT
|
|
71
|
+
recorded_with: VCR 6.2.0
|
|
@@ -36,6 +36,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
|
36
36
|
# expect(subject.valid?).to be true
|
|
37
37
|
expect(subject.id).to eq("https://doi.org/10.53731/4nwxn-frt36")
|
|
38
38
|
expect(subject.url).to eq("https://blog.front-matter.io/posts/does-it-compose")
|
|
39
|
+
expect(subject.files.length).to eq(3)
|
|
40
|
+
expect(subject.files[1]).to eq("mimeType" => "application/pdf", "url" => "https://api.rogue-scholar.org/posts/10.53731/4nwxn-frt36.pdf")
|
|
39
41
|
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "5bb66e92-5cb9-4659-8aca-20e486b695c9", "alternateIdentifierType" => "UUID" }])
|
|
40
42
|
expect(subject.type).to eq("Article")
|
|
41
43
|
expect(subject.contributors.length).to eq(1)
|
|
@@ -60,6 +62,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
|
60
62
|
# expect(subject.valid?).to be true
|
|
61
63
|
expect(subject.id).to eq("https://doi.org/10.53731/r79v4e1-97aq74v-ag578")
|
|
62
64
|
expect(subject.url).to eq("https://blog.front-matter.io/posts/differences-between-orcid-and-datacite-metadata")
|
|
65
|
+
expect(subject.files.length).to eq(3)
|
|
66
|
+
expect(subject.files[1]).to eq("mimeType" => "application/pdf", "url" => "https://api.rogue-scholar.org/posts/10.53731/r79v4e1-97aq74v-ag578.pdf")
|
|
63
67
|
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "8a4de443-3347-4b82-b57d-e3c82b6485fc", "alternateIdentifierType" => "UUID" }])
|
|
64
68
|
expect(subject.type).to eq("Article")
|
|
65
69
|
expect(subject.contributors.length).to eq(1)
|
|
@@ -85,6 +89,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
|
85
89
|
# expect(subject.valid?).to be true
|
|
86
90
|
expect(subject.id).to eq("https://doi.org/10.53731/r294649-6f79289-8cw18")
|
|
87
91
|
expect(subject.url).to eq("https://blog.front-matter.io/posts/nine-simple-ways-to-make-it-easier-to-re-use-your-data")
|
|
92
|
+
expect(subject.files.length).to eq(3)
|
|
93
|
+
expect(subject.files[1]).to eq("mimeType" => "application/pdf", "url" => "https://api.rogue-scholar.org/posts/10.53731/r294649-6f79289-8cw18.pdf")
|
|
88
94
|
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "2bdebfc5-e02e-42c2-90c5-e873e2d0435d", "alternateIdentifierType" => "UUID" }])
|
|
89
95
|
expect(subject.type).to eq("Article")
|
|
90
96
|
expect(subject.contributors.length).to eq(1)
|
|
@@ -110,6 +116,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
|
110
116
|
# expect(subject.valid?).to be true
|
|
111
117
|
expect(subject.id).to eq("https://doi.org/10.53731/r79s4nh-97aq74v-ag4t1")
|
|
112
118
|
expect(subject.url).to eq("https://blog.front-matter.io/posts/tracking-the-growth-of-the-pid-graph")
|
|
119
|
+
expect(subject.files.length).to eq(3)
|
|
120
|
+
expect(subject.files[1]).to eq("mimeType" => "application/pdf", "url" => "https://api.rogue-scholar.org/posts/10.53731/r79s4nh-97aq74v-ag4t1.pdf")
|
|
113
121
|
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "e58dc9c8-b870-4db2-8896-238b3246c551", "alternateIdentifierType" => "UUID" }])
|
|
114
122
|
expect(subject.type).to eq("Article")
|
|
115
123
|
expect(subject.contributors.length).to eq(1)
|
|
@@ -187,6 +195,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
|
187
195
|
# expect(subject.valid?).to be true
|
|
188
196
|
expect(subject.id).to eq("https://doi.org/10.53731/ffbx660-083tnag")
|
|
189
197
|
expect(subject.url).to eq("https://syldavia-gazette.org/guinea-worms-chatgpt-neanderthals")
|
|
198
|
+
expect(subject.files.length).to eq(3)
|
|
199
|
+
expect(subject.files[1]).to eq("mimeType" => "application/pdf", "url" => "https://api.rogue-scholar.org/posts/10.53731/ffbx660-083tnag.pdf")
|
|
190
200
|
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "0022b9ef-525a-4a79-81ad-13411697f58a", "alternateIdentifierType" => "UUID" }])
|
|
191
201
|
expect(subject.type).to eq("Article")
|
|
192
202
|
expect(subject.contributors.length).to eq(1)
|
|
@@ -210,6 +220,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
|
210
220
|
# expect(subject.valid?).to be true
|
|
211
221
|
expect(subject.id).to eq("https://doi.org/10.59350/kz04m-s8z58")
|
|
212
222
|
expect(subject.url).to eq("https://wisspub.net/2023/05/23/eu-mitgliedstaaten-betonen-die-rolle-von-wissenschaftsgeleiteten-open-access-modellen-jenseits-von-apcs")
|
|
223
|
+
expect(subject.files.length).to eq(3)
|
|
224
|
+
expect(subject.files[1]).to eq("mimeType" => "application/pdf", "url" => "https://api.rogue-scholar.org/posts/10.59350/kz04m-s8z58.pdf")
|
|
213
225
|
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "1c578558-1324-4493-b8af-84c49eabc52f", "alternateIdentifierType" => "UUID" }])
|
|
214
226
|
expect(subject.type).to eq("Article")
|
|
215
227
|
expect(subject.contributors.length).to eq(1)
|
|
@@ -234,14 +246,16 @@ describe Commonmeta::Metadata, vcr: true do
|
|
|
234
246
|
# expect(subject.valid?).to be true
|
|
235
247
|
expect(subject.id).to eq("https://doi.org/10.59350/faeph-x4x84")
|
|
236
248
|
expect(subject.url).to eq("https://wayback.archive-it.org/22143/20231103191454/https://project-thor.eu/2016/08/10/orcid-integration-in-pangaea")
|
|
249
|
+
expect(subject.files.length).to eq(3)
|
|
250
|
+
expect(subject.files[1]).to eq("mimeType" => "application/pdf", "url" => "https://api.rogue-scholar.org/posts/10.59350/faeph-x4x84.pdf")
|
|
237
251
|
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "570c8129-e867-49e6-8517-bd783627e76e", "alternateIdentifierType" => "UUID" }])
|
|
238
252
|
expect(subject.type).to eq("Article")
|
|
239
253
|
expect(subject.contributors.length).to eq(1)
|
|
240
254
|
expect(subject.contributors.first).to eq("contributorRoles" => ["Author"],
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
255
|
+
"type" => "Person",
|
|
256
|
+
"familyName" => "Stocker",
|
|
257
|
+
"givenName" => "Markus",
|
|
258
|
+
"id" => "https://orcid.org/0000-0001-5492-3212")
|
|
245
259
|
expect(subject.titles).to eq([{ "title" => "ORCID Integration Series: PANGAEA" }])
|
|
246
260
|
expect(subject.license).to eq("id" => "CC-BY-4.0",
|
|
247
261
|
"url" => "https://creativecommons.org/licenses/by/4.0/legalcode")
|
|
@@ -253,7 +267,7 @@ describe Commonmeta::Metadata, vcr: true do
|
|
|
253
267
|
"subject" => "FOS: Computer and information sciences",
|
|
254
268
|
"subjectScheme" => "Fields of Science and Technology (FOS)" }])
|
|
255
269
|
expect(subject.language).to eq("en")
|
|
256
|
-
expect(subject.funding_references).to eq([{ "awardNumber" => "654039", "funderIdentifier" => "https://doi.org/10.13039/501100007601", "funderIdentifierType"=>"Crossref Funder ID", "funderName" => "European Union’s Horizon 2020 research and innovation programme" }])
|
|
270
|
+
expect(subject.funding_references).to eq([{ "awardNumber" => "654039", "funderIdentifier" => "https://doi.org/10.13039/501100007601", "funderIdentifierType" => "Crossref Funder ID", "funderName" => "European Union’s Horizon 2020 research and innovation programme" }])
|
|
257
271
|
expect(subject.container).to eq("identifier" => "https://project-thor.eu", "identifierType" => "URL", "title" => "Project THOR", "type" => "Periodical")
|
|
258
272
|
expect(subject.archive_locations).to eq(["Internet Archive"])
|
|
259
273
|
end
|
|
@@ -264,10 +278,12 @@ describe Commonmeta::Metadata, vcr: true do
|
|
|
264
278
|
# expect(subject.valid?).to be true
|
|
265
279
|
expect(subject.id).to eq("https://doi.org/10.59350/hke8v-d1e66")
|
|
266
280
|
expect(subject.url).to eq("https://svpow.com/2023/06/09/new-paper-curtice-et-al-2023-on-the-first-haplocanthosaurus-from-dry-mesa")
|
|
281
|
+
expect(subject.files.length).to eq(3)
|
|
282
|
+
expect(subject.files[1]).to eq("mimeType" => "application/pdf", "url" => "https://api.rogue-scholar.org/posts/10.59350/hke8v-d1e66.pdf")
|
|
267
283
|
expect(subject.type).to eq("Article")
|
|
268
284
|
expect(subject.contributors.length).to eq(1)
|
|
269
285
|
expect(subject.contributors.first).to eq("familyName" => "Wedel", "givenName" => "Matt", "type" => "Person", "contributorRoles" => ["Author"])
|
|
270
|
-
expect(subject.titles).to eq([{ "title" => "New paper: Curtice et al. (2023) on the first <i>Haplocanthosaurus</i> from Dry Mesa"}])
|
|
286
|
+
expect(subject.titles).to eq([{ "title" => "New paper: Curtice et al. (2023) on the first <i>Haplocanthosaurus</i> from Dry Mesa" }])
|
|
271
287
|
expect(subject.license).to eq("id" => "CC-BY-4.0",
|
|
272
288
|
"url" => "https://creativecommons.org/licenses/by/4.0/legalcode")
|
|
273
289
|
expect(subject.date).to eq("published" => "2023-06-09", "updated" => "2023-06-09")
|
|
@@ -289,6 +305,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
|
289
305
|
# expect(subject.valid?).to be true
|
|
290
306
|
expect(subject.id).to eq("https://doi.org/10.59350/tpa8t-j6292")
|
|
291
307
|
expect(subject.url).to eq("https://www.samuelmoore.org/2023/04/20/how-to-cultivate-good-closures-scaling-small-and-the-limits-of-openness")
|
|
308
|
+
expect(subject.files.length).to eq(3)
|
|
309
|
+
expect(subject.files[1]).to eq("mimeType" => "application/pdf", "url" => "https://api.rogue-scholar.org/posts/10.59350/tpa8t-j6292.pdf")
|
|
292
310
|
expect(subject.type).to eq("Article")
|
|
293
311
|
expect(subject.contributors.length).to eq(1)
|
|
294
312
|
expect(subject.contributors.first).to eq("familyName" => "Moore", "givenName" => "Samuel", "type" => "Person", "contributorRoles" => ["Author"])
|
|
@@ -313,6 +331,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
|
313
331
|
# expect(subject.valid?).to be true
|
|
314
332
|
expect(subject.id).to eq("https://doi.org/10.59350/tfahc-rp566")
|
|
315
333
|
expect(subject.url).to eq("https://blog.oa.works/nature-features-oa-reports-work-putting-oa-policy-into-practice")
|
|
334
|
+
expect(subject.files.length).to eq(3)
|
|
335
|
+
expect(subject.files[1]).to eq("mimeType" => "application/pdf", "url" => "https://api.rogue-scholar.org/posts/10.59350/tfahc-rp566.pdf")
|
|
316
336
|
expect(subject.type).to eq("Article")
|
|
317
337
|
expect(subject.contributors.length).to eq(1)
|
|
318
338
|
expect(subject.contributors.first).to eq("name" => "OA.Works", "type" => "Organization", "contributorRoles" => ["Author"])
|
|
@@ -362,6 +382,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
|
362
382
|
# expect(subject.valid?).to be true
|
|
363
383
|
expect(subject.id).to eq("https://doi.org/10.59350/zwdq7-waa43")
|
|
364
384
|
expect(subject.url).to eq("https://citationstyles.org/2020/07/11/seeking-public-comment-on-CSL-1-0-2")
|
|
385
|
+
expect(subject.files.length).to eq(3)
|
|
386
|
+
expect(subject.files[1]).to eq("mimeType" => "application/pdf", "url" => "https://api.rogue-scholar.org/posts/10.59350/zwdq7-waa43.pdf")
|
|
365
387
|
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "efdacb04-bcec-49d7-b689-ab3eab0634bf", "alternateIdentifierType" => "UUID" }])
|
|
366
388
|
expect(subject.type).to eq("Article")
|
|
367
389
|
expect(subject.contributors.length).to eq(0)
|
|
@@ -387,6 +409,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
|
387
409
|
# expect(subject.valid?).to be true
|
|
388
410
|
expect(subject.id).to eq("https://doi.org/10.59350/2shz7-ehx26")
|
|
389
411
|
expect(subject.url).to eq("https://libscie.org/ku-leuven-supports-researchequals")
|
|
412
|
+
expect(subject.files.length).to eq(3)
|
|
413
|
+
expect(subject.files[1]).to eq("mimeType" => "application/pdf", "url" => "https://api.rogue-scholar.org/posts/10.59350/2shz7-ehx26.pdf")
|
|
390
414
|
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "5561f8e4-2ff1-4186-a8d5-8dacb3afe414", "alternateIdentifierType" => "UUID" }])
|
|
391
415
|
expect(subject.type).to eq("Article")
|
|
392
416
|
expect(subject.contributors.length).to eq(1)
|
|
@@ -412,6 +436,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
|
412
436
|
# expect(subject.valid?).to be true
|
|
413
437
|
expect(subject.id).to eq("https://doi.org/10.59350/33es7-fqz31")
|
|
414
438
|
expect(subject.url).to eq("https://lab.sub.uni-goettingen.de/welcome.html")
|
|
439
|
+
expect(subject.files.length).to eq(3)
|
|
440
|
+
expect(subject.files[1]).to eq("mimeType" => "application/pdf", "url" => "https://api.rogue-scholar.org/posts/10.59350/33es7-fqz31.pdf")
|
|
415
441
|
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "a163e340-5b3c-4736-9ab0-8c54fdff6a3c", "alternateIdentifierType" => "UUID" }])
|
|
416
442
|
expect(subject.type).to eq("Article")
|
|
417
443
|
expect(subject.contributors.length).to eq(1)
|
|
@@ -437,6 +463,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
|
437
463
|
# expect(subject.valid?).to be true
|
|
438
464
|
expect(subject.id).to eq("https://doi.org/10.59350/63055-a8604")
|
|
439
465
|
expect(subject.url).to eq("http://sfmatheson.blogspot.com/2023/01/quintessence-of-dust-2023-restart-why.html")
|
|
466
|
+
expect(subject.files.length).to eq(3)
|
|
467
|
+
expect(subject.files[1]).to eq("mimeType" => "application/pdf", "url" => "https://api.rogue-scholar.org/posts/10.59350/63055-a8604.pdf")
|
|
440
468
|
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "1898d2d7-4d87-4487-96c4-3073cf99e9a5", "alternateIdentifierType" => "UUID" }])
|
|
441
469
|
expect(subject.type).to eq("Article")
|
|
442
470
|
expect(subject.contributors.length).to eq(1)
|
|
@@ -462,6 +490,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
|
462
490
|
# expect(subject.valid?).to be true
|
|
463
491
|
expect(subject.id).to eq("https://doi.org/10.59350/9gfjs-pey70")
|
|
464
492
|
expect(subject.url).to eq("https://flavoursofopen.science/grundlagen-fur-die-entwicklung-einer-open-scholarship-strategie")
|
|
493
|
+
expect(subject.files.length).to eq(3)
|
|
494
|
+
expect(subject.files[1]).to eq("mimeType" => "application/pdf", "url" => "https://api.rogue-scholar.org/posts/10.59350/9gfjs-pey70.pdf")
|
|
465
495
|
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "f3dc29da-0481-4f3b-8110-4c07260fca67", "alternateIdentifierType" => "UUID" }])
|
|
466
496
|
expect(subject.type).to eq("Article")
|
|
467
497
|
expect(subject.contributors.length).to eq(1)
|
|
@@ -488,6 +518,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
|
488
518
|
# expect(subject.valid?).to be true
|
|
489
519
|
expect(subject.id).to eq("https://doi.org/10.59350/bbcsr-r4b59")
|
|
490
520
|
expect(subject.url).to eq("https://markrubin.substack.com/p/the-preregistration-prescriptiveness")
|
|
521
|
+
expect(subject.files.length).to eq(3)
|
|
522
|
+
expect(subject.files[1]).to eq("mimeType" => "application/pdf", "url" => "https://api.rogue-scholar.org/posts/10.59350/bbcsr-r4b59.pdf")
|
|
491
523
|
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "2b105b29-acbc-4eae-9ff1-368803f36a4d", "alternateIdentifierType" => "UUID" }])
|
|
492
524
|
expect(subject.type).to eq("Article")
|
|
493
525
|
expect(subject.contributors.length).to eq(1)
|
|
@@ -528,7 +560,7 @@ describe Commonmeta::Metadata, vcr: true do
|
|
|
528
560
|
|
|
529
561
|
context "get doi_prefix for blog", vcr: true do
|
|
530
562
|
it "by blog_id" do
|
|
531
|
-
response = subject.
|
|
563
|
+
response = subject.get_doi_prefix_by_blog_slug("iphylo")
|
|
532
564
|
expect(response).to eq("10.59350")
|
|
533
565
|
end
|
|
534
566
|
|
|
@@ -545,7 +577,7 @@ describe Commonmeta::Metadata, vcr: true do
|
|
|
545
577
|
|
|
546
578
|
context "get blog_id for json_feed item id", vcr: true do
|
|
547
579
|
it "by blog post id" do
|
|
548
|
-
response = subject.
|
|
580
|
+
response = subject.get_json_feed_blog_slug("1898d2d7-4d87-4487-96c4-3073cf99e9a5")
|
|
549
581
|
expect(response).to eq("sfmatheson")
|
|
550
582
|
end
|
|
551
583
|
|
|
@@ -57,7 +57,7 @@ describe Commonmeta::Metadata, vcr: true do
|
|
|
57
57
|
"journal_article")
|
|
58
58
|
expect(Array.wrap(crossref_xml.dig("contributors", "person_name")).length).to eq(6)
|
|
59
59
|
expect(Array.wrap(crossref_xml.dig("contributors",
|
|
60
|
-
"person_name")).first).to eq("contributor_role"=>"author", "given_name"=>"Markus", "sequence"=>"first", "surname"=>"Ralser")
|
|
60
|
+
"person_name")).first).to eq("contributor_role" => "author", "given_name" => "Markus", "sequence" => "first", "surname" => "Ralser")
|
|
61
61
|
expect(crossref_xml.dig("titles",
|
|
62
62
|
"title")).to eq("Triose Phosphate Isomerase Deficiency Is Caused by Altered Dimerization–Not Catalytic Inactivity–of the Mutant Enzymes")
|
|
63
63
|
end
|
|
@@ -232,6 +232,9 @@ describe Commonmeta::Metadata, vcr: true do
|
|
|
232
232
|
"title")).to eq("Attempts at automating journal subject classification")
|
|
233
233
|
expect(crossref_xml.dig("item_number")).to eq("__content__" => "5d14ffacb9ac4e20bdc0d9248df4e80d", "item_number_type" => "uuid")
|
|
234
234
|
expect(crossref_xml.dig("group_title")).to eq("Humanities")
|
|
235
|
+
expect(crossref_xml.dig("doi_data", "collection", "item", "resource").length).to eq(4)
|
|
236
|
+
expect(crossref_xml.dig("doi_data", "collection", "item", "resource", 2)).to eq("__content__" => "https://api.rogue-scholar.org/posts/10.54900/n6dnt-xpq48.pdf", "mime_type" => "application/pdf")
|
|
237
|
+
|
|
235
238
|
end
|
|
236
239
|
|
|
237
240
|
it "json_feed_item with references" do
|
|
@@ -264,6 +267,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
|
264
267
|
expect(crossref_xml.dig("citation_list", "citation").last).to eq("article_title" => "The Research Software Alliance (ReSA) and the community landscape", "cYear" => "2020", "doi" => "10.5281/zenodo.3699950", "key" => "ref11")
|
|
265
268
|
expect(crossref_xml.dig("item_number")).to eq("__content__" => "954f81380ecd409087c5cef1297f1470", "item_number_type" => "uuid")
|
|
266
269
|
expect(crossref_xml.dig("group_title")).to eq("Humanities")
|
|
270
|
+
expect(crossref_xml.dig("doi_data", "collection", "item", "resource").length).to eq(4)
|
|
271
|
+
expect(crossref_xml.dig("doi_data", "collection", "item", "resource", 2)).to eq("__content__" => "https://api.rogue-scholar.org/posts/10.54900/zwm7q-vet94.pdf", "mime_type" => "application/pdf")
|
|
267
272
|
end
|
|
268
273
|
|
|
269
274
|
it "json_feed_item from rogue scholar with doi" do
|
|
@@ -277,7 +282,7 @@ describe Commonmeta::Metadata, vcr: true do
|
|
|
277
282
|
expect(subject.titles).to eq([{ "title" => "EU-Mitgliedstaaten betonen die Rolle von wissenschaftsgeleiteten Open-Access-Modellen jenseits von APCs" }])
|
|
278
283
|
expect(subject.contributors.length).to eq(1)
|
|
279
284
|
expect(subject.contributors.first).to eq("familyName" => "Pampel", "givenName" => "Heinz", "id" => "https://orcid.org/0000-0003-3334-2771", "type" => "Person", "contributorRoles" => ["Author"])
|
|
280
|
-
expect(subject.publisher).to eq("name"=>"wisspub.net")
|
|
285
|
+
expect(subject.publisher).to eq("name" => "wisspub.net")
|
|
281
286
|
expect(subject.subjects).to eq([{ "subject" => "Social sciences" },
|
|
282
287
|
{ "schemeUri" => "http://www.oecd.org/science/inno/38235147.pdf",
|
|
283
288
|
"subject" => "FOS: Social sciences",
|
|
@@ -293,6 +298,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
|
293
298
|
"title")).to eq("EU-Mitgliedstaaten betonen die Rolle von wissenschaftsgeleiteten Open-Access-Modellen jenseits von APCs")
|
|
294
299
|
expect(crossref_xml.dig("item_number")).to eq("__content__" => "1c57855813244493b8af84c49eabc52f", "item_number_type" => "uuid")
|
|
295
300
|
expect(crossref_xml.dig("group_title")).to eq("Social sciences")
|
|
301
|
+
expect(crossref_xml.dig("doi_data", "collection", "item", "resource").length).to eq(4)
|
|
302
|
+
expect(crossref_xml.dig("doi_data", "collection", "item", "resource", 2)).to eq("__content__" => "https://api.rogue-scholar.org/posts/10.59350/9ry27-7cz42.pdf", "mime_type" => "application/pdf")
|
|
296
303
|
end
|
|
297
304
|
|
|
298
305
|
it "json_feed_item from rogue scholar with organizational author" do
|
|
@@ -321,6 +328,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
|
321
328
|
"title")).to eq("KU Leuven supports ResearchEquals")
|
|
322
329
|
expect(crossref_xml.dig("item_number")).to eq("__content__" => "5561f8e42ff14186a8d58dacb3afe414", "item_number_type" => "uuid")
|
|
323
330
|
expect(crossref_xml.dig("group_title")).to eq("Social sciences")
|
|
331
|
+
expect(crossref_xml.dig("doi_data", "collection", "item", "resource").length).to eq(4)
|
|
332
|
+
expect(crossref_xml.dig("doi_data", "collection", "item", "resource", 2)).to eq("__content__" => "https://api.rogue-scholar.org/posts/10.59350/9ry27-7cz42.pdf", "mime_type" => "application/pdf")
|
|
324
333
|
end
|
|
325
334
|
|
|
326
335
|
it "json_feed_item from rogue scholar with archived content" do
|
|
@@ -333,10 +342,10 @@ describe Commonmeta::Metadata, vcr: true do
|
|
|
333
342
|
expect(subject.type).to eq("Article")
|
|
334
343
|
expect(subject.contributors.length).to eq(1)
|
|
335
344
|
expect(subject.contributors.first).to eq("contributorRoles" => ["Author"],
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
345
|
+
"type" => "Person",
|
|
346
|
+
"familyName" => "Stocker",
|
|
347
|
+
"givenName" => "Markus",
|
|
348
|
+
"id" => "https://orcid.org/0000-0001-5492-3212")
|
|
340
349
|
expect(subject.titles).to eq([{ "title" => "ORCID Integration Series: PANGAEA" }])
|
|
341
350
|
expect(subject.license).to eq("id" => "CC-BY-4.0",
|
|
342
351
|
"url" => "https://creativecommons.org/licenses/by/4.0/legalcode")
|
|
@@ -348,18 +357,20 @@ describe Commonmeta::Metadata, vcr: true do
|
|
|
348
357
|
"subject" => "FOS: Computer and information sciences",
|
|
349
358
|
"subjectScheme" => "Fields of Science and Technology (FOS)" }])
|
|
350
359
|
expect(subject.language).to eq("en")
|
|
351
|
-
expect(subject.funding_references).to eq([{ "awardNumber" => "654039", "funderIdentifier" => "https://doi.org/10.13039/501100007601", "funderIdentifierType"=>"Crossref Funder ID", "funderName" => "European Union’s Horizon 2020 research and innovation programme" }])
|
|
360
|
+
expect(subject.funding_references).to eq([{ "awardNumber" => "654039", "funderIdentifier" => "https://doi.org/10.13039/501100007601", "funderIdentifierType" => "Crossref Funder ID", "funderName" => "European Union’s Horizon 2020 research and innovation programme" }])
|
|
352
361
|
expect(subject.container).to eq("identifier" => "https://project-thor.eu", "identifierType" => "URL", "title" => "Project THOR", "type" => "Periodical")
|
|
353
362
|
expect(subject.archive_locations).to eq(["Internet Archive"])
|
|
354
363
|
# puts subject.crossref_xml
|
|
355
364
|
crossref_xml = Hash.from_xml(subject.crossref_xml).dig("doi_batch", "body", "posted_content")
|
|
356
365
|
expect(Array.wrap(crossref_xml.dig("contributors", "person_name")).length).to eq(1)
|
|
357
366
|
expect(Array.wrap(crossref_xml.dig("contributors",
|
|
358
|
-
"person_name")).first).to eq("ORCID"=>"https://orcid.org/0000-0001-5492-3212", "contributor_role"=>"author", "given_name"=>"Markus", "sequence"=>"first", "surname"=>"Stocker")
|
|
367
|
+
"person_name")).first).to eq("ORCID" => "https://orcid.org/0000-0001-5492-3212", "contributor_role" => "author", "given_name" => "Markus", "sequence" => "first", "surname" => "Stocker")
|
|
359
368
|
expect(crossref_xml.dig("titles",
|
|
360
369
|
"title")).to eq("ORCID Integration Series: PANGAEA")
|
|
361
370
|
expect(crossref_xml.dig("item_number")).to eq("__content__" => "570c8129e86749e68517bd783627e76e", "item_number_type" => "uuid")
|
|
362
371
|
expect(crossref_xml.dig("group_title")).to eq("Computer and information sciences")
|
|
372
|
+
expect(crossref_xml.dig("doi_data", "collection", "item", "resource").length).to eq(4)
|
|
373
|
+
expect(crossref_xml.dig("doi_data", "collection", "item", "resource", 2)).to eq("__content__" => "https://api.rogue-scholar.org/posts/10.59350/faeph-x4x84.pdf", "mime_type" => "application/pdf")
|
|
363
374
|
end
|
|
364
375
|
|
|
365
376
|
it "json_feed_item from rogue scholar with relations" do
|
|
@@ -397,6 +408,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
|
397
408
|
"title")).to eq("Differences between ORCID and DataCite Metadata")
|
|
398
409
|
expect(crossref_xml.dig("item_number")).to eq("__content__" => "8a4de44333474b82b57de3c82b6485fc", "item_number_type" => "uuid")
|
|
399
410
|
expect(crossref_xml.dig("group_title")).to eq("Computer and information sciences")
|
|
411
|
+
expect(crossref_xml.dig("doi_data", "collection", "item", "resource").length).to eq(4)
|
|
412
|
+
expect(crossref_xml.dig("doi_data", "collection", "item", "resource", 2)).to eq("__content__" => "https://api.rogue-scholar.org/posts/10.53731/r79v4e1-97aq74v-ag578.pdf", "mime_type" => "application/pdf")
|
|
400
413
|
end
|
|
401
414
|
|
|
402
415
|
it "json_feed_item from rogue scholar with relations and funding" do
|
|
@@ -433,6 +446,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
|
433
446
|
"title")).to eq("Tracking the Growth of the PID Graph")
|
|
434
447
|
expect(crossref_xml.dig("item_number")).to eq("__content__" => "e58dc9c8b8704db28896238b3246c551", "item_number_type" => "uuid")
|
|
435
448
|
expect(crossref_xml.dig("group_title")).to eq("Computer and information sciences")
|
|
449
|
+
expect(crossref_xml.dig("doi_data", "collection", "item", "resource").length).to eq(4)
|
|
450
|
+
expect(crossref_xml.dig("doi_data", "collection", "item", "resource", 2)).to eq("__content__" => "https://api.rogue-scholar.org/posts/10.53731/r79s4nh-97aq74v-ag4t1.pdf", "mime_type" => "application/pdf")
|
|
436
451
|
end
|
|
437
452
|
|
|
438
453
|
it "json_feed_item from rogue scholar with anonymous author" do
|
|
@@ -466,6 +481,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
|
466
481
|
"title")).to eq("Welcome to the Lab")
|
|
467
482
|
expect(crossref_xml.dig("item_number")).to eq("__content__" => "a163e3405b3c47369ab08c54fdff6a3c", "item_number_type" => "uuid")
|
|
468
483
|
expect(crossref_xml.dig("group_title")).to eq("Computer and information sciences")
|
|
484
|
+
expect(crossref_xml.dig("doi_data", "collection", "item", "resource").length).to eq(4)
|
|
485
|
+
expect(crossref_xml.dig("doi_data", "collection", "item", "resource", 2)).to eq("__content__" => "https://api.rogue-scholar.org/posts/10.59350/9ry27-7cz42.pdf", "mime_type" => "application/pdf")
|
|
469
486
|
end
|
|
470
487
|
end
|
|
471
488
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: commonmeta-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.8.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Martin Fenner
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2024-01-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -599,6 +599,7 @@ files:
|
|
|
599
599
|
- ".github/workflows/build.yml"
|
|
600
600
|
- ".github/workflows/changelog.yml"
|
|
601
601
|
- ".github/workflows/codeql-analysis.yml"
|
|
602
|
+
- ".github/workflows/publish.yml"
|
|
602
603
|
- ".github/workflows/rubocop.yml"
|
|
603
604
|
- ".gitignore"
|
|
604
605
|
- ".rubocop.yml"
|
|
@@ -615,6 +616,41 @@ files:
|
|
|
615
616
|
- bin/commonmeta
|
|
616
617
|
- commonmeta.gemspec
|
|
617
618
|
- csl-data.json
|
|
619
|
+
- docs/.gitignore
|
|
620
|
+
- docs/_publish.yml
|
|
621
|
+
- docs/_quarto.yml
|
|
622
|
+
- docs/_site/favicon.ico
|
|
623
|
+
- docs/_site/images/icon.png
|
|
624
|
+
- docs/_site/index.html
|
|
625
|
+
- docs/_site/readers/bibtex_reader.html
|
|
626
|
+
- docs/_site/search.json
|
|
627
|
+
- docs/_site/site_libs/bootstrap/bootstrap-dark.min.css
|
|
628
|
+
- docs/_site/site_libs/bootstrap/bootstrap-icons.css
|
|
629
|
+
- docs/_site/site_libs/bootstrap/bootstrap-icons.woff
|
|
630
|
+
- docs/_site/site_libs/bootstrap/bootstrap.min.css
|
|
631
|
+
- docs/_site/site_libs/bootstrap/bootstrap.min.js
|
|
632
|
+
- docs/_site/site_libs/clipboard/clipboard.min.js
|
|
633
|
+
- docs/_site/site_libs/quarto-html/anchor.min.js
|
|
634
|
+
- docs/_site/site_libs/quarto-html/popper.min.js
|
|
635
|
+
- docs/_site/site_libs/quarto-html/quarto-syntax-highlighting-dark.css
|
|
636
|
+
- docs/_site/site_libs/quarto-html/quarto-syntax-highlighting.css
|
|
637
|
+
- docs/_site/site_libs/quarto-html/quarto.js
|
|
638
|
+
- docs/_site/site_libs/quarto-html/tippy.css
|
|
639
|
+
- docs/_site/site_libs/quarto-html/tippy.umd.min.js
|
|
640
|
+
- docs/_site/site_libs/quarto-nav/headroom.min.js
|
|
641
|
+
- docs/_site/site_libs/quarto-nav/quarto-nav.js
|
|
642
|
+
- docs/_site/site_libs/quarto-search/autocomplete.umd.js
|
|
643
|
+
- docs/_site/site_libs/quarto-search/fuse.min.js
|
|
644
|
+
- docs/_site/site_libs/quarto-search/quarto-search.js
|
|
645
|
+
- docs/_site/utils/doi_utils.html
|
|
646
|
+
- docs/_site/writers/bibtex_writer.html
|
|
647
|
+
- docs/favicon.ico
|
|
648
|
+
- docs/images/icon.png
|
|
649
|
+
- docs/index.qmd
|
|
650
|
+
- docs/readers/bibtex_reader.ipynb
|
|
651
|
+
- docs/theme.scss
|
|
652
|
+
- docs/utils/doi_utils.ipynb
|
|
653
|
+
- docs/writers/bibtex_writer.ipynb
|
|
618
654
|
- lib/commonmeta.rb
|
|
619
655
|
- lib/commonmeta/array.rb
|
|
620
656
|
- lib/commonmeta/author_utils.rb
|
|
@@ -791,6 +827,7 @@ files:
|
|
|
791
827
|
- spec/fixtures/vcr_cassettes/Commonmeta_CLI/find_from_format_by_id/medra.yml
|
|
792
828
|
- spec/fixtures/vcr_cassettes/Commonmeta_CLI/find_from_format_by_id/op.yml
|
|
793
829
|
- spec/fixtures/vcr_cassettes/Commonmeta_CLI/json_feed/json_feed_blog_id.yml
|
|
830
|
+
- spec/fixtures/vcr_cassettes/Commonmeta_CLI/json_feed/json_feed_blog_slug.yml
|
|
794
831
|
- spec/fixtures/vcr_cassettes/Commonmeta_CLI/json_feed/json_feed_by_blog.yml
|
|
795
832
|
- spec/fixtures/vcr_cassettes/Commonmeta_CLI/json_feed/json_feed_unregistered.yml
|
|
796
833
|
- spec/fixtures/vcr_cassettes/Commonmeta_CLI/json_feed/json_feed_updated.yml
|
|
@@ -1053,7 +1090,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
1053
1090
|
- !ruby/object:Gem::Version
|
|
1054
1091
|
version: '0'
|
|
1055
1092
|
requirements: []
|
|
1056
|
-
rubygems_version: 3.4.
|
|
1093
|
+
rubygems_version: 3.4.22
|
|
1057
1094
|
signing_key:
|
|
1058
1095
|
specification_version: 4
|
|
1059
1096
|
summary: Ruby client library for conversion of scholarly metadata
|