bolognese 1.9.12 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/build.yml +2 -30
- data/.github/workflows/ci.yml +22 -0
- data/.github/workflows/pull-request.yml +9 -0
- data/.github/workflows/release.yml +7 -22
- data/.gitignore +1 -0
- data/CHANGELOG.md +71 -0
- data/Gemfile.lock +106 -92
- data/bolognese.gemspec +4 -3
- data/lib/bolognese/author_utils.rb +19 -6
- data/lib/bolognese/datacite_utils.rb +50 -36
- data/lib/bolognese/doi_utils.rb +4 -0
- data/lib/bolognese/metadata.rb +1 -1
- data/lib/bolognese/metadata_utils.rb +1 -1
- data/lib/bolognese/readers/bibtex_reader.rb +2 -2
- data/lib/bolognese/readers/citeproc_reader.rb +1 -1
- data/lib/bolognese/readers/codemeta_reader.rb +2 -2
- data/lib/bolognese/readers/crosscite_reader.rb +4 -1
- data/lib/bolognese/readers/crossref_reader.rb +3 -4
- data/lib/bolognese/readers/datacite_json_reader.rb +4 -1
- data/lib/bolognese/readers/datacite_reader.rb +34 -11
- data/lib/bolognese/readers/npm_reader.rb +1 -1
- data/lib/bolognese/readers/ris_reader.rb +2 -2
- data/lib/bolognese/readers/schema_org_reader.rb +6 -6
- data/lib/bolognese/utils.rb +84 -14
- data/lib/bolognese/version.rb +1 -1
- data/lib/bolognese/writers/bibtex_writer.rb +1 -1
- data/lib/bolognese/writers/codemeta_writer.rb +1 -1
- data/lib/bolognese/writers/csv_writer.rb +1 -1
- data/lib/bolognese/writers/datacite_json_writer.rb +6 -1
- data/lib/bolognese/writers/jats_writer.rb +3 -3
- data/lib/bolognese/writers/ris_writer.rb +2 -2
- data/lib/bolognese/writers/schema_org_writer.rb +2 -2
- data/resources/kernel-4/include/datacite-relationType-v4.xsd +2 -0
- data/resources/kernel-4/include/datacite-resourceType-v4.xsd +2 -0
- data/resources/kernel-4/metadata.xsd +11 -7
- data/resources/kernel-4.5/include/datacite-contributorType-v4.xsd +35 -0
- data/resources/kernel-4.5/include/datacite-dateType-v4.xsd +25 -0
- data/resources/kernel-4.5/include/datacite-descriptionType-v4.xsd +19 -0
- data/resources/kernel-4.5/include/datacite-funderIdentifierType-v4.xsd +16 -0
- data/resources/kernel-4.5/include/datacite-nameType-v4.xsd +10 -0
- data/resources/kernel-4.5/include/datacite-numberType-v4.xsd +12 -0
- data/resources/kernel-4.5/include/datacite-relatedIdentifierType-v4.xsd +34 -0
- data/resources/kernel-4.5/include/datacite-relationType-v4.xsd +53 -0
- data/resources/kernel-4.5/include/datacite-resourceType-v4.xsd +45 -0
- data/resources/kernel-4.5/include/datacite-titleType-v4.xsd +14 -0
- data/resources/kernel-4.5/include/xml.xsd +286 -0
- data/resources/kernel-4.5/metadata.xsd +711 -0
- data/resources/oecd/dfg-mappings.json +1866 -0
- data/spec/author_utils_spec.rb +61 -2
- data/spec/datacite_utils_spec.rb +30 -1
- data/spec/fixtures/citeproc.json +4 -2
- data/spec/fixtures/datacite-example-ROR-nameIdentifiers.xml +117 -0
- data/spec/fixtures/datacite-example-full-v4.5.xml +255 -0
- data/spec/fixtures/datacite-example-nameIdentifier-with-schemeURI.xml +94 -0
- data/spec/fixtures/datacite-example-relateditems-with-attributes.xml +61 -0
- data/spec/fixtures/datacite-funderIdentifier.xml +20 -0
- data/spec/fixtures/datacite-seriesinformation.xml +7 -2
- data/spec/fixtures/datacite.json +9 -3
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_related_items/insert.yml +73 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/insert_subjects/insert.yml +32 -14
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_sandbox.yml +65 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/validate_orcid/validate_orcid_sandbox_https.yml +65 -0
- data/spec/metadata_spec.rb +1 -1
- data/spec/readers/bibtex_reader_spec.rb +2 -0
- data/spec/readers/citeproc_reader_spec.rb +3 -0
- data/spec/readers/codemeta_reader_spec.rb +4 -4
- data/spec/readers/crosscite_reader_spec.rb +2 -0
- data/spec/readers/crossref_reader_spec.rb +41 -41
- data/spec/readers/datacite_json_reader_spec.rb +3 -1
- data/spec/readers/datacite_reader_spec.rb +156 -50
- data/spec/readers/npm_reader_spec.rb +2 -0
- data/spec/readers/ris_reader_spec.rb +3 -0
- data/spec/readers/schema_org_reader_spec.rb +11 -11
- data/spec/spec_helper.rb +1 -0
- data/spec/utils_spec.rb +53 -4
- data/spec/writers/crosscite_writer_spec.rb +7 -0
- data/spec/writers/datacite_json_writer_spec.rb +38 -0
- data/spec/writers/datacite_writer_spec.rb +84 -5
- data/spec/writers/jats_writer_spec.rb +8 -0
- data/spec/writers/rdf_xml_writer_spec.rb +7 -0
- data/spec/writers/turtle_writer_spec.rb +18 -0
- metadata +49 -21
|
@@ -42,7 +42,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
42
42
|
{"subject"=>"taxonomy"},
|
|
43
43
|
{"subject"=>"mitochondrial genome"},
|
|
44
44
|
{"subject"=>"Parasites"}])
|
|
45
|
-
expect(subject.publisher).to eq("Dryad")
|
|
45
|
+
expect(subject.publisher).to eq({"name"=>"Dryad"})
|
|
46
46
|
expect(subject.agency).to eq("datacite")
|
|
47
47
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
|
|
48
48
|
end
|
|
@@ -65,7 +65,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
65
65
|
expect(subject.publication_year).to eq("2016")
|
|
66
66
|
expect(subject.related_identifiers.length).to eq(3)
|
|
67
67
|
expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"10.5438/0000-00ss", "relatedIdentifierType"=>"DOI", "relationType"=>"IsPartOf")
|
|
68
|
-
expect(subject.publisher).to eq("DataCite")
|
|
68
|
+
expect(subject.publisher).to eq({"name"=>"DataCite"})
|
|
69
69
|
expect(subject.subjects).to eq([{"subject"=>"datacite"},
|
|
70
70
|
{"subject"=>"doi"},
|
|
71
71
|
{"subject"=>"metadata"},
|
|
@@ -96,7 +96,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
96
96
|
{"subject"=>"000 Computer science, knowledge, general works",
|
|
97
97
|
"subjectScheme"=>"DDC"}])
|
|
98
98
|
expect(subject.publication_year).to eq("2013")
|
|
99
|
-
expect(subject.publisher).to eq("Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik GmbH, Wadern/Saarbruecken, Germany")
|
|
99
|
+
expect(subject.publisher).to eq({"name"=>"Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik GmbH, Wadern/Saarbruecken, Germany"})
|
|
100
100
|
expect(subject.agency).to eq("datacite")
|
|
101
101
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-2.1")
|
|
102
102
|
end
|
|
@@ -121,7 +121,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
121
121
|
"name"=>"Brown University"},
|
|
122
122
|
{"affiliationIdentifier"=>"https://grid.ac/institutes/grid.268117.b",
|
|
123
123
|
"affiliationIdentifierScheme"=>"GRID",
|
|
124
|
-
"name"=>"Wesleyan University"}])
|
|
124
|
+
"name"=>"Wesleyan University", "schemeUri"=>"https://grid.ac/institutes/"}])
|
|
125
125
|
expect(subject.creators.dig(2, "affiliation")).to eq([{"affiliationIdentifier"=>"https://ror.org/05gq02987",
|
|
126
126
|
"affiliationIdentifierScheme"=>"ROR", "name"=>"Brown University"}])
|
|
127
127
|
expect(subject.titles).to eq([{"lang"=>"en-US", "title"=>"Full DataCite XML Example"}, {"lang"=>"en-US", "title"=>"Demonstration of DataCite Properties.", "titleType"=>"Subtitle"}])
|
|
@@ -141,6 +141,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
141
141
|
"awardTitle"=>"Full DataCite XML Example",
|
|
142
142
|
"funderIdentifier"=>"https://doi.org/10.13039/100000001",
|
|
143
143
|
"funderIdentifierType"=>"Crossref Funder ID",
|
|
144
|
+
"schemeUri"=>"https://doi.org/",
|
|
144
145
|
"funderName"=>"National Science Foundation"}])
|
|
145
146
|
expect(subject.related_identifiers.length).to eq(2)
|
|
146
147
|
expect(subject.related_identifiers.first).to eq("relatedIdentifier"=>"https://data.datacite.org/application/citeproc+json/10.5072/example-full", "relatedIdentifierType"=>"URL", "relationType"=>"HasMetadata", "relatedMetadataScheme"=>"citeproc+json", "schemeUri"=>"https://github.com/citation-style-language/schema/raw/master/csl-data.json")
|
|
@@ -148,7 +149,12 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
148
149
|
expect(subject.language).to eq("en-US")
|
|
149
150
|
expect(subject.sizes).to eq(["4 kB"])
|
|
150
151
|
expect(subject.formats).to eq(["application/xml"])
|
|
151
|
-
expect(subject.publisher).to eq(
|
|
152
|
+
expect(subject.publisher).to eq(
|
|
153
|
+
{
|
|
154
|
+
"name"=>"DataCite",
|
|
155
|
+
"lang"=>"en",
|
|
156
|
+
}
|
|
157
|
+
)
|
|
152
158
|
expect(subject.agency).to eq("datacite")
|
|
153
159
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
|
|
154
160
|
end
|
|
@@ -165,7 +171,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
165
171
|
expect(subject.titles).to eq([{"lang"=>"en", "title"=>"Data underpinning - The Sun as a planet-host star: Proxies from SDO images for HARPS radial-velocity variations"}])
|
|
166
172
|
expect(subject.dates).to eq([{"date"=>"2016-01-20", "dateType"=>"Available"}, {"date"=>"2016", "dateType"=>"Issued"}])
|
|
167
173
|
expect(subject.publication_year).to eq("2016")
|
|
168
|
-
expect(subject.publisher).to eq("University of St Andrews")
|
|
174
|
+
expect(subject.publisher).to eq({"name"=>"University of St Andrews"})
|
|
169
175
|
expect(subject.agency).to eq("datacite")
|
|
170
176
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
|
|
171
177
|
end
|
|
@@ -184,7 +190,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
184
190
|
expect(subject.publication_year).to eq("2011")
|
|
185
191
|
expect(subject.sizes).to eq([])
|
|
186
192
|
expect(subject.subjects).to eq([{"subject"=>"Environmental research"}])
|
|
187
|
-
expect(subject.publisher).to eq("EvK2 CNR Committee")
|
|
193
|
+
expect(subject.publisher).to eq({"name"=>"EvK2 CNR Committee"})
|
|
188
194
|
expect(subject.agency).to eq("datacite")
|
|
189
195
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-2.2")
|
|
190
196
|
end
|
|
@@ -201,7 +207,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
201
207
|
expect(subject.types["citeproc"]).to eq("article")
|
|
202
208
|
expect(subject.creators).to eq([{"nameType"=>"Personal", "name"=>"Garza, Kristian", "givenName"=>"Kristian", "familyName"=>"Garza", "nameIdentifiers" => [], "affiliation" => []}])
|
|
203
209
|
expect(subject.titles).to eq([{"title"=>"Analysis Tools For Crossover Experiment Of Ui Using Choice Architecture"}])
|
|
204
|
-
expect(subject.descriptions.first["description"]).to start_with("
|
|
210
|
+
expect(subject.descriptions.first["description"]).to start_with(" \n\nThis tools are used to analyse the data produced by the Crosssover Experiment I designed to test Choice Architecture techniques as UI interventions in a SEEk4Science data catalogue. It contains:\n\n- Data structures for the experimental data.<br>\n- Visualisation functions<br>\n- Analysis functions\n\n## Installation\n\n- R<br>\n- python<br>\n- ipython 4\n\nClone and use.\n\n## Usage\n\n<br>\n```python<br>\nsource('parallel_plot.r')<br>\nwith(z, parallelset(trt,response, freq=count, alpha=0.2))<br>\n```\n\n<br>\n## Contributing\n\n1. Fork it!<br>\n2. Create your feature branch: `git checkout -b my-new-feature`<br>\n3. Commit your changes: `git commit -am 'Add some feature'`<br>\n4. Push to the branch: `git push origin my-new-feature`<br>\n5. Submit a pull request :D\n\n<br>\n## License\n\nThis work supports my PhD Thesis at University of Manchester.")
|
|
205
211
|
expect(subject.rights_list).to eq([{"rights"=>
|
|
206
212
|
"Creative Commons Attribution Non Commercial Share Alike 4.0 International",
|
|
207
213
|
"rightsIdentifier"=>"cc-by-nc-sa-4.0",
|
|
@@ -216,7 +222,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
216
222
|
expect(subject.subjects).to eq([{"subject"=>"choice architecture"},
|
|
217
223
|
{"subject"=>"crossover experiment"},
|
|
218
224
|
{"subject"=>"hci"}])
|
|
219
|
-
expect(subject.publisher).to eq("Zenodo")
|
|
225
|
+
expect(subject.publisher).to eq({"name"=>"Zenodo"})
|
|
220
226
|
expect(subject.agency).to eq("datacite")
|
|
221
227
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
|
|
222
228
|
end
|
|
@@ -242,7 +248,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
242
248
|
expect(subject.publication_year).to eq("2016")
|
|
243
249
|
expect(subject.related_identifiers.length).to eq(1)
|
|
244
250
|
expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"10.6084/m9.figshare.4234751", "relatedIdentifierType"=>"DOI", "relationType"=>"IsIdenticalTo")
|
|
245
|
-
expect(subject.publisher).to eq("figshare")
|
|
251
|
+
expect(subject.publisher).to eq({"name"=>"figshare"})
|
|
246
252
|
expect(subject.subjects).to eq([
|
|
247
253
|
{"schemeUri"=>
|
|
248
254
|
"http://www.abs.gov.au/ausstats/abs@.nsf/0/6BB427AB9696C225CA2574180004463E",
|
|
@@ -285,7 +291,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
285
291
|
"schemeUri"=>"https://spdx.org/licenses/"}])
|
|
286
292
|
expect(subject.dates).to eq([{"date"=>"2015-06-14", "dateType"=>"Created"}, {"date"=>"2020-06-02", "dateType"=>"Updated"}, {"date"=>"2020", "dateType"=>"Issued"}])
|
|
287
293
|
expect(subject.publication_year).to eq("2020")
|
|
288
|
-
expect(subject.publisher).to eq("figshare")
|
|
294
|
+
expect(subject.publisher).to eq({"name"=>"figshare"})
|
|
289
295
|
expect(subject.subjects).to eq([{"subject"=>"Evolutionary Biology"},
|
|
290
296
|
{"subject"=>"FOS: Biological sciences", "subjectScheme"=>"Fields of Science and Technology (FOS)", "schemeUri"=>"http://www.oecd.org/science/inno/38235147.pdf"},
|
|
291
297
|
{"subject"=>"60412 Quantitative Genetics (incl. Disease and Trait Mapping Genetics)", "subjectScheme"=>"FOR", "schemeUri"=>"http://www.abs.gov.au/ausstats/abs@.nsf/0/6BB427AB9696C225CA2574180004463E"}])
|
|
@@ -337,7 +343,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
337
343
|
expect(subject.descriptions.first["description"]).to start_with("The dataset contains a sample of metadata describing papers")
|
|
338
344
|
expect(subject.dates).to eq([{"date"=>"2013-04-03", "dateType"=>"Issued"}])
|
|
339
345
|
expect(subject.publication_year).to eq("2013")
|
|
340
|
-
expect(subject.publisher).to eq("Zenodo")
|
|
346
|
+
expect(subject.publisher).to eq({"name"=>"Zenodo"})
|
|
341
347
|
expect(subject.funding_references).to eq([{"awardNumber"=>"246686",
|
|
342
348
|
"awardTitle"=>"Open Access Infrastructure for Research in Europe",
|
|
343
349
|
"awardUri"=>"info:eu-repo/grantAgreement/EC/FP7/246686/",
|
|
@@ -381,7 +387,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
381
387
|
expect(subject.descriptions.first["description"]).to start_with("The dataset contains a sample of metadata describing papers")
|
|
382
388
|
expect(subject.dates).to eq([{"date"=>"2013-04-03", "dateType"=>"Issued"}])
|
|
383
389
|
expect(subject.publication_year).to eq("2013")
|
|
384
|
-
expect(subject.publisher).to eq("Zenodo")
|
|
390
|
+
expect(subject.publisher).to eq({"name"=>"Zenodo"})
|
|
385
391
|
expect(subject.funding_references).to eq([{"awardNumber"=>"246686",
|
|
386
392
|
"awardTitle"=>"Open Access Infrastructure for Research in Europe",
|
|
387
393
|
"awardUri"=>"info:eu-repo/grantAgreement/EC/FP7/246686/",
|
|
@@ -408,7 +414,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
408
414
|
subject = Bolognese::Metadata.new(input: input)
|
|
409
415
|
expect(subject.types["schemaOrg"]).to eq("Collection")
|
|
410
416
|
expect(subject.language).to eq("de")
|
|
411
|
-
expect(subject.publisher).to eq("Universitätsbibliothek Tübingen")
|
|
417
|
+
expect(subject.publisher).to eq({"name"=>"Universitätsbibliothek Tübingen"})
|
|
412
418
|
expect(subject.publication_year).to eq("2015")
|
|
413
419
|
expect(subject.valid?).to be false
|
|
414
420
|
expect(subject.errors).to eq("13:0: ERROR: Element '{http://datacite.org/schema/kernel-2.2}publisher': This element is not expected. Expected is ( {http://datacite.org/schema/kernel-2.2}publicationYear ).")
|
|
@@ -420,10 +426,12 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
420
426
|
expect(subject.funding_references.first).to eq({
|
|
421
427
|
"funderIdentifier"=>"http://www.isni.org/isni/0000000119587073",
|
|
422
428
|
"funderIdentifierType"=>"ISNI",
|
|
429
|
+
"schemeUri"=>"http://www.isni.org/isni/",
|
|
423
430
|
"funderName"=>"National Science Foundation (NSF)"})
|
|
424
|
-
expect(subject.funding_references
|
|
431
|
+
expect(subject.funding_references[2]).to eq({
|
|
425
432
|
"funderIdentifier"=>"https://doi.org/10.13039/501100000780",
|
|
426
433
|
"funderIdentifierType"=>"Crossref Funder ID",
|
|
434
|
+
"schemeUri"=>"https://doi.org/",
|
|
427
435
|
"funderName"=>"European Commission"})
|
|
428
436
|
expect(subject.funding_references[1]).to eq({
|
|
429
437
|
"funderIdentifier"=>"1234",
|
|
@@ -431,6 +439,35 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
431
439
|
"funderName"=>"Acme Inc"})
|
|
432
440
|
end
|
|
433
441
|
|
|
442
|
+
it "funder identifier with normalized identifiers and non-normalized identifiers" do
|
|
443
|
+
input = fixture_path + 'datacite-funderIdentifier.xml'
|
|
444
|
+
subject = Bolognese::Metadata.new(input: input)
|
|
445
|
+
expect(subject.funding_references[3]).to eq({
|
|
446
|
+
"funderIdentifier"=>"0000 0001 2298 6657",
|
|
447
|
+
"funderIdentifierType"=>"ISNI",
|
|
448
|
+
"schemeUri"=>"http://www.isni.org/isni/",
|
|
449
|
+
"funderName"=>"University of Washington"})
|
|
450
|
+
expect(subject.funding_references[4]).to eq({
|
|
451
|
+
"funderIdentifier"=>"127467345",
|
|
452
|
+
"funderIdentifierType"=>"Other",
|
|
453
|
+
"schemeUri"=>"http://viaf.org/viaf/",
|
|
454
|
+
"funderName"=>"National Library of Ireland."})
|
|
455
|
+
expect(subject.funding_references[5]).to eq({
|
|
456
|
+
"funderIdentifier"=>"https://ror.org/04wxnsj81",
|
|
457
|
+
"funderIdentifierType"=>"ROR",
|
|
458
|
+
"schemeUri"=>"https://ror.org",
|
|
459
|
+
"funderName"=>"DataCite"})
|
|
460
|
+
expect(subject.funding_references[6]).to eq({
|
|
461
|
+
"funderIdentifier"=>"https://ror.org/038wwg650",
|
|
462
|
+
"funderIdentifierType"=>"ROR",
|
|
463
|
+
"schemeUri"=>"https://ror.org",
|
|
464
|
+
"funderName"=>"Department of Agriculture"})
|
|
465
|
+
expect(subject.funding_references[7]).to eq({
|
|
466
|
+
"funderIdentifier"=>"https://doi.org/10.13039/501100005695",
|
|
467
|
+
"funderIdentifierType"=>"Crossref Funder ID",
|
|
468
|
+
"funderName"=>"Tottori University"})
|
|
469
|
+
end
|
|
470
|
+
|
|
434
471
|
it "geo_location empty" do
|
|
435
472
|
input = fixture_path + 'datacite-geolocation-empty.xml'
|
|
436
473
|
subject = Bolognese::Metadata.new(input: input)
|
|
@@ -500,7 +537,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
500
537
|
expect(subject.creators.length).to eq(1)
|
|
501
538
|
expect(subject.creators.first).to eq("familyName"=>"Fenner", "givenName"=>"Martin", "nameIdentifiers" => [{"nameIdentifier"=>"https://orcid.org/0000-0003-1419-2405", "nameIdentifierScheme"=>"ORCID", "schemeUri"=>"https://orcid.org"}], "name"=>"Fenner, Martin")
|
|
502
539
|
expect(subject.titles).to eq([{"title"=>"Eating your own Dog Food"}])
|
|
503
|
-
expect(subject.publisher).to eq("DataCite")
|
|
540
|
+
expect(subject.publisher).to eq({"name"=>"DataCite"})
|
|
504
541
|
expect(subject.publication_year).to eq("2016")
|
|
505
542
|
expect(subject.related_identifiers).to eq([{"relatedIdentifier"=>"10.5438/0012",
|
|
506
543
|
"relatedIdentifierType"=>"DOI",
|
|
@@ -515,7 +552,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
515
552
|
"descriptionType"=>"SeriesInformation",
|
|
516
553
|
"lang"=>"en"},
|
|
517
554
|
{"description"=>
|
|
518
|
-
"Eating your own dog food is a slang term to describe that an organization should itself use the products and services it provides. For DataCite this means that we should use DOIs with appropriate metadata and strategies for long-term preservation for
|
|
555
|
+
"Eating your own dog food is a slang term to \n describe that an organization should itself use the products and services it provides. \n For DataCite this means that we should use DOIs with appropriate metadata and strategies for long-term preservation for...\n • Unicode Bullet Point: This is an example of a bullet point.\\u2605\n ■ Unicode Black Square: This is an example of a black square.",
|
|
519
556
|
"descriptionType"=>"Abstract"}])
|
|
520
557
|
expect(subject.container).to eq("firstPage"=>"3", "identifier"=>"10.5438/0000-00SS", "identifierType"=>"DOI", "issue"=>"9", "lastPage"=>"4", "title"=>"DataCite Blog", "type"=>"Series", "volume"=>"2")
|
|
521
558
|
end
|
|
@@ -530,7 +567,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
530
567
|
expect(subject.creators.length).to eq(3)
|
|
531
568
|
expect(subject.creators.first).to eq("familyName"=>"Schumann", "givenName"=>"Kai", "name"=>"Schumann, Kai", "nameType"=>"Personal", "nameIdentifiers" => [], "affiliation" => [])
|
|
532
569
|
expect(subject.titles).to eq([{"title"=>"Gridded results of swath bathymetric mapping of Disko Bay, Western Greenland, 2007-2008"}])
|
|
533
|
-
expect(subject.publisher).to eq("PANGAEA - Data Publisher for Earth & Environmental Science")
|
|
570
|
+
expect(subject.publisher).to eq({"name"=>"PANGAEA - Data Publisher for Earth & Environmental Science"})
|
|
534
571
|
expect(subject.publication_year).to eq("2011")
|
|
535
572
|
expect(subject.related_identifiers).to eq([{"relatedIdentifier"=>"10.5072/timeseries", "relatedIdentifierType"=>"DOI", "relationType"=>"Continues"}])
|
|
536
573
|
expect(subject.geo_locations).to eq([{"geoLocationPlace"=>"Disko Bay", "geoLocationPoint"=>{"pointLatitude"=>"69.000000", "pointLongitude"=>"-52.000000"}}])
|
|
@@ -547,7 +584,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
547
584
|
expect(subject.creators.length).to eq(6)
|
|
548
585
|
expect(subject.creators.first).to eq("familyName"=>"Bales", "givenName"=>"Roger", "name"=>"Bales, Roger", "nameType"=>"Personal", "affiliation" => [{"name"=>"UC Merced"}, {"name"=>"NSF"}], "nameIdentifiers" => [])
|
|
549
586
|
expect(subject.titles).to eq([{"title"=>"Southern Sierra Critical Zone Observatory (SSCZO), Providence Creek meteorological data, soil moisture and temperature, snow depth and air temperature"}])
|
|
550
|
-
expect(subject.publisher).to eq("UC Merced")
|
|
587
|
+
expect(subject.publisher).to eq({"name"=>"UC Merced"})
|
|
551
588
|
expect(subject.dates).to eq([{"date"=>"2014-10-17", "dateType"=>"Updated"}, {"date"=>"2016-03-14T17:02:02Z", "dateType"=>"Available"}, {"date"=>"2013", "dateType"=>"Issued"}])
|
|
552
589
|
expect(subject.publication_year).to eq("2013")
|
|
553
590
|
expect(subject.subjects).to eq([{"subject"=>"Earth sciences"},
|
|
@@ -592,7 +629,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
592
629
|
expect(subject.id).to eq("https://doi.org/10.18429/jacow-ipac2016-tupmy003")
|
|
593
630
|
expect(subject.types["schemaOrg"]).to eq("ScholarlyArticle")
|
|
594
631
|
expect(subject.creators.length).to eq(12)
|
|
595
|
-
expect(subject.creators.first).to eq("nameType"=>"Personal", "nameIdentifiers" => [{"nameIdentifier"=>"
|
|
632
|
+
expect(subject.creators.first).to eq("nameType"=>"Personal", "nameIdentifiers" => [{"nameIdentifier"=>"JACoW-00077389", "nameIdentifierScheme"=>"JACoW-ID", "schemeUri"=>"http://jacow.org/"}], "name"=>"Otani, Masashi", "givenName"=>"Masashi", "familyName"=>"Otani", "affiliation" => [{"name"=>"KEK, Tsukuba, Japan"}])
|
|
596
633
|
end
|
|
597
634
|
|
|
598
635
|
it "author with wrong orcid scheme" do
|
|
@@ -627,7 +664,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
627
664
|
expect(subject.titles).to eq([{"title"=>"Dataset for \"Direct Evidence for Solid-Like Hydrogen in a Nanoporous Carbon Hydrogen Storage Material at Supercritical Temperatures\""}])
|
|
628
665
|
expect(subject.descriptions.first["description"]).to start_with("Dataset for Direct Evidence for Solid-Like Hydrogen")
|
|
629
666
|
expect(subject.publication_year).to eq("2015")
|
|
630
|
-
expect(subject.publisher).to eq("University of Bath")
|
|
667
|
+
expect(subject.publisher).to eq({"name"=>"University of Bath"})
|
|
631
668
|
expect(subject.funding_references.length).to eq(5)
|
|
632
669
|
expect(subject.funding_references.first).to eq("awardNumber" => "EP/J016454/1",
|
|
633
670
|
"awardTitle" => "SUPERGEN Hub Funding",
|
|
@@ -661,7 +698,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
661
698
|
expect(subject.titles).to eq([{"title"=>"Technical and Human Infrastructure for Open Research (THOR)"}])
|
|
662
699
|
expect(subject.descriptions.first["description"]).to start_with("Five years ago, a global infrastructure")
|
|
663
700
|
expect(subject.publication_year).to eq("2015")
|
|
664
|
-
expect(subject.publisher).to eq("DataCite")
|
|
701
|
+
expect(subject.publisher).to eq({"name"=>"DataCite"})
|
|
665
702
|
expect(subject.funding_references).to eq([{"awardNumber"=>"654039",
|
|
666
703
|
"awardTitle"=>"THOR – Technical and Human Infrastructure for Open Research",
|
|
667
704
|
"awardUri"=>"http://cordis.europa.eu/project/rcn/194927_en.html",
|
|
@@ -685,7 +722,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
685
722
|
expect(subject.titles).to eq([{"title"=>"МОДЕЛЬ СИСТЕМНОЙ ДИНАМИКИ ПРОЦЕССА ОБУЧЕНИЯ"}, {"title"=>"MODEL OF SYSTEM DYNAMICS OF PROCESS OF TRAINING", "titleType"=>"TranslatedTitle"}])
|
|
686
723
|
expect(subject.descriptions.first["description"]).to start_with("Актуальность данной работы обусловлена важностью учета в учебном процессе личностных качеств обучаем")
|
|
687
724
|
expect(subject.publication_year).to eq("2019")
|
|
688
|
-
expect(subject.publisher).to eq("МОДЕЛИРОВАНИЕ, ОПТИМИЗАЦИЯ И ИНФОРМАЦИОННЫЕ ТЕХНОЛОГИИ")
|
|
725
|
+
expect(subject.publisher).to eq({"name"=>"МОДЕЛИРОВАНИЕ, ОПТИМИЗАЦИЯ И ИНФОРМАЦИОННЫЕ ТЕХНОЛОГИИ"})
|
|
689
726
|
expect(subject.funding_references.length).to eq(1)
|
|
690
727
|
expect(subject.funding_references.first).to eq("awardNumber"=>"проект № 170100728", "funderName"=>"РФФИ")
|
|
691
728
|
expect(subject.agency).to eq("datacite")
|
|
@@ -722,7 +759,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
722
759
|
expect(subject.types["ris"]).to eq("BOOK")
|
|
723
760
|
expect(subject.types["citeproc"]).to eq("book")
|
|
724
761
|
expect(subject.creators).to eq([{"nameType"=>"Personal", "name"=>"Smith, John", "givenName"=>"John", "familyName"=>"Smith", "nameIdentifiers" => [], "affiliation" => []}, {"name"=>"つまらないものですが","nameIdentifiers"=>
|
|
725
|
-
[{"nameIdentifier"=>"
|
|
762
|
+
[{"nameIdentifier"=>"0000000134596520",
|
|
726
763
|
"nameIdentifierScheme"=>"ISNI",
|
|
727
764
|
"schemeUri"=>"http://isni.org/isni/"}],
|
|
728
765
|
"affiliation" => []}])
|
|
@@ -738,7 +775,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
738
775
|
"rightsIdentifierScheme"=>"SPDX",
|
|
739
776
|
"rightsUri"=>"https://creativecommons.org/licenses/by-nd/2.0/legalcode",
|
|
740
777
|
"schemeUri"=>"https://spdx.org/licenses/"}])
|
|
741
|
-
expect(subject.publisher).to eq("Springer")
|
|
778
|
+
expect(subject.publisher).to eq({"name"=>"Springer"})
|
|
742
779
|
expect(subject.agency).to eq("datacite")
|
|
743
780
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
|
|
744
781
|
end
|
|
@@ -753,7 +790,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
753
790
|
expect(subject.types["ris"]).to eq("BOOK")
|
|
754
791
|
expect(subject.types["citeproc"]).to eq("book")
|
|
755
792
|
expect(subject.creators).to eq([{"nameType"=>"Personal", "name"=>"Smith, John", "givenName"=>"John", "familyName"=>"Smith", "nameIdentifiers" => [], "affiliation" => []}, {"name"=>"つまらないものですが","nameIdentifiers"=>
|
|
756
|
-
[{"nameIdentifier"=>"
|
|
793
|
+
[{"nameIdentifier"=>"0000000134596520",
|
|
757
794
|
"nameIdentifierScheme"=>"ISNI",
|
|
758
795
|
"schemeUri"=>"http://isni.org/isni/"}],
|
|
759
796
|
"affiliation" => []}])
|
|
@@ -768,7 +805,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
768
805
|
"rightsIdentifierScheme"=>"SPDX",
|
|
769
806
|
"rightsUri"=>"https://creativecommons.org/licenses/by-nd/2.0/legalcode",
|
|
770
807
|
"schemeUri"=>"https://spdx.org/licenses/"}])
|
|
771
|
-
expect(subject.publisher).to eq("Springer")
|
|
808
|
+
expect(subject.publisher).to eq({"name"=>"Springer"})
|
|
772
809
|
expect(subject.agency).to eq("datacite")
|
|
773
810
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4.0")
|
|
774
811
|
end
|
|
@@ -797,7 +834,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
797
834
|
"rightsIdentifierScheme"=>"SPDX",
|
|
798
835
|
"rightsUri"=>"https://creativecommons.org/publicdomain/zero/1.0/legalcode",
|
|
799
836
|
"schemeUri"=>"https://spdx.org/licenses/"}])
|
|
800
|
-
expect(subject.publisher).to eq("Dryad Digital Repository")
|
|
837
|
+
expect(subject.publisher).to eq({"name"=>"Dryad Digital Repository"})
|
|
801
838
|
expect(subject.agency).to eq("datacite")
|
|
802
839
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-3")
|
|
803
840
|
end
|
|
@@ -812,7 +849,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
812
849
|
expect(subject.types["ris"]).to eq("BOOK")
|
|
813
850
|
expect(subject.types["citeproc"]).to eq("book")
|
|
814
851
|
expect(subject.creators).to eq([{"nameType"=>"Personal", "name"=>"Smith, John", "givenName"=>"John", "familyName"=>"Smith", "nameIdentifiers" => [], "affiliation" => []}, {"name"=>"つまらないものですが","nameIdentifiers"=>
|
|
815
|
-
[{"nameIdentifier"=>"
|
|
852
|
+
[{"nameIdentifier"=>"0000000134596520",
|
|
816
853
|
"nameIdentifierScheme"=>"ISNI",
|
|
817
854
|
"schemeUri"=>"http://isni.org/isni/"}],
|
|
818
855
|
"affiliation" => []}])
|
|
@@ -827,7 +864,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
827
864
|
"rightsIdentifierScheme"=>"SPDX",
|
|
828
865
|
"rightsUri"=>"https://creativecommons.org/licenses/by-nd/2.0/legalcode",
|
|
829
866
|
"schemeUri"=>"https://spdx.org/licenses/"}])
|
|
830
|
-
expect(subject.publisher).to eq("Springer")
|
|
867
|
+
expect(subject.publisher).to eq({"name"=>"Springer"})
|
|
831
868
|
expect(subject.agency).to eq("datacite")
|
|
832
869
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-3.0")
|
|
833
870
|
end
|
|
@@ -851,7 +888,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
851
888
|
expect(subject.publication_year).to eq("2010")
|
|
852
889
|
expect(subject.related_identifiers.length).to eq(1)
|
|
853
890
|
expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"10.5272/oldertestpub", "relatedIdentifierType"=>"DOI", "relationType"=>"IsPartOf")
|
|
854
|
-
expect(subject.publisher).to eq("Springer")
|
|
891
|
+
expect(subject.publisher).to eq({"name"=>"Springer"})
|
|
855
892
|
expect(subject.agency).to eq("datacite")
|
|
856
893
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-2.2")
|
|
857
894
|
end
|
|
@@ -864,7 +901,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
864
901
|
expect(subject.types["resourceType"]).to eq("Monograph")
|
|
865
902
|
expect(subject.types["resourceTypeGeneral"]).to eq("Text")
|
|
866
903
|
expect(subject.creators).to eq([{"nameType"=>"Personal", "name"=>"Smith, John", "givenName"=>"John", "familyName"=>"Smith", "nameIdentifiers" => [], "affiliation" => []}, {"name"=>"つまらないものですが","nameIdentifiers"=>
|
|
867
|
-
[{"nameIdentifier"=>"
|
|
904
|
+
[{"nameIdentifier"=>"0000000134596520",
|
|
868
905
|
"nameIdentifierScheme"=>"ISNI",
|
|
869
906
|
"schemeUri"=>"http://isni.org/isni/"}],
|
|
870
907
|
"affiliation" => []}])
|
|
@@ -885,7 +922,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
885
922
|
"rightsIdentifierScheme"=>"SPDX",
|
|
886
923
|
"rightsUri"=>"https://creativecommons.org/licenses/by-nd/2.0/legalcode",
|
|
887
924
|
"schemeUri"=>"https://spdx.org/licenses/"}])
|
|
888
|
-
expect(subject.publisher).to eq("Springer")
|
|
925
|
+
expect(subject.publisher).to eq({"name"=>"Springer"})
|
|
889
926
|
expect(subject.agency).to eq("datacite")
|
|
890
927
|
end
|
|
891
928
|
|
|
@@ -902,7 +939,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
902
939
|
expect(subject.titles).to eq([{"title"=>"LAMMPS Data-File Generator"}])
|
|
903
940
|
expect(subject.dates).to eq([{"date"=>"2018-07-18", "dateType"=>"Valid"}, {"date"=>"2018-07-18", "dateType"=>"Accepted"}, {"date"=>"2018", "dateType"=>"Issued"}])
|
|
904
941
|
expect(subject.publication_year).to eq("2018")
|
|
905
|
-
expect(subject.publisher).to eq("nanoHUB")
|
|
942
|
+
expect(subject.publisher).to eq({"name"=>"nanoHUB"})
|
|
906
943
|
expect(subject.agency).to eq("datacite")
|
|
907
944
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-2.2")
|
|
908
945
|
end
|
|
@@ -918,7 +955,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
918
955
|
expect(subject.types["ris"]).to eq("DATA")
|
|
919
956
|
expect(subject.types["bibtex"]).to eq("misc")
|
|
920
957
|
expect(subject.creators.length).to eq(1)
|
|
921
|
-
expect(subject.creators.first).to eq("affiliation" => [{"affiliationIdentifier"=>"https://ror.org/04zt3wx35", "affiliationIdentifierScheme"=>"ROR", "name"=>"Canada Mortgage and Housing Corporation"}],
|
|
958
|
+
expect(subject.creators.first).to eq("affiliation" => [{"affiliationIdentifier"=>"https://ror.org/04zt3wx35", "affiliationIdentifierScheme"=>"ROR", "name"=>"Canada Mortgage and Housing Corporation", "schemeUri"=>"https://ror.org"}],
|
|
922
959
|
"name" => "Statistique Canada",
|
|
923
960
|
"nameIdentifiers" => [],
|
|
924
961
|
"nameType" => "Organizational")
|
|
@@ -934,7 +971,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
934
971
|
expect(subject.creators).to eq([{"familyName"=>"Wong", "givenName"=>"Takmeng", "name"=>"Wong, Takmeng"}])
|
|
935
972
|
expect(subject.titles).to eq([{"title"=>"CERES Level 3 Cloud Type Historgram Terra+Aqua HDF file - Edition4"}])
|
|
936
973
|
expect(subject.publication_year).to eq("2016")
|
|
937
|
-
expect(subject.publisher).to eq("NASA Langley Atmospheric Science Data Center DAAC")
|
|
974
|
+
expect(subject.publisher).to eq({"name"=>"NASA Langley Atmospheric Science Data Center DAAC"})
|
|
938
975
|
expect(subject.agency).to eq("datacite")
|
|
939
976
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
|
|
940
977
|
end
|
|
@@ -975,7 +1012,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
975
1012
|
"subjectScheme"=>"CESSDA Topic Classification"}])
|
|
976
1013
|
expect(subject.dates).to eq([{"date"=>"1995-12", "dateType"=>"Collected"}, {"date"=>"1996", "dateType"=>"Issued"}])
|
|
977
1014
|
expect(subject.publication_year).to eq("1996")
|
|
978
|
-
expect(subject.publisher).to eq("GESIS Data Archive")
|
|
1015
|
+
expect(subject.publisher).to eq({"name"=>"GESIS Data Archive"})
|
|
979
1016
|
expect(subject.agency).to eq("datacite")
|
|
980
1017
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
|
|
981
1018
|
end
|
|
@@ -997,7 +1034,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
997
1034
|
expect(subject.container).to eq("firstPage"=>"Spain; 3353", "lastPage"=>"3356", "title"=>"23rd European Photovoltaic Solar Energy Conference and Exhibition", "type"=>"Series", "volume"=>"1-5 September 2008")
|
|
998
1035
|
expect(subject.descriptions[1]["description"]).to start_with("Aim of this paper is the presentation")
|
|
999
1036
|
expect(subject.subjects).to eq([{"subject"=>"PV Systems"}, {"subject"=>"Off-grid Applications"}])
|
|
1000
|
-
expect(subject.publisher).to eq("WIP-Munich")
|
|
1037
|
+
expect(subject.publisher).to eq({"name"=>"WIP-Munich"})
|
|
1001
1038
|
expect(subject.agency).to eq("datacite")
|
|
1002
1039
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-2.2")
|
|
1003
1040
|
end
|
|
@@ -1028,7 +1065,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
1028
1065
|
expect(subject.titles).to eq([{"title"=>"Messung der Bildunschaerfe in H.264-codierten Bildern und Videosequenzen"}])
|
|
1029
1066
|
expect(subject.dates).to eq([{"date"=>"2017", "dateType"=>"Issued"}])
|
|
1030
1067
|
expect(subject.publication_year).to eq("2017")
|
|
1031
|
-
expect(subject.publisher).to eq("Siemens AG")
|
|
1068
|
+
expect(subject.publisher).to eq({"name"=>"Siemens AG"})
|
|
1032
1069
|
expect(subject.agency).to eq("datacite")
|
|
1033
1070
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-3")
|
|
1034
1071
|
end
|
|
@@ -1068,7 +1105,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
1068
1105
|
expect(subject.version_info).to eq("2")
|
|
1069
1106
|
expect(subject.dates).to eq([{"date"=>"2014-04-25", "dateType"=>"Available"}, {"date"=>"2015", "dateType"=>"Issued"}])
|
|
1070
1107
|
expect(subject.publication_year).to eq("2015")
|
|
1071
|
-
expect(subject.publisher).to eq("Royal Netherlands Meteorological Institute (KNMI)")
|
|
1108
|
+
expect(subject.publisher).to eq({"name"=>"Royal Netherlands Meteorological Institute (KNMI)"})
|
|
1072
1109
|
expect(subject.agency).to eq("datacite")
|
|
1073
1110
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
|
|
1074
1111
|
end
|
|
@@ -1094,7 +1131,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
1094
1131
|
expect(subject.titles).to eq([{"title"=>"Test license"}])
|
|
1095
1132
|
expect(subject.dates).to eq([{"date"=>"2018-01-12", "dateType"=>"Issued"}])
|
|
1096
1133
|
expect(subject.publication_year).to eq("2018")
|
|
1097
|
-
expect(subject.publisher).to eq("CaltechDATA")
|
|
1134
|
+
expect(subject.publisher).to eq({"name"=>"CaltechDATA"})
|
|
1098
1135
|
expect(subject.agency).to eq("datacite")
|
|
1099
1136
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
|
|
1100
1137
|
expect(subject.state).to eq("findable")
|
|
@@ -1111,7 +1148,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
1111
1148
|
expect(subject.titles).to eq([{"title"=>"Referee report. For: FL Regression Wellcome [version 1; referees: retracted]"}])
|
|
1112
1149
|
expect(subject.dates).to eq([{"date"=>"2018", "dateType"=>"Issued"}])
|
|
1113
1150
|
expect(subject.publication_year).to eq("2018")
|
|
1114
|
-
expect(subject.publisher).to eq("F1000 Research Limited")
|
|
1151
|
+
expect(subject.publisher).to eq({"name"=>"F1000 Research Limited"})
|
|
1115
1152
|
expect(subject.agency).to eq("datacite")
|
|
1116
1153
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-3")
|
|
1117
1154
|
expect(subject.state).to eq("findable")
|
|
@@ -1130,7 +1167,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
1130
1167
|
expect(subject.creators.first).to eq("nameType"=>"Personal", "name"=>"Patel, Lina", "givenName"=>"Lina", "familyName"=>"Patel", "nameIdentifiers" => [], "affiliation" => [])
|
|
1131
1168
|
expect(subject.titles).to eq([{"title"=>"Referee report. For: Gates - add article keywords to the metatags [version 2; referees: 1 approved]"}])
|
|
1132
1169
|
expect(subject.publication_year).to eq("2018")
|
|
1133
|
-
expect(subject.publisher).to eq("Gates Open Research")
|
|
1170
|
+
expect(subject.publisher).to eq({"name"=>"Gates Open Research"})
|
|
1134
1171
|
expect(subject.agency).to eq("datacite")
|
|
1135
1172
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-3")
|
|
1136
1173
|
end
|
|
@@ -1223,7 +1260,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
1223
1260
|
{"date"=>"2014", "dateType"=>"Copyrighted"},
|
|
1224
1261
|
{"date"=>"2009-10-01/2014-01-23", "dateType"=>"Created"}])
|
|
1225
1262
|
expect(subject.publication_year).to eq("2014")
|
|
1226
|
-
expect(subject.publisher).to eq("Deutsches Elektronen-Synchrotron, DESY, Hamburg")
|
|
1263
|
+
expect(subject.publisher).to eq({"name"=>"Deutsches Elektronen-Synchrotron, DESY, Hamburg"})
|
|
1227
1264
|
expect(subject.agency).to eq("datacite")
|
|
1228
1265
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-3")
|
|
1229
1266
|
end
|
|
@@ -1248,7 +1285,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
1248
1285
|
expect(subject.titles.last).to eq("title"=>"MODEL OF SYSTEM DYNAMICS OF PROCESS OF TRAINING", "titleType"=>"TranslatedTitle")
|
|
1249
1286
|
expect(subject.dates).to eq([{"date"=>"2019-02-09", "dateType"=>"Issued"}])
|
|
1250
1287
|
expect(subject.publication_year).to eq("2019")
|
|
1251
|
-
expect(subject.publisher).to eq("МОДЕЛИРОВАНИЕ, ОПТИМИЗАЦИЯ И ИНФОРМАЦИОННЫЕ ТЕХНОЛОГИИ")
|
|
1288
|
+
expect(subject.publisher).to eq({"name"=>"МОДЕЛИРОВАНИЕ, ОПТИМИЗАЦИЯ И ИНФОРМАЦИОННЫЕ ТЕХНОЛОГИИ"})
|
|
1252
1289
|
expect(subject.funding_references.count).to eq(1)
|
|
1253
1290
|
expect(subject.funding_references.first).to eq("awardNumber"=>"проект № 170100728", "funderName"=>"РФФИ")
|
|
1254
1291
|
expect(subject.agency).to eq("datacite")
|
|
@@ -1303,7 +1340,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
1303
1340
|
expect(subject.doi).to eq("10.5061/dryad.8515")
|
|
1304
1341
|
expect(subject.creators).to eq([{"nameIdentifiers"=> [{"nameIdentifier"=>"https://orcid.org/0000-0003-1419-2405", "nameIdentifierScheme"=>"ORCID", "schemeUri"=>"https://orcid.org"}], "name"=>"Fenner, Martin", "givenName"=>"Martin", "familyName"=>"Fenner"}])
|
|
1305
1342
|
expect(subject.titles).to eq([{"title"=>"Eating your own Dog Food"}])
|
|
1306
|
-
expect(subject.publisher).to eq("DataCite")
|
|
1343
|
+
expect(subject.publisher).to eq({"name"=>"DataCite"})
|
|
1307
1344
|
expect(subject.publication_year).to eq("2016")
|
|
1308
1345
|
end
|
|
1309
1346
|
end
|
|
@@ -1330,7 +1367,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
1330
1367
|
expect(subject.formats).to eq(["application/tar"])
|
|
1331
1368
|
expect(subject.sizes).to eq(["15.7M"])
|
|
1332
1369
|
expect(subject.container).to eq("identifier"=>"https://www.ebi.ac.uk/miriam/main/datatypes/MIR:00000663", "identifierType"=>"URL", "title"=>"GTEx", "type"=>"DataRepository")
|
|
1333
|
-
expect(subject.publisher).to eq("GTEx")
|
|
1370
|
+
expect(subject.publisher).to eq({"name"=>"GTEx"})
|
|
1334
1371
|
expect(subject.funding_references.count).to eq(7)
|
|
1335
1372
|
expect(subject.funding_references.first).to eq("funderIdentifier"=>"https://doi.org/10.13039/100000052", "funderIdentifierType"=>"Crossref Funder ID", "funderName"=>"Common Fund of the Office of the Director of the NIH")
|
|
1336
1373
|
end
|
|
@@ -1347,7 +1384,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
1347
1384
|
expect(subject.creators.first).to eq("familyName"=>"Den Heijer", "givenName"=>"C", "name"=>"Den Heijer, C", "nameType"=>"Personal", "nameIdentifiers" => [], "affiliation" => [])
|
|
1348
1385
|
expect(subject.titles).to eq([{"lang"=>"en", "title"=>"Meteo measurements at the Sand Motor"}])
|
|
1349
1386
|
expect(subject.publication_year).to eq("2017")
|
|
1350
|
-
expect(subject.publisher).to eq("4TU.Centre for Research Data")
|
|
1387
|
+
expect(subject.publisher).to eq({"name"=>"4TU.Centre for Research Data"})
|
|
1351
1388
|
expect(subject.agency).to eq("datacite")
|
|
1352
1389
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
|
|
1353
1390
|
expect(subject.geo_locations.first["geoLocationPlace"]).to eq("Zandmotor, sand suppletion area on the Dutch coast.")
|
|
@@ -1413,7 +1450,12 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
1413
1450
|
"schemeUri"=>"https://spdx.org/licenses/"
|
|
1414
1451
|
}
|
|
1415
1452
|
])
|
|
1416
|
-
expect(subject.publisher).to eq(
|
|
1453
|
+
expect(subject.publisher).to eq(
|
|
1454
|
+
{
|
|
1455
|
+
"name"=>"DataCite",
|
|
1456
|
+
"lang"=>"en",
|
|
1457
|
+
}
|
|
1458
|
+
)
|
|
1417
1459
|
expect(subject.agency).to eq("datacite")
|
|
1418
1460
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
|
|
1419
1461
|
expect(subject.related_items.last).to eq(
|
|
@@ -1523,6 +1565,49 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
1523
1565
|
)
|
|
1524
1566
|
end
|
|
1525
1567
|
|
|
1568
|
+
it "Schema 4.4 related items from string with attributes" do
|
|
1569
|
+
input = fixture_path + "datacite-example-relateditems-with-attributes.xml"
|
|
1570
|
+
subject = Bolognese::Metadata.new(input: input)
|
|
1571
|
+
expect(subject.valid?).to be true
|
|
1572
|
+
|
|
1573
|
+
expect(subject.related_items.last).to eq(
|
|
1574
|
+
{
|
|
1575
|
+
"relatedItemType"=>"Journal",
|
|
1576
|
+
"relationType"=>"IsPublishedIn",
|
|
1577
|
+
"relatedItemIdentifier"=>
|
|
1578
|
+
{
|
|
1579
|
+
"relatedItemIdentifier"=>"10.5072/john-smiths-1234",
|
|
1580
|
+
"relatedItemIdentifierType"=>"DOI",
|
|
1581
|
+
"relatedMetadataScheme"=>"citeproc+json",
|
|
1582
|
+
"schemeURI"=>"https://github.com/citation-style-language/schema/raw/master/csl-data.json",
|
|
1583
|
+
"schemeType"=>"URL"
|
|
1584
|
+
},
|
|
1585
|
+
"creators" =>
|
|
1586
|
+
[
|
|
1587
|
+
{"nameType"=>"Personal", "name"=>"Smith, John", "givenName"=>"John", "familyName"=>"Smith"}
|
|
1588
|
+
],
|
|
1589
|
+
"titles"=>
|
|
1590
|
+
[
|
|
1591
|
+
{"title"=>"Understanding the fictional John Smith"},
|
|
1592
|
+
{"title"=>"A detailed look", "titleType"=>"Subtitle"}
|
|
1593
|
+
],
|
|
1594
|
+
"volume"=>"776",
|
|
1595
|
+
"issue"=>"1",
|
|
1596
|
+
"number"=>"1",
|
|
1597
|
+
"numberType"=>"Chapter",
|
|
1598
|
+
"firstPage"=>"50",
|
|
1599
|
+
"lastPage"=>"60",
|
|
1600
|
+
"publisher"=>"Example Inc",
|
|
1601
|
+
"publicationYear"=>"1776",
|
|
1602
|
+
"edition"=>"1",
|
|
1603
|
+
"contributors"=>
|
|
1604
|
+
[
|
|
1605
|
+
{"name"=>"Hallett, Richard", "givenName"=>"Richard", "familyName"=>"Hallett", "contributorType"=>"ProjectLeader"}
|
|
1606
|
+
]
|
|
1607
|
+
}
|
|
1608
|
+
)
|
|
1609
|
+
end
|
|
1610
|
+
|
|
1526
1611
|
it "Schema 4.4 dissertation from string" do
|
|
1527
1612
|
input = fixture_path + "datacite-example-dissertation-v4.4.xml"
|
|
1528
1613
|
subject = Bolognese::Metadata.new(input: input)
|
|
@@ -1608,7 +1693,12 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
1608
1693
|
"schemeUri"=>"https://spdx.org/licenses/"
|
|
1609
1694
|
}
|
|
1610
1695
|
])
|
|
1611
|
-
expect(subject.publisher).to eq(
|
|
1696
|
+
expect(subject.publisher).to eq(
|
|
1697
|
+
{
|
|
1698
|
+
"name"=>"GigaScience Database",
|
|
1699
|
+
"lang"=>"en",
|
|
1700
|
+
}
|
|
1701
|
+
)
|
|
1612
1702
|
expect(subject.agency).to eq("datacite")
|
|
1613
1703
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
|
|
1614
1704
|
end
|
|
@@ -1653,4 +1743,20 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
1653
1743
|
)
|
|
1654
1744
|
end
|
|
1655
1745
|
|
|
1746
|
+
describe "Schema 4.5" do
|
|
1747
|
+
it "publisher with attributes" do
|
|
1748
|
+
input = fixture_path + "datacite-example-full-v4.5.xml"
|
|
1749
|
+
subject = Bolognese::Metadata.new(input: input)
|
|
1750
|
+
expect(subject.valid?).to be true
|
|
1751
|
+
expect(subject.publisher).to eq(
|
|
1752
|
+
{
|
|
1753
|
+
"name" => "Example Publisher",
|
|
1754
|
+
"publisherIdentifier" => "https://ror.org/04z8jg394",
|
|
1755
|
+
"publisherIdentifierScheme" => "ROR",
|
|
1756
|
+
"schemeUri" => "https://ror.org/",
|
|
1757
|
+
"lang" => "en",
|
|
1758
|
+
}
|
|
1759
|
+
)
|
|
1760
|
+
end
|
|
1761
|
+
end
|
|
1656
1762
|
end
|
|
@@ -38,6 +38,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
38
38
|
#expect(subject.url).to eq("https://blog.datacite.org/eating-your-own-dog-food")
|
|
39
39
|
expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article", "reourceType"=>"NPM Package", "resourceTypeGeneral"=>"Software", "ris"=>"GEN", "schemaOrg"=>"SoftwareSourceCode")
|
|
40
40
|
expect(subject.creators).to eq([{"name"=>":(unav)", "nameType"=>"Organizational"}])
|
|
41
|
+
expect(subject.publisher).to eq(nil)
|
|
41
42
|
expect(subject.titles).to eq([{"title"=>"CITapp"}])
|
|
42
43
|
expect(subject.descriptions).to eq([{"description"=>"Concealed Information Test app", "descriptionType"=>"Abstract"}])
|
|
43
44
|
expect(subject.version_info).to eq("1.1.0")
|
|
@@ -54,6 +55,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
54
55
|
#expect(subject.url).to eq("https://blog.datacite.org/eating-your-own-dog-food")
|
|
55
56
|
expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article", "reourceType"=>"NPM Package", "resourceTypeGeneral"=>"Software", "ris"=>"GEN", "schemaOrg"=>"SoftwareSourceCode")
|
|
56
57
|
expect(subject.creators).to eq([{"affiliation"=>[], "familyName"=>"Brancotte", "givenName"=>"Bryan", "name"=>"Brancotte, Bryan", "nameIdentifiers"=>[], "nameType"=>"Personal"}])
|
|
58
|
+
expect(subject.publisher).to eq(nil)
|
|
57
59
|
expect(subject.titles).to eq([{"title"=>"edam-browser"}])
|
|
58
60
|
expect(subject.descriptions).to eq([{"description"=>
|
|
59
61
|
+ "The EDAM Browser is a client-side web-based visualization javascript widget. Its goals are to help describing bio-related resources and service with EDAM, and to facilitate and foster community contributions to EDAM.",
|
|
@@ -38,6 +38,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
38
38
|
"familyName"=>"Sankar",
|
|
39
39
|
"nameIdentifiers" => [],
|
|
40
40
|
"affiliation" => [])
|
|
41
|
+
expect(subject.publisher).to eq({"name"=>"(:unav)"})
|
|
41
42
|
expect(subject.titles).to eq([{"title"=>"Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth"}])
|
|
42
43
|
expect(subject.descriptions.first["description"]).to start_with("Among various advantages, their small size makes model organisms preferred subjects of investigation.")
|
|
43
44
|
expect(subject.dates).to eq([{"date"=>"2014", "dateType"=>"Issued"}])
|
|
@@ -55,6 +56,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
55
56
|
expect(subject.id).to eq("https://doi.org/10.7554/elife.01567")
|
|
56
57
|
expect(subject.types).to eq("citeproc"=>"misc", "resourceTypeGeneral"=>"Dissertation", "ris"=>"THES", "schemaOrg"=>"Thesis")
|
|
57
58
|
expect(subject.creators).to eq([{"nameType"=>"Personal", "name"=>"Toparlar, Y.", "givenName"=>"Y.", "familyName"=>"Toparlar", "nameIdentifiers" => [], "affiliation" => []}])
|
|
59
|
+
expect(subject.publisher).to eq({"name"=>"Technische Universiteit Eindhoven"})
|
|
58
60
|
expect(subject.titles).to eq([{"title"=>"A multiscale analysis of the urban heat island effect"}])
|
|
59
61
|
expect(subject.descriptions.first["description"]).to start_with("Designing the climates of cities")
|
|
60
62
|
expect(subject.dates).to eq([{"date"=>"2018-04-25", "dateType"=>"Issued"}, {"date"=>"2018-04-25", "dateType"=>"Created"}])
|
|
@@ -68,6 +70,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
|
68
70
|
subject = Bolognese::Metadata.new(input: input, doi: doi)
|
|
69
71
|
expect(subject.valid?).to be true
|
|
70
72
|
expect(subject.id).to eq("https://doi.org/10.7554/elife.01567")
|
|
73
|
+
expect(subject.publisher).to eq({"name"=>"Drexel University"})
|
|
71
74
|
expect(subject.titles).to eq([{"title"=>"Validation of an Image-based Subject-Specific Dynamic Model of the Ankle Joint Complex and its Applications to the Study of the Effect of Articular Surface Morphology on Ankle Joint Mechanics"}])
|
|
72
75
|
expect(subject.descriptions.first["description"]).to eq(abs)
|
|
73
76
|
end
|