bolognese 0.15.3 → 0.15.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bolognese/datacite_utils.rb +14 -1
- data/lib/bolognese/readers/datacite_reader.rb +1 -1
- data/lib/bolognese/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da2319f2e584ce2f889c308aa46e619ad620b9520c62d3ad7dc79aae80ffa88f
|
4
|
+
data.tar.gz: 6a71e4d5f6cd1aa50d889dfdf5362cc7cbb5e242f87f16d30a5e68b70e0e80ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fc230e49c969e975a1b08dc2326117bd41356c749ff99a5d63c13a1cae8f9cf4463cae2c9f480539d93738b273cea9577e8b2a15f057cf59fd1c1b2c828e16d
|
7
|
+
data.tar.gz: 1840531ac9c7863b9440e523db883d5a862afcb05bd67c02a16dbf22bc29c1a20cb34302f3c65e99d7b4fdd185cd6a59e565cbf9685516738919ae184c63da8b
|
@@ -148,7 +148,20 @@ module Bolognese
|
|
148
148
|
|
149
149
|
xml.subjects do
|
150
150
|
keywords.each do |subject|
|
151
|
-
|
151
|
+
if subject.is_a?(String) then
|
152
|
+
# If we've been read from somewhere that it was just a string output that
|
153
|
+
xml.subject(subject)
|
154
|
+
else
|
155
|
+
# Otherwise we'll assume a hash and therefore find/add attributes as appropriate
|
156
|
+
subject_node = xml.subject(subject['text'])
|
157
|
+
if subject["subject_scheme"].present? then
|
158
|
+
subject_node['subjectScheme'] = subject["subject_scheme"]
|
159
|
+
end
|
160
|
+
|
161
|
+
if subject["scheme_uri"].present? then
|
162
|
+
subject_node['schemeURI'] = subject["scheme_uri"]
|
163
|
+
end
|
164
|
+
end
|
152
165
|
end
|
153
166
|
end
|
154
167
|
end
|
@@ -54,7 +54,7 @@ module Bolognese
|
|
54
54
|
schema_version = Array.wrap(ns).last || "http://datacite.org/schema/kernel-4"
|
55
55
|
doc.remove_namespaces!
|
56
56
|
string = doc.to_xml(:indent => 2)
|
57
|
-
|
57
|
+
|
58
58
|
meta = Maremma.from_xml(string).to_h.fetch("resource", {})
|
59
59
|
|
60
60
|
# validate only when option is set, as this step is expensive and
|
data/lib/bolognese/version.rb
CHANGED
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: 0.15.
|
4
|
+
version: 0.15.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Fenner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: maremma
|
@@ -1024,7 +1024,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1024
1024
|
version: '0'
|
1025
1025
|
requirements: []
|
1026
1026
|
rubyforge_project:
|
1027
|
-
rubygems_version: 2.7.
|
1027
|
+
rubygems_version: 2.7.8
|
1028
1028
|
signing_key:
|
1029
1029
|
specification_version: 4
|
1030
1030
|
summary: Ruby client library for conversion of DOI Metadata
|