commonmeta-ruby 3.5 → 3.5.1
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 +7 -7
- data/csl-data.json +538 -0
- data/lib/commonmeta/metadata.rb +7 -7
- data/lib/commonmeta/readers/crossref_reader.rb +130 -121
- data/lib/commonmeta/readers/datacite_reader.rb +2 -0
- data/lib/commonmeta/readers/json_feed_reader.rb +6 -2
- data/lib/commonmeta/readers/schema_org_reader.rb +3 -1
- data/lib/commonmeta/schema_utils.rb +1 -1
- data/lib/commonmeta/version.rb +1 -1
- data/lib/commonmeta/writers/schema_org_writer.rb +1 -1
- data/resources/{commonmeta_v0.10.json → commonmeta_v0.10.3.json} +80 -13
- data/resources/csl-citation.json +99 -0
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/archived_wordpress_post.yml +119 -0
- data/spec/readers/crossref_reader_spec.rb +15 -2
- data/spec/readers/json_feed_reader_spec.rb +28 -0
- data/spec/readers/schema_org_reader_spec.rb +8 -7
- data/spec/writers/datacite_writer_spec.rb +1 -0
- metadata +6 -3
@@ -0,0 +1,99 @@
|
|
1
|
+
{
|
2
|
+
"description": "JSON schema for CSL citation objects",
|
3
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
4
|
+
"$id": "https://resource.citationstyles.org/schema/latest/input/json/csl-citation.json",
|
5
|
+
"type": "object",
|
6
|
+
"properties": {
|
7
|
+
"schema": {
|
8
|
+
"type": "string",
|
9
|
+
"enum": [
|
10
|
+
"https://resource.citationstyles.org/schema/latest/input/json/csl-citation.json"
|
11
|
+
]
|
12
|
+
},
|
13
|
+
"citationID": {
|
14
|
+
"type": ["string", "number"]
|
15
|
+
},
|
16
|
+
"citationItems": {
|
17
|
+
"type": "array",
|
18
|
+
"items": {
|
19
|
+
"type": "object",
|
20
|
+
"properties": {
|
21
|
+
"id": {
|
22
|
+
"type": ["string", "number"]
|
23
|
+
},
|
24
|
+
"itemData": {
|
25
|
+
"$ref": "https://resource.citationstyles.org/schema/v1.0/input/json/csl-data.json#/items"
|
26
|
+
},
|
27
|
+
"prefix": {
|
28
|
+
"type": "string"
|
29
|
+
},
|
30
|
+
"suffix": {
|
31
|
+
"type": "string"
|
32
|
+
},
|
33
|
+
"locator": {
|
34
|
+
"type": "string"
|
35
|
+
},
|
36
|
+
"label": {
|
37
|
+
"type": "string",
|
38
|
+
"enum": [
|
39
|
+
"act",
|
40
|
+
"appendix",
|
41
|
+
"article-locator",
|
42
|
+
"book",
|
43
|
+
"canon",
|
44
|
+
"chapter",
|
45
|
+
"column",
|
46
|
+
"elocation",
|
47
|
+
"equation",
|
48
|
+
"figure",
|
49
|
+
"folio",
|
50
|
+
"issue",
|
51
|
+
"line",
|
52
|
+
"note",
|
53
|
+
"opus",
|
54
|
+
"page",
|
55
|
+
"paragraph",
|
56
|
+
"part",
|
57
|
+
"rule",
|
58
|
+
"scene",
|
59
|
+
"section",
|
60
|
+
"sub-verbo",
|
61
|
+
"supplement",
|
62
|
+
"table",
|
63
|
+
"timestamp",
|
64
|
+
"title-locator",
|
65
|
+
"verse",
|
66
|
+
"version",
|
67
|
+
"volume"
|
68
|
+
]
|
69
|
+
},
|
70
|
+
"suppress-author": {
|
71
|
+
"type": ["string", "number", "boolean"]
|
72
|
+
},
|
73
|
+
"author-only": {
|
74
|
+
"type": ["string", "number", "boolean"]
|
75
|
+
},
|
76
|
+
"uris": {
|
77
|
+
"type": "array",
|
78
|
+
"items": {
|
79
|
+
"type": "string"
|
80
|
+
}
|
81
|
+
}
|
82
|
+
},
|
83
|
+
"required": ["id"],
|
84
|
+
"additionalProperties": false
|
85
|
+
}
|
86
|
+
},
|
87
|
+
"properties": {
|
88
|
+
"type": "object",
|
89
|
+
"properties": {
|
90
|
+
"noteIndex": {
|
91
|
+
"type": "number"
|
92
|
+
}
|
93
|
+
},
|
94
|
+
"additionalProperties": false
|
95
|
+
}
|
96
|
+
},
|
97
|
+
"required": ["schema", "citationID"],
|
98
|
+
"additionalProperties": false
|
99
|
+
}
|
@@ -0,0 +1,119 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://rogue-scholar.org/api/posts/570c8129-e867-49e6-8517-bd783627e76e
|
6
|
+
body:
|
7
|
+
encoding: ASCII-8BIT
|
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
|
+
- '6830'
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Date:
|
30
|
+
- Thu, 21 Sep 2023 20:19:59 GMT
|
31
|
+
Etag:
|
32
|
+
- '"uocsviufsi599"'
|
33
|
+
Server:
|
34
|
+
- Vercel
|
35
|
+
Strict-Transport-Security:
|
36
|
+
- max-age=63072000
|
37
|
+
X-Matched-Path:
|
38
|
+
- "/api/posts/[[...params]]"
|
39
|
+
X-Vercel-Cache:
|
40
|
+
- MISS
|
41
|
+
X-Vercel-Id:
|
42
|
+
- fra1::iad1::vxt89-1695327599116-42087c13d5ed
|
43
|
+
Connection:
|
44
|
+
- close
|
45
|
+
body:
|
46
|
+
encoding: UTF-8
|
47
|
+
string: '{"id":"570c8129-e867-49e6-8517-bd783627e76e","doi":null,"url":"https://project-thor.eu/2016/08/10/orcid-integration-in-pangaea","archive_url":"https://web.archive.org/web/20190709153404/https://project-thor.eu/2016/08/10/orcid-integration-in-pangaea","title":"ORCID
|
48
|
+
Integration Series: PANGAEA","summary":"This is the first in a series of posts describing
|
49
|
+
how THOR partners have recently integrated ORCID in their disciplinary data
|
50
|
+
repositories. This post describes ORCID integration in PANGAEA, the Data Publisher
|
51
|
+
for Earth & Environmental Science. PANGAEA is rolling out a new version
|
52
|
+
of its website. Developers and designers are currently ironing out a few remaining
|
53
|
+
open issues. The release is expected for autumn 2016.","content_html":"<p><span>This
|
54
|
+
is the first in a <a href=\"http://wp.me/p5O69U-aF\">series of posts</a></span><span> describing
|
55
|
+
how THOR partners have recently integrated <a href=\"http://orcid.org/\">ORCID</a>
|
56
|
+
in their disciplinary data repositories. This post describes ORCID integration
|
57
|
+
in <a href=\"https://www.pangaea.de/\">PANGAEA</a>, the Data Publisher for
|
58
|
+
Earth & Environmental Science.</span></p>\n<p><span>PANGAEA is rolling
|
59
|
+
out a new version of its website. Developers and designers are currently ironing
|
60
|
+
out a few remaining open issues. The release is expected for autumn 2016.
|
61
|
+
Among major improvements in search, design, and usability, a key new feature
|
62
|
+
is the integration of ORCID.</span></p>\n<p><span>The new feature enables
|
63
|
+
existing PANGAEA users to connect their PANGAEA profile with their ORCID iD,
|
64
|
+
as demonstrated in the video below. </span></p>\n<p></p><div></div><p></p>\n<p><span>With
|
65
|
+
this connection, PANGAEA obtains the </span><i><span>validated</span></i><span>
|
66
|
+
ORCID iD of its users from ORCID. By connecting their ORCID iD, users can
|
67
|
+
also choose to sign in to PANGAEA using ORCID, as an alternative to signing
|
68
|
+
in using PANGAEA user credentials. This can be handy when a user is already
|
69
|
+
signed in to ORCID, or it is quicker to recall ORCID credentials.</span></p>\n<p><span>Obtaining
|
70
|
+
the validated ORCID iDs of its users is significant for PANGAEA as, contrary
|
71
|
+
to a researcher’s name, the iD is unambiguous: two researchers with the same
|
72
|
+
name can be distinguished by their respective iDs. The iD is also persistent
|
73
|
+
through possible changes in a person’s name: the same researcher may change
|
74
|
+
marital status, or their name may appear in different permutations, at times
|
75
|
+
appear with full name, initials for first name, and with or without middle
|
76
|
+
name (initial). Furthermore, the iD is actionable and can be used to discover
|
77
|
+
information about the researcher.</span></p>\n<p><span>For researchers, the
|
78
|
+
greatest advantage of connecting their ORCID iD to their PANGAEA profile is
|
79
|
+
that PANGAEA can then record the relationships between dataset publication
|
80
|
+
DOIs and contributor ORCID iDs. This information is then shared with the global
|
81
|
+
network of PID infrastructures, and researchers benefit from automated updates
|
82
|
+
to their ORCID Record for data published at PANGAEA, gaining unambiguous attribution
|
83
|
+
for published datasets and benefiting from greater credit for sharing data
|
84
|
+
early.</span></p>\n<p><span>Let’s take a look at how the ORCID integration
|
85
|
+
in PANGAEA is making a difference to <a href=\"https://www.marum.de/en/Alice_Lefebvre.html\">Dr
|
86
|
+
Alice Lefebvre</a>, <a href=\"https://www.marum.de/en/GLOMAR.html\">GLOMAR</a>
|
87
|
+
Associate Scientist at the <a href=\"https://www.marum.de/en/index.html\">MARUM</a>
|
88
|
+
Center for Marine Environmental Sciences of the <a href=\"http://www.uni-bremen.de/en.html\">University
|
89
|
+
of Bremen</a>. </span></p>\n<p><span>Alice has recently joined ORCID and decided
|
90
|
+
to claim the 14 data publications deposited at PANGAEA that she has authored.
|
91
|
+
As a consequence, Alice gains a more complete <a href=\"http://orcid.org/0000-0002-9234-8279\">ORCID
|
92
|
+
Record</a>, one that does not just include her journal article publications
|
93
|
+
but also her authorship in data publications </span><span>−</span><span> a
|
94
|
+
record that better reflects her true contribution to the scientific record.
|
95
|
+
Alice was also surprised to learn about <a href=\"http://datacite.org\">DataCite</a>
|
96
|
+
and the <a href=\"http://search.datacite.org/contributors/0000-0002-9234-8279\">overview</a>
|
97
|
+
DataCite provides about her contributions. </span></p>\n<p><span>The upcoming
|
98
|
+
release of the PANGAEA website automates the sharing of information with the
|
99
|
+
global network of PID infrastructures. Authors of datasets published at PANGAEA
|
100
|
+
who have connected their ORCID iD, like Alice, will benefit from a workflow
|
101
|
+
that ensures information appears automatically and accurately on their ORCID
|
102
|
+
Record.</span></p>\n<p><span>This shows how far the integration between disciplinary
|
103
|
+
repositories and the global network of PID infrastructures has come over the
|
104
|
+
past years, and how the persistent identification of contributors and research
|
105
|
+
artefacts together with infrastructures that aggregate, process, and share
|
106
|
+
information about persistently identified resources are driving and shaping
|
107
|
+
21st-century attribution, credit, communication, and measurement of scholarly
|
108
|
+
activity.</span></p>\n<p><b>Want to Know More?<br />\n</b><span>Readers interested
|
109
|
+
in performing an ORCID integration in their own disciplinary repository can
|
110
|
+
find more information in our recent report, ‘<a href=\"http://doi.org/10.5281/zenodo.58971\">Demonstration
|
111
|
+
of Services to Integrate ORCIDs into Data Records and Database Systems</a>‘</span><span>.
|
112
|
+
</span></p>\n","published_at":1470819639,"updated_at":1470819639,"indexed_at":0,"authors":[{"url":"https://orcid.org/0000-0001-5492-3212","name":"Markus
|
113
|
+
Stocker"}],"image":null,"tags":["Uncategorized","ORCID","Persistent Identifier"],"language":"en","reference":[],"relationships":[],"blog_id":"cg9zq26","blog_name":"Project
|
114
|
+
THOR","blog_slug":"thor","blog":{"id":"cg9zq26","title":"Project THOR","description":"Technical
|
115
|
+
and Human infrastructure for Open Research.","language":"en","favicon":null,"feed_url":"https://project-thor.eu/feed/atom/","home_page_url":"https://project-thor.eu","user_id":"dead81b3-8a8b-45c9-85fe-f01bb3948c77","created_at":"2023-09-21","feed_format":"application/atom+xml","license":"https://creativecommons.org/licenses/by/4.0/legalcode","generator":"WordPress
|
116
|
+
(.com)","category":"computerAndInformationSciences","prefix":"10.59350","modified_at":"1970-01-01T00:00:00+00:00","version":"https://jsonfeed.org/version/1.1","current_feed_url":null,"status":"archived","issn":null,"backlog":0,"authors":null,"plan":"Team","slug":"thor","use_mastodon":false,"api":false,"funding":{"award_uri":"https://doi.org/10.3030/654039","funder_id":"https://doi.org/10.13039/501100007601","funder_name":"European
|
117
|
+
Union’s Horizon 2020 research and innovation programme","award_number":"654039"},"archive_prefix":"https://web.archive.org/web/20190709153404/"}}'
|
118
|
+
recorded_at: Thu, 21 Sep 2023 20:19:59 GMT
|
119
|
+
recorded_with: VCR 6.2.0
|
@@ -302,6 +302,10 @@ describe Commonmeta::Metadata, vcr: true do
|
|
302
302
|
expect(subject.references.length).to eq(27)
|
303
303
|
expect(subject.references.last).to eq("doi" => "https://doi.org/10.1378/chest.12-0045",
|
304
304
|
"key" => "30")
|
305
|
+
expect(subject.files).to eq([{ "mimeType" => "application/pdf",
|
306
|
+
"url" => "http://downloads.hindawi.com/journals/pm/2012/291294.pdf" },
|
307
|
+
{ "mimeType" => "application/xml",
|
308
|
+
"url" => "http://downloads.hindawi.com/journals/pm/2012/291294.xml" }])
|
305
309
|
expect(subject.container).to eq("firstPage" => "1", "identifier" => "2090-1844",
|
306
310
|
"identifierType" => "ISSN", "lastPage" => "7", "title" => "Pulmonary Medicine", "type" => "Journal", "volume" => "2012")
|
307
311
|
expect(subject.provider).to eq("Crossref")
|
@@ -329,6 +333,10 @@ describe Commonmeta::Metadata, vcr: true do
|
|
329
333
|
"publicationYear" => "1998",
|
330
334
|
"title" => "Characterization of the peptide binding motif of a rhesus MHC class I molecule (Mamu-A*01) that binds an immunodominant CTL epitope from simianimmunodeficiency virus.",
|
331
335
|
"volume" => "160")
|
336
|
+
expect(subject.files).to eq([{ "mimeType" => "text/xml",
|
337
|
+
"url" => "https://api.elsevier.com/content/article/PII:S0014299915002332?httpAccept=text/xml" },
|
338
|
+
{ "mimeType" => "text/plain",
|
339
|
+
"url" => "https://api.elsevier.com/content/article/PII:S0014299915002332?httpAccept=text/plain" }])
|
332
340
|
expect(subject.container).to eq("firstPage" => "303", "identifier" => "0014-2999",
|
333
341
|
"identifierType" => "ISSN", "lastPage" => "312", "title" => "European Journal of Pharmacology", "type" => "Journal", "volume" => "759")
|
334
342
|
expect(subject.provider).to eq("Crossref")
|
@@ -356,6 +364,11 @@ describe Commonmeta::Metadata, vcr: true do
|
|
356
364
|
"publicationYear" => "1946",
|
357
365
|
"unstructured" => "Alvarez J . (1946). Revisión del género Anoptichthys con descipción de una especie nueva (Pisces, Characidae). An Esc Nac Cien Biol México 4: 263–282.",
|
358
366
|
"volume" => "4")
|
367
|
+
expect(subject.files).to eq([{ "mimeType" => "application/pdf",
|
368
|
+
"url" => "http://www.nature.com/articles/hdy201326.pdf" },
|
369
|
+
{ "mimeType" => "text/html", "url" => "http://www.nature.com/articles/hdy201326" },
|
370
|
+
{ "mimeType" => "application/pdf",
|
371
|
+
"url" => "http://www.nature.com/articles/hdy201326.pdf" }])
|
359
372
|
expect(subject.container).to eq("firstPage" => "122", "identifier" => "1365-2540",
|
360
373
|
"identifierType" => "ISSN", "issue" => "2", "lastPage" => "130", "title" => "Heredity", "type" => "Journal", "volume" => "111")
|
361
374
|
expect(subject.provider).to eq("Crossref")
|
@@ -754,7 +767,7 @@ describe Commonmeta::Metadata, vcr: true do
|
|
754
767
|
expect(subject.url).to eq("https://www.nature.com/articles/ng.3834")
|
755
768
|
expect(subject.type).to eq("JournalArticle")
|
756
769
|
expect(subject.contributors.length).to eq(14)
|
757
|
-
expect(subject.contributors[1]).to eq("contributorRoles"=>["Author"], "name"=>"GTEx Consortium", "type"=>"Organization")
|
770
|
+
expect(subject.contributors[1]).to eq("contributorRoles" => ["Author"], "name" => "GTEx Consortium", "type" => "Organization")
|
758
771
|
expect(subject.titles).to eq([{ "title" => "The impact of structural variation on human gene expression" }])
|
759
772
|
expect(subject.date).to include("published" => "2017-04-03")
|
760
773
|
expect(subject.publisher).to eq("id" => "https://api.crossref.org/members/297",
|
@@ -846,7 +859,7 @@ describe Commonmeta::Metadata, vcr: true do
|
|
846
859
|
expect(subject.contributors.count).to eq(3)
|
847
860
|
expect(subject.contributors.first).to eq("type" => "Person", "contributorRoles" => ["Author"], "familyName" => "Clayton",
|
848
861
|
"givenName" => "Barbra R.")
|
849
|
-
expect(subject.contributors.last).to eq("contributorRoles"=>["Editor"], "familyName"=>"Shields", "givenName"=>"James Mark", "type"=>"Person")
|
862
|
+
expect(subject.contributors.last).to eq("contributorRoles" => ["Editor"], "familyName" => "Shields", "givenName" => "James Mark", "type" => "Person")
|
850
863
|
expect(subject.titles).to eq([{ "title" => "The Changing Way of the Bodhisattva" }])
|
851
864
|
expect(subject.id).to eq("https://doi.org/10.1093/oxfordhb/9780198746140.013.5")
|
852
865
|
expect(subject.alternate_identifiers.empty?).to be(true)
|
@@ -228,6 +228,34 @@ describe Commonmeta::Metadata, vcr: true do
|
|
228
228
|
expect(subject.container).to eq("identifier" => "https://wisspub.net", "identifierType" => "URL", "title" => "wisspub.net", "type" => "Periodical")
|
229
229
|
end
|
230
230
|
|
231
|
+
it "archived wordpress post" do
|
232
|
+
input = "https://rogue-scholar.org/api/posts/570c8129-e867-49e6-8517-bd783627e76e"
|
233
|
+
subject = described_class.new(input: input)
|
234
|
+
expect(subject.valid?).to be true
|
235
|
+
expect(subject.id).to eq("https://project-thor.eu/2016/08/10/orcid-integration-in-pangaea")
|
236
|
+
expect(subject.url).to eq("https://web.archive.org/web/20190709153404/https://project-thor.eu/2016/08/10/orcid-integration-in-pangaea")
|
237
|
+
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "570c8129-e867-49e6-8517-bd783627e76e", "alternateIdentifierType" => "UUID" }])
|
238
|
+
expect(subject.type).to eq("Article")
|
239
|
+
expect(subject.contributors.length).to eq(1)
|
240
|
+
expect(subject.contributors.first).to eq("contributorRoles" => ["Author"],
|
241
|
+
"type" => "Person",
|
242
|
+
"familyName" => "Stocker",
|
243
|
+
"givenName" => "Markus",
|
244
|
+
"id" => "https://orcid.org/0000-0001-5492-3212")
|
245
|
+
expect(subject.titles).to eq([{ "title" => "ORCID Integration Series: PANGAEA" }])
|
246
|
+
expect(subject.license).to eq("id" => "CC-BY-4.0",
|
247
|
+
"url" => "https://creativecommons.org/licenses/by/4.0/legalcode")
|
248
|
+
expect(subject.date).to eq("published" => "2016-08-10", "updated" => "2016-08-10")
|
249
|
+
expect(subject.descriptions.first["description"]).to start_with("This is the first in a series of posts describing how THOR partners")
|
250
|
+
expect(subject.publisher).to eq("name" => "Project THOR")
|
251
|
+
expect(subject.subjects).to eq([{ "subject" => "Computer and information sciences" },
|
252
|
+
{ "schemeUri" => "http://www.oecd.org/science/inno/38235147.pdf",
|
253
|
+
"subject" => "FOS: Computer and information sciences",
|
254
|
+
"subjectScheme" => "Fields of Science and Technology (FOS)" }])
|
255
|
+
expect(subject.language).to eq("en")
|
256
|
+
expect(subject.container).to eq("identifier" => "https://project-thor.eu", "identifierType" => "URL", "title" => "Project THOR", "type" => "Periodical")
|
257
|
+
end
|
258
|
+
|
231
259
|
it "wordpress post with references" do
|
232
260
|
input = "https://rogue-scholar.org/api/posts/4e4bf150-751f-4245-b4ca-fe69e3c3bb24"
|
233
261
|
subject = described_class.new(input: input)
|
@@ -226,7 +226,7 @@ describe Commonmeta::Metadata, vcr: true do
|
|
226
226
|
expect(subject.alternate_identifiers).to eq([{ "alternateIdentifier" => "687610993",
|
227
227
|
"alternateIdentifierType" => "md5" }])
|
228
228
|
expect(subject.url).to eq("https://ors.datacite.org/doi:/10.25491/d50j-3083")
|
229
|
-
expect(subject.
|
229
|
+
expect(subject.files).to eq([{ "url" => "https://storage.googleapis.com/gtex_analysis_v7/single_tissue_eqtl_data/GTEx_Analysis_v7_eQTL_expression_matrices.tar.gz" }])
|
230
230
|
expect(subject.type).to eq("Dataset")
|
231
231
|
expect(subject.contributors).to eq([{ "name" => "The GTEx Consortium",
|
232
232
|
"type" => "Organization", "contributorRoles" => ["Author"] }])
|
@@ -254,9 +254,8 @@ describe Commonmeta::Metadata, vcr: true do
|
|
254
254
|
{ "alternateIdentifier" => "dg.4503/c3d66dc9-58da-411c-83c4-dd656aa3c4b7",
|
255
255
|
"alternateIdentifierType" => "dataguid" }])
|
256
256
|
expect(subject.url).to eq("https://ors.datacite.org/doi:/10.23725/8na3-9s47")
|
257
|
-
expect(subject.
|
258
|
-
|
259
|
-
])
|
257
|
+
expect(subject.files).to eq([{ "url" => "s3://cgp-commons-public/topmed_open_access/197bc047-e917-55ed-852d-d563cdbc50e4/NWD165827.recab.cram" },
|
258
|
+
{ "url" => "gs://topmed-irc-share/public/NWD165827.recab.cram" }])
|
260
259
|
expect(subject.type).to eq("Dataset")
|
261
260
|
expect(subject.contributors).to eq([{ "name" => "TOPMed IRC", "type" => "Organization", "contributorRoles" => ["Author"] }])
|
262
261
|
expect(subject.titles).to eq([{ "title" => "NWD165827.recab.cram" }])
|
@@ -338,9 +337,11 @@ describe Commonmeta::Metadata, vcr: true do
|
|
338
337
|
{ "alternateIdentifier" => "f9e72bdf25bf4b4f0e581d9218fec2eb",
|
339
338
|
"alternateIdentifierType" => "md5" }])
|
340
339
|
expect(subject.url).to eq("https://ors.datacite.org/doi:/10.23725/7jg3-v803")
|
341
|
-
expect(subject.
|
342
|
-
|
343
|
-
|
340
|
+
expect(subject.files).to eq([
|
341
|
+
{ "url" => "s3://cgp-commons-public/topmed_open_access/44a8837b-4456-5709-b56b-54e23000f13a/NWD100953.recab.cram" },
|
342
|
+
{ "url" => "gs://topmed-irc-share/public/NWD100953.recab.cram" },
|
343
|
+
{ "url" => "dos://dos.commons.ucsc-cgp.org/01b048d0-e128-4cb0-94e9-b2d2cab7563d?version=2018-05-26T133719.491772Z" },
|
344
|
+
])
|
344
345
|
expect(subject.type).to eq("Dataset")
|
345
346
|
expect(subject.contributors).to eq([{ "name" => "TOPMed", "type" => "Organization", "contributorRoles" => ["Author"] }])
|
346
347
|
expect(subject.titles).to eq([{ "title" => "NWD100953.recab.cram" }])
|
@@ -136,6 +136,7 @@ describe Commonmeta::Metadata, vcr: true do
|
|
136
136
|
it 'from schema.org' do
|
137
137
|
input = 'https://blog.front-matter.io/posts/eating-your-own-dog-food/'
|
138
138
|
subject = described_class.new(input: input, from: 'schema_org')
|
139
|
+
puts subject.errors
|
139
140
|
expect(subject.valid?).to be true
|
140
141
|
datacite = JSON.parse(subject.datacite)
|
141
142
|
expect(datacite.fetch('titles')).to eq([{ 'title' => 'Eating your own Dog Food' }])
|
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:
|
4
|
+
version: 3.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Fenner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-09-
|
11
|
+
date: 2023-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -614,6 +614,7 @@ files:
|
|
614
614
|
- Rakefile
|
615
615
|
- bin/commonmeta
|
616
616
|
- commonmeta.gemspec
|
617
|
+
- csl-data.json
|
617
618
|
- lib/commonmeta.rb
|
618
619
|
- lib/commonmeta/array.rb
|
619
620
|
- lib/commonmeta/author_utils.rb
|
@@ -655,7 +656,7 @@ files:
|
|
655
656
|
- lib/commonmeta/xml_converter.rb
|
656
657
|
- resources/2008/09/xsd.xsl
|
657
658
|
- resources/cff.json
|
658
|
-
- resources/commonmeta_v0.10.json
|
659
|
+
- resources/commonmeta_v0.10.3.json
|
659
660
|
- resources/crossref/AccessIndicators.xsd
|
660
661
|
- resources/crossref/JATS-journalpublishing1-3d2-mathml3-elements.xsd
|
661
662
|
- resources/crossref/JATS-journalpublishing1-3d2-mathml3.xsd
|
@@ -670,6 +671,7 @@ files:
|
|
670
671
|
- resources/crossref/fundref.xsd
|
671
672
|
- resources/crossref/module-ali.xsd
|
672
673
|
- resources/crossref/relations.xsd
|
674
|
+
- resources/csl-citation.json
|
673
675
|
- resources/datacite-contributorType-v4.xsd
|
674
676
|
- resources/datacite-dateType-v4.xsd
|
675
677
|
- resources/datacite-descriptionType-v4.xsd
|
@@ -869,6 +871,7 @@ files:
|
|
869
871
|
- spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed/by_blog_id.yml
|
870
872
|
- spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed/not_indexed_posts.yml
|
871
873
|
- spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed/unregistered_posts.yml
|
874
|
+
- spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/archived_wordpress_post.yml
|
872
875
|
- spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/blog_post_with_non-url_id.yml
|
873
876
|
- spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/blogger_post.yml
|
874
877
|
- spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/ghost_post_with_author_name_suffix.yml
|