bolognese 1.7.3 → 1.8.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,73 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.datacite.org/dois/10.26301/qdpd-2250?include=media,client
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: OK
18
+ headers:
19
+ Date:
20
+ - Fri, 24 Jul 2020 09:45:26 GMT
21
+ Content-Type:
22
+ - application/json; charset=utf-8
23
+ Connection:
24
+ - keep-alive
25
+ Status:
26
+ - 200 OK
27
+ X-Anonymous-Consumer:
28
+ - 'true'
29
+ Cache-Control:
30
+ - max-age=0, private, must-revalidate
31
+ Vary:
32
+ - Accept-Encoding, Origin
33
+ X-Request-Id:
34
+ - 9e991a49-1b31-467e-8398-17c65f21adff
35
+ Etag:
36
+ - W/"f61889405ef061735e59275bdbe3242a"
37
+ X-Runtime:
38
+ - '1.280903'
39
+ X-Powered-By:
40
+ - Phusion Passenger 6.0.6
41
+ Server:
42
+ - nginx/1.14.0 + Phusion Passenger 6.0.6
43
+ body:
44
+ encoding: ASCII-8BIT
45
+ string: '{"data":{"id":"10.26301/qdpd-2250","type":"dois","attributes":{"doi":"10.26301/qdpd-2250","prefix":"10.26301","suffix":"qdpd-2250","identifiers":[],"alternateIdentifiers":[],"creators":[{"name":"USS
46
+ Pampanito","nameType":"Organizational","givenName":null,"familyName":null,"affiliation":[],"nameIdentifiers":[]}],"titles":[{"lang":null,"title":"USS
47
+ Pampanito Submarine","titleType":null}],"publisher":"Open Heritage 3D","container":{},"publicationYear":2020,"subjects":[],"contributors":[],"dates":[],"language":null,"types":{"ris":"DATA","bibtex":"misc","citeproc":"dataset","schemaOrg":"Dataset","resourceType":"3D
48
+ Data","resourceTypeGeneral":"Dataset"},"relatedIdentifiers":[],"sizes":[],"formats":[],"version":null,"rightsList":[],"descriptions":[],"geoLocations":[],"fundingReferences":[],"xml":"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHJlc291cmNlIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiIHhtbG5zPSJodHRwOi8vZGF0YWNpdGUub3JnL3NjaGVtYS9rZXJuZWwtNCIgeHNpOnNjaGVtYUxvY2F0aW9uPSJodHRwOi8vZGF0YWNpdGUub3JnL3NjaGVtYS9rZXJuZWwtNCBodHRwOi8vc2NoZW1hLmRhdGFjaXRlLm9yZy9tZXRhL2tlcm5lbC00L21ldGFkYXRhLnhzZCI+CiAgPGlkZW50aWZpZXIgaWRlbnRpZmllclR5cGU9IkRPSSI+MTAuMjYzMDEvUURQRC0yMjUwPC9pZGVudGlmaWVyPgogIDxjcmVhdG9ycz4KICAgIDxjcmVhdG9yPgogICAgICA8Y3JlYXRvck5hbWUgbmFtZVR5cGU9Ik9yZ2FuaXphdGlvbmFsIj5VU1MgUGFtcGFuaXRvPC9jcmVhdG9yTmFtZT4KICAgIDwvY3JlYXRvcj4KICA8L2NyZWF0b3JzPgogIDx0aXRsZXM+CiAgICA8dGl0bGU+VVNTIFBhbXBhbml0byBTdWJtYXJpbmU8L3RpdGxlPgogIDwvdGl0bGVzPgogIDxwdWJsaXNoZXI+T3BlbiBIZXJpdGFnZSAzRDwvcHVibGlzaGVyPgogIDxwdWJsaWNhdGlvblllYXI+MjAyMDwvcHVibGljYXRpb25ZZWFyPgogIDxyZXNvdXJjZVR5cGUgcmVzb3VyY2VUeXBlR2VuZXJhbD0iRGF0YXNldCI+M0QgRGF0YTwvcmVzb3VyY2VUeXBlPgogIDxzaXplcy8+CiAgPGZvcm1hdHMvPgogIDx2ZXJzaW9uLz4KPC9yZXNvdXJjZT4K","url":"https://openheritage3d.org/project.php?id=qdpd-2250","contentUrl":null,"metadataVersion":1,"schemaVersion":"http://datacite.org/schema/kernel-4","source":"fabricaForm","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":"2020-01-10T18:51:00.000Z","registered":"2020-01-16T00:17:10.000Z","published":"2020","updated":"2020-07-24T09:41:35.000Z"},"relationships":{"client":{"data":{"id":"cyark.oh","type":"clients"}},"media":{"data":{"id":"10.26301/qdpd-2250","type":"media"}},"references":{"data":[]},"citations":{"data":[]},"parts":{"data":[]},"partOf":{"data":[]},"versions":{"data":[]},"versionOf":{"data":[]}}},"included":[{"id":"cyark.oh","type":"clients","attributes":{"name":"OpenHeritage3D","symbol":"CYARK.OH","year":2019,"contactEmail":"scott.lee@cyark.org","alternateName":"Open
49
+ Heritage 3D","description":"As 3D and reality capture strategies for heritage
50
+ documentation become more widespread and available, there has emerged a growing
51
+ need to assist with guiding and facilitating accessibility to data, while
52
+ maintaining scientific rigor, cultural and ethical sensitivity, discoverability,
53
+ and archival standards. In response to these areas of need, The Open Heritage
54
+ 3D Alliance (OHA) has developed as an advisory group governing the Open Heritage
55
+ 3D initiative. This collaborative advisory group are among some of the earliest
56
+ adopters of 3D heritage documentation technologies, and offer first-hand guidance
57
+ for best practices in data management, sharing, and dissemination approaches
58
+ for 3D cultural heritage projects.\n\nThe founding members of the OHA, consist
59
+ of experts and organizational leaders from CyArk, Historic Environment Scotland,
60
+ and the University of South Florida Libraries, who together have significant
61
+ repositories of legacy and on-going 3D research and documentation projects.
62
+ These groups offer unique insight into not only the best practices for 3D
63
+ data capture and sharing, but also have come together around concerns dealing
64
+ with standards, formats, approach, ethics, and archive commitment. Together,
65
+ the OHA has begun the journey to provide open access to cultural heritage
66
+ 3D data, while maintaining integrity, security, and standards relating to
67
+ discoverable dissemination. Together, the OHA will work to provide democratized
68
+ access to primary heritage 3D data submitted from donors and organizations,
69
+ and will help to facilitate an operation platform, archive, and organization
70
+ of resources into the future","language":["en"],"clientType":"repository","domains":"*","re3data":null,"opendoar":null,"issn":{},"url":"https://openheritage3d.org/","created":"2019-03-26T16:21:19.000Z","updated":"2020-04-27T15:30:01.000Z","isActive":true,"hasPassword":true},"relationships":{"provider":{"data":{"id":"cyark","type":"providers"}},"prefixes":{"data":[{"id":"10.26301","type":"prefixes"}]}}}]}'
71
+ http_version:
72
+ recorded_at: Fri, 24 Jul 2020 09:45:26 GMT
73
+ recorded_with: VCR 3.0.3
@@ -153,7 +153,7 @@ describe Bolognese::Metadata, vcr: true do
153
153
  it "missing_comma" do
154
154
  json = IO.read(fixture_path + "datacite_software_missing_comma.json")
155
155
  response = subject.jsonlint(json)
156
- expect(response).to eq(["expected comma, not a string (doi) at line 4, column 11 [parse.c:373]"])
156
+ expect(response).to eq(["expected comma, not a string (after doi) at line 4, column 11 [parse.c:373]"])
157
157
  end
158
158
 
159
159
  it "overlapping_keys" do
@@ -47,7 +47,7 @@ describe Bolognese::Metadata, vcr: true do
47
47
  {"funderIdentifier"=>"https://doi.org/10.13039/501100006390",
48
48
  "funderIdentifierType"=>"Crossref Funder ID",
49
49
  "funderName"=>"University of Lausanne"}])
50
- expect(subject.agency).to eq("Crossref")
50
+ expect(subject.agency).to eq("crossref")
51
51
  end
52
52
 
53
53
  it "journal article" do
@@ -60,7 +60,7 @@ describe Bolognese::Metadata, vcr: true do
60
60
  expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
61
61
  expect(subject.creators.length).to eq(5)
62
62
  expect(subject.creators.first).to eq("nameType"=>"Personal", "name"=>"Ralser, Markus", "givenName"=>"Markus", "familyName"=>"Ralser")
63
- expect(subject.contributors).to eq("contributorType"=>"Editor", "familyName"=>"Janbon", "givenName"=>"Guilhem", "name"=>"Janbon, Guilhem", "nameType"=>"Personal")
63
+ expect(subject.contributors).to eq([{"contributorType"=>"Editor", "familyName"=>"Janbon", "givenName"=>"Guilhem", "name"=>"Janbon, Guilhem", "nameType"=>"Personal"}])
64
64
  expect(subject.titles).to eq([{"title"=>"Triose Phosphate Isomerase Deficiency Is Caused by Altered Dimerization–Not Catalytic Inactivity–of the Mutant Enzymes"}])
65
65
  expect(subject.rights_list).to eq([{"rights"=>"Creative Commons Attribution 4.0 International",
66
66
  "rightsIdentifier"=>"cc-by-4.0",
@@ -74,7 +74,7 @@ describe Bolognese::Metadata, vcr: true do
74
74
  expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"1932-6203", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection")
75
75
  expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"10.1056/nejm199109123251104", "relatedIdentifierType"=>"DOI", "relationType"=>"References")
76
76
  expect(subject.container).to eq("firstPage"=>"e30", "identifier"=>"1932-6203", "identifierType"=>"ISSN", "issue"=>"1", "title"=>"PLoS ONE", "type"=>"Journal", "volume"=>"1")
77
- expect(subject.agency).to eq("Crossref")
77
+ expect(subject.agency).to eq("crossref")
78
78
  end
79
79
 
80
80
  it "journal article with funding" do
@@ -101,7 +101,7 @@ describe Bolognese::Metadata, vcr: true do
101
101
  expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"1664-462X", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection")
102
102
  expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"10.17660/actahortic.2004.632.41", "relatedIdentifierType"=>"DOI", "relationType"=>"References")
103
103
  expect(subject.container).to eq("identifier"=>"1664-462X", "identifierType"=>"ISSN", "title"=>"Frontiers in Plant Science", "type"=>"Journal", "volume"=>"10")
104
- expect(subject.agency).to eq("Crossref")
104
+ expect(subject.agency).to eq("crossref")
105
105
  end
106
106
 
107
107
  it "journal article original language title" do
@@ -111,7 +111,7 @@ describe Bolognese::Metadata, vcr: true do
111
111
  expect(subject.id).to eq("https://doi.org/10.7600/jspfsm.56.60")
112
112
  expect(subject.url).to eq("http://jlc.jst.go.jp/JST.JSTAGE/jspfsm/56.60?lang=en&from=CrossRef&type=abstract")
113
113
  expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
114
- expect(subject.creators).to eq("name"=>":(unav)", "nameType"=>"Organizational")
114
+ expect(subject.creators).to eq([{"name"=>":(unav)", "nameType"=>"Organizational"}])
115
115
  expect(subject.titles).to eq([{"lang"=>"ja", "title"=>"自律神経・循環器応答"}])
116
116
  expect(subject.dates).to include({"date"=>"2007", "dateType"=>"Issued"})
117
117
  expect(subject.publication_year).to eq("2007")
@@ -119,7 +119,7 @@ describe Bolognese::Metadata, vcr: true do
119
119
  expect(subject.related_identifiers.length).to eq(1)
120
120
  expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"1881-4751", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection")
121
121
  expect(subject.container).to eq("firstPage"=>"60", "identifier"=>"1881-4751", "identifierType"=>"ISSN", "issue"=>"1", "lastPage"=>"60", "title"=>"Japanese Journal of Physical Fitness and Sports Medicine", "type"=>"Journal", "volume"=>"56")
122
- expect(subject.agency).to eq("Crossref")
122
+ expect(subject.agency).to eq("crossref")
123
123
  end
124
124
 
125
125
  it "journal article with RDF for container" do
@@ -139,7 +139,7 @@ describe Bolognese::Metadata, vcr: true do
139
139
  expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"1937-240X", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection")
140
140
  expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"10.1002/aqc.1122", "relatedIdentifierType"=>"DOI", "relationType"=>"References")
141
141
  expect(subject.container).to eq("firstPage"=>"949", "identifier"=>"1937-240X", "identifierType"=>"ISSN", "issue"=>"6", "lastPage"=>"961", "title"=>"Journal of Crustacean Biology", "type"=>"Journal", "volume"=>"32")
142
- expect(subject.agency).to eq("Crossref")
142
+ expect(subject.agency).to eq("crossref")
143
143
  end
144
144
 
145
145
  it "book chapter with RDF for container" do
@@ -154,11 +154,11 @@ describe Bolognese::Metadata, vcr: true do
154
154
  expect(subject.titles).to eq([{"title"=>"Human Body Orientation Estimation in Multiview Scenarios"}])
155
155
  expect(subject.dates).to eq([{"date"=>"2012", "dateType"=>"Issued"}, {"date"=>"2019-07-03T01:07:17Z", "dateType"=>"Updated"}])
156
156
  expect(subject.publication_year).to eq("2012")
157
- expect(subject.publisher).to eq("Springer Berlin Heidelberg")
157
+ expect(subject.publisher).to eq("Springer Science and Business Media LLC")
158
158
  expect(subject.related_identifiers.length).to eq(7)
159
159
  expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"10.1007/978-3-540-24670-1_3", "relatedIdentifierType"=>"DOI", "relationType"=>"References")
160
160
  expect(subject.container).to eq("identifier"=>"1611-3349", "identifierType"=>"ISSN", "title"=>"Lecture Notes in Computer Science", "type"=>"Book Series")
161
- expect(subject.agency).to eq("Crossref")
161
+ expect(subject.agency).to eq("crossref")
162
162
  end
163
163
 
164
164
  it "posted_content" do
@@ -175,8 +175,8 @@ describe Bolognese::Metadata, vcr: true do
175
175
  expect(subject.descriptions.first["description"]).to start_with("This article presents a practical roadmap")
176
176
  expect(subject.dates).to include({"date"=>"2017-10-09", "dateType"=>"Issued"})
177
177
  expect(subject.publication_year).to eq("2017")
178
- expect(subject.publisher).to eq("bioRxiv")
179
- expect(subject.agency).to eq("Crossref")
178
+ expect(subject.publisher).to eq("Cold Spring Harbor Laboratory")
179
+ expect(subject.agency).to eq("crossref")
180
180
  end
181
181
 
182
182
  it "DOI with SICI DOI" do
@@ -196,7 +196,7 @@ describe Bolognese::Metadata, vcr: true do
196
196
  expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"0012-9658", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection")
197
197
  expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"10.1098/rspb.2002.2213", "relatedIdentifierType"=>"DOI", "relationType"=>"References")
198
198
  expect(subject.container).to eq("firstPage"=>"2832", "identifier"=>"0012-9658", "identifierType"=>"ISSN", "issue"=>"11", "lastPage"=>"2841", "title"=>"Ecology", "type"=>"Journal", "volume"=>"87")
199
- expect(subject.agency).to eq("Crossref")
199
+ expect(subject.agency).to eq("crossref")
200
200
  end
201
201
 
202
202
  it "DOI with ORCID ID" do
@@ -221,7 +221,7 @@ describe Bolognese::Metadata, vcr: true do
221
221
  expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"2090-1844", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection")
222
222
  expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"10.1378/chest.12-0045", "relatedIdentifierType"=>"DOI", "relationType"=>"References")
223
223
  expect(subject.container).to eq("firstPage"=>"1", "identifier"=>"2090-1844", "identifierType"=>"ISSN", "lastPage"=>"7", "title"=>"Pulmonary Medicine", "type"=>"Journal", "volume"=>"2012")
224
- expect(subject.agency).to eq("Crossref")
224
+ expect(subject.agency).to eq("crossref")
225
225
  end
226
226
 
227
227
  it "date in future" do
@@ -240,7 +240,7 @@ describe Bolognese::Metadata, vcr: true do
240
240
  expect(subject.publisher).to eq("Elsevier BV")
241
241
  expect(subject.related_identifiers).to eq([{"relatedIdentifier"=>"0014-2999", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection"}])
242
242
  expect(subject.container).to eq("firstPage"=>"303", "identifier"=>"0014-2999", "identifierType"=>"ISSN", "lastPage"=>"312", "title"=>"European Journal of Pharmacology", "type"=>"Journal", "volume"=>"759")
243
- expect(subject.agency).to eq("Crossref")
243
+ expect(subject.agency).to eq("crossref")
244
244
  end
245
245
 
246
246
  it "vor with url" do
@@ -259,7 +259,7 @@ describe Bolognese::Metadata, vcr: true do
259
259
  expect(subject.related_identifiers.size).to eq(35)
260
260
  expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"1365-2540", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection")
261
261
  expect(subject.container).to eq("firstPage"=>"122", "identifier"=>"1365-2540", "identifierType"=>"ISSN", "issue"=>"2", "lastPage"=>"130", "title"=>"Heredity", "type"=>"Journal", "volume"=>"111")
262
- expect(subject.agency).to eq("Crossref")
262
+ expect(subject.agency).to eq("crossref")
263
263
  end
264
264
 
265
265
  it "dataset" do
@@ -276,7 +276,7 @@ describe Bolognese::Metadata, vcr: true do
276
276
  expect(subject.dates).to include({"date"=>"1984-07-17", "dateType"=>"Issued"})
277
277
  expect(subject.publication_year).to eq("1984")
278
278
  expect(subject.publisher).to eq("Worldwide Protein Data Bank")
279
- expect(subject.agency).to eq("Crossref")
279
+ expect(subject.agency).to eq("crossref")
280
280
  end
281
281
 
282
282
  it "component" do
@@ -286,13 +286,13 @@ describe Bolognese::Metadata, vcr: true do
286
286
  expect(subject.id).to eq("https://doi.org/10.1371/journal.pmed.0030277.g001")
287
287
  expect(subject.url).to eq("https://dx.plos.org/10.1371/journal.pmed.0030277.g001")
288
288
  expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article-journal", "resourceType"=>"SaComponent", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
289
- expect(subject.creators).to eq("name"=>":(unav)", "nameType"=>"Organizational")
289
+ expect(subject.creators).to eq([{"name"=>":(unav)", "nameType"=>"Organizational"}])
290
290
  expect(subject.titles).to eq([{"title"=>":{unav)"}])
291
291
  expect(subject.descriptions).to be_empty
292
292
  expect(subject.dates).to eq([{"date"=>"2015-10-20", "dateType"=>"Issued"}, {"date"=>"2018-10-19T17:13:42Z", "dateType"=>"Updated"}])
293
293
  expect(subject.publication_year).to eq("2015")
294
294
  expect(subject.publisher).to eq("Public Library of Science (PLoS)")
295
- expect(subject.agency).to eq("Crossref")
295
+ expect(subject.agency).to eq("crossref")
296
296
  end
297
297
 
298
298
  it "dataset usda" do
@@ -309,7 +309,7 @@ describe Bolognese::Metadata, vcr: true do
309
309
  expect(subject.dates).to eq([{"date"=>"2017-08-09", "dateType"=>"Issued"}, {"date"=>"2020-06-04T21:31:55Z", "dateType"=>"Updated"}])
310
310
  expect(subject.publication_year).to eq("2017")
311
311
  expect(subject.publisher).to eq("USDA Forest Service")
312
- expect(subject.agency).to eq("Crossref")
312
+ expect(subject.agency).to eq("crossref")
313
313
  end
314
314
 
315
315
  it "book chapter" do
@@ -324,8 +324,8 @@ describe Bolognese::Metadata, vcr: true do
324
324
  expect(subject.titles).to eq([{"title"=>"Clinical Symptoms and Physical Examinations"}])
325
325
  expect(subject.dates).to eq([{"date"=>"2015", "dateType"=>"Issued"}, {"date"=>"2015-04-14T02:31:13Z", "dateType"=>"Updated"}])
326
326
  expect(subject.publication_year).to eq("2015")
327
- expect(subject.publisher).to eq("Springer Berlin Heidelberg")
328
- expect(subject.agency).to eq("Crossref")
327
+ expect(subject.publisher).to eq("Springer Science and Business Media LLC")
328
+ expect(subject.agency).to eq("crossref")
329
329
  end
330
330
 
331
331
  it "another book chapter" do
@@ -335,12 +335,12 @@ describe Bolognese::Metadata, vcr: true do
335
335
  expect(subject.id).to eq("https://doi.org/10.1007/978-3-319-75889-3_1")
336
336
  expect(subject.url).to eq("http://link.springer.com/10.1007/978-3-319-75889-3_1")
337
337
  expect(subject.types).to eq("bibtex"=>"inbook", "citeproc"=>"chapter", "resourceType"=>"BookChapter", "resourceTypeGeneral"=>"Text", "ris"=>"CHAP", "schemaOrg"=>"Chapter")
338
- expect(subject.creators).to eq("familyName"=>"Jones", "givenName"=>"Hunter M.", "name"=>"Jones, Hunter M.", "nameType"=>"Personal")
338
+ expect(subject.creators).to eq([{"familyName"=>"Jones", "givenName"=>"Hunter M.", "name"=>"Jones, Hunter M.", "nameType"=>"Personal"}])
339
339
  expect(subject.titles).to eq([{"title"=>"Climate Change and Increasing Risk of Extreme Heat"}])
340
340
  expect(subject.dates).to include({"date"=>"2018", "dateType"=>"Issued"})
341
341
  expect(subject.publication_year).to eq("2018")
342
- expect(subject.publisher).to eq("Springer International Publishing")
343
- expect(subject.agency).to eq("Crossref")
342
+ expect(subject.publisher).to eq("Springer Science and Business Media LLC")
343
+ expect(subject.agency).to eq("crossref")
344
344
  end
345
345
 
346
346
  it "yet another book chapter" do
@@ -350,12 +350,12 @@ describe Bolognese::Metadata, vcr: true do
350
350
  expect(subject.id).to eq("https://doi.org/10.4018/978-1-4666-1891-6.ch004")
351
351
  expect(subject.url).to eq("http://services.igi-global.com/resolvedoi/resolve.aspx?doi=10.4018/978-1-4666-1891-6.ch004")
352
352
  expect(subject.types).to eq("bibtex"=>"inbook", "citeproc"=>"chapter", "resourceType"=>"BookChapter", "resourceTypeGeneral"=>"Text", "ris"=>"CHAP", "schemaOrg"=>"Chapter")
353
- expect(subject.creators).to eq("familyName"=>"Bichot", "givenName"=>"Charles-Edmond", "name"=>"Bichot, Charles-Edmond", "affiliation" => [{"name"=>"Université de Lyon, France"}], "nameType"=>"Personal")
353
+ expect(subject.creators).to eq([{"affiliation"=>[{"name"=>"Université de Lyon, France"}], "familyName"=>"Bichot", "givenName"=>"Charles-Edmond", "name"=>"Bichot, Charles-Edmond", "nameType"=>"Personal"}])
354
354
  expect(subject.titles).to eq([{"title"=>"Unsupervised and Supervised Image Segmentation Using Graph Partitioning"}])
355
355
  expect(subject.dates).to eq([{"date"=>"2012-08-08", "dateType"=>"Issued"}, {"date"=>"2019-07-02T17:17:21Z", "dateType"=>"Updated"}])
356
356
  expect(subject.publication_year).to eq("2012")
357
357
  expect(subject.publisher).to eq("IGI Global")
358
- expect(subject.agency).to eq("Crossref")
358
+ expect(subject.agency).to eq("crossref")
359
359
  end
360
360
 
361
361
  it "missing creator" do
@@ -370,7 +370,7 @@ describe Bolognese::Metadata, vcr: true do
370
370
  expect(subject.dates).to eq([{"date"=>"2018-04-09", "dateType"=>"Issued"}, {"date"=>"2018-04-10T17:58:05Z", "dateType"=>"Updated"}])
371
371
  expect(subject.publication_year).to eq("2018")
372
372
  expect(subject.publisher).to eq("MDPI AG")
373
- expect(subject.agency).to eq("Crossref")
373
+ expect(subject.agency).to eq("crossref")
374
374
  end
375
375
 
376
376
  it "book" do
@@ -380,13 +380,13 @@ describe Bolognese::Metadata, vcr: true do
380
380
  expect(subject.id).to eq("https://doi.org/10.1017/9781108348843")
381
381
  expect(subject.identifiers).to eq([{"identifier"=>"9781108348843", "identifierType"=>"ISBN"}])
382
382
  expect(subject.url).to eq("https://www.cambridge.org/core/product/identifier/9781108348843/type/book")
383
- expect(subject.types).to eq("bibtex"=>"book", "citeproc"=>"book", "resourceType"=>"Book", "ris"=>"BOOK", "schemaOrg"=>"Book")
384
- expect(subject.creators).to eq("familyName"=>"Leung", "givenName"=>"Vincent S.", "name"=>"Leung, Vincent S.", "nameType"=>"Personal")
383
+ expect(subject.types).to eq("bibtex"=>"book", "citeproc"=>"book", "resourceType"=>"Book", "resourceTypeGeneral"=>"Text", "ris"=>"BOOK", "schemaOrg"=>"Book")
384
+ expect(subject.creators).to eq([{"familyName"=>"Leung", "givenName"=>"Vincent S.", "name"=>"Leung, Vincent S.", "nameType"=>"Personal"}])
385
385
  expect(subject.titles).to eq([{"title"=>"The Politics of the Past in Early China"}])
386
386
  expect(subject.dates).to eq([{"date"=>"2019-07-01", "dateType"=>"Issued"}, {"date"=>"2019-12-01T18:11:11Z", "dateType"=>"Updated"}])
387
387
  expect(subject.publication_year).to eq("2019")
388
- expect(subject.publisher).to eq("Cambridge University Press")
389
- expect(subject.agency).to eq("Crossref")
388
+ expect(subject.publisher).to eq("Cambridge University Press (CUP)")
389
+ expect(subject.agency).to eq("crossref")
390
390
  expect(subject.date_registered).to eq("2019-07-06T10:19:22Z")
391
391
  end
392
392
 
@@ -396,15 +396,15 @@ describe Bolognese::Metadata, vcr: true do
396
396
  expect(subject.valid?).to be true
397
397
  expect(subject.id).to eq("https://doi.org/10.2973/odp.proc.ir.180.2000")
398
398
  expect(subject.url).to eq("http://www-odp.tamu.edu/publications/180_IR/180TOC.HTM")
399
- expect(subject.types).to eq("bibtex"=>"book", "citeproc"=>"book", "resourceType"=>"Book", "ris"=>"BOOK", "schemaOrg"=>"Book")
400
- expect(subject.creators).to eq("name"=>":(unav)", "nameType"=>"Organizational")
399
+ expect(subject.types).to eq("bibtex"=>"book", "citeproc"=>"book", "resourceType"=>"Book", "resourceTypeGeneral"=>"Text", "ris"=>"BOOK", "schemaOrg"=>"Book")
400
+ expect(subject.creators).to eq([{"name"=>":(unav)", "nameType"=>"Organizational"}])
401
401
  expect(subject.contributors.size).to eq(4)
402
402
  expect(subject.contributors.first).to eq("contributorType"=>"Editor", "familyName"=>"Taylor", "givenName"=>"B.", "name"=>"Taylor, B.", "nameType"=>"Personal")
403
403
  expect(subject.titles).to eq([{"title"=>"Proceedings of the Ocean Drilling Program, 180 Initial Reports"}])
404
404
  expect(subject.dates).to eq([{"date"=>"2000-02-04", "dateType"=>"Issued"}, {"date"=>"2009-02-02T21:19:43Z", "dateType"=>"Updated"}])
405
405
  expect(subject.publication_year).to eq("2000")
406
- expect(subject.publisher).to eq("Ocean Drilling Program")
407
- expect(subject.agency).to eq("Crossref")
406
+ expect(subject.publisher).to eq("International Ocean Discovery Program (IODP)")
407
+ expect(subject.agency).to eq("crossref")
408
408
  expect(subject.date_registered).to eq("2006-10-17T20:17:44Z")
409
409
  end
410
410
 
@@ -415,16 +415,16 @@ describe Bolognese::Metadata, vcr: true do
415
415
  expect(subject.id).to eq("https://doi.org/10.1029/ar035")
416
416
  expect(subject.identifiers).to eq([{"identifier"=>"0-87590-181-6", "identifierType"=>"ISBN"}])
417
417
  expect(subject.url).to eq("http://doi.wiley.com/10.1029/AR035")
418
- expect(subject.types).to eq("bibtex"=>"book", "citeproc"=>"book", "resourceType"=>"Book", "ris"=>"BOOK", "schemaOrg"=>"Book")
419
- expect(subject.creators).to eq("familyName"=>"McGinnis", "givenName"=>"Richard Frank", "name"=>"McGinnis, Richard Frank", "nameType"=>"Personal")
418
+ expect(subject.types).to eq("bibtex"=>"book", "citeproc"=>"book", "resourceType"=>"Book", "resourceTypeGeneral"=>"Text", "ris"=>"BOOK", "schemaOrg"=>"Book")
419
+ expect(subject.creators).to eq([{"familyName"=>"McGinnis", "givenName"=>"Richard Frank", "name"=>"McGinnis, Richard Frank", "nameType"=>"Personal"}])
420
420
  expect(subject.titles).to eq([{"title"=>"Biogeography of Lanternfishes (Myctophidae) South of 30°S"}])
421
421
  expect(subject.dates).to eq([{"date"=>"1982", "dateType"=>"Issued"}, {"date"=>"2019-06-15T05:11:12Z", "dateType"=>"Updated"}])
422
422
  expect(subject.publication_year).to eq("1982")
423
- expect(subject.publisher).to eq("American Geophysical Union")
423
+ expect(subject.publisher).to eq("Wiley")
424
424
  expect(subject.related_identifiers.length).to eq(44)
425
425
  expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"10.1016/0031-0182(70)90103-3", "relatedIdentifierType"=>"DOI", "relationType"=>"References")
426
426
  expect(subject.container).to eq("identifier"=>"0066-4634", "identifierType"=>"ISSN", "title"=>"Antarctic Research Series", "type"=>"Book Series", "volume"=>"35")
427
- expect(subject.agency).to eq("Crossref")
427
+ expect(subject.agency).to eq("crossref")
428
428
  expect(subject.date_registered).to be_nil
429
429
  end
430
430
 
@@ -469,7 +469,7 @@ describe Bolognese::Metadata, vcr: true do
469
469
  expect(subject.id).to eq("https://doi.org/10.1241/johokanri.39.979")
470
470
  expect(subject.url).to eq("http://joi.jlc.jst.go.jp/JST.JSTAGE/johokanri/39.979?from=CrossRef")
471
471
  expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
472
- expect(subject.creators).to eq("familyName"=>"KUSUMOTO", "givenName"=>"Hiroyuki", "name"=>"KUSUMOTO, Hiroyuki", "nameType"=>"Personal")
472
+ expect(subject.creators).to eq([{"familyName"=>"KUSUMOTO", "givenName"=>"Hiroyuki", "name"=>"KUSUMOTO, Hiroyuki", "nameType"=>"Personal"}])
473
473
  expect(subject.titles).to eq([{"title"=>"Utilizing the Internet. 12 Series. Future of the Internet."}])
474
474
  expect(subject.dates).to eq([{"date"=>"1997", "dateType"=>"Issued"}, {"date"=>"2020-03-06T06:44:36Z", "dateType"=>"Updated"}])
475
475
  expect(subject.publication_year).to eq("1997")
@@ -500,12 +500,12 @@ describe Bolognese::Metadata, vcr: true do
500
500
  expect(subject.id).to eq("https://doi.org/10.4000/dms.865")
501
501
  expect(subject.url).to eq("http://journals.openedition.org/dms/865")
502
502
  expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
503
- expect(subject.creators).to eq("familyName"=>"Peraya", "givenName"=>"Daniel", "name"=>"Peraya, Daniel", "nameType"=>"Personal")
503
+ expect(subject.creators).to eq([{"familyName"=>"Peraya", "givenName"=>"Daniel", "name"=>"Peraya, Daniel", "nameType"=>"Personal"}])
504
504
  expect(subject.titles).to eq([{"title"=>"Distances, absence, proximités et présences : des concepts en déplacement"}, {"title"=>"Distance(s), proximity and presence(s): evolving concepts"}])
505
505
  expect(subject.dates).to include({"date"=>"2014-12-23", "dateType"=>"Issued"})
506
506
  expect(subject.publication_year).to eq("2014")
507
507
  expect(subject.publisher).to eq("OpenEdition")
508
- expect(subject.agency).to eq("Crossref")
508
+ expect(subject.agency).to eq("crossref")
509
509
  expect(subject.date_registered).to be_nil
510
510
  end
511
511
 
@@ -522,7 +522,7 @@ describe Bolognese::Metadata, vcr: true do
522
522
  expect(subject.dates).to include({"date"=>"2017-05-24", "dateType"=>"Issued"})
523
523
  expect(subject.publication_year).to eq("2017")
524
524
  expect(subject.publisher).to eq("The Royal Society")
525
- expect(subject.agency).to eq("Crossref")
525
+ expect(subject.agency).to eq("crossref")
526
526
  expect(subject.date_registered).to eq("2019-07-18T04:43:12Z")
527
527
  end
528
528
 
@@ -581,7 +581,7 @@ describe Bolognese::Metadata, vcr: true do
581
581
  expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"0028-646X", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection")
582
582
  expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"10.1002/pmic.201400530", "relatedIdentifierType"=>"DOI", "relationType"=>"References")
583
583
  expect(subject.container).to eq("firstPage"=>"929", "identifier"=>"0028-646X", "identifierType"=>"ISSN", "issue"=>"3", "lastPage"=>"935", "title"=>"New Phytologist", "type"=>"Journal", "volume"=>"218")
584
- expect(subject.agency).to eq("Crossref")
584
+ expect(subject.agency).to eq("crossref")
585
585
  expect(subject.date_registered).to eq("2018-08-03T11:45:49Z")
586
586
  end
587
587
 
@@ -598,10 +598,51 @@ describe Bolognese::Metadata, vcr: true do
598
598
  expect(subject.dates).to include({"date"=>"2017-04-03", "dateType"=>"Issued"})
599
599
  expect(subject.publication_year).to eq("2017")
600
600
  expect(subject.publisher).to eq("Springer Science and Business Media LLC")
601
- expect(subject.agency).to eq("Crossref")
601
+ expect(subject.agency).to eq("crossref")
602
602
  expect(subject.date_registered).to eq("2019-11-02T09:30:06Z")
603
603
  end
604
604
 
605
+ it "posted content copernicus" do
606
+ input = "https://doi.org/10.5194/CP-2020-95"
607
+ subject = Bolognese::Metadata.new(input: input)
608
+ expect(subject.valid?).to be true
609
+ expect(subject.url).to eq("https://cp.copernicus.org/preprints/cp-2020-95/")
610
+ expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"PostedContent", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
611
+ expect(subject.creators.count).to eq(6)
612
+ expect(subject.creators.first).to eq("nameType" => "Personal", "familyName" => "Shao",
613
+ "givenName" => "Jun",
614
+ "name" => "Shao, Jun",
615
+ "nameIdentifiers" => [{"nameIdentifier"=>"https://orcid.org/0000-0001-6130-6474", "nameIdentifierScheme"=>"ORCID", "schemeUri"=>"https://orcid.org"}])
616
+ expect(subject.titles).to eq([{"title"=>"The Atmospheric Bridge Communicated the δ<sup>13</sup>C Declineduring the Last Deglaciation to the Global Upper Ocean"}])
617
+ expect(subject.id).to eq("https://doi.org/10.5194/cp-2020-95")
618
+ expect(subject.identifiers).to be_empty
619
+ expect(subject.descriptions.first["description"]).to start_with("Abstract. During the early last glacial termination")
620
+ expect(subject.dates).to include({"date"=>"2020-07-28", "dateType"=>"Issued"})
621
+ expect(subject.publication_year).to eq("2020")
622
+ expect(subject.publisher).to eq("Copernicus GmbH")
623
+ expect(subject.agency).to eq("crossref")
624
+ end
625
+
626
+ it "book oup" do
627
+ input = "10.1093/oxfordhb/9780198746140.013.5"
628
+ subject = Bolognese::Metadata.new(input: input)
629
+ expect(subject.valid?).to be true
630
+ expect(subject.url).to eq("http://oxfordhandbooks.com/view/10.1093/oxfordhb/9780198746140.001.0001/oxfordhb-9780198746140-e-5")
631
+ expect(subject.types).to eq("bibtex"=>"book", "citeproc"=>"book", "resourceType"=>"Book", "resourceTypeGeneral"=>"Text", "ris"=>"BOOK", "schemaOrg"=>"Book")
632
+ expect(subject.creators.count).to eq(1)
633
+ expect(subject.creators.first).to eq("familyName"=>"Clayton", "givenName"=>"Barbra R.", "name"=>"Clayton, Barbra R.", "nameType"=>"Personal")
634
+ expect(subject.contributors.count).to eq(2)
635
+ expect(subject.contributors.first).to eq("contributorType"=>"Editor", "familyName"=>"Cozort", "givenName"=>"Daniel", "name"=>"Cozort, Daniel", "nameType"=>"Personal")
636
+ expect(subject.titles).to eq([{"title"=>"The Changing Way of the Bodhisattva"}])
637
+ expect(subject.id).to eq("https://doi.org/10.1093/oxfordhb/9780198746140.013.5")
638
+ expect(subject.identifiers).to be_empty
639
+ expect(subject.descriptions.first["description"]).to start_with("This chapter explores the nature of the connections")
640
+ expect(subject.dates).to include({"date"=>"2018-04-05", "dateType"=>"Issued"})
641
+ expect(subject.publication_year).to eq("2018")
642
+ expect(subject.publisher).to eq("Oxford University Press (OUP)")
643
+ expect(subject.agency).to eq("crossref")
644
+ end
645
+
605
646
  it "journal issue" do
606
647
  input = "https://doi.org/10.6002/ect.2015.0371"
607
648
  subject = Bolognese::Metadata.new(input: input)
@@ -609,7 +650,7 @@ describe Bolognese::Metadata, vcr: true do
609
650
  expect(subject.id).to eq("https://doi.org/10.6002/ect.2015.0371")
610
651
  expect(subject.url).to eq("http://ectrx.org/forms/ectrxcontentshow.php?doi_id=10.6002/ect.2015.0371")
611
652
  expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article-journal", "resourceType"=>"JournalIssue", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"PublicationIssue")
612
- expect(subject.creators).to eq("name"=>":(unav)", "nameType"=>"Organizational")
653
+ expect(subject.creators).to eq([{"name"=>":(unav)", "nameType"=>"Organizational"}])
613
654
  expect(subject.titles).to eq([{"title"=>":{unav)"}])
614
655
  expect(subject.dates).to eq([{"date"=>"2018-10", "dateType"=>"Issued"}, {"date"=>"2018-10-03T12:09:12Z", "dateType"=>"Updated"}])
615
656
  expect(subject.publication_year).to eq("2018")
@@ -617,7 +658,7 @@ describe Bolognese::Metadata, vcr: true do
617
658
  expect(subject.related_identifiers.length).to eq(1)
618
659
  expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"2146-8427", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection")
619
660
  expect(subject.container).to eq("identifier"=>"2146-8427", "identifierType"=>"ISSN", "issue"=>"5", "title"=>"Experimental and Clinical Transplantation", "type"=>"Journal", "volume"=>"16")
620
- expect(subject.agency).to eq("Crossref")
661
+ expect(subject.agency).to eq("crossref")
621
662
  end
622
663
 
623
664
  it "not found error" do
@@ -626,7 +667,7 @@ describe Bolognese::Metadata, vcr: true do
626
667
  expect(subject.valid?).to be false
627
668
  expect(subject.id).to eq("https://doi.org/10.7554/elife.01567x")
628
669
  expect(subject.doi).to eq("10.7554/elife.01567x")
629
- expect(subject.agency).to eq("Crossref")
670
+ expect(subject.agency).to eq("crossref")
630
671
  expect(subject.state).to eq("not_found")
631
672
  end
632
673
  end