bolognese 1.8.2 → 1.8.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +10 -7
- data/bolognese.gemspec +1 -1
- data/lib/bolognese/readers/crossref_reader.rb +30 -13
- data/lib/bolognese/readers/datacite_reader.rb +1 -1
- data/lib/bolognese/utils.rb +9 -4
- data/lib/bolognese/version.rb +1 -1
- data/spec/fixtures/crosscite.json +1 -1
- data/spec/fixtures/datacite.json +1 -1
- data/spec/fixtures/datacite_software.json +1 -1
- data/spec/fixtures/datacite_software_version.json +1 -1
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/book_oup.yml +91 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/posted_content_copernicus.yml +94 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/report_osti.yml +138 -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 +113 -53
- data/spec/readers/datacite_json_reader_spec.rb +2 -2
- data/spec/readers/datacite_reader_spec.rb +45 -34
- data/spec/writers/datacite_writer_spec.rb +9 -9
- data/spec/writers/jats_writer_spec.rb +1 -1
- metadata +8 -10
@@ -0,0 +1,138 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://doi.org/ra/10.2172
|
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
|
+
- Wed, 29 Jul 2020 21:23:48 GMT
|
21
|
+
Content-Type:
|
22
|
+
- application/json;charset=UTF-8
|
23
|
+
Connection:
|
24
|
+
- keep-alive
|
25
|
+
Set-Cookie:
|
26
|
+
- __cfduid=d01ef02c612a86c1cf7a059f5c9c803201596057828; expires=Fri, 28-Aug-20
|
27
|
+
21:23:48 GMT; path=/; domain=.doi.org; HttpOnly; SameSite=Lax; Secure
|
28
|
+
Cf-Cache-Status:
|
29
|
+
- DYNAMIC
|
30
|
+
Cf-Request-Id:
|
31
|
+
- 043e0ed580000096d473a7a200000001
|
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
|
+
- 5ba9e7359f0c96d4-FRA
|
40
|
+
body:
|
41
|
+
encoding: ASCII-8BIT
|
42
|
+
string: |-
|
43
|
+
[
|
44
|
+
{
|
45
|
+
"DOI": "10.2172",
|
46
|
+
"RA": "Crossref"
|
47
|
+
}
|
48
|
+
]
|
49
|
+
http_version:
|
50
|
+
recorded_at: Wed, 29 Jul 2020 21:23:48 GMT
|
51
|
+
- request:
|
52
|
+
method: get
|
53
|
+
uri: https://api.crossref.org/works/10.2172/972169/transform/application/vnd.crossref.unixsd+xml
|
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/xml
|
62
|
+
response:
|
63
|
+
status:
|
64
|
+
code: 200
|
65
|
+
message: OK
|
66
|
+
headers:
|
67
|
+
Link:
|
68
|
+
- <http://dx.doi.org/10.2172/972169>; rel="canonical"
|
69
|
+
Access-Control-Allow-Origin:
|
70
|
+
- "*"
|
71
|
+
Access-Control-Allow-Headers:
|
72
|
+
- X-Requested-With
|
73
|
+
Content-Length:
|
74
|
+
- '4217'
|
75
|
+
Server:
|
76
|
+
- http-kit
|
77
|
+
Date:
|
78
|
+
- Wed, 29 Jul 2020 21:23:49 GMT
|
79
|
+
X-Rate-Limit-Limit:
|
80
|
+
- '50'
|
81
|
+
X-Rate-Limit-Interval:
|
82
|
+
- 1s
|
83
|
+
Connection:
|
84
|
+
- close
|
85
|
+
body:
|
86
|
+
encoding: ASCII-8BIT
|
87
|
+
string: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<crossref_result xmlns=\"http://www.crossref.org/qrschema/3.0\"
|
88
|
+
version=\"3.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.crossref.org/qrschema/3.0
|
89
|
+
http://www.crossref.org/schemas/crossref_query_output3.0.xsd\">\r\n <query_result>\r\n
|
90
|
+
\ <head>\r\n <doi_batch_id>none</doi_batch_id>\r\n </head>\r\n <body>\r\n
|
91
|
+
\ <query status=\"resolved\">\r\n <doi type=\"report-paper_title\">10.2172/972169</doi>\r\n
|
92
|
+
\ <crm-item name=\"publisher-name\" type=\"string\">Office of Scientific
|
93
|
+
and Technical Information (OSTI)</crm-item>\r\n <crm-item name=\"prefix-name\"
|
94
|
+
type=\"string\">Office of Scientific and Technical Information</crm-item>\r\n
|
95
|
+
\ <crm-item name=\"member-id\" type=\"number\">960</crm-item>\r\n <crm-item
|
96
|
+
name=\"citation-id\" type=\"number\">41225045</crm-item>\r\n <crm-item
|
97
|
+
name=\"book-id\" type=\"number\">584445</crm-item>\r\n <crm-item name=\"deposit-timestamp\"
|
98
|
+
type=\"number\">20100218105553</crm-item>\r\n <crm-item name=\"owner-prefix\"
|
99
|
+
type=\"string\">10.2172</crm-item>\r\n <crm-item name=\"last-update\"
|
100
|
+
type=\"date\">2010-02-19T03:56:05Z</crm-item>\r\n <crm-item name=\"created\"
|
101
|
+
type=\"date\">2010-02-19T03:56:03Z</crm-item>\r\n <crm-item name=\"citedby-count\"
|
102
|
+
type=\"number\">159</crm-item>\r\n <doi_record>\r\n <crossref
|
103
|
+
xmlns=\"http://www.crossref.org/xschema/1.0\" xsi:schemaLocation=\"http://www.crossref.org/xschema/1.0
|
104
|
+
http://doi.crossref.org/schemas/unixref1.0.xsd\">\r\n <report-paper
|
105
|
+
publication_type=\"full_text\">\r\n <report-paper_metadata language=\"en\">\r\n
|
106
|
+
\ <contributors>\r\n <person_name sequence=\"first\"
|
107
|
+
contributor_role=\"author\">\r\n <given_name>P.</given_name>\r\n
|
108
|
+
\ <surname>Denholm</surname>\r\n </person_name>\r\n
|
109
|
+
\ <person_name sequence=\"additional\" contributor_role=\"author\">\r\n
|
110
|
+
\ <given_name>E.</given_name>\r\n <surname>Ela</surname>\r\n
|
111
|
+
\ </person_name>\r\n <person_name sequence=\"additional\"
|
112
|
+
contributor_role=\"author\">\r\n <given_name>B.</given_name>\r\n
|
113
|
+
\ <surname>Kirby</surname>\r\n </person_name>\r\n
|
114
|
+
\ <person_name sequence=\"additional\" contributor_role=\"author\">\r\n
|
115
|
+
\ <given_name>M.</given_name>\r\n <surname>Milligan</surname>\r\n
|
116
|
+
\ </person_name>\r\n </contributors>\r\n <titles>\r\n
|
117
|
+
\ <title>Role of Energy Storage with Renewable Electricity
|
118
|
+
Generation</title>\r\n </titles>\r\n <publication_date
|
119
|
+
media_type=\"online\">\r\n <month>01</month>\r\n <day>01</day>\r\n
|
120
|
+
\ <year>2010</year>\r\n </publication_date>\r\n
|
121
|
+
\ <approval_date>\r\n <month>02</month>\r\n
|
122
|
+
\ <day>18</day>\r\n <year>2010</year>\r\n
|
123
|
+
\ </approval_date>\r\n <institution>\r\n <institution_name>National
|
124
|
+
Renewable Energy Laboratory (NREL)</institution_name>\r\n <institution_acronym>NREL</institution_acronym>\r\n
|
125
|
+
\ <institution_place>Golden, CO (United States)</institution_place>\r\n
|
126
|
+
\ </institution>\r\n <institution>\r\n <institution_name>USDOE</institution_name>\r\n
|
127
|
+
\ </institution>\r\n <publisher_item>\r\n <item_number
|
128
|
+
item_number_type=\"report-number\">NREL/TP-6A2-47187</item_number>\r\n <item_number
|
129
|
+
item_number_type=\"sequence-number\">972169</item_number>\r\n </publisher_item>\r\n
|
130
|
+
\ <contract_number>AC36-99-GO10337</contract_number>\r\n <doi_data>\r\n
|
131
|
+
\ <doi>10.2172/972169</doi>\r\n <timestamp>20100218105553</timestamp>\r\n
|
132
|
+
\ <resource>http://www.osti.gov/servlets/purl/972169-1QXROM/</resource>\r\n
|
133
|
+
\ </doi_data>\r\n </report-paper_metadata>\r\n
|
134
|
+
\ </report-paper>\r\n </crossref>\r\n </doi_record>\r\n
|
135
|
+
\ </query>\r\n </body>\r\n </query_result>\r\n</crossref_result>"
|
136
|
+
http_version:
|
137
|
+
recorded_at: Wed, 29 Jul 2020 21:23:49 GMT
|
138
|
+
recorded_with: VCR 3.0.3
|
@@ -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
|
@@ -19,7 +19,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
19
19
|
it "DOI with data citation" do
|
20
20
|
expect(subject.valid?).to be true
|
21
21
|
expect(subject.id).to eq("https://doi.org/10.7554/elife.01567")
|
22
|
-
expect(subject.identifiers).to eq([{"identifier"=>"e01567", "identifierType"=>"
|
22
|
+
expect(subject.identifiers).to eq([{"identifier"=>"e01567", "identifierType"=>"article_number"}])
|
23
23
|
expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
|
24
24
|
expect(subject.url).to eq("https://elifesciences.org/articles/01567")
|
25
25
|
expect(subject.creators.length).to eq(5)
|
@@ -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("
|
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("
|
77
|
+
expect(subject.agency).to eq("crossref")
|
78
78
|
end
|
79
79
|
|
80
80
|
it "journal article with funding" do
|
@@ -82,7 +82,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
82
82
|
subject = Bolognese::Metadata.new(input: input)
|
83
83
|
expect(subject.valid?).to be true
|
84
84
|
expect(subject.id).to eq("https://doi.org/10.3389/fpls.2019.00816")
|
85
|
-
expect(subject.identifiers).to eq([{"identifier"=>"816", "identifierType"=>"
|
85
|
+
expect(subject.identifiers).to eq([{"identifier"=>"816", "identifierType"=>"article_number"}])
|
86
86
|
expect(subject.url).to eq("https://www.frontiersin.org/article/10.3389/fpls.2019.00816/full")
|
87
87
|
expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
|
88
88
|
expect(subject.creators.length).to eq(4)
|
@@ -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("
|
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("
|
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("
|
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
|
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("
|
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("
|
179
|
-
expect(subject.agency).to eq("
|
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("
|
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("
|
224
|
+
expect(subject.agency).to eq("crossref")
|
225
225
|
end
|
226
226
|
|
227
227
|
it "date in future" do
|
@@ -229,7 +229,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
229
229
|
subject = Bolognese::Metadata.new(input: input)
|
230
230
|
expect(subject.valid?).to be true
|
231
231
|
expect(subject.id).to eq("https://doi.org/10.1016/j.ejphar.2015.03.018")
|
232
|
-
expect(subject.identifiers).to eq([{"identifier"=>"S0014299915002332", "identifierType"=>"
|
232
|
+
expect(subject.identifiers).to eq([{"identifier"=>"S0014299915002332", "identifierType"=>"sequence-number"}])
|
233
233
|
expect(subject.url).to eq("https://linkinghub.elsevier.com/retrieve/pii/S0014299915002332")
|
234
234
|
expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
|
235
235
|
expect(subject.creators.length).to eq(10)
|
@@ -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("
|
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("
|
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("
|
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("
|
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("
|
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
|
328
|
-
expect(subject.agency).to eq("
|
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
|
343
|
-
expect(subject.agency).to eq("
|
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", "
|
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("
|
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("
|
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("
|
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
|
407
|
-
expect(subject.agency).to eq("
|
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("
|
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("
|
427
|
+
expect(subject.agency).to eq("crossref")
|
428
428
|
expect(subject.date_registered).to be_nil
|
429
429
|
end
|
430
430
|
|
@@ -433,7 +433,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
433
433
|
subject = Bolognese::Metadata.new(input: input)
|
434
434
|
expect(subject.valid?).to be true
|
435
435
|
expect(subject.id).to eq("https://doi.org/10.3280/ecag2018-001005")
|
436
|
-
expect(subject.identifiers).to eq([{"identifier"=>"5", "identifierType"=>"
|
436
|
+
expect(subject.identifiers).to eq([{"identifier"=>"5", "identifierType"=>"article_number"}])
|
437
437
|
expect(subject.url).to eq("http://www.francoangeli.it/riviste/Scheda_Riviste.asp?IDArticolo=61645")
|
438
438
|
expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
|
439
439
|
expect(subject.creators.length).to eq(2)
|
@@ -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("
|
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("
|
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
|
|
@@ -547,7 +547,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
547
547
|
subject = Bolognese::Metadata.new(input: input)
|
548
548
|
expect(subject.valid?).to be true
|
549
549
|
expect(subject.id).to eq("https://doi.org/10.1055/s-0039-1690894")
|
550
|
-
expect(subject.identifiers).to eq([{"identifier"=>"s-0039-1690894", "identifierType"=>"
|
550
|
+
expect(subject.identifiers).to eq([{"identifier"=>"s-0039-1690894", "identifierType"=>"sequence-number"}])
|
551
551
|
expect(subject.url).to eq("http://www.thieme-connect.de/DOI/DOI?10.1055/s-0039-1690894")
|
552
552
|
expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resourceType"=>"JournalArticle", "resourceTypeGeneral"=>"Text", "ris"=>"JOUR", "schemaOrg"=>"ScholarlyArticle")
|
553
553
|
expect(subject.creators.length).to eq(4)
|
@@ -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("
|
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,70 @@ 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("
|
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
|
+
|
646
|
+
it "report osti" do
|
647
|
+
input = "10.2172/972169"
|
648
|
+
subject = Bolognese::Metadata.new(input: input)
|
649
|
+
expect(subject.valid?).to be true
|
650
|
+
expect(subject.url).to eq("http://www.osti.gov/servlets/purl/972169-1QXROM/")
|
651
|
+
expect(subject.types).to eq("bibtex"=>"techreport", "citeproc"=>"report", "resourceType"=>"Report", "resourceTypeGeneral"=>"Text", "ris"=>"RPRT", "schemaOrg"=>"Report")
|
652
|
+
expect(subject.creators.count).to eq(4)
|
653
|
+
expect(subject.creators.first).to eq("familyName"=>"Denholm", "givenName"=>"P.", "name"=>"Denholm, P.", "nameType"=>"Personal")
|
654
|
+
expect(subject.contributors.count).to eq(0)
|
655
|
+
expect(subject.titles).to eq([{"title"=>"Role of Energy Storage with Renewable Electricity Generation"}])
|
656
|
+
expect(subject.id).to eq("https://doi.org/10.2172/972169")
|
657
|
+
expect(subject.identifiers).to eq( [{"identifier"=>"NREL/TP-6A2-47187", "identifierType"=>"report-number"}, {"identifier"=>"972169", "identifierType"=>"sequence-number"}])
|
658
|
+
expect(subject.descriptions).to be_empty
|
659
|
+
expect(subject.dates).to include({"date"=>"2010-01-01", "dateType"=>"Issued"})
|
660
|
+
expect(subject.publication_year).to eq("2010")
|
661
|
+
expect(subject.publisher).to eq("Office of Scientific and Technical Information (OSTI)")
|
662
|
+
expect(subject.agency).to eq("crossref")
|
663
|
+
end
|
664
|
+
|
605
665
|
it "journal issue" do
|
606
666
|
input = "https://doi.org/10.6002/ect.2015.0371"
|
607
667
|
subject = Bolognese::Metadata.new(input: input)
|
@@ -609,7 +669,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
609
669
|
expect(subject.id).to eq("https://doi.org/10.6002/ect.2015.0371")
|
610
670
|
expect(subject.url).to eq("http://ectrx.org/forms/ectrxcontentshow.php?doi_id=10.6002/ect.2015.0371")
|
611
671
|
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")
|
672
|
+
expect(subject.creators).to eq([{"name"=>":(unav)", "nameType"=>"Organizational"}])
|
613
673
|
expect(subject.titles).to eq([{"title"=>":{unav)"}])
|
614
674
|
expect(subject.dates).to eq([{"date"=>"2018-10", "dateType"=>"Issued"}, {"date"=>"2018-10-03T12:09:12Z", "dateType"=>"Updated"}])
|
615
675
|
expect(subject.publication_year).to eq("2018")
|
@@ -617,7 +677,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
617
677
|
expect(subject.related_identifiers.length).to eq(1)
|
618
678
|
expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"2146-8427", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection")
|
619
679
|
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("
|
680
|
+
expect(subject.agency).to eq("crossref")
|
621
681
|
end
|
622
682
|
|
623
683
|
it "not found error" do
|
@@ -626,7 +686,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
626
686
|
expect(subject.valid?).to be false
|
627
687
|
expect(subject.id).to eq("https://doi.org/10.7554/elife.01567x")
|
628
688
|
expect(subject.doi).to eq("10.7554/elife.01567x")
|
629
|
-
expect(subject.agency).to eq("
|
689
|
+
expect(subject.agency).to eq("crossref")
|
630
690
|
expect(subject.state).to eq("not_found")
|
631
691
|
end
|
632
692
|
end
|