bolognese 1.8.6 → 1.8.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +14 -16
- data/lib/bolognese/readers/crossref_reader.rb +20 -3
- data/lib/bolognese/utils.rb +4 -1
- data/lib/bolognese/version.rb +1 -1
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/affiliation_is_space.yml +100 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/dissertation.yml +122 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/multiple_issn.yml +98 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/multiple_titles_with_missing.yml +449 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/peer_review.yml +96 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/cc-by_3_0_us.yml +104 -0
- data/spec/readers/crossref_reader_spec.rb +118 -2
- data/spec/readers/datacite_reader_spec.rb +11 -0
- metadata +8 -2
@@ -0,0 +1,104 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://doi.org/ra/10.6084
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Mozilla/5.0 (compatible; Maremma/4.7.1; mailto:info@datacite.org)
|
12
|
+
Accept:
|
13
|
+
- text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message: ''
|
18
|
+
headers:
|
19
|
+
Date:
|
20
|
+
- Fri, 21 Aug 2020 11:43:04 GMT
|
21
|
+
Content-Type:
|
22
|
+
- application/json;charset=UTF-8
|
23
|
+
Connection:
|
24
|
+
- keep-alive
|
25
|
+
Set-Cookie:
|
26
|
+
- __cfduid=dfd6c87cff8b6f860fa122f6cddf80f0f1598010184; expires=Sun, 20-Sep-20
|
27
|
+
11:43:04 GMT; path=/; domain=.doi.org; HttpOnly; SameSite=Lax; Secure
|
28
|
+
Cf-Cache-Status:
|
29
|
+
- DYNAMIC
|
30
|
+
Cf-Request-Id:
|
31
|
+
- 04b26d6b940000d6e96a26c200000001
|
32
|
+
Expect-Ct:
|
33
|
+
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
|
34
|
+
Strict-Transport-Security:
|
35
|
+
- max-age=31536000; includeSubDomains; preload
|
36
|
+
Server:
|
37
|
+
- cloudflare
|
38
|
+
Cf-Ray:
|
39
|
+
- 5c641825bf84d6e9-FRA
|
40
|
+
body:
|
41
|
+
encoding: ASCII-8BIT
|
42
|
+
string: |-
|
43
|
+
[
|
44
|
+
{
|
45
|
+
"DOI": "10.6084",
|
46
|
+
"RA": "DataCite"
|
47
|
+
}
|
48
|
+
]
|
49
|
+
http_version:
|
50
|
+
recorded_at: Fri, 21 Aug 2020 11:43:04 GMT
|
51
|
+
- request:
|
52
|
+
method: get
|
53
|
+
uri: https://api.datacite.org/dois/10.6084/m9.figshare.1286826.v1?include=media,client
|
54
|
+
body:
|
55
|
+
encoding: US-ASCII
|
56
|
+
string: ''
|
57
|
+
headers:
|
58
|
+
User-Agent:
|
59
|
+
- Mozilla/5.0 (compatible; Maremma/4.7.1; mailto:info@datacite.org)
|
60
|
+
Accept:
|
61
|
+
- text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
|
62
|
+
response:
|
63
|
+
status:
|
64
|
+
code: 200
|
65
|
+
message: OK
|
66
|
+
headers:
|
67
|
+
Date:
|
68
|
+
- Fri, 21 Aug 2020 11:43:05 GMT
|
69
|
+
Content-Type:
|
70
|
+
- application/json; charset=utf-8
|
71
|
+
Connection:
|
72
|
+
- keep-alive
|
73
|
+
Status:
|
74
|
+
- 200 OK
|
75
|
+
X-Anonymous-Consumer:
|
76
|
+
- 'true'
|
77
|
+
Cache-Control:
|
78
|
+
- max-age=0, private, must-revalidate
|
79
|
+
Vary:
|
80
|
+
- Accept-Encoding, Origin
|
81
|
+
X-Request-Id:
|
82
|
+
- f32dc0c7-ae28-4225-aebb-690f7ed8f96f
|
83
|
+
Etag:
|
84
|
+
- W/"1053de58f4bcf558a2c6eff57d658893"
|
85
|
+
X-Runtime:
|
86
|
+
- '0.281050'
|
87
|
+
X-Powered-By:
|
88
|
+
- Phusion Passenger 6.0.6
|
89
|
+
Server:
|
90
|
+
- nginx/1.14.0 + Phusion Passenger 6.0.6
|
91
|
+
body:
|
92
|
+
encoding: ASCII-8BIT
|
93
|
+
string: '{"data":{"id":"10.6084/m9.figshare.1286826.v1","type":"dois","attributes":{"doi":"10.6084/m9.figshare.1286826.v1","prefix":"10.6084","suffix":"m9.figshare.1286826.v1","identifiers":[],"alternateIdentifiers":[],"creators":[{"name":"Kramer,
|
94
|
+
Bianca","nameType":"Personal","givenName":"Bianca","familyName":"Kramer","affiliation":[],"nameIdentifiers":[{"nameIdentifier":"https://orcid.org/0000-0002-5965-6560","nameIdentifierScheme":"ORCID"}]},{"name":"Bosman,
|
95
|
+
Jeroen","nameType":"Personal","givenName":"Jeroen","familyName":"Bosman","affiliation":[],"nameIdentifiers":[{"nameIdentifier":"https://orcid.org/0000-0001-5796-2727","nameIdentifierScheme":"ORCID"}]}],"titles":[{"title":"101
|
96
|
+
Innovations in Scholarly Communication - the Changing Research Workflow"}],"publisher":"Figshare","container":{},"publicationYear":2015,"subjects":[],"contributors":[],"dates":[{"date":"2015","dateType":"Issued"}],"language":null,"types":{"ris":"DATA","bibtex":"misc","citeproc":"dataset","schemaOrg":"Dataset","resourceType":"Dataset","resourceTypeGeneral":"Dataset"},"relatedIdentifiers":[],"sizes":[],"formats":[],"version":null,"rightsList":[{"rights":"CC-BY","rightsUri":"http://creativecommons.org/licenses/by/3.0/us"}],"descriptions":[],"geoLocations":[],"fundingReferences":[],"xml":"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHJlc291cmNlIHhtbG5zPSJodHRwOi8vZGF0YWNpdGUub3JnL3NjaGVtYS9rZXJuZWwtMyIgeG1sbnM6eHNpPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYS1pbnN0YW5jZSIgeHNpOnNjaGVtYUxvY2F0aW9uPSJodHRwOi8vZGF0YWNpdGUub3JnL3NjaGVtYS9rZXJuZWwtMyBodHRwOi8vc2NoZW1hLmRhdGFjaXRlLm9yZy9tZXRhL2tlcm5lbC0zL21ldGFkYXRhLnhzZCI+PGlkZW50aWZpZXIgaWRlbnRpZmllclR5cGU9IkRPSSI+MTAuNjA4NC9NOS5GSUdTSEFSRS4xMjg2ODI2LlYxPC9pZGVudGlmaWVyPjx0aXRsZXM+PHRpdGxlPjEwMSBJbm5vdmF0aW9ucyBpbiBTY2hvbGFybHkgQ29tbXVuaWNhdGlvbiAtIHRoZSBDaGFuZ2luZyBSZXNlYXJjaCBXb3JrZmxvdzwvdGl0bGU+PC90aXRsZXM+PHB1Ymxpc2hlcj5GaWdzaGFyZTwvcHVibGlzaGVyPjxwdWJsaWNhdGlvblllYXI+MjAxNTwvcHVibGljYXRpb25ZZWFyPjxyZXNvdXJjZVR5cGUgcmVzb3VyY2VUeXBlR2VuZXJhbD0iRGF0YXNldCI+RGF0YXNldDwvcmVzb3VyY2VUeXBlPjxyaWdodHNMaXN0PjxyaWdodHMgcmlnaHRzVVJJPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9saWNlbnNlcy9ieS8zLjAvdXMvIj5DQy1CWTwvcmlnaHRzPjwvcmlnaHRzTGlzdD48Y3JlYXRvcnM+PGNyZWF0b3I+PGNyZWF0b3JOYW1lPkJpYW5jYSAgS3JhbWVyPC9jcmVhdG9yTmFtZT48bmFtZUlkZW50aWZpZXIgbmFtZUlkZW50aWZpZXJTY2hlbWU9Ik9SQ0lEIj4wMDAwLTAwMDItNTk2NS02NTYwPC9uYW1lSWRlbnRpZmllcj48L2NyZWF0b3I+PGNyZWF0b3I+PGNyZWF0b3JOYW1lPkplcm9lbiBCb3NtYW48L2NyZWF0b3JOYW1lPjxuYW1lSWRlbnRpZmllciBuYW1lSWRlbnRpZmllclNjaGVtZT0iT1JDSUQiPjAwMDAtMDAwMS01Nzk2LTI3Mjc8L25hbWVJZGVudGlmaWVyPjwvY3JlYXRvcj48L2NyZWF0b3JzPjwvcmVzb3VyY2U+","url":"https://figshare.com/articles/101_Innovations_in_Scholarly_Communication_the_Changing_Research_Workflow/1286826/1","contentUrl":null,"metadataVersion":0,"schemaVersion":"http://datacite.org/schema/kernel-3","source":null,"isActive":true,"state":"findable","reason":null,"viewCount":0,"viewsOverTime":[],"downloadCount":0,"downloadsOverTime":[],"referenceCount":0,"citationCount":0,"citationsOverTime":[],"partCount":0,"partOfCount":0,"versionCount":0,"versionOfCount":0,"created":"2016-01-19T13:15:11.000Z","registered":"2016-01-19T13:15:12.000Z","published":"2015","updated":"2020-07-27T15:52:33.000Z"},"relationships":{"client":{"data":{"id":"figshare.ars","type":"clients"}},"media":{"data":{"id":"10.6084/m9.figshare.1286826.v1","type":"media"}},"references":{"data":[]},"citations":{"data":[]},"parts":{"data":[]},"partOf":{"data":[]},"versions":{"data":[]},"versionOf":{"data":[]}}},"included":[{"id":"figshare.ars","type":"clients","attributes":{"name":"figshare
|
97
|
+
Academic Research System","symbol":"FIGSHARE.ARS","year":2016,"contactEmail":"danielduduta@figshare.com","alternateName":null,"description":"figshare
|
98
|
+
allows researchers to publish all of their research outputs in an easily citable,
|
99
|
+
sharable and discoverable manner. All file formats can be published, including
|
100
|
+
videos and datasets. Optional peer review process. figshare uses creative
|
101
|
+
commons licensing.","language":null,"clientType":"repository","domains":"figshare.com","re3data":"https://doi.org/10.17616/R3PK5R","opendoar":null,"issn":null,"url":"http://figshare.com/","created":"2016-10-12T13:42:35.000Z","updated":"2019-07-27T07:15:48.000Z","isActive":true,"hasPassword":true},"relationships":{"provider":{"data":{"id":"figshare","type":"providers"}},"prefixes":{"data":[{"id":"10.6084","type":"prefixes"}]}}}]}'
|
102
|
+
http_version:
|
103
|
+
recorded_at: Fri, 21 Aug 2020 11:43:05 GMT
|
104
|
+
recorded_with: VCR 3.0.3
|
@@ -179,6 +179,52 @@ describe Bolognese::Metadata, vcr: true do
|
|
179
179
|
expect(subject.agency).to eq("crossref")
|
180
180
|
end
|
181
181
|
|
182
|
+
it "peer review" do
|
183
|
+
input = "https://doi.org/10.7554/elife.55167.sa2"
|
184
|
+
subject = Bolognese::Metadata.new(input: input)
|
185
|
+
expect(subject.valid?).to be true
|
186
|
+
expect(subject.url).to eq("https://elifesciences.org/articles/55167#sa2")
|
187
|
+
expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article-journal", "resourceType"=>"PeerReview", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"Review")
|
188
|
+
expect(subject.creators.count).to eq(8)
|
189
|
+
expect(subject.creators.last).to eq("affiliation" => [{"name"=>"Center for Computational Mathematics, Flatiron Institute, New York, United States"}],
|
190
|
+
"familyName" => "Barnett",
|
191
|
+
"givenName" => "Alex H",
|
192
|
+
"name" => "Barnett, Alex H",
|
193
|
+
"nameType" => "Personal")
|
194
|
+
expect(subject.titles).to eq([{"title"=>"Author response: SpikeForest, reproducible web-facing ground-truth validation of automated neural spike sorters"}])
|
195
|
+
expect(subject.id).to eq("https://doi.org/10.7554/elife.55167.sa2")
|
196
|
+
expect(subject.identifiers).to be_empty
|
197
|
+
expect(subject.descriptions).to be_empty
|
198
|
+
expect(subject.dates).to include({"date"=>"2020-05-19", "dateType"=>"Issued"})
|
199
|
+
expect(subject.publication_year).to eq("2020")
|
200
|
+
expect(subject.publisher).to eq("eLife Sciences Publications, Ltd")
|
201
|
+
expect(subject.agency).to eq("crossref")
|
202
|
+
end
|
203
|
+
|
204
|
+
it "dissertation" do
|
205
|
+
input = "https://doi.org/10.14264/uql.2020.791"
|
206
|
+
subject = Bolognese::Metadata.new(input: input)
|
207
|
+
expect(subject.valid?).to be true
|
208
|
+
expect(subject.url).to eq("http://espace.library.uq.edu.au/view/UQ:23a1e74")
|
209
|
+
expect(subject.types).to eq("bibtex"=>"phdthesis", "citeproc"=>"thesis", "resourceType"=>"Dissertation", "resourceTypeGeneral"=>"Text", "ris"=>"THES", "schemaOrg"=>"Thesis")
|
210
|
+
expect(subject.creators).to eq([{"familyName"=>"Collingwood",
|
211
|
+
"givenName"=>"Patricia Maree",
|
212
|
+
"name"=>"Collingwood, Patricia Maree",
|
213
|
+
"nameIdentifiers"=>
|
214
|
+
[{"nameIdentifier"=>"https://orcid.org/0000-0003-3086-4443",
|
215
|
+
"nameIdentifierScheme"=>"ORCID",
|
216
|
+
"schemeUri"=>"https://orcid.org"}],
|
217
|
+
"nameType"=>"Personal"}])
|
218
|
+
expect(subject.titles).to eq([{"title"=>"School truancy and financial independence during emerging adulthood: a longitudinal analysis of receipt of and reliance on cash transfers"}])
|
219
|
+
expect(subject.id).to eq("https://doi.org/10.14264/uql.2020.791")
|
220
|
+
expect(subject.identifiers).to be_empty
|
221
|
+
expect(subject.descriptions).to be_empty
|
222
|
+
expect(subject.dates).to include({"date"=>"2020-06-08", "dateType"=>"Issued"})
|
223
|
+
expect(subject.publication_year).to eq("2020")
|
224
|
+
expect(subject.publisher).to eq("University of Queensland Library")
|
225
|
+
expect(subject.agency).to eq("crossref")
|
226
|
+
end
|
227
|
+
|
182
228
|
it "DOI with SICI DOI" do
|
183
229
|
input = "https://doi.org/10.1890/0012-9658(2006)87[2832:tiopma]2.0.co;2"
|
184
230
|
subject = Bolognese::Metadata.new(input: input)
|
@@ -287,7 +333,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
287
333
|
expect(subject.url).to eq("https://dx.plos.org/10.1371/journal.pmed.0030277.g001")
|
288
334
|
expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article-journal", "resourceType"=>"SaComponent", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
|
289
335
|
expect(subject.creators).to eq([{"name"=>":(unav)", "nameType"=>"Organizational"}])
|
290
|
-
expect(subject.titles).to eq([{"title"=>":
|
336
|
+
expect(subject.titles).to eq([{"title"=>":(unav)"}])
|
291
337
|
expect(subject.descriptions).to be_empty
|
292
338
|
expect(subject.dates).to eq([{"date"=>"2015-10-20", "dateType"=>"Issued"}, {"date"=>"2018-10-19T17:13:42Z", "dateType"=>"Updated"}])
|
293
339
|
expect(subject.publication_year).to eq("2015")
|
@@ -509,6 +555,41 @@ describe Bolognese::Metadata, vcr: true do
|
|
509
555
|
expect(subject.date_registered).to be_nil
|
510
556
|
end
|
511
557
|
|
558
|
+
it "multiple titles with missing" do
|
559
|
+
input = "https://doi.org/10.1186/1471-2164-7-187"
|
560
|
+
subject = Bolognese::Metadata.new(input: input)
|
561
|
+
expect(subject.valid?).to be true
|
562
|
+
expect(subject.id).to eq("https://doi.org/10.1186/1471-2164-7-187")
|
563
|
+
expect(subject.url).to eq("https://bmcgenomics.biomedcentral.com/articles/10.1186/1471-2164-7-187")
|
564
|
+
expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
|
565
|
+
expect(subject.creators).to eq([{"familyName"=>"Myers",
|
566
|
+
"givenName"=>"Chad L",
|
567
|
+
"name"=>"Myers, Chad L",
|
568
|
+
"nameType"=>"Personal"},
|
569
|
+
{"familyName"=>"Barrett",
|
570
|
+
"givenName"=>"Daniel R",
|
571
|
+
"name"=>"Barrett, Daniel R",
|
572
|
+
"nameType"=>"Personal"},
|
573
|
+
{"familyName"=>"Hibbs",
|
574
|
+
"givenName"=>"Matthew A",
|
575
|
+
"name"=>"Hibbs, Matthew A",
|
576
|
+
"nameType"=>"Personal"},
|
577
|
+
{"familyName"=>"Huttenhower",
|
578
|
+
"givenName"=>"Curtis",
|
579
|
+
"name"=>"Huttenhower, Curtis",
|
580
|
+
"nameType"=>"Personal"},
|
581
|
+
{"familyName"=>"Troyanskaya",
|
582
|
+
"givenName"=>"Olga G",
|
583
|
+
"name"=>"Troyanskaya, Olga G",
|
584
|
+
"nameType"=>"Personal"}])
|
585
|
+
expect(subject.titles).to eq([{"title"=>"Finding function: evaluation methods for functional genomic data"}])
|
586
|
+
expect(subject.dates).to include({"date"=>"2006-07-25", "dateType"=>"Issued"})
|
587
|
+
expect(subject.publication_year).to eq("2006")
|
588
|
+
expect(subject.publisher).to eq("Springer Science and Business Media LLC")
|
589
|
+
expect(subject.agency).to eq("crossref")
|
590
|
+
expect(subject.date_registered).to eq("2020-04-20T16:04:45Z")
|
591
|
+
end
|
592
|
+
|
512
593
|
it "markup" do
|
513
594
|
input = "https://doi.org/10.1098/rspb.2017.0132"
|
514
595
|
subject = Bolognese::Metadata.new(input: input)
|
@@ -602,6 +683,41 @@ describe Bolognese::Metadata, vcr: true do
|
|
602
683
|
expect(subject.date_registered).to eq("2019-11-02T09:30:06Z")
|
603
684
|
end
|
604
685
|
|
686
|
+
it "affiliation is space" do
|
687
|
+
input = "https://doi.org/10.1177/0042098011428175"
|
688
|
+
subject = Bolognese::Metadata.new(input: input)
|
689
|
+
expect(subject.valid?).to be true
|
690
|
+
expect(subject.id).to eq("https://doi.org/10.1177/0042098011428175")
|
691
|
+
expect(subject.url).to eq("http://journals.sagepub.com/doi/10.1177/0042098011428175")
|
692
|
+
expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
|
693
|
+
expect(subject.creators.length).to eq(1)
|
694
|
+
expect(subject.creators.first).to eq("familyName"=>"Petrovici", "givenName"=>"Norbert", "name"=>"Petrovici, Norbert", "nameType"=>"Personal")
|
695
|
+
expect(subject.titles).to eq([{"title"=>"Workers and the City: Rethinking the Geographies of Power in Post-socialist Urbanisation"}])
|
696
|
+
expect(subject.dates).to include({"date"=>"2011-12-22", "dateType"=>"Issued"})
|
697
|
+
expect(subject.publication_year).to eq("2011")
|
698
|
+
expect(subject.publisher).to eq("SAGE Publications")
|
699
|
+
expect(subject.agency).to eq("crossref")
|
700
|
+
expect(subject.date_registered).to eq("2017-12-17T00:37:32Z")
|
701
|
+
end
|
702
|
+
|
703
|
+
it "multiple issn" do
|
704
|
+
input = "https://doi.org/10.1007/978-3-642-34922-5_19"
|
705
|
+
subject = Bolognese::Metadata.new(input: input)
|
706
|
+
expect(subject.valid?).to be true
|
707
|
+
expect(subject.id).to eq("https://doi.org/10.1007/978-3-642-34922-5_19")
|
708
|
+
expect(subject.url).to eq("http://link.springer.com/10.1007/978-3-642-34922-5_19")
|
709
|
+
expect(subject.types).to eq("bibtex"=>"inbook", "citeproc"=>"chapter", "resourceType"=>"BookChapter", "resourceTypeGeneral"=>"Text", "ris"=>"CHAP", "schemaOrg"=>"Chapter")
|
710
|
+
expect(subject.creators.length).to eq(3)
|
711
|
+
expect(subject.creators.first).to eq("familyName"=>"Razib", "givenName"=>"Ali", "name"=>"Razib, Ali", "nameType"=>"Personal")
|
712
|
+
expect(subject.titles).to eq([{"title"=>"Log-Domain Arithmetic for High-Speed Fuzzy Control on a Field-Programmable Gate Array"}])
|
713
|
+
expect(subject.dates).to include({"date"=>"2013", "dateType"=>"Issued"})
|
714
|
+
expect(subject.publication_year).to eq("2013")
|
715
|
+
expect(subject.publisher).to eq("Springer Science and Business Media LLC")
|
716
|
+
expect(subject.container).to eq("identifier"=>"1860-0808", "identifierType"=>"ISSN", "title"=>"Studies in Fuzziness and Soft Computing", "type"=>"Book Series")
|
717
|
+
expect(subject.agency).to eq("crossref")
|
718
|
+
expect(subject.date_registered).to eq("2012-10-31T16:15:44Z")
|
719
|
+
end
|
720
|
+
|
605
721
|
it "posted content copernicus" do
|
606
722
|
input = "https://doi.org/10.5194/CP-2020-95"
|
607
723
|
subject = Bolognese::Metadata.new(input: input)
|
@@ -670,7 +786,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
670
786
|
expect(subject.url).to eq("http://ectrx.org/forms/ectrxcontentshow.php?doi_id=10.6002/ect.2015.0371")
|
671
787
|
expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article-journal", "resourceType"=>"JournalIssue", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"PublicationIssue")
|
672
788
|
expect(subject.creators).to eq([{"name"=>":(unav)", "nameType"=>"Organizational"}])
|
673
|
-
expect(subject.titles).to eq([{"title"=>":
|
789
|
+
expect(subject.titles).to eq([{"title"=>":(unav)"}])
|
674
790
|
expect(subject.dates).to eq([{"date"=>"2018-10", "dateType"=>"Issued"}, {"date"=>"2018-10-03T12:09:12Z", "dateType"=>"Updated"}])
|
675
791
|
expect(subject.publication_year).to eq("2018")
|
676
792
|
expect(subject.publisher).to eq("Baskent University")
|
@@ -295,6 +295,17 @@ describe Bolognese::Metadata, vcr: true do
|
|
295
295
|
{"subject"=>"FOS: Media and communications", "subjectScheme"=>"Fields of Science and Technology (FOS)", "schemeUri"=>"http://www.oecd.org/science/inno/38235147.pdf"}, {"subject"=>"Library and Information Studies"}])
|
296
296
|
end
|
297
297
|
|
298
|
+
it "cc-by 3.0 us" do
|
299
|
+
input = "10.6084/m9.figshare.1286826.v1"
|
300
|
+
subject = Bolognese::Metadata.new(input: input)
|
301
|
+
expect(subject.valid?).to be true
|
302
|
+
expect(subject.rights_list).to eq([{"rights"=>"Creative Commons Attribution 3.0 Unported",
|
303
|
+
+ "rightsIdentifier"=>"cc-by-3.0",
|
304
|
+
+ "rightsIdentifierScheme"=>"SPDX",
|
305
|
+
+ "rightsUri"=>"https://creativecommons.org/licenses/by/3.0/legalcode",
|
306
|
+
+ "schemeUri"=>"https://spdx.org/licenses/"}])
|
307
|
+
end
|
308
|
+
|
298
309
|
it "funding schema version 3" do
|
299
310
|
input = "https://doi.org/10.5281/ZENODO.1239"
|
300
311
|
subject = Bolognese::Metadata.new(input: input)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bolognese
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Fenner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: maremma
|
@@ -896,6 +896,7 @@ files:
|
|
896
896
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/JaLC.yml
|
897
897
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/KISTI.yml
|
898
898
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/OP.yml
|
899
|
+
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/affiliation_is_space.yml
|
899
900
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/another_book.yml
|
900
901
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/another_book_chapter.yml
|
901
902
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/author_literal.yml
|
@@ -907,6 +908,7 @@ files:
|
|
907
908
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/dataset.yml
|
908
909
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/dataset_usda.yml
|
909
910
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/date_in_future.yml
|
911
|
+
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/dissertation.yml
|
910
912
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/empty_given_name.yml
|
911
913
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/invalid_date.yml
|
912
914
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_article.yml
|
@@ -918,8 +920,11 @@ files:
|
|
918
920
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/mEDRA.yml
|
919
921
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/markup.yml
|
920
922
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/missing_creator.yml
|
923
|
+
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/multiple_issn.yml
|
921
924
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/multiple_titles.yml
|
925
|
+
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/multiple_titles_with_missing.yml
|
922
926
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/not_found_error.yml
|
927
|
+
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/peer_review.yml
|
923
928
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/posted_content.yml
|
924
929
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/posted_content_copernicus.yml
|
925
930
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/report_osti.yml
|
@@ -941,6 +946,7 @@ files:
|
|
941
946
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/author_only_full_name.yml
|
942
947
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/author_with_scheme.yml
|
943
948
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/author_with_wrong_orcid_scheme.yml
|
949
|
+
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/cc-by_3_0_us.yml
|
944
950
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/content_url.yml
|
945
951
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/date.yml
|
946
952
|
- spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/dissertation.yml
|