bolognese 1.6.4 → 1.6.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -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", "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")
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
@@ -161,7 +161,7 @@ describe Bolognese::Metadata, vcr: true do
161
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" => [])
162
162
  expect(subject.titles).to eq([{"title"=>"Recommendation of: ORCID Works Metadata Working Group"}])
163
163
  expect(subject.rights_list).to eq([{"rights"=>"Creative Commons Zero v1.0 Universal",
164
- "rightsIdentifier"=>"CC0-1.0",
164
+ "rightsIdentifier"=>"cc0-1.0",
165
165
  "rightsIdentifierScheme"=>"SPDX",
166
166
  "rightsUri"=>"https://creativecommons.org/publicdomain/zero/1.0/legalcode",
167
167
  "schemeUri"=>"https://spdx.org/licenses/"}])
@@ -187,7 +187,7 @@ describe Bolognese::Metadata, vcr: true do
187
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" => [])
188
188
  expect(subject.titles).to eq([{"title"=>"Recommendation of: ORCID Works Metadata Working Group"}])
189
189
  expect(subject.rights_list).to eq([{"rights"=>"Creative Commons Zero v1.0 Universal",
190
- "rightsIdentifier"=>"CC0-1.0",
190
+ "rightsIdentifier"=>"cc0-1.0",
191
191
  "rightsIdentifierScheme"=>"SPDX",
192
192
  "rightsUri"=>"https://creativecommons.org/publicdomain/zero/1.0/legalcode",
193
193
  "schemeUri"=>"https://spdx.org/licenses/"}])
@@ -216,7 +216,7 @@ describe Bolognese::Metadata, vcr: true do
216
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.",
217
217
  "identifierType"=>"citation"}])
218
218
  expect(subject.rights_list).to eq([{"rights"=>"Creative Commons Zero v1.0 Universal",
219
- "rightsIdentifier"=>"CC0-1.0",
219
+ "rightsIdentifier"=>"cc0-1.0",
220
220
  "rightsIdentifierScheme"=>"SPDX",
221
221
  "rightsUri"=>"https://creativecommons.org/publicdomain/zero/1.0/legalcode",
222
222
  "schemeUri"=>"https://spdx.org/licenses/"}])
@@ -243,7 +243,7 @@ describe Bolognese::Metadata, vcr: true do
243
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"}])
244
244
  expect(subject.identifiers).to eq([{"identifier"=>"https://doi.org/10.6071/z7wc73", "identifierType"=>"DOI"}])
245
245
  expect(subject.rights_list).to eq([{"rights"=>"Creative Commons Attribution 4.0 International",
246
- "rightsIdentifier"=>"CC-BY-4.0",
246
+ "rightsIdentifier"=>"cc-by-4.0",
247
247
  "rightsIdentifierScheme"=>"SPDX",
248
248
  "rightsUri"=>"https://creativecommons.org/licenses/by/4.0/legalcode",
249
249
  "schemeUri"=>"https://spdx.org/licenses/"}])
@@ -306,7 +306,7 @@ describe Bolognese::Metadata, vcr: true do
306
306
  expect(datacite.dig("relatedIdentifiers", "relatedIdentifier").length).to eq(27)
307
307
  expect(datacite.dig("relatedIdentifiers", "relatedIdentifier").first).to eq("__content__"=>"2050-084X", "relatedIdentifierType"=>"ISSN", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Collection")
308
308
  expect(datacite.dig("relatedIdentifiers", "relatedIdentifier")[1]).to eq("relatedIdentifierType"=>"DOI", "relationType"=>"References", "__content__"=>"10.1038/nature02100")
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")
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")
310
310
  expect(datacite.dig("fundingReferences", "fundingReference").count).to eq(4)
311
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"})
312
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)
@@ -41,6 +42,7 @@ describe Bolognese::Metadata, vcr: true do
41
42
  subject = Bolognese::Metadata.new(input: input, from: "datacite")
42
43
  json = JSON.parse(subject.schema_org)
43
44
  expect(json["@id"]).to eq("https://doi.org/10.5281/zenodo.48440")
45
+ expect(json["@type"]).to eq("SoftwareSourceCode")
44
46
  expect(json["name"]).to eq("Analysis Tools For Crossover Experiment Of Ui Using Choice Architecture")
45
47
  expect(json["license"]).to eq(["https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode", "info:eu-repo/semantics/openAccess"])
46
48
  end
@@ -50,6 +52,7 @@ describe Bolognese::Metadata, vcr: true do
50
52
  subject = Bolognese::Metadata.new(input: input, from: "datacite")
51
53
  json = JSON.parse(subject.schema_org)
52
54
  expect(json["@id"]).to eq("https://doi.org/10.5061/dryad.8515")
55
+ expect(json["@type"]).to eq("Dataset")
53
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"}}],
54
57
  "isBasedOn" => [{"@id"=>"https://doi.org/10.1371/journal.ppat.1000446", "@type"=>"ScholarlyArticle"}, {"@type"=>"ScholarlyArticle", "identifier"=>{"@type"=>"PropertyValue", "propertyID"=>"PMID", "value"=>"19478877"}}])
55
58
  expect(json["license"]).to eq("https://creativecommons.org/publicdomain/zero/1.0/legalcode")
@@ -58,12 +61,21 @@ describe Bolognese::Metadata, vcr: true do
58
61
 
59
62
  it "Schema.org JSON IsSupplementTo" do
60
63
  input = "https://doi.org/10.5517/CC8H01S"
61
- subject = Bolognese::Metadata.new(input: input, from: "datacite")
64
+ subject = Bolognese::Metadata.new(input: input)
62
65
  json = JSON.parse(subject.schema_org)
63
66
  expect(json["@id"]).to eq("https://doi.org/10.5517/cc8h01s")
67
+ expect(json["@type"]).to eq("Dataset")
64
68
  expect(json["@reverse"]).to eq("isBasedOn"=>{"@id"=>"https://doi.org/10.1107/s1600536804021154", "@type"=>"ScholarlyArticle"})
65
69
  end
66
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
+
67
79
  it "rdataone" do
68
80
  input = fixture_path + 'codemeta.json'
69
81
  subject = Bolognese::Metadata.new(input: input, from: "codemeta")
@@ -90,9 +102,10 @@ describe Bolognese::Metadata, vcr: true do
90
102
 
91
103
  it "Funding" do
92
104
  input = "https://doi.org/10.5438/6423"
93
- subject = Bolognese::Metadata.new(input: input, from: "datacite")
105
+ subject = Bolognese::Metadata.new(input: input)
94
106
  json = JSON.parse(subject.schema_org)
95
107
  expect(json["@id"]).to eq("https://doi.org/10.5438/6423")
108
+ expect(json["@type"]).to eq("Collection")
96
109
  expect(json["hasPart"].length).to eq(25)
97
110
  expect(json["hasPart"].first).to eq("@type"=>"CreativeWork", "@id"=>"https://doi.org/10.5281/zenodo.30799")
98
111
  expect(json["funder"]).to eq("@id"=>"https://doi.org/10.13039/501100000780", "@type"=>"Organization", "name"=>"European Commission")
@@ -101,9 +114,10 @@ describe Bolognese::Metadata, vcr: true do
101
114
 
102
115
  it "Funding OpenAIRE" do
103
116
  input = "https://doi.org/10.5281/ZENODO.1239"
104
- subject = Bolognese::Metadata.new(input: input, from: "datacite")
117
+ subject = Bolognese::Metadata.new(input: input)
105
118
  json = JSON.parse(subject.schema_org)
106
119
  expect(json["@id"]).to eq("https://doi.org/10.5281/zenodo.1239")
120
+ expect(json["@type"]).to eq("Dataset")
107
121
  expect(json["funder"]).to eq("@id"=>"https://doi.org/10.13039/501100000780", "@type"=>"Organization", "name"=>"European Commission")
108
122
  expect(json["license"]).to eq(["https://creativecommons.org/publicdomain/zero/1.0/legalcode", "info:eu-repo/semantics/openAccess"])
109
123
  end
@@ -113,6 +127,7 @@ describe Bolognese::Metadata, vcr: true do
113
127
  subject = Bolognese::Metadata.new(input: input, from: "datacite")
114
128
  json = JSON.parse(subject.schema_org)
115
129
  expect(json["@id"]).to eq("https://doi.org/10.4232/1.2745")
130
+ expect(json["@type"]).to eq("Dataset")
116
131
  expect(json["name"]).to eq("Flash Eurobarometer 54 (Madrid Summit)")
117
132
  expect(json["keywords"]).to eq("KAT12 International Institutions, Relations, Conditions")
118
133
  end
@@ -122,6 +137,7 @@ describe Bolognese::Metadata, vcr: true do
122
137
  subject = Bolognese::Metadata.new(input: input, from: "datacite")
123
138
  json = JSON.parse(subject.schema_org)
124
139
  expect(json["@id"]).to eq("https://doi.org/10.1594/pangaea.721193")
140
+ expect(json["@type"]).to eq("Dataset")
125
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")
126
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)")
127
143
  expect(json["license"]).to eq("https://creativecommons.org/licenses/by/3.0/legalcode")
@@ -134,6 +150,7 @@ describe Bolognese::Metadata, vcr: true do
134
150
  subject = Bolognese::Metadata.new(input: input, url: url, content_url: content_url, from: "datacite")
135
151
  json = JSON.parse(subject.schema_org)
136
152
  expect(json["@id"]).to eq("https://doi.org/10.25491/9hx8-ke93")
153
+ expect(json["@type"]).to eq("Dataset")
137
154
  expect(json["author"]).to eq("@type"=>"Organization", "name"=>"The GTEx Consortium")
138
155
  expect(json["url"]).to eq("https://ors.datacite.org/doi:/10.25491/9hx8-ke93")
139
156
  expect(json["encodingFormat"]).to eq("application/tar")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bolognese
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.4
4
+ version: 1.6.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fenner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-03 00:00:00.000000000 Z
11
+ date: 2020-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: maremma
@@ -132,14 +132,20 @@ dependencies:
132
132
  requirements:
133
133
  - - "~>"
134
134
  - !ruby/object:Gem::Version
135
- version: '0.19'
135
+ version: '1.0'
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: 1.0.1
136
139
  type: :runtime
137
140
  prerelease: false
138
141
  version_requirements: !ruby/object:Gem::Requirement
139
142
  requirements:
140
143
  - - "~>"
141
144
  - !ruby/object:Gem::Version
142
- version: '0.19'
145
+ version: '1.0'
146
+ - - ">="
147
+ - !ruby/object:Gem::Version
148
+ version: 1.0.1
143
149
  - !ruby/object:Gem::Dependency
144
150
  name: colorize
145
151
  requirement: !ruby/object:Gem::Requirement
@@ -268,20 +274,20 @@ dependencies:
268
274
  requirements:
269
275
  - - "~>"
270
276
  - !ruby/object:Gem::Version
271
- version: '2.2'
277
+ version: '3.1'
272
278
  - - ">="
273
279
  - !ruby/object:Gem::Version
274
- version: 2.2.1
280
+ version: 3.1.4
275
281
  type: :runtime
276
282
  prerelease: false
277
283
  version_requirements: !ruby/object:Gem::Requirement
278
284
  requirements:
279
285
  - - "~>"
280
286
  - !ruby/object:Gem::Version
281
- version: '2.2'
287
+ version: '3.1'
282
288
  - - ">="
283
289
  - !ruby/object:Gem::Version
284
- version: 2.2.1
290
+ version: 3.1.4
285
291
  - !ruby/object:Gem::Dependency
286
292
  name: jsonlint
287
293
  requirement: !ruby/object:Gem::Requirement
@@ -1077,6 +1083,7 @@ files:
1077
1083
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/sanitize/should_only_keep_specific_tags.yml
1078
1084
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/sanitize/should_remove_a_tags.yml
1079
1085
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/hsh_to_spdx_id.yml
1086
+ - spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/hsh_to_spdx_id_lowercase.yml
1080
1087
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/hsh_to_spdx_not_found.yml
1081
1088
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/hsh_to_spdx_url.yml
1082
1089
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/spdx/name_to_spdx_exists.yml
@@ -1123,6 +1130,7 @@ files:
1123
1130
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/Dataset.yml
1124
1131
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/Journal_article.yml
1125
1132
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/Missing_author.yml
1133
+ - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citation/software_w/version.yml
1126
1134
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/BlogPosting.yml
1127
1135
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/BlogPosting_schema_org.yml
1128
1136
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_citeproc/Dataset.yml
@@ -1189,6 +1197,7 @@ files:
1189
1197
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Funding.yml
1190
1198
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Funding_OpenAIRE.yml
1191
1199
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON.yml
1200
+ - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON_Cyark.yml
1192
1201
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON_IsSupplementTo.yml
1193
1202
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/Schema_org_JSON_isReferencedBy.yml
1194
1203
  - spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/alternate_identifiers.yml