commonmeta-ruby 3.4.5 → 3.5
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/Gemfile.lock +2 -2
- data/lib/commonmeta/author_utils.rb +103 -71
- data/lib/commonmeta/crossref_utils.rb +31 -25
- data/lib/commonmeta/metadata.rb +2 -8
- data/lib/commonmeta/metadata_utils.rb +4 -3
- data/lib/commonmeta/readers/bibtex_reader.rb +3 -3
- data/lib/commonmeta/readers/cff_reader.rb +7 -6
- data/lib/commonmeta/readers/codemeta_reader.rb +3 -3
- data/lib/commonmeta/readers/crossref_reader.rb +3 -5
- data/lib/commonmeta/readers/crossref_xml_reader.rb +7 -6
- data/lib/commonmeta/readers/csl_reader.rb +3 -4
- data/lib/commonmeta/readers/datacite_reader.rb +3 -5
- data/lib/commonmeta/readers/json_feed_reader.rb +2 -2
- data/lib/commonmeta/readers/npm_reader.rb +2 -2
- data/lib/commonmeta/readers/ris_reader.rb +1 -1
- data/lib/commonmeta/readers/schema_org_reader.rb +3 -3
- data/lib/commonmeta/schema_utils.rb +1 -1
- data/lib/commonmeta/utils.rb +4 -2
- data/lib/commonmeta/version.rb +1 -1
- data/lib/commonmeta/writers/bibtex_writer.rb +1 -1
- data/lib/commonmeta/writers/cff_writer.rb +5 -4
- data/lib/commonmeta/writers/codemeta_writer.rb +4 -2
- data/lib/commonmeta/writers/csv_writer.rb +4 -2
- data/lib/commonmeta/writers/datacite_writer.rb +1 -1
- data/lib/commonmeta/writers/jats_writer.rb +9 -5
- data/lib/commonmeta/writers/ris_writer.rb +2 -1
- data/lib/commonmeta/writers/schema_org_writer.rb +6 -3
- data/resources/{commonmeta_v0.9.3.json → commonmeta_v0.10.json} +62 -46
- data/spec/author_utils_spec.rb +16 -16
- data/spec/cli_spec.rb +1 -1
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_crossref_metadata/missing_contributor.yml +307 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_datacite_metadata/SoftwareSourceCode.yml +76 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/book_oup.yml +107 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/journal_article_plos.yml +407 -0
- data/spec/metadata_spec.rb +2 -2
- data/spec/readers/bibtex_reader_spec.rb +5 -5
- data/spec/readers/cff_reader_spec.rb +127 -127
- data/spec/readers/codemeta_reader_spec.rb +11 -11
- data/spec/readers/crossref_reader_spec.rb +831 -835
- data/spec/readers/crossref_xml_reader_spec.rb +899 -901
- data/spec/readers/csl_reader_spec.rb +33 -33
- data/spec/readers/datacite_reader_spec.rb +106 -103
- data/spec/readers/json_feed_reader_spec.rb +40 -40
- data/spec/readers/npm_reader_spec.rb +32 -33
- data/spec/readers/ris_reader_spec.rb +36 -36
- data/spec/readers/schema_org_reader_spec.rb +284 -284
- data/spec/writers/codemeta_writer_spec.rb +19 -20
- data/spec/writers/crossref_xml_writer_spec.rb +73 -37
- data/spec/writers/datacite_writer_spec.rb +1 -1
- metadata +7 -3
@@ -14,8 +14,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
14
14
|
expect(subject.url).to eq("https://iphylo.blogspot.com/2023/05/ten-years-and-million-links.html")
|
15
15
|
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "f3629c86-06e0-42c0-844a-266b03a91ef1", "alternateIdentifierType" => "UUID" }])
|
16
16
|
expect(subject.type).to eq("Article")
|
17
|
-
expect(subject.
|
18
|
-
expect(subject.
|
17
|
+
expect(subject.contributors.length).to eq(1)
|
18
|
+
expect(subject.contributors.first).to eq("id" => "https://orcid.org/0000-0002-7101-9767", "familyName" => "Page", "givenName" => "Roderic", "type" => "Person", "contributorRoles" => ["Author"])
|
19
19
|
expect(subject.titles).to eq([{ "title" => "Ten years and a million links" }])
|
20
20
|
expect(subject.license).to eq("id" => "CC-BY-4.0",
|
21
21
|
"url" => "https://creativecommons.org/licenses/by/4.0/legalcode")
|
@@ -38,8 +38,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
38
38
|
expect(subject.url).to eq("https://blog.front-matter.io/posts/does-it-compose")
|
39
39
|
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "5bb66e92-5cb9-4659-8aca-20e486b695c9", "alternateIdentifierType" => "UUID" }])
|
40
40
|
expect(subject.type).to eq("Article")
|
41
|
-
expect(subject.
|
42
|
-
expect(subject.
|
41
|
+
expect(subject.contributors.length).to eq(1)
|
42
|
+
expect(subject.contributors.first).to eq("id" => "https://orcid.org/0000-0003-1419-2405", "familyName" => "Fenner", "givenName" => "Martin", "type" => "Person", "contributorRoles" => ["Author"])
|
43
43
|
expect(subject.titles).to eq([{ "title" => "Does it compose?" }])
|
44
44
|
expect(subject.license).to eq("id" => "CC-BY-4.0",
|
45
45
|
"url" => "https://creativecommons.org/licenses/by/4.0/legalcode")
|
@@ -62,8 +62,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
62
62
|
expect(subject.url).to eq("https://blog.front-matter.io/posts/differences-between-orcid-and-datacite-metadata")
|
63
63
|
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "8a4de443-3347-4b82-b57d-e3c82b6485fc", "alternateIdentifierType" => "UUID" }])
|
64
64
|
expect(subject.type).to eq("Article")
|
65
|
-
expect(subject.
|
66
|
-
expect(subject.
|
65
|
+
expect(subject.contributors.length).to eq(1)
|
66
|
+
expect(subject.contributors.first).to eq("id" => "https://orcid.org/0000-0003-1419-2405", "familyName" => "Fenner", "givenName" => "Martin", "type" => "Person", "contributorRoles" => ["Author"])
|
67
67
|
expect(subject.titles).to eq([{ "title" => "Differences between ORCID and DataCite Metadata" }])
|
68
68
|
expect(subject.license).to eq("id" => "CC-BY-4.0",
|
69
69
|
"url" => "https://creativecommons.org/licenses/by/4.0/legalcode")
|
@@ -87,8 +87,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
87
87
|
expect(subject.url).to eq("https://blog.front-matter.io/posts/nine-simple-ways-to-make-it-easier-to-re-use-your-data")
|
88
88
|
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "2bdebfc5-e02e-42c2-90c5-e873e2d0435d", "alternateIdentifierType" => "UUID" }])
|
89
89
|
expect(subject.type).to eq("Article")
|
90
|
-
expect(subject.
|
91
|
-
expect(subject.
|
90
|
+
expect(subject.contributors.length).to eq(1)
|
91
|
+
expect(subject.contributors.first).to eq("id" => "https://orcid.org/0000-0003-1419-2405", "familyName" => "Fenner", "givenName" => "Martin", "type" => "Person", "contributorRoles" => ["Author"])
|
92
92
|
expect(subject.titles).to eq([{ "title" => "Nine simple ways to make it easier to (re)use your data" }])
|
93
93
|
expect(subject.license).to eq("id" => "CC-BY-4.0",
|
94
94
|
"url" => "https://creativecommons.org/licenses/by/4.0/legalcode")
|
@@ -112,8 +112,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
112
112
|
expect(subject.url).to eq("https://blog.front-matter.io/posts/tracking-the-growth-of-the-pid-graph")
|
113
113
|
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "e58dc9c8-b870-4db2-8896-238b3246c551", "alternateIdentifierType" => "UUID" }])
|
114
114
|
expect(subject.type).to eq("Article")
|
115
|
-
expect(subject.
|
116
|
-
expect(subject.
|
115
|
+
expect(subject.contributors.length).to eq(1)
|
116
|
+
expect(subject.contributors.first).to eq("id" => "https://orcid.org/0000-0003-1419-2405", "familyName" => "Fenner", "givenName" => "Martin", "type" => "Person", "contributorRoles" => ["Author"])
|
117
117
|
expect(subject.titles).to eq([{ "title" => "Tracking the Growth of the PID Graph" }])
|
118
118
|
expect(subject.license).to eq("id" => "CC-BY-4.0",
|
119
119
|
"url" => "https://creativecommons.org/licenses/by/4.0/legalcode")
|
@@ -138,9 +138,9 @@ describe Commonmeta::Metadata, vcr: true do
|
|
138
138
|
expect(subject.url).to eq("https://www.ideasurg.pub/residency-visual-abstract")
|
139
139
|
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "c3095752-2af0-40a4-a229-3ceb7424bce2", "alternateIdentifierType" => "UUID" }])
|
140
140
|
expect(subject.type).to eq("Article")
|
141
|
-
expect(subject.
|
142
|
-
expect(subject.
|
143
|
-
"id" => "https://orcid.org/0000-0003-0449-4469", "type" => "Person")
|
141
|
+
expect(subject.contributors.length).to eq(1)
|
142
|
+
expect(subject.contributors.first).to eq("familyName" => "Sathe", "givenName" => "Tejas S.",
|
143
|
+
"id" => "https://orcid.org/0000-0003-0449-4469", "type" => "Person", "contributorRoles" => ["Author"])
|
144
144
|
expect(subject.titles).to eq([{ "title" => "The Residency Visual Abstract" }])
|
145
145
|
expect(subject.license).to eq("id" => "CC-BY-4.0",
|
146
146
|
"url" => "https://creativecommons.org/licenses/by/4.0/legalcode")
|
@@ -163,8 +163,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
163
163
|
expect(subject.url).to eq("https://www.ideasurg.pub/academic-powerhouse")
|
164
164
|
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "153d65e1-f0e4-49a6-a969-33d2129800ba", "alternateIdentifierType" => "UUID" }])
|
165
165
|
expect(subject.type).to eq("Article")
|
166
|
-
expect(subject.
|
167
|
-
expect(subject.
|
166
|
+
expect(subject.contributors.length).to eq(1)
|
167
|
+
expect(subject.contributors.first).to eq("familyName" => "Sathe", "givenName" => "Tejas S.", "type" => "Person", "contributorRoles" => ["Author"],
|
168
168
|
"id" => "https://orcid.org/0000-0003-0449-4469")
|
169
169
|
expect(subject.titles).to eq([{ "title" => "How to Build an Academic Powerhouse: Let's Study Who's Doing it" }])
|
170
170
|
expect(subject.license).to eq("id" => "CC-BY-4.0",
|
@@ -189,8 +189,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
189
189
|
expect(subject.url).to eq("https://syldavia-gazette.org/guinea-worms-chatgpt-neanderthals")
|
190
190
|
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "0022b9ef-525a-4a79-81ad-13411697f58a", "alternateIdentifierType" => "UUID" }])
|
191
191
|
expect(subject.type).to eq("Article")
|
192
|
-
expect(subject.
|
193
|
-
expect(subject.
|
192
|
+
expect(subject.contributors.length).to eq(1)
|
193
|
+
expect(subject.contributors.first).to eq("familyName" => "Fenner", "givenName" => "Martin", "id" => "https://orcid.org/0000-0003-1419-2405", "type" => "Person", "contributorRoles" => ["Author"])
|
194
194
|
expect(subject.titles).to eq([{ "title" => "Guinea Worms, ChatGPT, Neanderthals, Plagiarism, Tidyverse" }])
|
195
195
|
expect(subject.license).to eq("id" => "CC-BY-4.0",
|
196
196
|
"url" => "https://creativecommons.org/licenses/by/4.0/legalcode")
|
@@ -212,8 +212,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
212
212
|
expect(subject.url).to eq("https://wisspub.net/2023/05/23/eu-mitgliedstaaten-betonen-die-rolle-von-wissenschaftsgeleiteten-open-access-modellen-jenseits-von-apcs")
|
213
213
|
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "1c578558-1324-4493-b8af-84c49eabc52f", "alternateIdentifierType" => "UUID" }])
|
214
214
|
expect(subject.type).to eq("Article")
|
215
|
-
expect(subject.
|
216
|
-
expect(subject.
|
215
|
+
expect(subject.contributors.length).to eq(1)
|
216
|
+
expect(subject.contributors.first).to eq("familyName" => "Pampel", "givenName" => "Heinz", "id" => "https://orcid.org/0000-0003-3334-2771", "type" => "Person", "contributorRoles" => ["Author"])
|
217
217
|
expect(subject.titles).to eq([{ "title" => "EU-Mitgliedstaaten betonen die Rolle von wissenschaftsgeleiteten Open-Access-Modellen jenseits von APCs" }])
|
218
218
|
expect(subject.license).to eq("id" => "CC-BY-4.0",
|
219
219
|
"url" => "https://creativecommons.org/licenses/by/4.0/legalcode")
|
@@ -235,8 +235,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
235
235
|
expect(subject.id).to eq("https://doi.org/10.59350/hke8v-d1e66")
|
236
236
|
expect(subject.url).to eq("https://svpow.com/2023/06/09/new-paper-curtice-et-al-2023-on-the-first-haplocanthosaurus-from-dry-mesa")
|
237
237
|
expect(subject.type).to eq("Article")
|
238
|
-
expect(subject.
|
239
|
-
expect(subject.
|
238
|
+
expect(subject.contributors.length).to eq(1)
|
239
|
+
expect(subject.contributors.first).to eq("familyName" => "Wedel", "givenName" => "Matt", "type" => "Person", "contributorRoles" => ["Author"])
|
240
240
|
expect(subject.titles).to eq([{ "title" => "New paper: Curtice et al. (2023) on the first Haplocanthosaurus from Dry Mesa" }])
|
241
241
|
expect(subject.license).to eq("id" => "CC-BY-4.0",
|
242
242
|
"url" => "https://creativecommons.org/licenses/by/4.0/legalcode")
|
@@ -260,8 +260,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
260
260
|
expect(subject.id).to eq("https://doi.org/10.59350/tpa8t-j6292")
|
261
261
|
expect(subject.url).to eq("https://www.samuelmoore.org/2023/04/20/how-to-cultivate-good-closures-scaling-small-and-the-limits-of-openness")
|
262
262
|
expect(subject.type).to eq("Article")
|
263
|
-
expect(subject.
|
264
|
-
expect(subject.
|
263
|
+
expect(subject.contributors.length).to eq(1)
|
264
|
+
expect(subject.contributors.first).to eq("familyName" => "Moore", "givenName" => "Samuel", "id" => "https://orcid.org/0000-0002-0504-2897", "type" => "Person", "contributorRoles" => ["Author"])
|
265
265
|
expect(subject.titles).to eq([{ "title" => "How to cultivate good closures: ‘scaling small’ and the limits of openness" }])
|
266
266
|
expect(subject.license).to eq("id" => "CC-BY-4.0",
|
267
267
|
"url" => "https://creativecommons.org/licenses/by/4.0/legalcode")
|
@@ -284,8 +284,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
284
284
|
expect(subject.id).to eq("https://doi.org/10.59350/tfahc-rp566")
|
285
285
|
expect(subject.url).to eq("https://blog.oa.works/nature-features-oa-reports-work-putting-oa-policy-into-practice")
|
286
286
|
expect(subject.type).to eq("Article")
|
287
|
-
expect(subject.
|
288
|
-
expect(subject.
|
287
|
+
expect(subject.contributors.length).to eq(1)
|
288
|
+
expect(subject.contributors.first).to eq("name" => "OA.Works", "type" => "Organization", "contributorRoles" => ["Author"])
|
289
289
|
expect(subject.titles).to eq([{ "title" => "Nature features OA.Report's work putting OA policy into practice!" }])
|
290
290
|
expect(subject.license).to eq("id" => "CC-BY-4.0",
|
291
291
|
"url" => "https://creativecommons.org/licenses/by/4.0/legalcode")
|
@@ -308,8 +308,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
308
308
|
expect(subject.url).to eq("https://upstream.force11.org/the-research-software-alliance-resa")
|
309
309
|
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "954f8138-0ecd-4090-87c5-cef1297f1470", "alternateIdentifierType" => "UUID" }])
|
310
310
|
expect(subject.type).to eq("Article")
|
311
|
-
expect(subject.
|
312
|
-
expect(subject.
|
311
|
+
expect(subject.contributors.length).to eq(2)
|
312
|
+
expect(subject.contributors.first).to eq("familyName" => "Katz", "givenName" => "Daniel S.", "id" => "https://orcid.org/0000-0001-5934-7525", "type" => "Person", "contributorRoles" => ["Author"])
|
313
313
|
expect(subject.titles).to eq([{ "title" => "The Research Software Alliance (ReSA)" }])
|
314
314
|
expect(subject.license).to eq("id" => "CC-BY-4.0",
|
315
315
|
"url" => "https://creativecommons.org/licenses/by/4.0/legalcode")
|
@@ -334,9 +334,9 @@ describe Commonmeta::Metadata, vcr: true do
|
|
334
334
|
expect(subject.url).to eq("https://citationstyles.org/2020/07/11/seeking-public-comment-on-CSL-1-0-2")
|
335
335
|
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "efdacb04-bcec-49d7-b689-ab3eab0634bf", "alternateIdentifierType" => "UUID" }])
|
336
336
|
expect(subject.type).to eq("Article")
|
337
|
-
expect(subject.
|
338
|
-
expect(subject.
|
339
|
-
"id" => "https://orcid.org/0000-0001-8249-7388", "type" => "Person")
|
337
|
+
expect(subject.contributors.length).to eq(1)
|
338
|
+
expect(subject.contributors.first).to eq("familyName" => "Karcher", "givenName" => "Sebastian",
|
339
|
+
"id" => "https://orcid.org/0000-0001-8249-7388", "type" => "Person", "contributorRoles" => ["Author"])
|
340
340
|
expect(subject.titles).to eq([{ "title" => "Seeking Public Comment on CSL 1.0.2 Release" }])
|
341
341
|
expect(subject.license).to eq("id" => "CC-BY-4.0",
|
342
342
|
"url" => "https://creativecommons.org/licenses/by/4.0/legalcode")
|
@@ -359,8 +359,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
359
359
|
expect(subject.url).to eq("https://libscie.org/ku-leuven-supports-researchequals")
|
360
360
|
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "5561f8e4-2ff1-4186-a8d5-8dacb3afe414", "alternateIdentifierType" => "UUID" }])
|
361
361
|
expect(subject.type).to eq("Article")
|
362
|
-
expect(subject.
|
363
|
-
expect(subject.
|
362
|
+
expect(subject.contributors.length).to eq(1)
|
363
|
+
expect(subject.contributors.first).to eq("id" => "https://ror.org/0342dzm54", "name" => "Liberate Science", "type" => "Organization", "contributorRoles" => ["Author"])
|
364
364
|
expect(subject.titles).to eq([{ "title" => "KU Leuven supports ResearchEquals" }])
|
365
365
|
expect(subject.license).to eq("id" => "CC-BY-4.0",
|
366
366
|
"url" => "https://creativecommons.org/licenses/by/4.0/legalcode")
|
@@ -384,8 +384,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
384
384
|
expect(subject.url).to eq("https://lab.sub.uni-goettingen.de/welcome.html")
|
385
385
|
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "a163e340-5b3c-4736-9ab0-8c54fdff6a3c", "alternateIdentifierType" => "UUID" }])
|
386
386
|
expect(subject.type).to eq("Article")
|
387
|
-
expect(subject.
|
388
|
-
expect(subject.
|
387
|
+
expect(subject.contributors.length).to eq(1)
|
388
|
+
expect(subject.contributors.first).to eq("familyName" => "Göbel", "givenName" => "Mathias", "type" => "Person", "contributorRoles" => ["Author"])
|
389
389
|
expect(subject.titles).to eq([{ "title" => "Welcome to the Lab" }])
|
390
390
|
expect(subject.license).to eq("id" => "CC-BY-4.0",
|
391
391
|
"url" => "https://creativecommons.org/licenses/by/4.0/legalcode")
|
@@ -409,8 +409,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
409
409
|
expect(subject.url).to eq("http://sfmatheson.blogspot.com/2023/01/quintessence-of-dust-2023-restart-why.html")
|
410
410
|
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "1898d2d7-4d87-4487-96c4-3073cf99e9a5", "alternateIdentifierType" => "UUID" }])
|
411
411
|
expect(subject.type).to eq("Article")
|
412
|
-
expect(subject.
|
413
|
-
expect(subject.
|
412
|
+
expect(subject.contributors.length).to eq(1)
|
413
|
+
expect(subject.contributors.first).to eq("familyName" => "Matheson", "givenName" => "Stephen", "type" => "Person", "contributorRoles" => ["Author"])
|
414
414
|
expect(subject.titles).to eq([{ "title" => "Quintessence of Dust 2023 restart: the why" }])
|
415
415
|
expect(subject.license).to eq("id" => "CC-BY-4.0",
|
416
416
|
"url" => "https://creativecommons.org/licenses/by/4.0/legalcode")
|
@@ -434,8 +434,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
434
434
|
expect(subject.url).to eq("https://flavoursofopen.science/grundlagen-fur-die-entwicklung-einer-open-scholarship-strategie")
|
435
435
|
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "f3dc29da-0481-4f3b-8110-4c07260fca67", "alternateIdentifierType" => "UUID" }])
|
436
436
|
expect(subject.type).to eq("Article")
|
437
|
-
expect(subject.
|
438
|
-
expect(subject.
|
437
|
+
expect(subject.contributors.length).to eq(1)
|
438
|
+
expect(subject.contributors.first).to eq("familyName" => "Steiner", "givenName" => "Tobias", "id" => "https://orcid.org/0000-0002-3158-3136", "type" => "Person", "contributorRoles" => ["Author"])
|
439
439
|
expect(subject.titles).to eq([{ "title" => "Grundlagen für die Entwicklung einer Open Scholarship-Strategie" }])
|
440
440
|
expect(subject.license).to eq("id" => "CC-BY-4.0",
|
441
441
|
"url" => "https://creativecommons.org/licenses/by/4.0/legalcode")
|
@@ -460,8 +460,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
460
460
|
expect(subject.url).to eq("https://markrubin.substack.com/p/the-preregistration-prescriptiveness")
|
461
461
|
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "2b105b29-acbc-4eae-9ff1-368803f36a4d", "alternateIdentifierType" => "UUID" }])
|
462
462
|
expect(subject.type).to eq("Article")
|
463
|
-
expect(subject.
|
464
|
-
expect(subject.
|
463
|
+
expect(subject.contributors.length).to eq(1)
|
464
|
+
expect(subject.contributors.first).to eq("familyName" => "Rubin", "givenName" => "Mark", "type" => "Person", "contributorRoles" => ["Author"])
|
465
465
|
expect(subject.titles).to eq([{ "title" => "The Preregistration Prescriptiveness Trade-Off and Unknown Unknowns in Science" }])
|
466
466
|
expect(subject.license).to eq("id" => "CC-BY-4.0",
|
467
467
|
"url" => "https://creativecommons.org/licenses/by/4.0/legalcode")
|
@@ -1,67 +1,66 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
3
|
+
require "spec_helper"
|
4
4
|
|
5
5
|
describe Commonmeta::Metadata, vcr: true do
|
6
|
-
subject { described_class.new(input: input, from:
|
6
|
+
subject { described_class.new(input: input, from: "npm") }
|
7
7
|
|
8
8
|
let(:input) { "#{fixture_path}cgimp_package.json" }
|
9
9
|
|
10
|
-
context
|
11
|
-
it
|
10
|
+
context "get npm raw" do
|
11
|
+
it "software" do
|
12
12
|
expect(subject.raw).to eq(File.read(input).strip)
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
|
-
context
|
17
|
-
it
|
16
|
+
context "get npm metadata" do
|
17
|
+
it "minimal" do
|
18
18
|
expect(subject.valid?).to be false
|
19
|
-
expect(subject.errors.first).to eq(
|
19
|
+
expect(subject.errors.first).to eq("root is missing required keys: id, url, publisher, date")
|
20
20
|
# expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.5438/4k3m-nyvg", "identifierType"=>"DOI"}])
|
21
21
|
# expect(subject.url).to eq("https://blog.datacite.org/eating-your-own-dog-food")
|
22
|
-
expect(subject.type).to eq(
|
23
|
-
expect(subject.
|
24
|
-
expect(subject.titles).to eq([{
|
22
|
+
expect(subject.type).to eq("Software")
|
23
|
+
expect(subject.contributors).to be_empty
|
24
|
+
expect(subject.titles).to eq([{ "title" => "fullstack_app" }])
|
25
25
|
expect(subject.descriptions.empty?).to be(true)
|
26
|
-
expect(subject.license).to eq(
|
27
|
-
|
28
|
-
expect(subject.version).to eq(
|
26
|
+
expect(subject.license).to eq("id" => "ISC",
|
27
|
+
"url" => "https://www.isc.org/downloads/software-support-policy/isc-license/")
|
28
|
+
expect(subject.version).to eq("1.0.0")
|
29
29
|
# expect(subject.dates).to eq([{"date"=>"2016-12-20", "dateType"=>"Issued"}])
|
30
30
|
# expect(subject.publication_year).to eq("2016")
|
31
31
|
end
|
32
32
|
|
33
|
-
it
|
33
|
+
it "minimal with description" do
|
34
34
|
input = "#{fixture_path}cit_package.json"
|
35
|
-
subject = described_class.new(input: input, from:
|
35
|
+
subject = described_class.new(input: input, from: "npm")
|
36
36
|
expect(subject.valid?).to be false
|
37
|
-
expect(subject.errors.first).to eq(
|
37
|
+
expect(subject.errors.first).to eq("root is missing required keys: id, url, publisher, date")
|
38
38
|
# expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.5438/4k3m-nyvg", "identifierType"=>"DOI"}])
|
39
39
|
# expect(subject.url).to eq("https://blog.datacite.org/eating-your-own-dog-food")
|
40
|
-
expect(subject.type).to eq(
|
41
|
-
expect(subject.
|
42
|
-
expect(subject.titles).to eq([{
|
43
|
-
expect(subject.descriptions).to eq([{
|
44
|
-
|
45
|
-
expect(subject.version).to eq(
|
40
|
+
expect(subject.type).to eq("Software")
|
41
|
+
expect(subject.contributors).to be_empty
|
42
|
+
expect(subject.titles).to eq([{ "title" => "CITapp" }])
|
43
|
+
expect(subject.descriptions).to eq([{ "description" => "Concealed Information Test app",
|
44
|
+
"descriptionType" => "Abstract" }])
|
45
|
+
expect(subject.version).to eq("1.1.0")
|
46
46
|
# expect(subject.dates).to eq([{"date"=>"2016-12-20", "dateType"=>"Issued"}])
|
47
47
|
# expect(subject.publication_year).to eq("2016")
|
48
48
|
end
|
49
49
|
|
50
|
-
it
|
50
|
+
it "minimal with description" do
|
51
51
|
input = "#{fixture_path}edam_package.json"
|
52
|
-
subject = described_class.new(input: input, from:
|
52
|
+
subject = described_class.new(input: input, from: "npm")
|
53
53
|
expect(subject.valid?).to be false
|
54
|
-
expect(subject.errors.first).to eq(
|
54
|
+
expect(subject.errors.first).to eq("root is missing required keys: id, url, publisher, date")
|
55
55
|
# expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.5438/4k3m-nyvg", "identifierType"=>"DOI"}])
|
56
56
|
# expect(subject.url).to eq("https://blog.datacite.org/eating-your-own-dog-food")
|
57
|
-
expect(subject.type).to eq(
|
58
|
-
expect(subject.
|
59
|
-
|
60
|
-
expect(subject.titles).to eq([{
|
61
|
-
expect(subject.descriptions).to eq([{
|
62
|
-
|
63
|
-
|
64
|
-
expect(subject.version).to eq('1.0.0')
|
57
|
+
expect(subject.type).to eq("Software")
|
58
|
+
expect(subject.contributors).to eq([{ "familyName" => "Brancotte", "givenName" => "Bryan",
|
59
|
+
"type" => "Person", "contributorRoles" => ["Author"] }])
|
60
|
+
expect(subject.titles).to eq([{ "title" => "edam-browser" }])
|
61
|
+
expect(subject.descriptions).to eq([{ "description" => +"The EDAM Browser is a client-side web-based visualization javascript widget. Its goals are to help describing bio-related resources and service with EDAM, and to facilitate and foster community contributions to EDAM.",
|
62
|
+
"descriptionType" => "Abstract" }])
|
63
|
+
expect(subject.version).to eq("1.0.0")
|
65
64
|
# expect(subject.dates).to eq([{"date"=>"2016-12-20", "dateType"=>"Issued"}])
|
66
65
|
# expect(subject.publication_year).to eq("2016")
|
67
66
|
end
|
@@ -1,70 +1,70 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
3
|
+
require "spec_helper"
|
4
4
|
|
5
5
|
describe Commonmeta::Metadata, vcr: true do
|
6
6
|
subject { described_class.new(input: input) }
|
7
7
|
|
8
8
|
let(:input) { "#{fixture_path}crossref.ris" }
|
9
9
|
|
10
|
-
context
|
11
|
-
it
|
10
|
+
context "detect format" do
|
11
|
+
it "extension" do
|
12
12
|
# expect(subject.valid?).to be true
|
13
13
|
end
|
14
14
|
|
15
|
-
it
|
15
|
+
it "string" do
|
16
16
|
described_class.new(input: File.read(input).strip)
|
17
17
|
# expect(subject.valid?).to be true
|
18
|
-
expect(subject.id).to eq(
|
18
|
+
expect(subject.id).to eq("https://doi.org/10.7554/elife.01567")
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
-
context
|
23
|
-
it
|
22
|
+
context "get ris raw" do
|
23
|
+
it "Crossref DOI" do
|
24
24
|
expect(subject.raw).to eq(File.read(input).strip)
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
-
context
|
29
|
-
it
|
28
|
+
context "get ris metadata" do
|
29
|
+
it "Crossref DOI" do
|
30
30
|
expect(subject.valid?).to be true
|
31
|
-
expect(subject.id).to eq(
|
32
|
-
expect(subject.type).to eq(
|
33
|
-
expect(subject.url).to eq(
|
34
|
-
expect(subject.
|
35
|
-
expect(subject.
|
36
|
-
|
37
|
-
|
38
|
-
expect(subject.titles).to eq([{
|
39
|
-
expect(subject.descriptions.first[
|
40
|
-
expect(subject.date).to eq(
|
41
|
-
expect(subject.container).to eq(
|
42
|
-
|
31
|
+
expect(subject.id).to eq("https://doi.org/10.7554/elife.01567")
|
32
|
+
expect(subject.type).to eq("JournalArticle")
|
33
|
+
expect(subject.url).to eq("http://elifesciences.org/lookup/doi/10.7554/eLife.01567")
|
34
|
+
expect(subject.contributors.length).to eq(5)
|
35
|
+
expect(subject.contributors.first).to eq("type" => "Person", "contributorRoles" => ["Author"],
|
36
|
+
"givenName" => "Martial",
|
37
|
+
"familyName" => "Sankar")
|
38
|
+
expect(subject.titles).to eq([{ "title" => "Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth" }])
|
39
|
+
expect(subject.descriptions.first["description"]).to start_with("Among various advantages, their small size makes model organisms preferred subjects of investigation.")
|
40
|
+
expect(subject.date).to eq("published" => "2014")
|
41
|
+
expect(subject.container).to eq("identifier" => "2050084X", "title" => "eLife",
|
42
|
+
"type" => "Journal", "volume" => "3")
|
43
43
|
end
|
44
44
|
|
45
|
-
it
|
45
|
+
it "DOI does not exist" do
|
46
46
|
input = "#{fixture_path}pure.ris"
|
47
|
-
doi =
|
47
|
+
doi = "10.7554/elife.01567"
|
48
48
|
subject = described_class.new(input: input, doi: doi)
|
49
49
|
expect(subject.valid?).to be false
|
50
|
-
expect(subject.state).to eq(
|
51
|
-
expect(subject.id).to eq(
|
52
|
-
expect(subject.type).to eq(
|
53
|
-
expect(subject.
|
54
|
-
expect(subject.titles).to eq([{
|
55
|
-
expect(subject.descriptions.first[
|
56
|
-
expect(subject.date).to eq(
|
50
|
+
expect(subject.state).to eq("not_found")
|
51
|
+
expect(subject.id).to eq("https://doi.org/10.7554/elife.01567")
|
52
|
+
expect(subject.type).to eq("Dissertation")
|
53
|
+
expect(subject.contributors).to eq([{ "familyName" => "Toparlar", "givenName" => "Y.", "type" => "Person", "contributorRoles" => ["Author"] }])
|
54
|
+
expect(subject.titles).to eq([{ "title" => "A multiscale analysis of the urban heat island effect" }])
|
55
|
+
expect(subject.descriptions.first["description"]).to start_with("Designing the climates of cities")
|
56
|
+
expect(subject.date).to eq("created" => "2018-04-25", "published" => "2018-04-25")
|
57
57
|
end
|
58
58
|
|
59
|
-
it
|
59
|
+
it "RIS with Dashes" do
|
60
60
|
input = "#{fixture_path}ris_bug.ris"
|
61
|
-
abs =
|
62
|
-
doi =
|
61
|
+
abs = "3D image based subject specific models of the ankle complex can be extremely significant in a wide variety of clinical and biomechanical applications such as evaluating the effect of ligament ruptures, diagnosing and comparing surgical procedures. However, there are very few computational models that can accurately capture the full 3D biomechanical properties of the ankle complex. One such computational model was introduced by our group in 2004 [1], and this model was partially validated with a very limited set of parameters for comparison. In the current study, we have developed an improvised version of this model and validated it on a subject to subject basis for a number of specimens. This is achieved by comparing a wide range of biomechanical parameters between the experiments and the simulation. Once, the model is validated, it can be used for a wide variety of clinical and surgical applications .Some applications include comparing the effects of surface morphology on the kinematics of the ankle joint, diagnosing and evaluation of ankle disorders like ligament tears and reconstruction surgeries. Previous experimental studies conducted to understand and validate the effect of morphological variations to kinematics involved invasive surgical procedures and hence could only be conducted in cadaveric foot. Hence a need for a dynamic model which could predict and recreate the kinematics of an ankle using only CT and, or MRI data was realized. Such a model could help in development and non-invasive testing of subject specific TAR. This thesis focusses on the subject specific validation of rigid body models of four specimens and an one-to-one validation based on Load-displacement curves, Range of Motion, Surface-to-surface interaction and Ligament straining patterns. Post validation of the MBS model in MSC ADAMS, the model is used to investigate the effect of axial loads, total ankle arthrodesis and the effect of varying surface morphologies on the behavior of the ankle joint complex. An in-depth comparative analysis on the use of a numerical model for the development and performance evaluation of an implant derived from the morphological parameters of the ankle joint is also presented."
|
62
|
+
doi = "10.7554/elife.01567"
|
63
63
|
subject = described_class.new(input: input, doi: doi)
|
64
64
|
# expect(subject.valid?).to be true
|
65
|
-
expect(subject.id).to eq(
|
66
|
-
expect(subject.titles).to eq([{
|
67
|
-
expect(subject.descriptions.first[
|
65
|
+
expect(subject.id).to eq("https://doi.org/10.7554/elife.01567")
|
66
|
+
expect(subject.titles).to eq([{ "title" => "Validation of an Image-based Subject-Specific Dynamic Model of the Ankle Joint Complex and its Applications to the Study of the Effect of Articular Surface Morphology on Ankle Joint Mechanics" }])
|
67
|
+
expect(subject.descriptions.first["description"]).to eq(abs)
|
68
68
|
end
|
69
69
|
end
|
70
70
|
end
|