bolognese 2.3.5 → 2.3.7
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/Gemfile.lock +1 -1
- data/lib/bolognese/utils.rb +2 -2
- data/lib/bolognese/version.rb +1 -1
- data/spec/fixtures/datacite-by-nd-4.0.xml +51 -0
- data/spec/readers/datacite_reader_spec.rb +12 -0
- data/spec/writers/schema_org_writer_spec.rb +8 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c05f0dab0bec984086a16ee896eb4c11e96dc0dea3dfafb06dfc850c21509d6e
|
4
|
+
data.tar.gz: 553fbf418f768e5d5be884f14faa196f0b8be525db318199782f2567f4864fad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73754eb7b9a63ba680fa54d350ae0a3f72c936bddb0135f20723858f570fdab014e49fcbf075e69119d9f5296e00108a61dcf18e27e7ccbb7f55b2526a220d04
|
7
|
+
data.tar.gz: 84db456e50757438cdea6405c03b006eb827033e7a46fb4c7ef1d52473f7de69d6f77b05168569d98f6fa3bc23ba516337335906da78a5c05eb804ab627f3cd3
|
data/Gemfile.lock
CHANGED
data/lib/bolognese/utils.rb
CHANGED
@@ -32,7 +32,7 @@ module Bolognese
|
|
32
32
|
"https://creativecommons.org/licenses/by-nd/2.0" => "https://creativecommons.org/licenses/by-nd/2.0/legalcode",
|
33
33
|
"https://creativecommons.org/licenses/by-nd/2.5" => "https://creativecommons.org/licenses/by-nd/2.5/legalcode",
|
34
34
|
"https://creativecommons.org/licenses/by-nd/3.0" => "https://creativecommons.org/licenses/by-nd/3.0/legalcode",
|
35
|
-
"https://creativecommons.org/licenses/by-nd/4.0" => "https://creativecommons.org/licenses/by-nd/
|
35
|
+
"https://creativecommons.org/licenses/by-nd/4.0" => "https://creativecommons.org/licenses/by-nd/4.0/legalcode",
|
36
36
|
"https://creativecommons.org/licenses/by-sa/1.0" => "https://creativecommons.org/licenses/by-sa/1.0/legalcode",
|
37
37
|
"https://creativecommons.org/licenses/by-sa/2.0" => "https://creativecommons.org/licenses/by-sa/2.0/legalcode",
|
38
38
|
"https://creativecommons.org/licenses/by-sa/2.5" => "https://creativecommons.org/licenses/by-sa/2.5/legalcode",
|
@@ -1430,7 +1430,7 @@ module Bolognese
|
|
1430
1430
|
|
1431
1431
|
def abstract_description
|
1432
1432
|
# Fetch the first description with descriptionType "Abstract"
|
1433
|
-
descriptions&.find { |d| d["descriptionType"] == "Abstract" }
|
1433
|
+
Array.wrap(descriptions)&.find { |d| d["descriptionType"] == "Abstract" }
|
1434
1434
|
end
|
1435
1435
|
end
|
1436
1436
|
end
|
data/lib/bolognese/version.rb
CHANGED
@@ -0,0 +1,51 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<resource
|
3
|
+
xmlns="http://datacite.org/schema/kernel-3"
|
4
|
+
xmlns:dspace="http://www.dspace.org/xmlns/dspace/dim"
|
5
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://datacite.org/schema/kernel-3 http://schema.datacite.org/meta/kernel-3/metadata.xsd">
|
6
|
+
<identifier identifierType="DOI">10.26041/FHNW-7645</identifier>
|
7
|
+
<creators>
|
8
|
+
<creator>
|
9
|
+
<creatorName>Piñeiro, Esteban</creatorName>
|
10
|
+
</creator>
|
11
|
+
<creator>
|
12
|
+
<creatorName>Locher, Nora</creatorName>
|
13
|
+
</creator>
|
14
|
+
<creator>
|
15
|
+
<creatorName>Pasche, Nathalie</creatorName>
|
16
|
+
</creator>
|
17
|
+
</creators>
|
18
|
+
<titles>
|
19
|
+
<title>The art of soft power banishment. New insights into the Swiss deportation regime</title>
|
20
|
+
</titles>
|
21
|
+
<publisher>Taylor & Francis</publisher>
|
22
|
+
<publicationYear>2021</publicationYear>
|
23
|
+
<subjects>
|
24
|
+
<subject subjectScheme="ddc">300 - Sozialwissenschaften, Soziologie, Anthropologie</subject>
|
25
|
+
</subjects>
|
26
|
+
<contributors>
|
27
|
+
<contributor contributorType="DataManager">
|
28
|
+
<contributorName>Fachhochschule Nordwestschweiz FHNW</contributorName>
|
29
|
+
</contributor>
|
30
|
+
<contributor contributorType="HostingInstitution">
|
31
|
+
<contributorName>Fachhochschule Nordwestschweiz FHNW</contributorName>
|
32
|
+
</contributor>
|
33
|
+
</contributors>
|
34
|
+
<dates>
|
35
|
+
<date dateType="Accepted">2024-01-19</date>
|
36
|
+
<date dateType="Available">2024-01-19</date>
|
37
|
+
<date dateType="Issued">2021</date>
|
38
|
+
</dates>
|
39
|
+
<language>de</language>
|
40
|
+
<resourceType resourceTypeGeneral="Other">01A - Beitrag in wissenschaftlicher Zeitschrift</resourceType>
|
41
|
+
<alternateIdentifiers>
|
42
|
+
<alternateIdentifier alternateIdentifierType="doi">10.1080/01419870.2021.1989010</alternateIdentifier>
|
43
|
+
<alternateIdentifier alternateIdentifierType="issn">0141-9870</alternateIdentifier>
|
44
|
+
<alternateIdentifier alternateIdentifierType="issn">1466-4356</alternateIdentifier>
|
45
|
+
<alternateIdentifier alternateIdentifierType="uri">https://irf.fhnw.ch/handle/11654/43705</alternateIdentifier>
|
46
|
+
<alternateIdentifier alternateIdentifierType="uri">https://doi.org/10.26041/fhnw-7645</alternateIdentifier>
|
47
|
+
</alternateIdentifiers>
|
48
|
+
<rightsList>
|
49
|
+
<rights rightsURI="https://creativecommons.org/licenses/by-nd/4.0/"/>
|
50
|
+
</rightsList>
|
51
|
+
</resource>
|
@@ -1849,5 +1849,17 @@ describe Bolognese::Metadata, vcr: true do
|
|
1849
1849
|
|
1850
1850
|
end
|
1851
1851
|
end
|
1852
|
+
|
1853
|
+
describe "DataCite with CC-BY-ND 4.0 rightsURI" do
|
1854
|
+
it "returns correct normalized right" do
|
1855
|
+
input = fixture_path + 'datacite-by-nd-4.0.xml'
|
1856
|
+
subject = Bolognese::Metadata.new(input: input)
|
1857
|
+
expect(subject.valid?).to be true
|
1858
|
+
|
1859
|
+
rights_list = subject.rights_list
|
1860
|
+
right = rights_list.find { |r| r["rightsIdentifier"] == "cc-by-nd-4.0" }
|
1861
|
+
expect(right).not_to be_nil
|
1862
|
+
end
|
1863
|
+
end
|
1852
1864
|
end
|
1853
1865
|
|
@@ -414,5 +414,13 @@ describe Bolognese::Metadata, vcr: true do
|
|
414
414
|
"2020-01-01"
|
415
415
|
)
|
416
416
|
end
|
417
|
+
|
418
|
+
it "when descriptions is a dictionary" do
|
419
|
+
input = fixture_path + 'datacite-example-full-v4.6.xml'
|
420
|
+
subject = Bolognese::Metadata.new(input: input)
|
421
|
+
subject.descriptions = { "descriptionType" => "Abstract", "description" => "This is an abstract as a dictionary." }
|
422
|
+
json = JSON.parse(subject.schema_org)
|
423
|
+
expect(json.fetch("description")).to eq("This is an abstract as a dictionary.")
|
424
|
+
end
|
417
425
|
end
|
418
426
|
end
|
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: 2.3.
|
4
|
+
version: 2.3.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Fenner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: maremma
|
@@ -803,6 +803,7 @@ files:
|
|
803
803
|
- spec/fixtures/crossref.ris
|
804
804
|
- spec/fixtures/crossref.xml
|
805
805
|
- spec/fixtures/crossref_schema_4.6_values.xml
|
806
|
+
- spec/fixtures/datacite-by-nd-4.0.xml
|
806
807
|
- spec/fixtures/datacite-empty-sizes.xml
|
807
808
|
- spec/fixtures/datacite-example-ROR-nameIdentifiers.xml
|
808
809
|
- spec/fixtures/datacite-example-affiliation.xml
|