randomperson 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +1 -0
- data/Manifest +17 -1
- data/README +25 -0
- data/Rakefile +4 -2
- data/gem-public_cert.pem +20 -0
- data/lib/Choice.rb +1 -1
- data/lib/CommonFormatsFirstName.rb +38 -0
- data/lib/Formatter.rb +31 -0
- data/lib/Generator.rb +1 -1
- data/lib/Name.rb +22 -0
- data/lib/NameFiles/AmericanLast.rb +14 -25
- data/lib/NameFiles/AmericanMaleFirst.rb +12 -22
- data/lib/NameFiles/AmericanSuffix.rb +7 -6
- data/lib/NameFiles/AnyLast.rb +13 -10
- data/lib/NameFiles/BasqueLast.rb +6 -24
- data/lib/NameFiles/BritishPrefix.rb +29 -0
- data/lib/NameFiles/BritishSuffix.rb +30 -0
- data/lib/NameFiles/EnglishFemaleFirst.rb +14 -11
- data/lib/NameFiles/EnglishLast.rb +7 -18
- data/lib/NameFiles/EnglishMaleFirst.rb +21 -0
- data/lib/NameFiles/ScottishFemaleFirst.rb +21 -0
- data/lib/NameFiles/ScottishLast.rb +22 -0
- data/lib/NameFiles/ScottishMaleFirst.rb +21 -0
- data/lib/NameFiles/SpanishFemaleFirst.rb +20 -17
- data/lib/NameFiles/SpanishLast.rb +6 -23
- data/lib/NameFiles/SpanishMaleFirst.rb +19 -17
- data/lib/NameFiles/SwedishFemaleFirst.rb +22 -0
- data/lib/NameFiles/SwedishLast.rb +21 -0
- data/lib/NameFiles/SwedishMaleFirst.rb +20 -0
- data/lib/NameFiles/ThaiFirst.rb +5 -22
- data/lib/NameFiles/ThaiRomanisedFemaleFirst.rb +5 -22
- data/lib/NameFiles/ThaiRomanisedLast.rb +5 -23
- data/lib/NameFiles/ThaiRomanisedMaleFirst.rb +4 -22
- data/lib/NameFiles/WelshFemaleFirst.rb +22 -0
- data/lib/NameFiles/WelshLast.rb +23 -0
- data/lib/NameFiles/WelshMaleFirst.rb +22 -0
- data/randomperson.gemspec +4 -4
- data/t/Generator.t +23 -10
- data.tar.gz.sig +0 -0
- metadata +36 -5
- metadata.gz.sig +0 -0
- data/lib/NameFiles/EnglishPrefix.rb +0 -26
data/CHANGELOG
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
v0.0.2. Added support for Welsh, Scottish and Swedish names
|
data/Manifest
CHANGED
@@ -1,23 +1,39 @@
|
|
1
|
+
CHANGELOG
|
1
2
|
Manifest
|
2
3
|
README
|
3
4
|
Rakefile
|
5
|
+
gem-public_cert.pem
|
4
6
|
lib/Choice.rb
|
7
|
+
lib/CommonFormatsFirstName.rb
|
8
|
+
lib/Formatter.rb
|
5
9
|
lib/Generator.rb
|
10
|
+
lib/Name.rb
|
6
11
|
lib/NameFiles/AmericanLast.rb
|
7
12
|
lib/NameFiles/AmericanMaleFirst.rb
|
8
13
|
lib/NameFiles/AmericanSuffix.rb
|
9
14
|
lib/NameFiles/AnyLast.rb
|
10
15
|
lib/NameFiles/BasqueLast.rb
|
16
|
+
lib/NameFiles/BritishPrefix.rb
|
17
|
+
lib/NameFiles/BritishSuffix.rb
|
11
18
|
lib/NameFiles/EnglishFemaleFirst.rb
|
12
19
|
lib/NameFiles/EnglishLast.rb
|
13
|
-
lib/NameFiles/
|
20
|
+
lib/NameFiles/EnglishMaleFirst.rb
|
21
|
+
lib/NameFiles/ScottishFemaleFirst.rb
|
22
|
+
lib/NameFiles/ScottishLast.rb
|
23
|
+
lib/NameFiles/ScottishMaleFirst.rb
|
14
24
|
lib/NameFiles/SpanishFemaleFirst.rb
|
15
25
|
lib/NameFiles/SpanishLast.rb
|
16
26
|
lib/NameFiles/SpanishMaleFirst.rb
|
27
|
+
lib/NameFiles/SwedishFemaleFirst.rb
|
28
|
+
lib/NameFiles/SwedishLast.rb
|
29
|
+
lib/NameFiles/SwedishMaleFirst.rb
|
17
30
|
lib/NameFiles/ThaiFirst.rb
|
18
31
|
lib/NameFiles/ThaiRomanisedFemaleFirst.rb
|
19
32
|
lib/NameFiles/ThaiRomanisedLast.rb
|
20
33
|
lib/NameFiles/ThaiRomanisedMaleFirst.rb
|
34
|
+
lib/NameFiles/WelshFemaleFirst.rb
|
35
|
+
lib/NameFiles/WelshLast.rb
|
36
|
+
lib/NameFiles/WelshMaleFirst.rb
|
21
37
|
lib/Names.rb
|
22
38
|
lib/Person.rb
|
23
39
|
lib/Ratio.rb
|
data/README
CHANGED
@@ -15,6 +15,19 @@ And I'm a masochist.
|
|
15
15
|
It also has unicode characters, so it'll give your database a real test.
|
16
16
|
|
17
17
|
|
18
|
+
==Installation:
|
19
|
+
|
20
|
+
You'll need at least Ruby v1.9.1
|
21
|
+
|
22
|
+
Get the public key from http://github.com/yb66/RandomPerson/blob/master/gem-public_cert.pem and do:
|
23
|
+
|
24
|
+
gem cert --add /path/to/public_cert.pem
|
25
|
+
|
26
|
+
then install it:
|
27
|
+
|
28
|
+
gem install randomperson -P HighSecurity
|
29
|
+
|
30
|
+
|
18
31
|
==USAGE (STOP SHOUTING!):
|
19
32
|
|
20
33
|
So, to generate 1000 random people with Spanish names, between the ages of 16 and 35 with a ratio of 3 males to every 5 females:
|
@@ -101,6 +114,10 @@ _and_
|
|
101
114
|
|
102
115
|
always begin with *add_*
|
103
116
|
|
117
|
+
_and_
|
118
|
+
|
119
|
+
make sure each word is capitalised, add_male will actually pick up Fe_male_ whereas Female and Male will get what you want.
|
120
|
+
|
104
121
|
If you want EnglishLast names loaded:
|
105
122
|
|
106
123
|
choice.add_English_Last
|
@@ -180,6 +197,14 @@ I've taken bits and pieces from wherever I could get them, so if you see somethi
|
|
180
197
|
|
181
198
|
There's lots to do. Lot of repetition and ugly bits here and there, but it works so I'll get round to it when I can.
|
182
199
|
|
200
|
+
==THANKS GO TO
|
201
|
+
|
202
|
+
Peter Hickman for writing the original library in Perl that inspired this on in Ruby.
|
203
|
+
|
204
|
+
My good friend Johan Bergsten for helping me out with the Swedish names.
|
205
|
+
|
206
|
+
==THE END UNLESS YOU WANT TO READ THE LICENCE
|
207
|
+
|
183
208
|
*Iain Barnett*
|
184
209
|
|
185
210
|
==LICENCE:
|
data/Rakefile
CHANGED
@@ -2,7 +2,8 @@ require 'rake'
|
|
2
2
|
require 'echoe'
|
3
3
|
# require 'rake/testtask'
|
4
4
|
|
5
|
-
|
5
|
+
|
6
|
+
Echoe.new('randomperson', '0.0.2') do |p|
|
6
7
|
p.description = "A gem for generating random persons"
|
7
8
|
p.url = "http://github.com/yb66/RandomPerson"
|
8
9
|
p.author = "Iain Barnett"
|
@@ -11,6 +12,7 @@ Echoe.new('randomperson', '0.0.1') do |p|
|
|
11
12
|
p.development_dependencies = []
|
12
13
|
p.runtime_dependencies = []
|
13
14
|
p.ruby_version = ">= 1.9.1"
|
15
|
+
p.require_signed = true
|
14
16
|
end
|
15
17
|
|
16
18
|
# task :default => [:test_units]
|
@@ -20,4 +22,4 @@ end
|
|
20
22
|
# t.pattern = 't/*.t'
|
21
23
|
# t.verbose = true
|
22
24
|
# t.warning = true
|
23
|
-
# }
|
25
|
+
# }
|
data/gem-public_cert.pem
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
-----BEGIN CERTIFICATE-----
|
2
|
+
MIIDNDCCAhygAwIBAgIBADANBgkqhkiG9w0BAQUFADBAMRIwEAYDVQQDDAlpYWlu
|
3
|
+
c3BlZWQxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkWA2Nv
|
4
|
+
bTAeFw0xMDA4MTkyMTQwMDlaFw0xMTA4MTkyMTQwMDlaMEAxEjAQBgNVBAMMCWlh
|
5
|
+
aW5zcGVlZDEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQBGRYD
|
6
|
+
Y29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApraebFPxvJVrayuZ
|
7
|
+
xJkFZLAId7j0G3QG4oyJcRaJVhaJ36zcCUeg6/6f9LC78nZSmL2zA2ZG9H3Lzda0
|
8
|
+
0j+McpynbK/eSq0XpruQbuuhcOBow1KgDfjdhz3qXylHJ/iIzBosQzoEIk5eVY84
|
9
|
+
R0qD+vNHwZQoDE+k4PB8LWIfbJPi+dmnL16C0qireO3nZASwTSGm1JdUtgESP0Hn
|
10
|
+
f1KAe/ox00S8cSQNGUZ/fAsrnhAOApL9V38TwxiL0eMVcY+TbUspI26MB8oNwsgV
|
11
|
+
zkBNt2lI45/SguV5wWMOWbWZ2v//w3PrBCUenkk+vwZmpOQUlk/8Ebrk+UeoAN1F
|
12
|
+
NqE2DQIDAQABozkwNzAJBgNVHRMEAjAAMB0GA1UdDgQWBBTMWVuCrozPKTpMRYkm
|
13
|
+
RUAqQFsGdDALBgNVHQ8EBAMCBLAwDQYJKoZIhvcNAQEFBQADggEBAFqZW23axU5A
|
14
|
+
Hf/p5iBfRlJLIZqFmVbGb1A+mxaPFUkhERH7FfY4ay4p2Ci1DNhSYQLy5dsB1ik0
|
15
|
+
J0tlNaXxkJ0uq6up65yoj4/XBJArm9oiO7PcwrzC52bmiEv4Ir67/AGRyfmgIU0A
|
16
|
+
5jv3cSFcnbrwCvClZOoVhNkvaxer3/DgLecpjgXfSwY++JHU0L/5HplidHzjE3PZ
|
17
|
+
1YGYQYJGIy5Hap8Lpn1x9/Q2C8pMX33JRItrIVie6UIsrGXVtGS5lZS/pri9Budd
|
18
|
+
+ikjZ+dLa/HjsXQ5HcI6WdySxyKElXr2Ecs8ipmnxCk6+KH9/2OnXrpBzeIXJoMS
|
19
|
+
YK13fiGcldY=
|
20
|
+
-----END CERTIFICATE-----
|
data/lib/Choice.rb
CHANGED
@@ -0,0 +1,38 @@
|
|
1
|
+
module RandomPerson
|
2
|
+
|
3
|
+
require 'Names'
|
4
|
+
|
5
|
+
class FirstName
|
6
|
+
include Names
|
7
|
+
|
8
|
+
#def names() NAMES; end
|
9
|
+
|
10
|
+
def initialize
|
11
|
+
@formats = {
|
12
|
+
:single => ->(n) { n.rand },
|
13
|
+
}
|
14
|
+
|
15
|
+
@formats_ratiod = [ (0..99)]
|
16
|
+
end
|
17
|
+
|
18
|
+
attr_accessor :formats, :formats_ratiod
|
19
|
+
|
20
|
+
def execute( person, format=nil, names )
|
21
|
+
if format.nil?
|
22
|
+
if @formats.length > 1
|
23
|
+
r = rand(@formats_ratiod.last.end)
|
24
|
+
i = @formats_ratiod.index_in_range( r )
|
25
|
+
f = @formats.by_index(i).last
|
26
|
+
else
|
27
|
+
f = @formats[:single]
|
28
|
+
end
|
29
|
+
else
|
30
|
+
f = format
|
31
|
+
end
|
32
|
+
format = ->(n){ n.rand } if format.nil?
|
33
|
+
# puts format.inspect
|
34
|
+
format.( names )
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
end
|
data/lib/Formatter.rb
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
#!/usr/bin/env ruby -wKU
|
2
|
+
|
3
|
+
module RandomPerson
|
4
|
+
|
5
|
+
class Formatter
|
6
|
+
|
7
|
+
def initialize( extra={} )
|
8
|
+
@@formats = {
|
9
|
+
:single => ->(n){ n.rand },
|
10
|
+
:double_barrelled => ->(n){ n.rand + ' ' + n.rand },
|
11
|
+
:double_barrelled => ->(n){ n.rand + ' ' + n.rand },
|
12
|
+
:de => ->(n){ n.rand + ' de ' + n.rand },
|
13
|
+
:compound_hyphenated => ->(n){ n.rand + ' ' + n.rand + ' ' + n.rand },
|
14
|
+
:compound_y => ->(n){ n.rand + ' ' + n.rand + ' y ' + n.rand },
|
15
|
+
}
|
16
|
+
|
17
|
+
self.formats=( extra ) unless extra.empty?
|
18
|
+
end
|
19
|
+
|
20
|
+
def formats
|
21
|
+
return @@formats
|
22
|
+
end
|
23
|
+
|
24
|
+
def formats=(extra={})
|
25
|
+
@@formats.merge!( extra ) unless extra.empty?
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
|
30
|
+
end
|
31
|
+
|
data/lib/Generator.rb
CHANGED
data/lib/Name.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
#!/usr/bin/env ruby -wKU
|
2
|
+
|
3
|
+
module RandomPerson
|
4
|
+
|
5
|
+
class Name
|
6
|
+
|
7
|
+
attr_accessor :formats, :formats_ratiod, :names
|
8
|
+
|
9
|
+
def execute( person=nil )
|
10
|
+
if @formats.length > 1
|
11
|
+
r = rand(@formats_ratiod.last.end)
|
12
|
+
i = @formats_ratiod.index_in_range( r )
|
13
|
+
f = @formats.by_index(i).last
|
14
|
+
else
|
15
|
+
f = @formats[:single]
|
16
|
+
end
|
17
|
+
f.( @names )
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
@@ -2,32 +2,21 @@
|
|
2
2
|
|
3
3
|
module RandomPerson
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
class AmericanLast
|
8
|
-
include Names
|
9
|
-
|
10
|
-
#def names() NAMES; end
|
5
|
+
class AmericanLast < Name
|
11
6
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
FORMATS_RATIOD = [ (0..95), (96..97), (98..99) ]
|
7
|
+
def initialize
|
8
|
+
@formats = {
|
9
|
+
:single => ->(n) { n.rand },
|
10
|
+
:double_barrelled => ->(n) { n.rand + ' ' + n.rand },
|
11
|
+
:double_barrelled_hyphenated=> ->(n) { n.rand + '-' + n.rand },
|
12
|
+
}
|
19
13
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
def execute( person, format=nil )
|
28
|
-
Names.execute( NAMES )
|
29
|
-
end
|
30
|
-
|
31
|
-
NAMES = %w(adams adamson adler akers akin aleman alexander allen allison allwood anderson andreou anthony appelbaum applegate arbore arenson armold arntzen askew athanas atkinson ausman austin averitt avila badders baer baggerly bailliet baird baker ball ballentine ballew banks baptist barbee barber barchas barcio bardsley barkauskas barnes barnett barnwell barrera barreto barroso barrow bart barton bass bates bavinger baxter bazaldua becker beeghly belforte bellamy bellavance beltran belusar bennett benoit bensley berger berggren bergman berry bertelson bess beusse bickford bierner bird birdwell bixby blackmon blackwell blair blankinship blanton block blomkalns bloomfield blume boeckenhauer bolding bolt bolton book boucher boudreau bowman boyd boyes boyles braby braden bradley brady bragg brandow brantley brauner braunhardt bray bredenberg bremer breyer bricout briggs brittain brockman brockmoller broman brooks brown brubaker bruce brumfield brumley bruning buck budd buhler buhr burleson burns burton bush butterfield byers byon byrd bzostek cabrera caesar caffey caffrey calhoun call callahan campbell cano capri carey carlisle carlson carmichael carnes carr carreira carroll carson carswell carter cartwright cason cates catlett caudle cavallaro cave cazamias chabot chance chapman characklis cheatham chen chern cheville chong christensen church claibourn clark clasen claude close coakley coffey cohen cole collier conant connell conte conway cooley cooper copeland coram corbett cort cortes cousins cowsar cox coyne crain crankshaw craven crawford cressman crestani crier crocker cromwell crouse crowder crowe culpepper cummings cunningham currie cusey cutcher cyprus d'ascenzo dabak dakoulas daly dana danburg danenhauer darley darrouzet dartt daugherty davila davis dawkins day dehart demoss demuth devincentis deaton dees degenhardt deggeller deigaard delabroy delaney demir denison denney derr dettweiler deuel devitt diamond dickinson dietrich dilbeck dobson dodds dodson doherty dooley dorsey dortch doughty dove dowd dowling drescher drucker dryer dryver duckworth dunbar dunham dunn duston dyson eason eaton ebert eckhoff edelman edmonds eichhorn eisbach elders elias elijah elizabeth elliott elliston elms emerson engelberg engle eplett epp erickson estades etezadi evans ewing fair farfan fargason farhat farry fawcett faye federle felcher feldman ferguson fergusson fernandez ferrer fine fineman fisher flanagan flathmann fleming fletcher folk fortune fossati foster foulston fowler fox francis frantom franz frazer fredericks frey freymann fuentes fuller fundling furlong gainer galang galeazzi gamse gannaway garcia gardner garneau gartler garverick garza gatt gattis gayman geiger gelder george gerbino gerbode gibson gifford gillespie gillingham gilpin gilyot girgis gjertsen glantz glaze glenn glotzbach gobble gockenbach goff goffin golden goldwyn gomez gonzalez good graham gramm granlund grant gray grayson greene greenslade greenwood greer griffin grinstein grisham gross grove guthrie guyton haas hackney haddock hagelstein hagen haggard haines hale haley hall halladay hamill hamilton hammer hancock hane hansen harding harless harms harper harrigan harris harrison hart harton hartz harvey hastings hauenstein haushalter haven hawes hawkins hawley haygood haylock hazard heath heidel heins hellums hendricks henry henson herbert herman hernandez herrera hertzmann hewitt hightower hildebrand hill hindman hirasaki hirsh hochman hocker hoffman hoffmann holder holland holloman holstein holt holzer honeyman hood hooks hopper horne house houston howard howell howley huang hudgings huffman hughes humphrey hunt hunter hurley huston hutchinson hyatt irving jacobs jaramillo jaranson jarboe jarrell jenkins johnson johnston jones joy juette julicher jumper kabir kamberova kamen kamine kampe kane kang kapetanovic kargatis karlin karlsson kasbekar kasper kastensmidt katz kauffman kavanagh kaydos kearsley keleher kelly kelty kendrick key kicinski kiefer kielt kim kimmel kincaid king kinney kipp kirby kirk kirkland kirkpatrick klamczynski klein kopnicky kotsonis koutras kramer kremer krohn kuhlken kunitz lalonde lavalle laware lacy lam lamb lampkin lane langston lanier larsen lassiter latchford lawera leblanc legrand leatherbury lebron ledman lee leinenbach leslie levy lewis lichtenstein lisowski liston litvak llano lloyd lock lodge logan lomonaco long lopez lopez loren loughridge love ludtke luers lukes luxemburg macallister macleod mackey maddox magee mallinson mann manning manthos marie marrow marshall martin martinez martisek massey mathis matt maxwell mayer mazurek mcadams mcafee mcalexander mcbride mccarthy mcclure mccord mccoy mccrary mccrossin mcdonald mcelfresh mcfarland mcgarr mcghee mcgoldrick mcgrath mcguire mckinley mcmahan mcmahon mcmath mcnally mcdonald meade meador mebane medrano melton merchant merwin millam millard miller mills milstead minard miner minkoff minnotte minyard mirza mitchell money monk montgomery monton moore moren moreno morris morse moss moyer mueller mull mullet mullins munn murdock murphey murphy murray murry mutchler myers myrick nassar nathan nazzal neal nederveld nelson nguyen nichols nielsen nockton nolan noonan norbury nordlander norris norvell noyes nugent nunn o'brien o'connell o'neill o'steen ober odegard oliver ollmann olson ongley ordway ortiz ouellette overcash overfelt overley owens page paige pardue parham parker parks patterson patton paul payne peck penisson percer perez perlioni perrino peterman peters pfeiffer phelps philip philippe phillips pickett pippenger pistole platzek player poddar poirier poklepovic polk polking pond popish porter pound pounds powell powers prado preston price prichep priour prischmann pryor puckett raglin ralston rampersad ratner rawles ray read reddy reed reese reeves reichenbach reifel rein reiten reiter reitmeier reynolds rhinehart richardson rider ritchie rittenbach roberts robinson rodriguez rogers roper rosemblun rosen rosenberg rosenblatt ross roth rowatt roy royston rozendal rubble ruhlin rupert russell ruthruff ryan rye sabry sachitano sachs sammartino sands saunders savely scales schaefer schafer scheer schild schlitt schmitz schneider schoenberger schoppe scott seay segura selesnick self seligmann sewall shami shampine sharp shaw shefelbine sheldon sherrill shidle shifley shillingsburg shisler shopbell shupack sievert simpson sims sissman smayling smith snyder solomon solon soltero sommers sonneborn sorensen southworth spear speight spencer spruell spudich stacy staebel steele steinhour steinke stepp stevens stewart stickel stine stivers stobb stone stratmann stubbers stuckey stugart sullivan sultan sumrall sunley sunshine sutton swaim swales sweed swick swift swindell swint symonds syzdek szafranski takimoto talbott talwar tanner taslimi tate tatum taylor tchainikov terk thacker thomas thompson thomson thornton thurman thurow tilley tolle towns trafton tran trevas trevino triggs truchard tunison turner twedell tyler tyree unger van vanderzanden vanlandingham varanasi varela varman venier verspoor vick visinsky voltz wagner wake walcott waldron walker wallace walters walton ward wardle warnes warren washington watson watters webber weidenfeller weien weimer weiner weinger weinheimer weirich welch wells wendt west westmoreland wex whitaker white whitley wiediger wilburn williams williamson willman wilson winger wise wisur witt wong woodbury wooten workman wright wyatt yates yeamans yen york yotov younan young zeldin zettner ziegler zitterkopf zucker)
|
14
|
+
@formats_ratiod = [ (0..95), (96..97), (98..99) ]
|
15
|
+
setupnames
|
16
|
+
end
|
17
|
+
|
18
|
+
def setupnames
|
19
|
+
@names = %w(Adams Adamson Adler Akers Akin Aleman Alexander Allen Allison Allwood Anderson Andreou Anthony Appelbaum Applegate Arbore Arenson Armold Arntzen Askew Athanas Atkinson Ausman Austin Averitt Avila Badders Baer Baggerly Bailliet Baird Baker Ball Ballentine Ballew Banks Baptist Barbee Barber Barchas Barcio Bardsley Barkauskas Barnes Barnett Barnwell Barrera Barreto Barroso Barrow Bart Barton Bass Bates Bavinger Baxter Bazaldua Becker Beeghly Belforte Bellamy Bellavance Beltran Belusar Bennett Benoit Bensley Berger Berggren Bergman Berry Bertelson Bess Beusse Bickford Bierner Bird Birdwell Bixby Blackmon Blackwell Blair Blankinship Blanton Block Blomkalns Bloomfield Blume Boeckenhauer Bolding Bolt Bolton Book Boucher Boudreau Bowman Boyd Boyes Boyles Braby Braden Bradley Brady Bragg Brandow Brantley Brauner Braunhardt Bray Bredenberg Bremer Breyer Bricout Briggs Brittain Brockman Brockmoller Broman Brooks Brown Brubaker Bruce Brumfield Brumley Bruning Buck Budd Buhler Buhr Burleson Burns Burton Bush Butterfield Byers Byon Byrd Bzostek Cabrera Caesar Caffey Caffrey Calhoun Call Callahan Campbell Cano Capri Carey Carlisle Carlson Carmichael Carnes Carr Carreira Carroll Carson Carswell Carter Cartwright Cason Cates Catlett Caudle Cavallaro Cave Cazamias Chabot Chance Chapman Characklis Cheatham Chen Chern Cheville Chong Christensen Church Claibourn Clark Clasen Claude Close Coakley Coffey Cohen Cole Collier Conant Connell Conte Conway Cooley Cooper Copeland Coram Corbett Cort Cortes Cousins Cowsar Cox Coyne Crain Crankshaw Craven Crawford Cressman Crestani Crier Crocker Cromwell Crouse Crowder Crowe Culpepper Cummings Cunningham Currie Cusey Cutcher Cyprus D'ascenzo Dabak Dakoulas Daly Dana Danburg Danenhauer Darley Darrouzet Dartt Daugherty Davila Davis Dawkins Day Dehart Demoss Demuth Devincentis Deaton Dees Degenhardt Deggeller Deigaard Delabroy Delaney Demir Denison Denney Derr Dettweiler Deuel Devitt Diamond Dickinson Dietrich Dilbeck Dobson Dodds Dodson Doherty Dooley Dorsey Dortch Doughty Dove Dowd Dowling Drescher Drucker Dryer Dryver Duckworth Dunbar Dunham Dunn Duston Dyson Eason Eaton Ebert Eckhoff Edelman Edmonds Eichhorn Eisbach Elders Elias Elijah Elizabeth Elliott Elliston Elms Emerson Engelberg Engle Eplett Epp Erickson Estades Etezadi Evans Ewing Fair Farfan Fargason Farhat Farry Fawcett Faye Federle Felcher Feldman Ferguson Fergusson Fernandez Ferrer Fine Fineman Fisher Flanagan Flathmann Fleming Fletcher Folk Fortune Fossati Foster Foulston Fowler Fox Francis Frantom Franz Frazer Fredericks Frey Freymann Fuentes Fuller Fundling Furlong Gainer Galang Galeazzi Gamse Gannaway Garcia Gardner Garneau Gartler Garverick Garza Gatt Gattis Gayman Geiger Gelder George Gerbino Gerbode Gibson Gifford Gillespie Gillingham Gilpin Gilyot Girgis Gjertsen Glantz Glaze Glenn Glotzbach Gobble Gockenbach Goff Goffin Golden Goldwyn Gomez Gonzalez Good Graham Gramm Granlund Grant Gray Grayson Greene Greenslade Greenwood Greer Griffin Grinstein Grisham Gross Grove Guthrie Guyton Haas Hackney Haddock Hagelstein Hagen Haggard Haines Hale Haley Hall Halladay Hamill Hamilton Hammer Hancock Hane Hansen Harding Harless Harms Harper Harrigan Harris Harrison Hart Harton Hartz Harvey Hastings Hauenstein Haushalter Haven Hawes Hawkins Hawley Haygood Haylock Hazard Heath Heidel Heins Hellums Hendricks Henry Henson Herbert Herman Hernandez Herrera Hertzmann Hewitt Hightower Hildebrand Hill Hindman Hirasaki Hirsh Hochman Hocker Hoffman Hoffmann Holder Holland Holloman Holstein Holt Holzer Honeyman Hood Hooks Hopper Horne House Houston Howard Howell Howley Huang Hudgings Huffman Hughes Humphrey Hunt Hunter Hurley Huston Hutchinson Hyatt Irving Jacobs Jaramillo Jaranson Jarboe Jarrell Jenkins Johnson Johnston Jones Joy Juette Julicher Jumper Kabir Kamberova Kamen Kamine Kampe Kane Kang Kapetanovic Kargatis Karlin Karlsson Kasbekar Kasper Kastensmidt Katz Kauffman Kavanagh Kaydos Kearsley Keleher Kelly Kelty Kendrick Key Kicinski Kiefer Kielt Kim Kimmel Kincaid King Kinney Kipp Kirby Kirk Kirkland Kirkpatrick Klamczynski Klein Kopnicky Kotsonis Koutras Kramer Kremer Krohn Kuhlken Kunitz Lalonde Lavalle Laware Lacy Lam Lamb Lampkin Lane Langston Lanier Larsen Lassiter Latchford Lawera Leblanc Legrand Leatherbury Lebron Ledman Lee Leinenbach Leslie Levy Lewis Lichtenstein Lisowski Liston Litvak Llano Lloyd Lock Lodge Logan Lomonaco Long Lopez Lopez Loren Loughridge Love Ludtke Luers Lukes Luxemburg Macallister Macleod Mackey Maddox Magee Mallinson Mann Manning Manthos Marie Marrow Marshall Martin Martinez Martisek Massey Mathis Matt Maxwell Mayer Mazurek Mcadams Mcafee Mcalexander Mcbride Mccarthy Mcclure Mccord Mccoy Mccrary Mccrossin Mcdonald Mcelfresh Mcfarland Mcgarr Mcghee Mcgoldrick Mcgrath Mcguire Mckinley Mcmahan Mcmahon Mcmath Mcnally Mcdonald Meade Meador Mebane Medrano Melton Merchant Merwin Millam Millard Miller Mills Milstead Minard Miner Minkoff Minnotte Minyard Mirza Mitchell Money Monk Montgomery Monton Moore Moren Moreno Morris Morse Moss Moyer Mueller Mull Mullet Mullins Munn Murdock Murphey Murphy Murray Murry Mutchler Myers Myrick Nassar Nathan Nazzal Neal Nederveld Nelson Nguyen Nichols Nielsen Nockton Nolan Noonan Norbury Nordlander Norris Norvell Noyes Nugent Nunn O'brien O'connell O'neill O'steen Ober Odegard Oliver Ollmann Olson Ongley Ordway Ortiz Ouellette Overcash Overfelt Overley Owens Page Paige Pardue Parham Parker Parks Patterson Patton Paul Payne Peck Penisson Percer Perez Perlioni Perrino Peterman Peters Pfeiffer Phelps Philip Philippe Phillips Pickett Pippenger Pistole Platzek Player Poddar Poirier Poklepovic Polk Polking Pond Popish Porter Pound Pounds Powell Powers Prado Preston Price Prichep Priour Prischmann Pryor Puckett Raglin Ralston Rampersad Ratner Rawles Ray Read Reddy Reed Reese Reeves Reichenbach Reifel Rein Reiten Reiter Reitmeier Reynolds Rhinehart Richardson Rider Ritchie Rittenbach Roberts Robinson Rodriguez Rogers Roper Rosemblun Rosen Rosenberg Rosenblatt Ross Roth Rowatt Roy Royston Rozendal Rubble Ruhlin Rupert Russell Ruthruff Ryan Rye Sabry Sachitano Sachs Sammartino Sands Saunders Savely Scales Schaefer Schafer Scheer Schild Schlitt Schmitz Schneider Schoenberger Schoppe Scott Seay Segura Selesnick Self Seligmann Sewall Shami Shampine Sharp Shaw Shefelbine Sheldon Sherrill Shidle Shifley Shillingsburg Shisler Shopbell Shupack Sievert Simpson Sims Sissman Smayling Smith Snyder Solomon Solon Soltero Sommers Sonneborn Sorensen Southworth Spear Speight Spencer Spruell Spudich Stacy Staebel Steele Steinhour Steinke Stepp Stevens Stewart Stickel Stine Stivers Stobb Stone Stratmann Stubbers Stuckey Stugart Sullivan Sultan Sumrall Sunley Sunshine Sutton Swaim Swales Sweed Swick Swift Swindell Swint Symonds Syzdek Szafranski Takimoto Talbott Talwar Tanner Taslimi Tate Tatum Taylor Tchainikov Terk Thacker Thomas Thompson Thomson Thornton Thurman Thurow Tilley Tolle Towns Trafton Tran Trevas Trevino Triggs Truchard Tunison Turner Twedell Tyler Tyree Unger Van Vanderzanden Vanlandingham Varanasi Varela Varman Venier Verspoor Vick Visinsky Voltz Wagner Wake Walcott Waldron Walker Wallace Walters Walton Ward Wardle Warnes Warren Washington Watson Watters Webber Weidenfeller Weien Weimer Weiner Weinger Weinheimer Weirich Welch Wells Wendt West Westmoreland Wex Whitaker White Whitley Wiediger Wilburn Williams Williamson Willman Wilson Winger Wise Wisur Witt Wong Woodbury Wooten Workman Wright Wyatt Yates Yeamans Yen York Yotov Younan Young Zeldin Zettner Ziegler Zitterkopf Zucker)
|
20
|
+
end
|
32
21
|
end
|
33
22
|
end
|
@@ -2,30 +2,20 @@
|
|
2
2
|
|
3
3
|
module RandomPerson
|
4
4
|
|
5
|
-
|
5
|
+
class AmericanMaleFirst < Name
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
NAMES = %w{ aaron adam adrian alan alejandro alex allen andrew andy anthony art arthur barry bart ben benjamin bill bobby brad bradley brendan brett brian bruce bryan carlos chad charles chris christopher chuck clay corey craig dan daniel darren dave david dean dennis denny derek don doug duane edward eric eugene evan frank fred gary gene george gordon greg harry henry hunter ivan jack james jamie jason jay jeff jeffrey jeremy jim joe joel john jonathan joseph justin keith ken kevin larry logan marc mark matt matthew michael mike nat nathan patrick paul perry peter philip phillip randy raymond ricardo richard rick rob robert rod roger ross ruben russell ryan sam scot scott sean shaun stephen steve steven stewart stuart ted thomas tim toby todd tom troy victor wade walter wayne william }
|
7
|
+
def initialize
|
8
|
+
@formats = {
|
9
|
+
:single => ->(n) { n.rand },
|
10
|
+
}
|
11
|
+
|
12
|
+
@formats_ratiod = [ (0..99) ]
|
13
|
+
setupnames
|
14
|
+
end
|
17
15
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
# format = FORMATS[:single] if format.nil?
|
24
|
-
# # puts format.inspect
|
25
|
-
# # format.( @NAMES )
|
26
|
-
# NAMES.rand
|
27
|
-
# end
|
28
|
-
|
16
|
+
def setupnames
|
17
|
+
NAMES = %w{ Aaron Adam Adrian Alan Alejandro Alex Allen Andrew Andy Anthony Art Arthur Barry Bart Ben Benjamin Bill Bobby Brad Bradley Brendan Brett Brian Bruce Bryan Carlos Chad Charles Chris Christopher Chuck Clay Corey Craig Dan Daniel Darren Dave David Dean Dennis Denny Derek Don Doug Duane Edward Eric Eugene Evan Frank Fred Gary Gene George Gordon Greg Harry Henry Hunter Ivan Jack James Jamie Jason Jay Jeff Jeffrey Jeremy Jim Joe Joel John Jonathan Joseph Justin Keith Ken Kevin Larry Logan Marc Mark Matt Matthew Michael Mike Nat Nathan Patrick Paul Perry Peter Philip Phillip Randy Raymond Ricardo Richard Rick Rob Robert Rod Roger Ross Ruben Russell Ryan Sam Scot Scott Sean Shaun Stephen Steve Steven Stewart Stuart Ted Thomas Tim Toby Todd Tom Troy Victor Wade Walter Wayne William }
|
18
|
+
end
|
29
19
|
|
30
20
|
end
|
31
21
|
end
|
@@ -5,19 +5,20 @@ module RandomPerson
|
|
5
5
|
class AmericanSuffix
|
6
6
|
include Names
|
7
7
|
|
8
|
+
def initialize
|
9
|
+
@names = [ 'Jr.', ''] + %w( I II III IV V Sr. )
|
10
|
+
@formats_ratiod = [ 0, 1..93, 94, 95, 96, 97, 98, 99]
|
11
|
+
end
|
8
12
|
|
9
|
-
|
10
|
-
SUFFIX_ratiod = [ 0, 1..93, 94, 95, 96, 97, 98, 99]
|
11
|
-
|
12
|
-
def execute( person, format=nil)
|
13
|
+
def execute( person)
|
13
14
|
|
14
15
|
r = rand(99)
|
15
16
|
if person.age > 17
|
16
17
|
r += 1 #Jr can't happen
|
17
18
|
end
|
18
19
|
|
19
|
-
i =
|
20
|
-
return
|
20
|
+
i = @formats_ratiod.index_in_range( r )
|
21
|
+
return @names[i]
|
21
22
|
end
|
22
23
|
|
23
24
|
end
|