randomizer 0.0.1 → 0.0.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.
@@ -0,0 +1 @@
1
+ pkg
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2009 Paul Canavese
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,48 +1,46 @@
1
1
  = randomizer
2
2
 
3
- * http://github.com/canavese/randomizer
3
+ The purpose of this gem is to generate realistic test data.
4
4
 
5
- == DESCRIPTION:
5
+ == Users
6
6
 
7
- Generates random data, particularly useful for user simulation.
7
+ Generate a random user like so:
8
8
 
9
- == FEATURES/PROBLEMS:
9
+ u = RandomUser.new
10
10
 
11
- * In progress... not ready for public consumption.
11
+ The following fields are available (all except the name are lazily-loaded):
12
12
 
13
- == SYNOPSIS:
13
+ * first_name, last_name, full_name: Chosen from lists of common first and last names in the United States.
14
+ * nickname: short one-word all-lowercase name appropriate for a username/login/handle, based on real name.
15
+ * password: random eight characters.
16
+ * email: email address based on nickname and common email domains.
17
+ * avatar_url: URL to an avatar image on allavatars.com.
14
18
 
15
- FIX (code sample of usage)
19
+ If a nickname or email address is taken, you can regenerate them:
16
20
 
17
- == REQUIREMENTS:
21
+ u.regenerate_nickname
22
+ u.regenerate_email
18
23
 
19
- * FIX (list of requirements)
24
+ == Random text
20
25
 
21
- == INSTALL:
26
+ Generate a random text like so:
22
27
 
23
- * FIX (sudo gem install, anything else)
28
+ g = MarkovTextGenerator.new
29
+ g.random(2)
24
30
 
25
- == LICENSE:
31
+ This will generate two sentences of text based on the Markov algorithm. The initializer accepts any sufficiently-long
32
+ string to be used as a pattern. The gem includes Aesop's fairy tales (used by default), Alice in Wonderland, the
33
+ Adventures of Sherlock Holmes, and Latin gibberish (lorem ipsum...).
26
34
 
27
- (The MIT License)
35
+ == Note on Patches/Pull Requests
36
+
37
+ * Fork the project.
38
+ * Make your feature addition or bug fix.
39
+ * Add tests for it. This is important so I don't break it in a future version unintentionally.
40
+ * Commit, do not mess with rakefile, version, or history.
41
+ (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
42
+ * Send me a pull request. Bonus points for topic branches.
28
43
 
29
- Copyright (c) 2009 Paul Canavese
44
+ == Copyright
30
45
 
31
- Permission is hereby granted, free of charge, to any person obtaining
32
- a copy of this software and associated documentation files (the
33
- 'Software'), to deal in the Software without restriction, including
34
- without limitation the rights to use, copy, modify, merge, publish,
35
- distribute, sublicense, and/or sell copies of the Software, and to
36
- permit persons to whom the Software is furnished to do so, subject to
37
- the following conditions:
38
-
39
- The above copyright notice and this permission notice shall be
40
- included in all copies or substantial portions of the Software.
41
-
42
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
43
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
44
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
45
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
46
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
47
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
48
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
46
+ Copyright (c) 2009 Paul Canavese. See LICENSE for details.
data/Rakefile CHANGED
@@ -1,27 +1,57 @@
1
- require 'rubygems'
2
- gem 'hoe', '>= 2.1.0'
3
- require 'hoe'
4
- gem 'hpricot', '>= 0.5'
5
- require 'hpricot'
6
- require 'fileutils'
7
- require './lib/randomizer'
8
-
9
- Hoe.plugin :newgem
10
- # Hoe.plugin :website
11
- Hoe.plugin :cucumberfeatures
12
-
13
- # Generate all the Rake tasks
14
- # Run 'rake -T' to see list of generated tasks (from gem root directory)
15
- $hoe = Hoe.spec 'randomizer' do
16
- self.developer 'Paul Canavese', 'paul@canavese.org'
17
- self.post_install_message = 'PostInstall.txt' # TODO remove if post-install message not required
18
- self.rubyforge_name = self.name # TODO this is default value
19
- # self.extra_deps = [['activesupport','>= 2.0.2']]
20
- end
21
-
22
- require 'newgem/tasks'
23
- Dir['tasks/**/*.rake'].each { |t| load t }
24
-
25
- # TODO - want other tests/tasks run by default? Add them to the list
26
- # remove_task :default
27
- # task :default => [:spec, :features]
1
+ require 'rubygems'
2
+ require 'rake'
3
+
4
+ begin
5
+ require 'jeweler'
6
+ Jeweler::Tasks.new do |gem|
7
+ gem.name = "randomizer"
8
+ gem.summary = %Q{Generates random test data}
9
+ gem.description = %Q{}
10
+ gem.email = "paul@canavese.org"
11
+ gem.homepage = "http://github.com/canavese/randomizer"
12
+ gem.authors = ["Paul Canavese"]
13
+ gem.add_development_dependency "rspec", ">= 1.2.9"
14
+ gem.add_development_dependency "cucumber", ">= 0"
15
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
16
+ end
17
+ Jeweler::GemcutterTasks.new
18
+ rescue LoadError
19
+ puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
20
+ end
21
+
22
+ require 'spec/rake/spectask'
23
+ Spec::Rake::SpecTask.new(:spec) do |spec|
24
+ spec.libs << 'lib' << 'spec'
25
+ spec.spec_files = FileList['spec/**/*_spec.rb']
26
+ end
27
+
28
+ Spec::Rake::SpecTask.new(:rcov) do |spec|
29
+ spec.libs << 'lib' << 'spec'
30
+ spec.pattern = 'spec/**/*_spec.rb'
31
+ spec.rcov = true
32
+ end
33
+
34
+ task :spec => :check_dependencies
35
+
36
+ begin
37
+ require 'cucumber/rake/task'
38
+ Cucumber::Rake::Task.new(:features)
39
+
40
+ task :features => :check_dependencies
41
+ rescue LoadError
42
+ task :features do
43
+ abort "Cucumber is not available. In order to run features, you must: sudo gem install cucumber"
44
+ end
45
+ end
46
+
47
+ task :default => :spec
48
+
49
+ require 'rake/rdoctask'
50
+ Rake::RDocTask.new do |rdoc|
51
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
52
+
53
+ rdoc.rdoc_dir = 'rdoc'
54
+ rdoc.title = "randomizer #{version}"
55
+ rdoc.rdoc_files.include('README*')
56
+ rdoc.rdoc_files.include('lib/**/*.rb')
57
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.2
@@ -0,0 +1,564 @@
1
+ Jennifer
2
+ Michelle
3
+ Lisa
4
+ Kimberly
5
+ Amy
6
+ Angela
7
+ Melissa
8
+ Stephanie
9
+ Heather
10
+ Nicole
11
+ Tammy
12
+ Julie
13
+ Mary
14
+ Rebecca
15
+ Elizabeth
16
+ Christine
17
+ Laura
18
+ Tina
19
+ Tracy
20
+ Dawn
21
+ Karen
22
+ Shannon
23
+ Kelly
24
+ Susan
25
+ Cynthia
26
+ Christina
27
+ Patricia
28
+ Lori
29
+ Wendy
30
+ Andrea
31
+ Sandra
32
+ Maria
33
+ Stacy
34
+ Pamela
35
+ Denise
36
+ Michele
37
+ Tonya
38
+ Tara
39
+ Teresa
40
+ Rachel
41
+ Stacey
42
+ Melanie
43
+ Deborah
44
+ Brenda
45
+ Donna
46
+ Jessica
47
+ Monica
48
+ April
49
+ Sharon
50
+ Sarah
51
+ Linda
52
+ Dana
53
+ Carrie
54
+ Tanya
55
+ Robin
56
+ Cheryl
57
+ Kathleen
58
+ Barbara
59
+ Crystal
60
+ Rhonda
61
+ Tiffany
62
+ Nancy
63
+ Jill
64
+ Heidi
65
+ Catherine
66
+ Debra
67
+ Kristin
68
+ Theresa
69
+ Katherine
70
+ Sherry
71
+ Holly
72
+ Paula
73
+ Danielle
74
+ Christy
75
+ Leslie
76
+ Amanda
77
+ Renee
78
+ Gina
79
+ Jacqueline
80
+ Cindy
81
+ Melinda
82
+ Veronica
83
+ Diana
84
+ Tamara
85
+ Kristen
86
+ Erica
87
+ Anna
88
+ Tracey
89
+ Sheila
90
+ Yolanda
91
+ Ann
92
+ Suzanne
93
+ Erin
94
+ Shelly
95
+ Margaret
96
+ Alicia
97
+ Jodi
98
+ Laurie
99
+ Victoria
100
+ Valerie
101
+ Sara
102
+ Kristi
103
+ Kathryn
104
+ Regina
105
+ Diane
106
+ Carla
107
+ Kathy
108
+ Deanna
109
+ Carol
110
+ Carolyn
111
+ Janet
112
+ Kristina
113
+ Beth
114
+ Jamie
115
+ Allison
116
+ Katrina
117
+ Katina
118
+ Kim
119
+ Jenny
120
+ Traci
121
+ Tricia
122
+ Sonya
123
+ Colleen
124
+ Terri
125
+ Misty
126
+ Shelley
127
+ Kristine
128
+ Felicia
129
+ Sherri
130
+ Julia
131
+ Connie
132
+ Emily
133
+ Vanessa
134
+ Anne
135
+ Lynn
136
+ Anita
137
+ Samantha
138
+ Erika
139
+ Cassandra
140
+ Brandy
141
+ Brandi
142
+ Krista
143
+ Natalie
144
+ Carmen
145
+ Angel
146
+ Nichole
147
+ Sheri
148
+ Kerry
149
+ Yvonne
150
+ Martha
151
+ Kelli
152
+ Monique
153
+ Aimee
154
+ Sabrina
155
+ Annette
156
+ Bridget
157
+ Bonnie
158
+ Kristy
159
+ Stacie
160
+ Joy
161
+ Amber
162
+ Alison
163
+ Tracie
164
+ Virginia
165
+ Becky
166
+ Wanda
167
+ Marie
168
+ Kristie
169
+ Cathy
170
+ Natasha
171
+ Janice
172
+ Jody
173
+ Nikki
174
+ Shawna
175
+ Gloria
176
+ Vicki
177
+ Sonia
178
+ Toni
179
+ Leah
180
+ Penny
181
+ Megan
182
+ Debbie
183
+ Trina
184
+ Shawn
185
+ Beverly
186
+ Kari
187
+ Charlotte
188
+ Belinda
189
+ Yvette
190
+ Kerri
191
+ Jeanette
192
+ Christie
193
+ Robyn
194
+ Charlene
195
+ Sylvia
196
+ Kara
197
+ Meredith
198
+ Joanna
199
+ Darlene
200
+ Kendra
201
+ Ruth
202
+ Betty
203
+ Catina
204
+ Tammie
205
+ Claudia
206
+ Joyce
207
+ Peggy
208
+ Joanne
209
+ Shirley
210
+ Ginger
211
+ Rose
212
+ Jean
213
+ Hope
214
+ Rosa
215
+ Tami
216
+ Frances
217
+ Tonia
218
+ Dorothy
219
+ Kimberley
220
+ Judith
221
+ Judy
222
+ Gretchen
223
+ Candace
224
+ Kellie
225
+ Helen
226
+ Molly
227
+ Kelley
228
+ Marsha
229
+ Leigh
230
+ Rita
231
+ Alice
232
+ Latonya
233
+ Sonja
234
+ Ellen
235
+ Ashley
236
+ Bobbie
237
+ Maureen
238
+ Jane
239
+ Norma
240
+ Tasha
241
+ Juanita
242
+ Vickie
243
+ Karla
244
+ Melody
245
+ Christa
246
+ Keri
247
+ Joann
248
+ Dina
249
+ Ana
250
+ Billie
251
+ Caroline
252
+ Elaine
253
+ Staci
254
+ Evelyn
255
+ Sandy
256
+ Leticia
257
+ Rochelle
258
+ Loretta
259
+ Jackie
260
+ Angie
261
+ Raquel
262
+ Lauren
263
+ Candice
264
+ Teri
265
+ Marcia
266
+ Cheri
267
+ Gail
268
+ Lynette
269
+ Rachael
270
+ Roberta
271
+ Dena
272
+ Stefanie
273
+ Sheryl
274
+ Jeanne
275
+ Adrienne
276
+ Ronda
277
+ Jodie
278
+ Eileen
279
+ Audrey
280
+ Christi
281
+ Marcy
282
+ Sally
283
+ Jenifer
284
+ Rachelle
285
+ Kirsten
286
+ Lora
287
+ Eva
288
+ Roxanne
289
+ Gwendolyn
290
+ Jennie
291
+ Jana
292
+ Marilyn
293
+ Mindy
294
+ Candy
295
+ Deana
296
+ Tabitha
297
+ Lara
298
+ Shari
299
+ Cherie
300
+ Angelia
301
+ Ericka
302
+ Jeannie
303
+ Keisha
304
+ Antoinette
305
+ Shelia
306
+ Nina
307
+ Irene
308
+ Desiree
309
+ Bethany
310
+ Alisa
311
+ Lorraine
312
+ Dianna
313
+ Katie
314
+ Marla
315
+ Trisha
316
+ Priscilla
317
+ Shana
318
+ Shelby
319
+ Lydia
320
+ Terry
321
+ Brooke
322
+ Joan
323
+ Bobbi
324
+ Jo
325
+ Cara
326
+ Tammi
327
+ Sherrie
328
+ Latasha
329
+ Angelique
330
+ Wendi
331
+ Darla
332
+ Lee
333
+ Esther
334
+ Ramona
335
+ Audra
336
+ Lorie
337
+ Courtney
338
+ Jacquelyn
339
+ Karin
340
+ Angelica
341
+ Chandra
342
+ Marlene
343
+ Cristina
344
+ Lesley
345
+ Patrice
346
+ Bernadette
347
+ Marisol
348
+ Naomi
349
+ Betsy
350
+ Ruby
351
+ Melisa
352
+ Tamika
353
+ Alexandra
354
+ Tanisha
355
+ Lillian
356
+ Glenda
357
+ Marcie
358
+ Rosemary
359
+ Tisha
360
+ Shanna
361
+ Elisa
362
+ Doris
363
+ Grace
364
+ Nora
365
+ Lana
366
+ Shauna
367
+ Janine
368
+ Amie
369
+ Vicky
370
+ Janelle
371
+ Charity
372
+ Josephine
373
+ Angelina
374
+ Jeannette
375
+ Miriam
376
+ Vivian
377
+ Cecilia
378
+ Marci
379
+ Tania
380
+ Alma
381
+ Constance
382
+ Alisha
383
+ Daphne
384
+ Kenya
385
+ Maribel
386
+ Celeste
387
+ Casey
388
+ Bridgette
389
+ Rebekah
390
+ Lynda
391
+ Dionne
392
+ Faith
393
+ Latanya
394
+ Darcy
395
+ Leanne
396
+ Lorena
397
+ Camille
398
+ Phyllis
399
+ Ladonna
400
+ Arlene
401
+ Marianne
402
+ Jeanine
403
+ Tabatha
404
+ Terra
405
+ Marisa
406
+ Sophia
407
+ Elena
408
+ Paige
409
+ Jami
410
+ Carey
411
+ Dianne
412
+ Edith
413
+ Lena
414
+ Yesenia
415
+ Ingrid
416
+ Pauline
417
+ Paulette
418
+ Laurel
419
+ Guadalupe
420
+ Kimberlee
421
+ Anissa
422
+ Lashawn
423
+ Dora
424
+ Margarita
425
+ Marjorie
426
+ Mona
427
+ Rene
428
+ Emma
429
+ Krystal
430
+ Serena
431
+ Sue
432
+ Michael
433
+ Adriana
434
+ Lea
435
+ Janie
436
+ Meghan
437
+ Shonda
438
+ Annie
439
+ Marcella
440
+ Iris
441
+ Jeannine
442
+ Cathleen
443
+ Georgia
444
+ Doreen
445
+ Lynne
446
+ Francine
447
+ Lucinda
448
+ Irma
449
+ Malinda
450
+ Lucy
451
+ Leann
452
+ Mia
453
+ Lawanda
454
+ Johanna
455
+ Luz
456
+ Latisha
457
+ Amelia
458
+ Patty
459
+ Edna
460
+ June
461
+ Susanne
462
+ Lorrie
463
+ Allyson
464
+ Maryann
465
+ Dolores
466
+ Nadine
467
+ Abigail
468
+ Alexis
469
+ Cari
470
+ Tonja
471
+ Karyn
472
+ Kerrie
473
+ Catrina
474
+ Blanca
475
+ Tera
476
+ Jan
477
+ Karrie
478
+ Ursula
479
+ Liza
480
+ Tia
481
+ Latonia
482
+ Bridgett
483
+ Deanne
484
+ Deena
485
+ Suzette
486
+ Brandie
487
+ Clara
488
+ Susie
489
+ Cassie
490
+ Gena
491
+ Janette
492
+ Myra
493
+ Lashonda
494
+ Olga
495
+ Selena
496
+ Janel
497
+ Gabrielle
498
+ Isabel
499
+ Jocelyn
500
+ Meghan
501
+ Shonda
502
+ Annie
503
+ Marcella
504
+ Iris
505
+ Jeannine
506
+ Cathleen
507
+ Georgia
508
+ Doreen
509
+ Lynne
510
+ Francine
511
+ Lucinda
512
+ Irma
513
+ Malinda
514
+ Lucy
515
+ Leann
516
+ Mia
517
+ Lawanda
518
+ Johanna
519
+ Luz
520
+ Latisha
521
+ Amelia
522
+ Patty
523
+ Edna
524
+ June
525
+ Susanne
526
+ Lorrie
527
+ Allyson
528
+ Maryann
529
+ Dolores
530
+ Nadine
531
+ Abigail
532
+ Alexis
533
+ Cari
534
+ Tonja
535
+ Karyn
536
+ Kerrie
537
+ Catrina
538
+ Blanca
539
+ Tera
540
+ Jan
541
+ Karrie
542
+ Ursula
543
+ Liza
544
+ Tia
545
+ Latonia
546
+ Bridgett
547
+ Deanne
548
+ Deena
549
+ Suzette
550
+ Brandie
551
+ Clara
552
+ Susie
553
+ Cassie
554
+ Gena
555
+ Janette
556
+ Myra
557
+ Lashonda
558
+ Olga
559
+ Selena
560
+ Janel
561
+ Gabrielle
562
+ Isabel
563
+ Jocelyn
564
+ Deirdre