nameable 0.5.1 → 1.0.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 +7 -0
- data/.gitignore +3 -0
- data/Gemfile +2 -9
- data/Gemfile.lock +24 -23
- data/{LICENSE → LICENSE.txt} +2 -0
- data/README.md +68 -0
- data/Rakefile +1 -38
- data/{examples/nameable_web_service.rb → bin/nameable_web_service} +4 -2
- data/data/app_c.csv +151672 -0
- data/data/yob2013.txt +33072 -0
- data/lib/nameable.rb +6 -216
- data/lib/nameable/error.rb +5 -0
- data/lib/nameable/extensions.rb +5 -0
- data/lib/nameable/latin.rb +247 -0
- data/lib/nameable/latin/patterns.rb +34 -0
- data/lib/nameable/version.rb +3 -0
- data/nameable.gemspec +24 -0
- data/spec/nameable/latin_spec.rb +284 -0
- data/spec/nameable_spec.rb +5 -17
- data/spec/spec_helper.rb +5 -6
- metadata +53 -39
- data/History.txt +0 -11
- data/README.rdoc +0 -29
- data/TODO +0 -3
- data/VERSION +0 -1
- data/examples/test.rb +0 -45
data/History.txt
DELETED
data/README.rdoc
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
== nameable
|
2
|
-
|
3
|
-
A gem that provides parsing and output of people's names.
|
4
|
-
|
5
|
-
A person's name is trivial when you validate the input at data entry
|
6
|
-
time. That is not always possible, and for my enterprise it is almost
|
7
|
-
never possible.
|
8
|
-
|
9
|
-
References: http://www.onlineaspect.com/2009/08/17/splitting-names/
|
10
|
-
|
11
|
-
require "nameable"
|
12
|
-
|
13
|
-
n = Nameable::Latin.new.parse("Mr. Chris K Horn Esquire")
|
14
|
-
|
15
|
-
puts n.prefix
|
16
|
-
|
17
|
-
puts n.first
|
18
|
-
|
19
|
-
puts n.middle
|
20
|
-
|
21
|
-
puts n.last
|
22
|
-
|
23
|
-
puts n.suffix
|
24
|
-
|
25
|
-
puts n.to_fullname
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
-chorn
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.5.1
|
data/examples/test.rb
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "rubygems"
|
4
|
-
require "./lib/nameable"
|
5
|
-
|
6
|
-
DATA.each do |testcase|
|
7
|
-
n = Nameable::Latin.new.parse(testcase)
|
8
|
-
puts "``#{testcase.chomp}'' -> #{n.first} #{n.last} // #{n.to_fullname}"
|
9
|
-
end
|
10
|
-
|
11
|
-
__END__
|
12
|
-
HORN, CHRIS K
|
13
|
-
HORN, CHRIS K.
|
14
|
-
Mr. Chris Horn PhD
|
15
|
-
Chris Horn T.I.T.L.E.
|
16
|
-
Chris Horn II
|
17
|
-
Chris Horn II Esquire
|
18
|
-
Chris O'Horn
|
19
|
-
Chris McHorn
|
20
|
-
Chris Von Horn
|
21
|
-
Chris O' Horn
|
22
|
-
Chris K Horn
|
23
|
-
Chris K. Horn
|
24
|
-
Chris K Horn Sr
|
25
|
-
Chris Horn - Horn
|
26
|
-
Chris Ole Biscuit Barrel Horn
|
27
|
-
CHRIS HORN
|
28
|
-
CHRIS-HORN
|
29
|
-
CHRIS;HORN
|
30
|
-
Horn, Chris
|
31
|
-
Horn, Chris K
|
32
|
-
Horn, Chris K.
|
33
|
-
Horn, Chris K. DDS
|
34
|
-
Horn,,Chris
|
35
|
-
Horn,, Chris
|
36
|
-
Horn , , Chris
|
37
|
-
Horn ,, Chris
|
38
|
-
Chris Horn, Ph.D. DB CCNE
|
39
|
-
CHRIS MC HORN
|
40
|
-
CHRIS MAC HORN
|
41
|
-
CHRIS VAN HORN
|
42
|
-
CHRIS DA HORN
|
43
|
-
CHRIS DE HORN
|
44
|
-
CHRIS ST HORN
|
45
|
-
CHRIS ST. HORN
|