relaton-nist 1.13.0 → 1.13.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/relaton_nist/data_fetcher.rb +8 -3
- data/lib/relaton_nist/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aeed99df30e7f99bfc8d2b05dccaf5bc45eb6c8980b1b5f608eb2ce94a541382
|
4
|
+
data.tar.gz: 41a13eb308604d5fbf7b9b808e2397d90b6c7ad0ba19722618487434233cd315
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2e8d7da0a19ea149b5dce1d43831a4589a39f47ddb57bbb91f6621896d614ea670aae89348479fc6f956ecc678d9493503fe6b24e44e17b2e5986e997be89dd
|
7
|
+
data.tar.gz: caf9ddca1f1dc8eb37541c9c5620d183f72ff4bcd389261d6173f306e4d511a3e83df84a7fc6828dbb7bdc31457e01834e9fe18fca0b7f7d46fadc54d2dc6133
|
@@ -174,7 +174,7 @@ module RelatonNist
|
|
174
174
|
#
|
175
175
|
# @return [Array<Array<RelatonBib::LocalizedString>>] forename and initials
|
176
176
|
#
|
177
|
-
def forename_initial(person, doc) # rubocop:disable Metrics/MethodLength
|
177
|
+
def forename_initial(person, doc) # rubocop:disable Metrics/MethodLength, Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
178
178
|
fnames = []
|
179
179
|
fname = person.at("given_name")&.text
|
180
180
|
if fname
|
@@ -182,10 +182,13 @@ module RelatonNist
|
|
182
182
|
ints = inits.split(/[.\s]*/)
|
183
183
|
fnames << forename(doc, fname, ints.shift)
|
184
184
|
ints.each { |i| fnames << forename(doc, nil, i) }
|
185
|
-
else
|
185
|
+
else
|
186
|
+
fn = forename(doc, fname)
|
187
|
+
fnames << fn if fn
|
186
188
|
end
|
187
189
|
end
|
188
|
-
|
190
|
+
initials = localized_string inits, doc if not(inits.nil? || inits.empty?)
|
191
|
+
[fnames, initials]
|
189
192
|
end
|
190
193
|
|
191
194
|
#
|
@@ -198,6 +201,8 @@ module RelatonNist
|
|
198
201
|
# @return [RelatonBib::Forename] forename object
|
199
202
|
#
|
200
203
|
def forename(doc, cnt, init = nil)
|
204
|
+
return if (cnt.nil? || cnt.empty?) && (init.nil? || init.empty?)
|
205
|
+
|
201
206
|
RelatonBib::Forename.new(
|
202
207
|
content: cnt, language: doc["language"], script: "Latn", initial: init,
|
203
208
|
)
|
data/lib/relaton_nist/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-nist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.13.
|
4
|
+
version: 1.13.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: equivalent-xml
|