bolognese 1.6.2 → 1.6.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 +18 -13
- data/bolognese.gemspec +4 -4
- data/lib/bolognese/datacite_utils.rb +9 -3
- data/lib/bolognese/metadata.rb +6 -8
- data/lib/bolognese/metadata_utils.rb +10 -3
- data/lib/bolognese/readers/bibtex_reader.rb +2 -1
- data/lib/bolognese/readers/citeproc_reader.rb +2 -2
- data/lib/bolognese/readers/codemeta_reader.rb +3 -3
- data/lib/bolognese/readers/crossref_reader.rb +2 -2
- data/lib/bolognese/readers/datacite_reader.rb +3 -3
- data/lib/bolognese/readers/npm_reader.rb +1 -1
- data/lib/bolognese/readers/schema_org_reader.rb +4 -5
- data/lib/bolognese/utils.rb +89 -9
- data/lib/bolognese/version.rb +1 -1
- data/lib/bolognese/writers/bibtex_writer.rb +2 -1
- data/lib/bolognese/writers/codemeta_writer.rb +3 -2
- data/lib/bolognese/writers/jats_writer.rb +2 -2
- data/lib/bolognese/writers/schema_org_writer.rb +1 -1
- data/resources/spdx/licenses.json +5297 -0
- data/spec/datacite_utils_spec.rb +5 -1
- data/spec/fixtures/datacite-example-affiliation.xml +1 -1
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_cc_url/not_found.yml +44 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_cc_url/with_trailing_slash.yml +44 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_cc_url/with_trailing_slash_and_to_https.yml +44 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_url/to_https.yml +44 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/normalize_url/with_trailing_slash_and_to_https.yml +44 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/hsh_to_spdx_id.yml +44 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/hsh_to_spdx_not_found.yml +44 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/hsh_to_spdx_url.yml +44 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/name_to_spdx_exists.yml +44 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/name_to_spdx_id.yml +44 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/name_to_spdx_not_found.yml +44 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/url_to_https/http.yml +44 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/url_to_https/uri.yml +44 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/url_to_https/with_trailing_slash.yml +44 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/software_w/version.yml +52 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Funding.yml +58 -10
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Funding_OpenAIRE.yml +65 -28
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON_Cyark.yml +98 -0
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON_IsSupplementTo.yml +58 -10
- data/spec/readers/bibtex_reader_spec.rb +5 -1
- data/spec/readers/codemeta_reader_spec.rb +21 -1
- data/spec/readers/crossref_reader_spec.rb +21 -5
- data/spec/readers/datacite_json_reader_spec.rb +1 -1
- data/spec/readers/datacite_reader_spec.rb +51 -11
- data/spec/readers/npm_reader_spec.rb +3 -3
- data/spec/readers/schema_org_reader_spec.rb +2 -2
- data/spec/utils_spec.rb +58 -0
- data/spec/writers/bibtex_writer_spec.rb +6 -0
- data/spec/writers/citation_writer_spec.rb +8 -0
- data/spec/writers/citeproc_writer_spec.rb +12 -2
- data/spec/writers/crosscite_writer_spec.rb +5 -1
- data/spec/writers/datacite_json_writer_spec.rb +5 -1
- data/spec/writers/datacite_writer_spec.rb +22 -7
- data/spec/writers/schema_org_writer_spec.rb +29 -3
- metadata +31 -8
@@ -24,7 +24,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
24
24
|
expect(subject.titles).to eq([{"title"=>"fullstack_app"}])
|
25
25
|
expect(subject.descriptions).to be_empty
|
26
26
|
expect(subject.rights_list).to eq([{"rights"=>"ISC"}])
|
27
|
-
expect(subject.
|
27
|
+
expect(subject.version_info).to eq("1.0.0")
|
28
28
|
#expect(subject.dates).to eq([{"date"=>"2016-12-20", "dateType"=>"Issued"}])
|
29
29
|
#expect(subject.publication_year).to eq("2016")
|
30
30
|
end
|
@@ -40,7 +40,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
40
40
|
expect(subject.creators).to eq([{"name"=>":(unav)", "nameType"=>"Organizational"}])
|
41
41
|
expect(subject.titles).to eq([{"title"=>"CITapp"}])
|
42
42
|
expect(subject.descriptions).to eq([{"description"=>"Concealed Information Test app", "descriptionType"=>"Abstract"}])
|
43
|
-
expect(subject.
|
43
|
+
expect(subject.version_info).to eq("1.1.0")
|
44
44
|
#expect(subject.dates).to eq([{"date"=>"2016-12-20", "dateType"=>"Issued"}])
|
45
45
|
#expect(subject.publication_year).to eq("2016")
|
46
46
|
end
|
@@ -58,7 +58,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
58
58
|
expect(subject.descriptions).to eq([{"description"=>
|
59
59
|
+ "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.",
|
60
60
|
"descriptionType"=>"Abstract"}])
|
61
|
-
expect(subject.
|
61
|
+
expect(subject.version_info).to eq("1.0.0")
|
62
62
|
#expect(subject.dates).to eq([{"date"=>"2016-12-20", "dateType"=>"Issued"}])
|
63
63
|
#expect(subject.publication_year).to eq("2016")
|
64
64
|
end
|
@@ -180,7 +180,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
180
180
|
expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"dataset", "resourceType"=>"Gene expression matrices", "resourceTypeGeneral"=>"Dataset", "ris"=>"DATA", "schemaOrg"=>"Dataset")
|
181
181
|
expect(subject.creators).to eq([{"name"=>"The GTEx Consortium", "nameType"=>"Organizational", "nameIdentifiers"=>[], "affiliation" => []}])
|
182
182
|
expect(subject.titles).to eq([{"title"=>"Fully processed, filtered and normalized gene expression matrices (in BED format) for each tissue, which were used as input into FastQTL for eQTL discovery"}])
|
183
|
-
expect(subject.
|
183
|
+
expect(subject.version_info).to eq("v7")
|
184
184
|
expect(subject.subjects).to eq([{"subject"=>"gtex"}, {"subject"=>"annotation"}, {"subject"=>"phenotype"}, {"subject"=>"gene regulation"}, {"subject"=>"transcriptomics"}])
|
185
185
|
expect(subject.dates).to eq([{"date"=>"2017", "dateType"=>"Issued"}])
|
186
186
|
expect(subject.publication_year).to eq("2017")
|
@@ -290,7 +290,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
290
290
|
expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"dataset", "resourceTypeGeneral"=>"Dataset", "ris"=>"DATA", "schemaOrg"=>"Dataset")
|
291
291
|
# expect(subject.creators).to eq([{"familyName"=>"Lindman", "givenName"=>"Karin", "name"=>"Lindman, Karin", "nameIdentifiers"=>[{"nameIdentifier"=> "https://orcid.org/0000-0003-1298-517X", "nameIdentifierScheme"=>"ORCID", "schemeUri"=>"https://orcid.org"}], "nameType"=>"Personal"}])
|
292
292
|
expect(subject.titles).to eq([{"title"=>"Ovary data from the Visual Sweden project DROID"}])
|
293
|
-
expect(subject.
|
293
|
+
expect(subject.version_info).to eq("1.0")
|
294
294
|
expect(subject.subjects).to eq([{"subject"=>"pathology"}, {"subject"=>"whole slide imaging"}, {"subject"=>"annotated"}])
|
295
295
|
expect(subject.dates).to eq([{"date"=>"2019-01-09", "dateType"=>"Issued"}, {"date"=>"2019-01-09", "dateType"=>"Created"}, {"date"=>"2019-01-09", "dateType"=>"Updated"}])
|
296
296
|
expect(subject.publication_year).to eq("2019")
|
data/spec/utils_spec.rb
CHANGED
@@ -212,6 +212,12 @@ describe Bolognese::Metadata, vcr: true do
|
|
212
212
|
expect(response).to eq("http://creativecommons.org/publicdomain/zero/1.0")
|
213
213
|
end
|
214
214
|
|
215
|
+
it "with trailing slash and to https" do
|
216
|
+
url = "http://creativecommons.org/publicdomain/zero/1.0/"
|
217
|
+
response = subject.normalize_url(url, https: true)
|
218
|
+
expect(response).to eq("https://creativecommons.org/publicdomain/zero/1.0")
|
219
|
+
end
|
220
|
+
|
215
221
|
it "uri" do
|
216
222
|
url = "info:eu-repo/semantics/openAccess"
|
217
223
|
response = subject.normalize_url(url)
|
@@ -219,6 +225,26 @@ describe Bolognese::Metadata, vcr: true do
|
|
219
225
|
end
|
220
226
|
end
|
221
227
|
|
228
|
+
context "normalize cc url" do
|
229
|
+
it "with trailing slash" do
|
230
|
+
url = "http://creativecommons.org/publicdomain/zero/1.0/"
|
231
|
+
response = subject.normalize_cc_url(url)
|
232
|
+
expect(response).to eq("https://creativecommons.org/publicdomain/zero/1.0/legalcode")
|
233
|
+
end
|
234
|
+
|
235
|
+
it "with trailing slash and to https" do
|
236
|
+
url = "http://creativecommons.org/publicdomain/zero/1.0/"
|
237
|
+
response = subject.normalize_cc_url(url)
|
238
|
+
expect(response).to eq("https://creativecommons.org/publicdomain/zero/1.0/legalcode")
|
239
|
+
end
|
240
|
+
|
241
|
+
it "not found" do
|
242
|
+
url = "http://creativecommons.org/publicdomain/zero/2.0/"
|
243
|
+
response = subject.normalize_cc_url(url)
|
244
|
+
expect(response).to eq("https://creativecommons.org/publicdomain/zero/2.0")
|
245
|
+
end
|
246
|
+
end
|
247
|
+
|
222
248
|
context "normalize issn" do
|
223
249
|
it "from array" do
|
224
250
|
input = [{"media_type"=>"print", "__content__"=>"13040855"}, {"media_type"=>"electronic", "__content__"=>"21468427"}]
|
@@ -482,6 +508,38 @@ describe Bolognese::Metadata, vcr: true do
|
|
482
508
|
end
|
483
509
|
end
|
484
510
|
|
511
|
+
context "spdx" do
|
512
|
+
it "name_to_spdx exists" do
|
513
|
+
name = "Creative Commons Attribution 4.0 International"
|
514
|
+
response = subject.name_to_spdx(name)
|
515
|
+
expect(response).to eq({"rights"=>"Creative Commons Attribution 4.0 International", "rightsUri"=>"https://creativecommons.org/licenses/by/4.0/legalcode", "rightsIdentifier"=>"CC-BY-4.0", "rightsIdentifierScheme"=>"SPDX", "schemeUri"=>"https://spdx.org/licenses/"})
|
516
|
+
end
|
517
|
+
|
518
|
+
it "name_to_spdx id" do
|
519
|
+
name = "CC-BY-4.0"
|
520
|
+
response = subject.name_to_spdx(name)
|
521
|
+
expect(response).to eq({"rights"=>"Creative Commons Attribution 4.0 International", "rightsUri"=>"https://creativecommons.org/licenses/by/4.0/legalcode", "rightsIdentifier"=>"CC-BY-4.0", "rightsIdentifierScheme"=>"SPDX", "schemeUri"=>"https://spdx.org/licenses/"})
|
522
|
+
end
|
523
|
+
|
524
|
+
it "hsh_to_spdx id" do
|
525
|
+
hsh = { "rightsIdentifier" => "CC-BY-4.0" }
|
526
|
+
response = subject.hsh_to_spdx(hsh)
|
527
|
+
expect(response).to eq({"rights"=>"Creative Commons Attribution 4.0 International", "rightsUri"=>"https://creativecommons.org/licenses/by/4.0/legalcode", "rightsIdentifier"=>"CC-BY-4.0", "rightsIdentifierScheme"=>"SPDX", "schemeUri"=>"https://spdx.org/licenses/"})
|
528
|
+
end
|
529
|
+
|
530
|
+
it "hsh_to_spdx url" do
|
531
|
+
hsh = { "rightsURI" => "http://creativecommons.org/licenses/by-nc/4.0/legalcode" }
|
532
|
+
response = subject.hsh_to_spdx(hsh)
|
533
|
+
expect(response).to eq("rights"=>"Creative Commons Attribution Non Commercial 4.0 International", "rightsUri"=>"https://creativecommons.org/licenses/by-nc/4.0/legalcode", "rightsIdentifier"=>"CC-BY-NC-4.0", "rightsIdentifierScheme"=>"SPDX", "schemeUri"=>"https://spdx.org/licenses/")
|
534
|
+
end
|
535
|
+
|
536
|
+
it "hsh_to_spdx not found" do
|
537
|
+
hsh = { "rightsURI" => "info:eu-repo/semantics/openAccess" }
|
538
|
+
response = subject.hsh_to_spdx(hsh)
|
539
|
+
expect(response).to eq({"rightsUri"=>"info:eu-repo/semantics/openAccess"})
|
540
|
+
end
|
541
|
+
end
|
542
|
+
|
485
543
|
context "fos" do
|
486
544
|
it "name_to_fos match" do
|
487
545
|
name = "Biological sciences"
|
@@ -16,6 +16,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
16
16
|
expect(bibtex[:author]).to eq("Sankar, Martial and Nieminen, Kaisa and Ragni, Laura and Xenarios, Ioannis and Hardtke, Christian S")
|
17
17
|
expect(bibtex[:journal]).to eq("eLife")
|
18
18
|
expect(bibtex[:year]).to eq("2014")
|
19
|
+
expect(bibtex[:copyright]).to eq("Creative Commons Attribution 3.0 Unported")
|
19
20
|
end
|
20
21
|
|
21
22
|
it "with pages" do
|
@@ -31,6 +32,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
31
32
|
expect(bibtex[:journal]).to eq("Pulmonary Medicine")
|
32
33
|
expect(bibtex[:pages]).to eq("1-7")
|
33
34
|
expect(bibtex[:year]).to eq("2012")
|
35
|
+
expect(bibtex[:copyright]).to eq("Creative Commons Attribution 3.0 Unported")
|
34
36
|
end
|
35
37
|
|
36
38
|
it "text" do
|
@@ -71,6 +73,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
71
73
|
expect(bibtex[:publisher]).to eq("DataCite")
|
72
74
|
expect(bibtex[:keywords]).to eq("faraday, excon, net/http")
|
73
75
|
expect(bibtex[:year]).to eq("2017")
|
76
|
+
expect(bibtex[:copyright]).to eq("MIT License")
|
74
77
|
end
|
75
78
|
|
76
79
|
it "BlogPosting from string" do
|
@@ -111,6 +114,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
111
114
|
expect(bibtex[:author]).to eq("Ollomo, Benjamin and Durand, Patrick and Prugnolle, Franck and Douzery, Emmanuel J. P. and Arnathau, Céline and Nkoghe, Dieudonné and Leroy, Eric and Renaud, François")
|
112
115
|
expect(bibtex[:publisher]).to eq("Dryad Digital Repository")
|
113
116
|
expect(bibtex[:year]).to eq("2011")
|
117
|
+
expect(bibtex[:copyright]).to eq("Creative Commons Zero v1.0 Universal")
|
114
118
|
end
|
115
119
|
|
116
120
|
it "from schema_org" do
|
@@ -139,6 +143,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
139
143
|
expect(bibtex[:publisher]).to eq("eyemovement.org")
|
140
144
|
expect(bibtex[:keywords]).to eq("eye tracking; eye movements; scanpaths; eye movement sequence; web pages; visual elements; web pages; scanpath analysis techniques; scanpath analysis; pattern detection; common scanpaths")
|
141
145
|
expect(bibtex[:year]).to eq("2015")
|
146
|
+
expect(bibtex[:copyright]).to eq("Creative Commons Attribution 4.0 International")
|
142
147
|
end
|
143
148
|
|
144
149
|
it "keywords subject scheme" do
|
@@ -150,6 +155,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
150
155
|
expect(bibtex[:doi]).to eq("10.1594/pangaea.721193")
|
151
156
|
expect(bibtex[:keywords]).to eq("Animalia, Bottles or small containers/Aquaria ( 20 L), Calcification/Dissolution, Coast and continental shelf, Crassostrea gigas, Development, Growth/Morphology, Laboratory experiment, Mollusca, North Pacific, Pelagos, Single species, Temperate, Zooplankton, Experimental treatment, Carbonate system computation flag, Temperature, water, Salinity, pH, Alkalinity, total, Carbon, inorganic, dissolved, Carbon dioxide, Bicarbonate ion, Carbonate ion, Partial pressure of carbon dioxide (water) at sea surface temperature (wet air), Fugacity of carbon dioxide (water) at sea surface temperature (wet air), Aragonite saturation state, Calcite saturation state, Proportion, Crassostrea gigas, larvae length, Crassostrea gigas, larvae height, Crassostrea gigas, non mineralized, Crassostrea gigas, partially mineralized, Crassostrea gigas, fully mineralized, Calculated using seacarb after Nisumaa et al. (2010), Refractometer (Atago 100-S), pH meter (Mettler Toledo), pH meter (PHM290, Radiometer), Measured, European Project on Ocean Acidification (EPOCA), European network of excellence for Ocean Ecosystems Analysis (EUR-OCEANS), Ocean Acidification International Coordination Centre (OA-ICC)")
|
152
157
|
expect(bibtex[:year]).to eq("2007")
|
158
|
+
expect(bibtex[:copyright]).to eq("Creative Commons Attribution 3.0 Unported")
|
153
159
|
end
|
154
160
|
|
155
161
|
it "author is organization" do
|
@@ -32,5 +32,13 @@ describe Bolognese::Metadata, vcr: true do
|
|
32
32
|
subject = Bolognese::Metadata.new(input: input, from: "crossref")
|
33
33
|
expect(subject.citation).to eq("Alexander Kohls, & Salvatore Mele. (2018). Converting the Literature of a Scientific Field to Open Access through Global Collaboration: The Experience of SCOAP3 in Particle Physics. <i>Publications</i>, <i>6</i>(2), 15. https://doi.org/10.3390/publications6020015")
|
34
34
|
end
|
35
|
+
|
36
|
+
it "software w/version" do
|
37
|
+
input = "https://doi.org/10.5281/zenodo.2598836"
|
38
|
+
subject = Bolognese::Metadata.new(input: input, from: "datacite")
|
39
|
+
expect(subject.style).to eq("apa")
|
40
|
+
expect(subject.locale).to eq("en-US")
|
41
|
+
expect(subject.citation).to eq("Lab For Exosphere And Near Space Environment Studies. (2019). <i>lenses-lab/LYAO_RT-2018JA026426: Original Release</i> (Version 1.0.0) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.2598836")
|
42
|
+
end
|
35
43
|
end
|
36
44
|
end
|
@@ -24,6 +24,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
24
24
|
expect(json["publisher"]).to eq("Dryad Digital Repository")
|
25
25
|
expect(json["issued"]).to eq("date-parts" => [[2011]])
|
26
26
|
expect(json["submitted"]).to be_nil
|
27
|
+
expect(json["copyright"]).to eq("Creative Commons Zero v1.0 Universal")
|
27
28
|
end
|
28
29
|
|
29
30
|
it "BlogPosting" do
|
@@ -83,6 +84,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
83
84
|
expect(json["container-title"]).to eq("eLife")
|
84
85
|
expect(json["volume"]).to eq("3")
|
85
86
|
expect(json["issued"]).to eq("date-parts" => [[2014, 2, 11]])
|
87
|
+
expect(json["copyright"]).to eq("Creative Commons Attribution 3.0 Unported")
|
86
88
|
end
|
87
89
|
|
88
90
|
it "software" do
|
@@ -92,24 +94,27 @@ describe Bolognese::Metadata, vcr: true do
|
|
92
94
|
expect(json["type"]).to eq("article")
|
93
95
|
expect(json["DOI"]).to eq("10.6084/m9.figshare.4906367.v1")
|
94
96
|
expect(json["title"]).to eq("Scimag catalogue of LibGen as of January 1st, 2014")
|
97
|
+
expect(json["copyright"]).to eq("Creative Commons Zero v1.0 Universal")
|
95
98
|
end
|
96
99
|
|
97
100
|
it "software w/version" do
|
98
101
|
input = "https://doi.org/10.5281/zenodo.2598836"
|
99
102
|
subject = Bolognese::Metadata.new(input: input, from: "datacite")
|
100
103
|
json = JSON.parse(subject.citeproc)
|
101
|
-
expect(json["type"]).to eq("
|
104
|
+
expect(json["type"]).to eq("book")
|
102
105
|
expect(json["DOI"]).to eq("10.5281/zenodo.2598836")
|
103
106
|
expect(json["version"]).to eq("1.0.0")
|
107
|
+
expect(json["copyright"]).to eq("Open Access")
|
104
108
|
end
|
105
109
|
|
106
110
|
it "software w/version from datacite_json" do
|
107
111
|
input = fixture_path + "datacite_software_version.json"
|
108
112
|
subject = Bolognese::Metadata.new(input: input, from: "datacite_json")
|
109
113
|
json = JSON.parse(subject.citeproc)
|
110
|
-
expect(json["type"]).to eq("
|
114
|
+
expect(json["type"]).to eq("book")
|
111
115
|
expect(json["DOI"]).to eq("10.5281/ZENODO.2598836")
|
112
116
|
expect(json["version"]).to eq("1.0.0")
|
117
|
+
expect(json["copyright"]).to eq("Open Access")
|
113
118
|
end
|
114
119
|
|
115
120
|
it "multiple abstracts" do
|
@@ -141,6 +146,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
141
146
|
expect(json["volume"]).to eq("2012")
|
142
147
|
expect(json["page"]).to eq("1-7")
|
143
148
|
expect(json["issued"]).to eq("date-parts"=>[[2012]])
|
149
|
+
expect(json["copyright"]).to eq("Creative Commons Attribution 3.0 Unported")
|
144
150
|
end
|
145
151
|
|
146
152
|
it "with only first page" do
|
@@ -157,6 +163,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
157
163
|
expect(json["volume"]).to eq("14")
|
158
164
|
expect(json["page"]).to eq("e0214986")
|
159
165
|
expect(json["issued"]).to eq("date-parts"=>[[2019, 5, 8]])
|
166
|
+
expect(json["copyright"]).to eq("Creative Commons Zero v1.0 Universal")
|
160
167
|
end
|
161
168
|
|
162
169
|
it "missing creator" do
|
@@ -173,6 +180,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
173
180
|
expect(json["publisher"]).to eq("MDPI AG")
|
174
181
|
expect(json["page"]).to eq("15")
|
175
182
|
expect(json["issued"]).to eq("date-parts"=>[[2018, 4, 9]])
|
183
|
+
expect(json["copyright"]).to eq("Creative Commons Attribution 4.0 International")
|
176
184
|
end
|
177
185
|
|
178
186
|
it "container title" do
|
@@ -226,6 +234,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
226
234
|
expect(json["author"]).to eq([{"family"=>"Fenner", "given"=>"Martin"}])
|
227
235
|
expect(json["publisher"]).to eq("DataCite")
|
228
236
|
expect(json["issued"]).to eq("date-parts" => [[2017, 2, 24]])
|
237
|
+
expect(json["copyright"]).to eq("MIT License")
|
229
238
|
end
|
230
239
|
|
231
240
|
it "keywords subject scheme" do
|
@@ -236,6 +245,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
236
245
|
expect(json["id"]).to eq("https://doi.org/10.1594/pangaea.721193")
|
237
246
|
expect(json["DOI"]).to eq("10.1594/pangaea.721193")
|
238
247
|
expect(json["categories"]).to include("Animalia", "Bottles or small containers/Aquaria ( 20 L)", "Calcification/Dissolution", "Coast and continental shelf", "Development", "Growth/Morphology", "Laboratory experiment", "Mollusca", "Pelagos", "Single species", "Temperate", "Zooplankton", "Experimental treatment", "Carbonate system computation flag", "Temperature, water", "Salinity", "pH", "Alkalinity, total", "Carbon, inorganic, dissolved", "Carbon dioxide", "Bicarbonate ion", "Carbonate ion", "Partial pressure of carbon dioxide (water) at sea surface temperature (wet air)", "Fugacity of carbon dioxide (water) at sea surface temperature (wet air)", "Aragonite saturation state", "Calcite saturation state", "Proportion", "Crassostrea gigas, larvae length", "Crassostrea gigas, larvae height", "Crassostrea gigas, non mineralized", "Crassostrea gigas, partially mineralized", "Crassostrea gigas, fully mineralized", "Calculated using seacarb after Nisumaa et al. (2010)", "Refractometer (Atago 100-S)", "pH meter (Mettler Toledo)", "pH meter (PHM290, Radiometer)", "Measured", "European Project on Ocean Acidification (EPOCA)", "European network of excellence for Ocean Ecosystems Analysis (EUR-OCEANS)", "Ocean Acidification International Coordination Centre (OA-ICC)")
|
248
|
+
expect(json["copyright"]).to eq("Creative Commons Attribution 3.0 Unported")
|
239
249
|
end
|
240
250
|
|
241
251
|
it "organization author" do
|
@@ -14,7 +14,11 @@ describe Bolognese::Metadata, vcr: true do
|
|
14
14
|
expect(crosscite.fetch("related_identifiers").length).to eq(27)
|
15
15
|
expect(crosscite.fetch("related_identifiers").first).to eq("relatedIdentifier"=>"2050-084X", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection")
|
16
16
|
expect(crosscite.fetch("related_identifiers").last).to eq("relatedIdentifier"=>"10.1038/ncb2764", "relatedIdentifierType"=>"DOI", "relationType"=>"References")
|
17
|
-
expect(crosscite.fetch("rights_list")).to eq([{"
|
17
|
+
expect(crosscite.fetch("rights_list")).to eq([{"rights"=>"Creative Commons Attribution 3.0 Unported",
|
18
|
+
"rightsIdentifier"=>"CC-BY-3.0",
|
19
|
+
"rightsIdentifierScheme"=>"SPDX",
|
20
|
+
"rightsUri"=>"https://creativecommons.org/licenses/by/3.0/legalcode",
|
21
|
+
"schemeUri"=>"https://spdx.org/licenses/"}])
|
18
22
|
end
|
19
23
|
|
20
24
|
it "with ORCID ID" do
|
@@ -13,7 +13,11 @@ describe Bolognese::Metadata, vcr: true do
|
|
13
13
|
expect(datacite.fetch("titles")).to eq([{"title"=>"Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth"}])
|
14
14
|
expect(datacite.fetch("relatedIdentifiers").length).to eq(27)
|
15
15
|
expect(datacite.fetch("relatedIdentifiers").first).to eq("relatedIdentifier"=>"2050-084X", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection")
|
16
|
-
expect(datacite.fetch("rightsList")).to eq([{"
|
16
|
+
expect(datacite.fetch("rightsList")).to eq([{"rights"=>"Creative Commons Attribution 3.0 Unported",
|
17
|
+
"rightsIdentifier"=>"CC-BY-3.0",
|
18
|
+
"rightsIdentifierScheme"=>"SPDX",
|
19
|
+
"rightsUri"=>"https://creativecommons.org/licenses/by/3.0/legalcode",
|
20
|
+
"schemeUri"=>"https://spdx.org/licenses/"}])
|
17
21
|
end
|
18
22
|
|
19
23
|
it "with ORCID ID" do
|
@@ -14,7 +14,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
14
14
|
expect(datacite.dig("relatedIdentifiers", "relatedIdentifier").length).to eq(27)
|
15
15
|
expect(datacite.dig("relatedIdentifiers", "relatedIdentifier").first).to eq("relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "__content__"=>"2050-084X", "resourceTypeGeneral"=>"Collection")
|
16
16
|
expect(datacite.dig("relatedIdentifiers", "relatedIdentifier")[1]).to eq("relatedIdentifierType"=>"DOI", "relationType"=>"References", "__content__"=>"10.1038/nature02100")
|
17
|
-
expect(datacite.dig("rightsList")).to eq("
|
17
|
+
expect(datacite.dig("rightsList", "rights")).to eq("rightsURI"=>"https://creativecommons.org/licenses/by/3.0/legalcode", "rightsIdentifier"=>"CC-BY-3.0", "rightsIdentifierScheme"=>"SPDX", "schemeURI"=>"https://spdx.org/licenses/", "__content__"=>"Creative Commons Attribution 3.0 Unported")
|
18
18
|
expect(datacite.dig("fundingReferences", "fundingReference").count).to eq(4)
|
19
19
|
expect(datacite.dig("fundingReferences", "fundingReference").last).to eq("funderName"=>"University of Lausanne", "funderIdentifier" => {"funderIdentifierType"=>"Crossref Funder ID", "__content__"=>"https://doi.org/10.13039/501100006390"})
|
20
20
|
end
|
@@ -145,7 +145,6 @@ describe Bolognese::Metadata, vcr: true do
|
|
145
145
|
expect(subject.dates).to eq([{"date"=>"2015-08-19", "dateType"=>"Issued"}])
|
146
146
|
expect(subject.publication_year).to eq("2015")
|
147
147
|
expect(subject.version_info).to eq("v0.3.2")
|
148
|
-
expect(subject.version).to eq("v0.3.2")
|
149
148
|
expect(subject.publisher).to eq("Zenodo")
|
150
149
|
expect(subject.agency).to eq("DataCite")
|
151
150
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
|
@@ -161,7 +160,11 @@ describe Bolognese::Metadata, vcr: true do
|
|
161
160
|
expect(subject.creators.length).to eq(20)
|
162
161
|
expect(subject.creators.first).to eq("nameType"=>"Personal", "familyName" => "Paglione", "givenName" => "Laura", "nameIdentifiers" => [{"nameIdentifier"=>"https://orcid.org/0000-0003-3188-6273", "nameIdentifierScheme"=>"ORCID", "schemeUri"=>"https://orcid.org"}], "name" => "Paglione, Laura", "affiliation" => [])
|
163
162
|
expect(subject.titles).to eq([{"title"=>"Recommendation of: ORCID Works Metadata Working Group"}])
|
164
|
-
expect(subject.rights_list).to eq([{"
|
163
|
+
expect(subject.rights_list).to eq([{"rights"=>"Creative Commons Zero v1.0 Universal",
|
164
|
+
"rightsIdentifier"=>"CC0-1.0",
|
165
|
+
"rightsIdentifierScheme"=>"SPDX",
|
166
|
+
"rightsUri"=>"https://creativecommons.org/publicdomain/zero/1.0/legalcode",
|
167
|
+
"schemeUri"=>"https://spdx.org/licenses/"}])
|
165
168
|
expect(subject.dates).to eq([{"date"=>"2017-06-28", "dateType"=>"Created"}, {"date"=>"2017-06-28", "dateType"=>"Updated"}, {"date"=>"2017", "dateType"=>"Issued"}])
|
166
169
|
expect(subject.publication_year).to eq("2017")
|
167
170
|
expect(subject.publisher).to eq("Figshare")
|
@@ -183,7 +186,11 @@ describe Bolognese::Metadata, vcr: true do
|
|
183
186
|
expect(subject.creators.length).to eq(20)
|
184
187
|
expect(subject.creators.first).to eq("nameType" => "Personal", "familyName" => "Paglione", "givenName" => "Laura", "name" => "Paglione, Laura", "nameIdentifiers" => [{"nameIdentifier"=>"https://orcid.org/0000-0003-3188-6273", "nameIdentifierScheme"=>"ORCID", "schemeUri"=>"https://orcid.org"}],"affiliation" => [])
|
185
188
|
expect(subject.titles).to eq([{"title"=>"Recommendation of: ORCID Works Metadata Working Group"}])
|
186
|
-
expect(subject.rights_list).to eq([{"
|
189
|
+
expect(subject.rights_list).to eq([{"rights"=>"Creative Commons Zero v1.0 Universal",
|
190
|
+
"rightsIdentifier"=>"CC0-1.0",
|
191
|
+
"rightsIdentifierScheme"=>"SPDX",
|
192
|
+
"rightsUri"=>"https://creativecommons.org/publicdomain/zero/1.0/legalcode",
|
193
|
+
"schemeUri"=>"https://spdx.org/licenses/"}])
|
187
194
|
expect(subject.dates).to eq([{"date"=>"2017-06-28", "dateType"=>"Created"}, {"date"=>"2017-06-28", "dateType"=>"Updated"}, {"date"=>"2017", "dateType"=>"Issued"}])
|
188
195
|
expect(subject.publication_year).to eq("2017")
|
189
196
|
expect(subject.publisher).to eq("Figshare")
|
@@ -208,7 +215,11 @@ describe Bolognese::Metadata, vcr: true do
|
|
208
215
|
{"identifier"=>
|
209
216
|
"Ollomo B, Durand P, Prugnolle F, Douzery EJP, Arnathau C, Nkoghe D, Leroy E, Renaud F (2009) A new malaria agent in African hominids. PLoS Pathogens 5(5): e1000446.",
|
210
217
|
"identifierType"=>"citation"}])
|
211
|
-
expect(subject.rights_list).to eq([{"
|
218
|
+
expect(subject.rights_list).to eq([{"rights"=>"Creative Commons Zero v1.0 Universal",
|
219
|
+
"rightsIdentifier"=>"CC0-1.0",
|
220
|
+
"rightsIdentifierScheme"=>"SPDX",
|
221
|
+
"rightsUri"=>"https://creativecommons.org/publicdomain/zero/1.0/legalcode",
|
222
|
+
"schemeUri"=>"https://spdx.org/licenses/"}])
|
212
223
|
expect(subject.dates).to eq([{"date"=>"2011", "dateType"=>"Issued"}])
|
213
224
|
expect(subject.publication_year).to eq("2011")
|
214
225
|
expect(subject.related_identifiers.length).to eq(6)
|
@@ -231,7 +242,11 @@ describe Bolognese::Metadata, vcr: true do
|
|
231
242
|
expect(subject.creators.first).to eq("affiliation"=>[{"name"=>"UC Merced"}, {"name"=>"NSF"}], "familyName"=>"Bales", "givenName"=>"Roger", "name"=>"Bales, Roger", "nameType"=>"Personal", "nameIdentifiers"=>[])
|
232
243
|
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"}])
|
233
244
|
expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.6071/z7wc73", "identifierType"=>"DOI"}])
|
234
|
-
expect(subject.rights_list).to eq([{"rights"=>"Creative Commons Attribution 4.0 International
|
245
|
+
expect(subject.rights_list).to eq([{"rights"=>"Creative Commons Attribution 4.0 International",
|
246
|
+
"rightsIdentifier"=>"CC-BY-4.0",
|
247
|
+
"rightsIdentifierScheme"=>"SPDX",
|
248
|
+
"rightsUri"=>"https://creativecommons.org/licenses/by/4.0/legalcode",
|
249
|
+
"schemeUri"=>"https://spdx.org/licenses/"}])
|
235
250
|
expect(subject.dates).to eq([{"date"=>"2014-10-17", "dateType"=>"Updated"}, {"date"=>"2016-03-14T17:02:02Z", "dateType"=>"Available"}, {"date"=>"2013", "dateType"=>"Issued"}])
|
236
251
|
expect(subject.publication_year).to eq("2013")
|
237
252
|
expect(subject.publisher).to eq("UC Merced")
|
@@ -291,7 +306,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
291
306
|
expect(datacite.dig("relatedIdentifiers", "relatedIdentifier").length).to eq(27)
|
292
307
|
expect(datacite.dig("relatedIdentifiers", "relatedIdentifier").first).to eq("__content__"=>"2050-084X", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection")
|
293
308
|
expect(datacite.dig("relatedIdentifiers", "relatedIdentifier")[1]).to eq("relatedIdentifierType"=>"DOI", "relationType"=>"References", "__content__"=>"10.1038/nature02100")
|
294
|
-
expect(datacite.dig("rightsList")).to eq("
|
309
|
+
expect(datacite.dig("rightsList", "rights")).to eq("rightsURI"=>"https://creativecommons.org/licenses/by/3.0/legalcode", "rightsIdentifier"=>"CC-BY-3.0", "rightsIdentifierScheme"=>"SPDX", "schemeURI"=>"https://spdx.org/licenses/", "__content__"=>"Creative Commons Attribution 3.0 Unported")
|
295
310
|
expect(datacite.dig("fundingReferences", "fundingReference").count).to eq(4)
|
296
311
|
expect(datacite.dig("fundingReferences", "fundingReference").last).to eq("funderName"=>"University of Lausanne", "funderIdentifier" => {"funderIdentifierType"=>"Crossref Funder ID", "__content__"=>"https://doi.org/10.13039/501100006390"})
|
297
312
|
end
|
@@ -9,6 +9,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
9
9
|
subject = Bolognese::Metadata.new(input: input, from: "crossref")
|
10
10
|
json = JSON.parse(subject.schema_org)
|
11
11
|
expect(json["@id"]).to eq("https://doi.org/10.7554/elife.01567")
|
12
|
+
expect(json["@type"]).to eq("ScholarlyArticle")
|
12
13
|
expect(json["isPartOf"]).to eq("@type"=>"Periodical", "issn"=>"2050-084X")
|
13
14
|
expect(json["periodical"]).to eq("@type"=>"Journal", "identifier"=>"2050-084X", "identifierType"=>"ISSN", "name"=>"eLife", "volume"=>"3")
|
14
15
|
expect(json["citation"].length).to eq(26)
|
@@ -23,6 +24,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
23
24
|
{"name"=>"University of Lausanne",
|
24
25
|
"@type"=>"Organization",
|
25
26
|
"@id"=>"https://doi.org/10.13039/501100006390"}])
|
27
|
+
expect(json["license"]).to eq("https://creativecommons.org/licenses/by/3.0/legalcode")
|
26
28
|
end
|
27
29
|
|
28
30
|
it "maremma schema.org JSON" do
|
@@ -40,7 +42,9 @@ describe Bolognese::Metadata, vcr: true do
|
|
40
42
|
subject = Bolognese::Metadata.new(input: input, from: "datacite")
|
41
43
|
json = JSON.parse(subject.schema_org)
|
42
44
|
expect(json["@id"]).to eq("https://doi.org/10.5281/zenodo.48440")
|
45
|
+
expect(json["@type"]).to eq("SoftwareSourceCode")
|
43
46
|
expect(json["name"]).to eq("Analysis Tools For Crossover Experiment Of Ui Using Choice Architecture")
|
47
|
+
expect(json["license"]).to eq(["https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode", "info:eu-repo/semantics/openAccess"])
|
44
48
|
end
|
45
49
|
|
46
50
|
it "Schema.org JSON isReferencedBy" do
|
@@ -48,19 +52,30 @@ describe Bolognese::Metadata, vcr: true do
|
|
48
52
|
subject = Bolognese::Metadata.new(input: input, from: "datacite")
|
49
53
|
json = JSON.parse(subject.schema_org)
|
50
54
|
expect(json["@id"]).to eq("https://doi.org/10.5061/dryad.8515")
|
55
|
+
expect(json["@type"]).to eq("Dataset")
|
51
56
|
expect(json["@reverse"]).to eq("citation" => [{"@id"=>"https://doi.org/10.1371/journal.ppat.1000446", "@type"=>"ScholarlyArticle"}, {"@type"=>"ScholarlyArticle", "identifier"=>{"@type"=>"PropertyValue", "propertyID"=>"PMID", "value"=>"19478877"}}],
|
52
57
|
"isBasedOn" => [{"@id"=>"https://doi.org/10.1371/journal.ppat.1000446", "@type"=>"ScholarlyArticle"}, {"@type"=>"ScholarlyArticle", "identifier"=>{"@type"=>"PropertyValue", "propertyID"=>"PMID", "value"=>"19478877"}}])
|
58
|
+
expect(json["license"]).to eq("https://creativecommons.org/publicdomain/zero/1.0/legalcode")
|
53
59
|
expect(json["keywords"]).to eq("Phylogeny, Malaria, Parasites, Taxonomy, Mitochondrial genome, Africa, Plasmodium")
|
54
60
|
end
|
55
61
|
|
56
62
|
it "Schema.org JSON IsSupplementTo" do
|
57
63
|
input = "https://doi.org/10.5517/CC8H01S"
|
58
|
-
subject = Bolognese::Metadata.new(input: input
|
64
|
+
subject = Bolognese::Metadata.new(input: input)
|
59
65
|
json = JSON.parse(subject.schema_org)
|
60
66
|
expect(json["@id"]).to eq("https://doi.org/10.5517/cc8h01s")
|
67
|
+
expect(json["@type"]).to eq("Dataset")
|
61
68
|
expect(json["@reverse"]).to eq("isBasedOn"=>{"@id"=>"https://doi.org/10.1107/s1600536804021154", "@type"=>"ScholarlyArticle"})
|
62
69
|
end
|
63
70
|
|
71
|
+
it "Schema.org JSON Cyark" do
|
72
|
+
input = "https://doi.org/10.26301/jgf3-jm06"
|
73
|
+
subject = Bolognese::Metadata.new(input: input)
|
74
|
+
json = JSON.parse(subject.schema_org)
|
75
|
+
expect(json["@id"]).to eq("https://doi.org/10.26301/jgf3-jm06")
|
76
|
+
expect(json["@type"]).to eq("Dataset")
|
77
|
+
end
|
78
|
+
|
64
79
|
it "rdataone" do
|
65
80
|
input = fixture_path + 'codemeta.json'
|
66
81
|
subject = Bolognese::Metadata.new(input: input, from: "codemeta")
|
@@ -87,20 +102,24 @@ describe Bolognese::Metadata, vcr: true do
|
|
87
102
|
|
88
103
|
it "Funding" do
|
89
104
|
input = "https://doi.org/10.5438/6423"
|
90
|
-
subject = Bolognese::Metadata.new(input: input
|
105
|
+
subject = Bolognese::Metadata.new(input: input)
|
91
106
|
json = JSON.parse(subject.schema_org)
|
92
107
|
expect(json["@id"]).to eq("https://doi.org/10.5438/6423")
|
108
|
+
expect(json["@type"]).to eq("Collection")
|
93
109
|
expect(json["hasPart"].length).to eq(25)
|
94
110
|
expect(json["hasPart"].first).to eq("@type"=>"CreativeWork", "@id"=>"https://doi.org/10.5281/zenodo.30799")
|
95
111
|
expect(json["funder"]).to eq("@id"=>"https://doi.org/10.13039/501100000780", "@type"=>"Organization", "name"=>"European Commission")
|
112
|
+
expect(json["license"]).to eq("https://creativecommons.org/licenses/by/4.0/legalcode")
|
96
113
|
end
|
97
114
|
|
98
115
|
it "Funding OpenAIRE" do
|
99
116
|
input = "https://doi.org/10.5281/ZENODO.1239"
|
100
|
-
subject = Bolognese::Metadata.new(input: input
|
117
|
+
subject = Bolognese::Metadata.new(input: input)
|
101
118
|
json = JSON.parse(subject.schema_org)
|
102
119
|
expect(json["@id"]).to eq("https://doi.org/10.5281/zenodo.1239")
|
120
|
+
expect(json["@type"]).to eq("Dataset")
|
103
121
|
expect(json["funder"]).to eq("@id"=>"https://doi.org/10.13039/501100000780", "@type"=>"Organization", "name"=>"European Commission")
|
122
|
+
expect(json["license"]).to eq(["https://creativecommons.org/publicdomain/zero/1.0/legalcode", "info:eu-repo/semantics/openAccess"])
|
104
123
|
end
|
105
124
|
|
106
125
|
it "subject scheme" do
|
@@ -108,6 +127,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
108
127
|
subject = Bolognese::Metadata.new(input: input, from: "datacite")
|
109
128
|
json = JSON.parse(subject.schema_org)
|
110
129
|
expect(json["@id"]).to eq("https://doi.org/10.4232/1.2745")
|
130
|
+
expect(json["@type"]).to eq("Dataset")
|
111
131
|
expect(json["name"]).to eq("Flash Eurobarometer 54 (Madrid Summit)")
|
112
132
|
expect(json["keywords"]).to eq("KAT12 International Institutions, Relations, Conditions")
|
113
133
|
end
|
@@ -117,8 +137,10 @@ describe Bolognese::Metadata, vcr: true do
|
|
117
137
|
subject = Bolognese::Metadata.new(input: input, from: "datacite")
|
118
138
|
json = JSON.parse(subject.schema_org)
|
119
139
|
expect(json["@id"]).to eq("https://doi.org/10.1594/pangaea.721193")
|
140
|
+
expect(json["@type"]).to eq("Dataset")
|
120
141
|
expect(json["name"]).to eq("Seawater carbonate chemistry and processes during experiments with Crassostrea gigas, 2007, supplement to: Kurihara, Haruko; Kato, Shoji; Ishimatsu, Atsushi (2007): Effects of increased seawater pCO2 on early development of the oyster Crassostrea gigas. Aquatic Biology, 1(1), 91-98")
|
121
142
|
expect(json["keywords"]).to eq("Animalia, Bottles or small containers/Aquaria ( 20 L), Calcification/Dissolution, Coast and continental shelf, Crassostrea gigas, Development, Growth/Morphology, Laboratory experiment, Mollusca, North Pacific, Pelagos, Single species, Temperate, Zooplankton, Experimental treatment, Carbonate system computation flag, Temperature, water, Salinity, pH, Alkalinity, total, Carbon, inorganic, dissolved, Carbon dioxide, Bicarbonate ion, Carbonate ion, Partial pressure of carbon dioxide (water) at sea surface temperature (wet air), Fugacity of carbon dioxide (water) at sea surface temperature (wet air), Aragonite saturation state, Calcite saturation state, Proportion, Crassostrea gigas, larvae length, Crassostrea gigas, larvae height, Crassostrea gigas, non mineralized, Crassostrea gigas, partially mineralized, Crassostrea gigas, fully mineralized, Calculated using seacarb after Nisumaa et al. (2010), Refractometer (Atago 100-S), pH meter (Mettler Toledo), pH meter (PHM290, Radiometer), Measured, European Project on Ocean Acidification (EPOCA), European network of excellence for Ocean Ecosystems Analysis (EUR-OCEANS), Ocean Acidification International Coordination Centre (OA-ICC)")
|
143
|
+
expect(json["license"]).to eq("https://creativecommons.org/licenses/by/3.0/legalcode")
|
122
144
|
end
|
123
145
|
|
124
146
|
it "author is organization" do
|
@@ -128,6 +150,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
128
150
|
subject = Bolognese::Metadata.new(input: input, url: url, content_url: content_url, from: "datacite")
|
129
151
|
json = JSON.parse(subject.schema_org)
|
130
152
|
expect(json["@id"]).to eq("https://doi.org/10.25491/9hx8-ke93")
|
153
|
+
expect(json["@type"]).to eq("Dataset")
|
131
154
|
expect(json["author"]).to eq("@type"=>"Organization", "name"=>"The GTEx Consortium")
|
132
155
|
expect(json["url"]).to eq("https://ors.datacite.org/doi:/10.25491/9hx8-ke93")
|
133
156
|
expect(json["encodingFormat"]).to eq("application/tar")
|
@@ -210,6 +233,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
210
233
|
"propertyID"=>"URL",
|
211
234
|
"value"=>"https://schema.datacite.org/meta/kernel-4.2/example/datacite-example-full-v4.2.xml"}]
|
212
235
|
)
|
236
|
+
expect(json["license"]).to eq("https://creativecommons.org/publicdomain/zero/1.0/legalcode")
|
213
237
|
end
|
214
238
|
|
215
239
|
it "geo_location_point" do
|
@@ -234,6 +258,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
234
258
|
{"@type"=>"GeoShape",
|
235
259
|
"address"=>"Providence Creek (Lower, Upper and P301)",
|
236
260
|
"box"=>"37.046 -119.211 37.075 -119.182"}}])
|
261
|
+
expect(json["license"]).to eq("https://creativecommons.org/licenses/by/4.0/legalcode")
|
237
262
|
end
|
238
263
|
|
239
264
|
it "geo_location_box" do
|
@@ -252,6 +277,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
252
277
|
expect(json["includedInDataCatalog"]).to be_nil
|
253
278
|
expect(json["identifier"]).to eq("@type"=>"PropertyValue", "propertyID"=>"DOI", "value"=>"https://doi.org/10.1594/pangaea.842237")
|
254
279
|
expect(json["spatialCoverage"]).to eq("@type"=>"Place", "geo"=>{"@type"=>"GeoShape", "box"=>"-64.3088 -168.5182 79.6753 174.9006"})
|
280
|
+
expect(json["license"]).to eq("https://creativecommons.org/licenses/by/3.0/legalcode")
|
255
281
|
end
|
256
282
|
|
257
283
|
it "geo_location_polygon" do
|