bolognese 1.9.6 → 1.9.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 +1 -1
- data/lib/bolognese/utils.rb +6 -6
- data/lib/bolognese/version.rb +1 -1
- data/spec/utils_spec.rb +14 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a01fe4851a13d779fd983f0fd3dc3c3e14a9374ddee6f9802f305e11c802156e
|
4
|
+
data.tar.gz: 49d2105471c6bc0270c5e6c326f4564503668537a7ffc26a241293ca2f0ae877
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e6d56a5bb01f18d4bc5812520828d73c19ec9f52f5a3650d31ba9c58f7a19715b59161c8f4bfdfe1cdaf565a94bfc9963b928a1587d86c4cd17ee0579f9b77a
|
7
|
+
data.tar.gz: 0ca356314c8b16aadb0e9d0f30ebc21e77ee13baf2e73d90a9b8437e83201fa56f3091d6df802824bde0e3b900cc3aa09166caac75c6131378dccc48551de3b1
|
data/Gemfile.lock
CHANGED
data/lib/bolognese/utils.rb
CHANGED
@@ -1306,8 +1306,8 @@ module Bolognese
|
|
1306
1306
|
return [{
|
1307
1307
|
"subject" => sanitize(hsh["__content__"] || hsh["subject"]),
|
1308
1308
|
"subjectScheme" => hsh["subjectScheme"],
|
1309
|
-
"schemeUri" => hsh["schemeURI"] || hsh["
|
1310
|
-
"valueUri" => hsh["valueURI"] || hsh["
|
1309
|
+
"schemeUri" => hsh["schemeURI"] || hsh["schemeUri"],
|
1310
|
+
"valueUri" => hsh["valueURI"] || hsh["valueUri"],
|
1311
1311
|
"classificationCode" => hsh["classificationCode"],
|
1312
1312
|
"lang" => hsh["lang"] }.compact,
|
1313
1313
|
{
|
@@ -1339,8 +1339,8 @@ module Bolognese
|
|
1339
1339
|
"subject" => sanitize(hsh["__content__"] || hsh["subject"]),
|
1340
1340
|
"subjectScheme" => hsh["subjectScheme"],
|
1341
1341
|
"classificationCode" => hsh["classificationCode"],
|
1342
|
-
"schemeUri" => hsh["schemeURI"] || hsh["
|
1343
|
-
"valueUri" => hsh["valueURI"] || hsh["
|
1342
|
+
"schemeUri" => hsh["schemeURI"] || hsh["schemeUri"],
|
1343
|
+
"valueUri" => hsh["valueURI"] || hsh["valueUri"],
|
1344
1344
|
"lang" => hsh["lang"] }.compact,
|
1345
1345
|
{
|
1346
1346
|
"subject" => "FOS: " + subject["fosLabel"],
|
@@ -1352,8 +1352,8 @@ module Bolognese
|
|
1352
1352
|
"subject" => sanitize(hsh["__content__"] || hsh["subject"]),
|
1353
1353
|
"subjectScheme" => hsh["subjectScheme"],
|
1354
1354
|
"classificationCode" => hsh["classificationCode"],
|
1355
|
-
"schemeUri" => hsh["schemeURI"] || hsh["
|
1356
|
-
"valueUri" => hsh["valueURI"] || hsh["
|
1355
|
+
"schemeUri" => hsh["schemeURI"] || hsh["schemeUri"],
|
1356
|
+
"valueUri" => hsh["valueURI"] || hsh["valueUri"],
|
1357
1357
|
"lang" => hsh["lang"] }.compact]
|
1358
1358
|
end
|
1359
1359
|
end
|
data/lib/bolognese/version.rb
CHANGED
data/spec/utils_spec.rb
CHANGED
@@ -539,7 +539,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
539
539
|
expect(response).to eq({"rightsUri"=>"info:eu-repo/semantics/openAccess"})
|
540
540
|
end
|
541
541
|
end
|
542
|
-
|
542
|
+
|
543
543
|
context "fos" do
|
544
544
|
it "name_to_fos match" do
|
545
545
|
name = "Biological sciences"
|
@@ -583,10 +583,23 @@ describe Bolognese::Metadata, vcr: true do
|
|
583
583
|
"subjectScheme"=>"Fields of Science and Technology (FOS)"}])
|
584
584
|
end
|
585
585
|
|
586
|
+
it "hsh_to_fos for with schemeUri in hash" do
|
587
|
+
hsh = {
|
588
|
+
"subject" => "FOS: Computer and information sciences",
|
589
|
+
"subjectScheme" => "Fields of Science and Technology (FOS)",
|
590
|
+
"schemeUri" => "http://www.oecd.org/science/inno/38235147.pdf"}
|
591
|
+
response = subject.hsh_to_fos(hsh)
|
592
|
+
expect(response).to eq([{
|
593
|
+
"subject" => "FOS: Computer and information sciences",
|
594
|
+
"subjectScheme" => "Fields of Science and Technology (FOS)",
|
595
|
+
"schemeUri" => "http://www.oecd.org/science/inno/38235147.pdf"}])
|
596
|
+
end
|
597
|
+
|
586
598
|
it "hsh_to_fos no match" do
|
587
599
|
hsh = { "__content__"=>"Random tag" }
|
588
600
|
response = subject.hsh_to_fos(hsh)
|
589
601
|
expect(response).to eq([{"subject"=>"Random tag"}])
|
590
602
|
end
|
603
|
+
|
591
604
|
end
|
592
605
|
end
|