dwc_agent 3.1.5.0 → 3.2.1.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 +4 -4
- data/lib/dwc_agent/cleaner.rb +4 -2
- data/lib/dwc_agent/constants.rb +3 -2
- data/lib/dwc_agent/utility.rb +4 -0
- data/lib/dwc_agent/version.rb +2 -2
- 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: cec3414f1b65b944a67995a6a306282ceced45af8d58a63c42ecfd469d74b135
|
4
|
+
data.tar.gz: 26644458e9c264b4f07c270c86bdcc89ba5654495662f08974bc551688fb3cab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4915c877d81d0f19c4b32fb05bbf6fd708e7ebd69f27f3ae119f7896668b946612228a155879b64713af3bdd8107fbf1760e3182e99000038dfa6b1530dadd2b
|
7
|
+
data.tar.gz: 6c85892b18270743222d2db185e34e531c025e12d6f15915352fe3e6e2229d4b814a127036b24cce5f89a739d07353754d74fa132c07173225060ed80e06bb41
|
data/lib/dwc_agent/cleaner.rb
CHANGED
@@ -16,7 +16,7 @@ module DwcAgent
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def default
|
19
|
-
|
19
|
+
DwcAgent.default
|
20
20
|
end
|
21
21
|
|
22
22
|
# Cleans the passed-in namae object from the parse method and
|
@@ -26,6 +26,8 @@ module DwcAgent
|
|
26
26
|
# @return Namae::Name [Object] a new Namae object
|
27
27
|
def clean(parsed_namae)
|
28
28
|
|
29
|
+
return default if !parsed_namae.instance_of?(Namae::Name)
|
30
|
+
|
29
31
|
if parsed_namae.family &&
|
30
32
|
parsed_namae.family == NameCase(parsed_namae.family) &&
|
31
33
|
parsed_namae.display_order.split.join == parsed_namae.initials
|
@@ -92,7 +94,7 @@ module DwcAgent
|
|
92
94
|
matched = /^(?<family>[A-Za-z]{3,})\s+(?<given>([A-Z]\.\s?){1,})$/.match(parsed_namae.family)
|
93
95
|
parsed_namae.family = matched[:family]
|
94
96
|
parsed_namae.given = matched[:given]
|
95
|
-
|
97
|
+
end
|
96
98
|
|
97
99
|
if parsed_namae.given &&
|
98
100
|
(parsed_namae.given == parsed_namae.given.upcase ||
|
data/lib/dwc_agent/constants.rb
CHANGED
@@ -10,7 +10,7 @@ module DwcAgent
|
|
10
10
|
[,]?\s*\#*\s+\d+\-(?i:[A-Z]|\d)+\-?\d*[A-Za-z]*\z|
|
11
11
|
\d*[A-Za-z]*\d*-\d*\z|
|
12
12
|
\b\d+\(?(?i:[[:alpha:]])\)?\b|
|
13
|
-
|
13
|
+
[,;\s]{1,}(?:et\.?\s+al|&\s+al)l?\.?|
|
14
14
|
\b[,;]?\s*(?i:etal)\.?|
|
15
15
|
\b[,;]?\s*(?i:et.al)\.?|
|
16
16
|
\b\s+(bis|ter)(\b|\z)|
|
@@ -94,6 +94,7 @@ module DwcAgent
|
|
94
94
|
(?i:field\s+museum\s+of\s+natural\s+history)|
|
95
95
|
(?i:american\s+museum\s+of\s+natural\s+history)|
|
96
96
|
(?i:The\s+Paleontological\s+Research\s+Institution)|
|
97
|
+
(?i:literature?)|
|
97
98
|
(?i:museums?\s+victoria)|
|
98
99
|
\b\s*(?i:united\s+states|russia)\s*\b|
|
99
100
|
(?i:revised|photograph|fruits\s+only)|
|
@@ -112,7 +113,7 @@ module DwcAgent
|
|
112
113
|
(?i:not?)\s+(?i:name|date|details?|specific)?\s*?(?i:given|name|date|noted)|
|
113
114
|
(?i:non?)\s+(?i:specificato)|
|
114
115
|
\b[,;]\s+\d+\.?\z|
|
115
|
-
[!@?]
|
116
|
+
[!@?]\s*\-?\s*|
|
116
117
|
\d{1,4}[\/.]?(?i:i|ii|iii|iv|v|vi|vii|viii|ix|x|xi|xii)[\/.]\d{1,4}|
|
117
118
|
[,]?\d+|
|
118
119
|
[,;]\z|
|
data/lib/dwc_agent/utility.rb
CHANGED
data/lib/dwc_agent/version.rb
CHANGED
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.1.
|
4
|
+
version: 3.2.1.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-
|
11
|
+
date: 2024-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: namae
|