fullname-parser 1.1.1 → 1.1.2
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/fullname/parser.rb +2 -1
- data/lib/fullname/parser/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 09b6eb370fa0893594a6934ed9e8f55f813b65e4
|
4
|
+
data.tar.gz: 8198c830256103491c9c3ed2582d841281c18622
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f71b2ad9c81cd2d1b04b081afb46500c7299523a5610cda0748a4fc5e9267614593c7e79565e332b9a922f9eff4758f5d084a0e74f1b4c114b2d01c146e05838
|
7
|
+
data.tar.gz: b83e7539c310718571ab58c94e350b16c09d0e9042953144c5fa27b7b6e54d6584dfe8b72af2f74b50617179331e7e8598a849bb0747280589edfc11293840a7
|
data/lib/fullname/parser.rb
CHANGED
@@ -135,10 +135,11 @@ module Fullname
|
|
135
135
|
# Henry C.{Harry} Wilson => 'Henry C. Wilson'
|
136
136
|
# Cellestine {Steen} Armstrong => 'Cellestine Armstrong'
|
137
137
|
name.gsub!(/\{.*?\}/, ' ')
|
138
|
+
|
138
139
|
# remove exceptional names
|
139
140
|
# ex. "William . D. 'Bill' Beard" => "William D. 'Bill' Beard"
|
140
141
|
# also this regexp can remove
|
141
|
-
name.gsub!(/\s+[^a-zA-Z]+\s+/, ' ')
|
142
|
+
name.gsub!(/\s+[^a-zA-Z,]+\s+/, ' ')
|
142
143
|
# Why we use substitute(sub) comma to whitespace, not global substitute(gsub).
|
143
144
|
# the reason is the substitution applies for suffix splitting, not for replacing
|
144
145
|
# bad data. As we want, convert "Marvene A Gordon, JD" to "Marvene A Gordon JD",
|