dwc_agent 3.0.18.0 → 3.0.19.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8fa71b1f9139c38ff5d9d91301fe05d60502c5924e42e16dd48a48c548cdb77f
4
- data.tar.gz: 8603c5b12e92ee2e37cebeb4d94d32c19c64a2a23b819f647faffe2e2e2f9f45
3
+ metadata.gz: 232c24dde9ae5ecd8221049ab24283c2480c7d09df539f0eeef6b03729295360
4
+ data.tar.gz: 3fa7afa2113b78326938849744cf2e6a5a1f4949ba8567c0dac200872a72c62f
5
5
  SHA512:
6
- metadata.gz: 86a92559bdd7c872610dfba445d9aeaf0cd046acf3221a992517fe99d5879644df4b8e4100fe8c273cd967861ea15616e681c94b8cf41b45ea72c049fb44c694
7
- data.tar.gz: 59c22b205b42d2bc66a2026bbfa1f053ccfef1adf7fa6312ac3fa7d922a8d0ccf5f9f8dd5382cc244f7a421f15ab98f10f77505f8e7d5b512c00f893dbed6618
6
+ metadata.gz: 4a5778f3d32830ff95a2790c320d838df3c2e08937d8ca66cd1d3bf2a84560ce46b286f259bb213b7cf29c298d817c5f33d8ec09f958d65fd255825dc9dc1860
7
+ data.tar.gz: 8c01720ea2044073e3c850956e74b0a01f723350abb8b6d98183f9f8a6952f17dcbb5f64ab19311d72d57ff191634c783bc2b9e93cd40fd6c1819fa6c8de83fe
@@ -78,7 +78,6 @@ module DwcAgent
78
78
  parsed_namae.family &&
79
79
  parsed_namae.family.length <=3 &&
80
80
  parsed_namae.family == parsed_namae.family.upcase &&
81
- #parsed_namae.family != NameCase(parsed_namae.family) &&
82
81
  parsed_namae.given[-1] != "."
83
82
  given = parsed_namae.given
84
83
  family = parsed_namae.family
@@ -168,6 +167,11 @@ module DwcAgent
168
167
  return default
169
168
  end
170
169
 
170
+ if !family.nil? && family.downcase.count(VOWELS) == 0 &&
171
+ !FAMILY_GREENLIST.any?{ |s| s.casecmp(family) == 0 }
172
+ return default
173
+ end
174
+
171
175
  name = {
172
176
  title: title,
173
177
  appellation: appellation,
@@ -208,7 +208,8 @@ module DwcAgent
208
208
  '-Jr' => ' Jr.',
209
209
  'Dr.' => 'Dr. ',
210
210
  'prof.' => 'Prof. ',
211
- ' .;' => '. ;'
211
+ ' .;' => '. ;',
212
+ ', &' => ' &'
212
213
  }
213
214
 
214
215
  SEPARATORS = {
@@ -301,6 +302,18 @@ module DwcAgent
301
302
  ^\s*?de\s*?$
302
303
  }x
303
304
 
305
+ FAMILY_GREENLIST = [
306
+ "Ng",
307
+ "Srb",
308
+ "Srp",
309
+ "Vlk",
310
+ "Smrz",
311
+ "Smrž",
312
+ "Smrt",
313
+ "Krc",
314
+ "Krč"
315
+ ]
316
+
304
317
  FAMILY_BLACKLIST = [
305
318
  "a b",
306
319
  "a e",
@@ -403,4 +416,6 @@ module DwcAgent
403
416
  "von der"
404
417
  ]
405
418
 
419
+ VOWELS = "aeiouäèéêëìíôöü"
420
+
406
421
  end
@@ -4,7 +4,7 @@ module DwcAgent
4
4
 
5
5
  MAJOR = 3
6
6
  MINOR = 0
7
- PATCH = 18
7
+ PATCH = 19
8
8
  BUILD = 0
9
9
 
10
10
  def self.version
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dwc_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.18.0
4
+ version: 3.0.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David P. Shorthouse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-04 00:00:00.000000000 Z
11
+ date: 2024-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: namae