demode 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ demode-gem
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ ruby-1.9.3-p385
data/Gemfile ADDED
@@ -0,0 +1,15 @@
1
+ source "http://rubygems.org"
2
+ # Add dependencies required to use your gem here.
3
+ # Example:
4
+ # gem "activesupport", ">= 2.3.5"
5
+
6
+ gem 'rest-client'
7
+
8
+ # Add dependencies to develop your gem here.
9
+ # Include everything needed to run rake, tests, features, etc.
10
+ group :development do
11
+ gem "rspec", "~> 2.3.0"
12
+ gem "bundler", "~> 1.0.0"
13
+ gem "jeweler", "~> 1.6.4"
14
+ gem "rcov", ">= 0"
15
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,32 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ diff-lcs (1.1.3)
5
+ git (1.2.5)
6
+ jeweler (1.6.4)
7
+ bundler (~> 1.0)
8
+ git (>= 1.2.5)
9
+ rake
10
+ mime-types (1.17.2)
11
+ rake (0.9.2.2)
12
+ rcov (0.9.11)
13
+ rest-client (1.6.7)
14
+ mime-types (>= 1.16)
15
+ rspec (2.3.0)
16
+ rspec-core (~> 2.3.0)
17
+ rspec-expectations (~> 2.3.0)
18
+ rspec-mocks (~> 2.3.0)
19
+ rspec-core (2.3.1)
20
+ rspec-expectations (2.3.0)
21
+ diff-lcs (~> 1.1.2)
22
+ rspec-mocks (2.3.0)
23
+
24
+ PLATFORMS
25
+ ruby
26
+
27
+ DEPENDENCIES
28
+ bundler (~> 1.0.0)
29
+ jeweler (~> 1.6.4)
30
+ rcov
31
+ rest-client
32
+ rspec (~> 2.3.0)
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2013 Christopher Gooley, Eric Garcia / Preact, Less Neglect Inc.
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.
data/Rakefile ADDED
@@ -0,0 +1,52 @@
1
+ # encoding: utf-8
2
+
3
+ require File.expand_path("../lib/demode/version", __FILE__)
4
+
5
+ require 'rubygems'
6
+ require 'bundler'
7
+ begin
8
+ Bundler.setup(:default, :development)
9
+ rescue Bundler::BundlerError => e
10
+ $stderr.puts e.message
11
+ $stderr.puts "Run `bundle install` to install missing gems"
12
+ exit e.status_code
13
+ end
14
+ require 'rake'
15
+
16
+ require 'jeweler'
17
+ Jeweler::Tasks.new do |gem|
18
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
19
+ gem.name = "demode"
20
+ gem.homepage = "http://github.com/preact/demode"
21
+ gem.license = "MIT"
22
+ gem.summary = "Consistent demo data masking"
23
+ gem.description = "Library to allow you to easily fake data during demos"
24
+ gem.email = "gooley@preact.io"
25
+ gem.authors = ["Christopher Gooley", "Eric Garcia"]
26
+ gem.version = Demode::VERSION
27
+ # dependencies defined in Gemfile
28
+ end
29
+ Jeweler::RubygemsDotOrgTasks.new
30
+
31
+ require 'rspec/core'
32
+ require 'rspec/core/rake_task'
33
+ RSpec::Core::RakeTask.new(:spec) do |spec|
34
+ spec.pattern = FileList['spec/**/*_spec.rb']
35
+ end
36
+
37
+ RSpec::Core::RakeTask.new(:rcov) do |spec|
38
+ spec.pattern = 'spec/**/*_spec.rb'
39
+ spec.rcov = true
40
+ end
41
+
42
+ task :default => :spec
43
+
44
+ require 'rdoc/task'
45
+ Rake::RDocTask.new do |rdoc|
46
+ version = Demode::VERSION
47
+
48
+ rdoc.rdoc_dir = 'rdoc'
49
+ rdoc.title = "demode #{version}"
50
+ rdoc.rdoc_files.include('README*')
51
+ rdoc.rdoc_files.include('lib/**/*.rb')
52
+ end
data/demode.gemspec ADDED
@@ -0,0 +1,69 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "demode"
8
+ s.version = "0.0.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Christopher Gooley", "Eric Garcia"]
12
+ s.date = "2013-06-18"
13
+ s.description = "Library to allow you to easily fake data during demos"
14
+ s.email = "gooley@preact.io"
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt"
17
+ ]
18
+ s.files = [
19
+ ".document",
20
+ ".rspec",
21
+ ".ruby-gemset",
22
+ ".ruby-version",
23
+ "Gemfile",
24
+ "Gemfile.lock",
25
+ "LICENSE.txt",
26
+ "Rakefile",
27
+ "demode.gemspec",
28
+ "lib/demode.rb",
29
+ "lib/demode/configuration.rb",
30
+ "lib/demode/generate.rb",
31
+ "lib/demode/generator/company.rb",
32
+ "lib/demode/generator/fields.rb",
33
+ "lib/demode/generator/person.rb",
34
+ "lib/demode/version.rb",
35
+ "readme.md",
36
+ "spec/demode_spec.rb",
37
+ "spec/spec_helper.rb"
38
+ ]
39
+ s.homepage = "http://github.com/preact/demode"
40
+ s.licenses = ["MIT"]
41
+ s.require_paths = ["lib"]
42
+ s.rubygems_version = "1.8.25"
43
+ s.summary = "Consistent demo data masking"
44
+
45
+ if s.respond_to? :specification_version then
46
+ s.specification_version = 3
47
+
48
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
49
+ s.add_runtime_dependency(%q<rest-client>, [">= 0"])
50
+ s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
51
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
52
+ s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
53
+ s.add_development_dependency(%q<rcov>, [">= 0"])
54
+ else
55
+ s.add_dependency(%q<rest-client>, [">= 0"])
56
+ s.add_dependency(%q<rspec>, ["~> 2.3.0"])
57
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
58
+ s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
59
+ s.add_dependency(%q<rcov>, [">= 0"])
60
+ end
61
+ else
62
+ s.add_dependency(%q<rest-client>, [">= 0"])
63
+ s.add_dependency(%q<rspec>, ["~> 2.3.0"])
64
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
65
+ s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
66
+ s.add_dependency(%q<rcov>, [">= 0"])
67
+ end
68
+ end
69
+
@@ -0,0 +1,49 @@
1
+ require 'demode/version'
2
+
3
+ module Demode
4
+ class Configuration
5
+
6
+ attr_accessor :check_enabled
7
+
8
+ attr_accessor :id_field
9
+ attr_accessor :replacements
10
+
11
+ def initialize
12
+ @check_enabled = nil
13
+ @id_field = :id
14
+ @replacements = []
15
+ end
16
+
17
+ def validate!
18
+ if @replacements && @replacements.count > 0
19
+ @replacements.each do |r|
20
+ raise "Replacement must specify three parameters: class, method to replace, replacement field" if r.count != 3
21
+
22
+ raise "Replacement first param must be a Class: #{r[0]}" if !r[0].is_a?(Class)
23
+ raise "Replacement second param must be a symbol: #{r[1]}" if !r[1].is_a?(Symbol)
24
+ raise "Replacement third param must be a symbol or proc: #{r[2]}" if !r[2].is_a?(Symbol) && !r[2].respond_to?(:call)
25
+
26
+ raise "Unknown replacement field: #{r[2]}" if !Generator.respond_to?(r[2])
27
+ end
28
+ end
29
+
30
+ raise "Must specify a valid symbol for the id_field" if @id_field.nil? || !@id_field.is_a?(Symbol)
31
+
32
+ true
33
+ end
34
+
35
+ def enabled?
36
+ if check_enabled
37
+ if check_enabled.respond_to?(:call)
38
+ return check_enabled.call
39
+ elsif check_enabled.is_a?(Boolean)
40
+ return check_enabled == true
41
+ else
42
+ raise "check_enabled must be callable or boolean"
43
+ end
44
+ end
45
+ false
46
+ end
47
+
48
+ end
49
+ end
@@ -0,0 +1,44 @@
1
+ require 'demode/generator/person'
2
+ require 'demode/generator/company'
3
+ require 'demode/generator/fields'
4
+ require 'digest'
5
+
6
+ module Demode
7
+ module Generate
8
+ class << self
9
+
10
+ def get(id, field)
11
+ if Generator.respond_to? field
12
+ return Generator.send(field, normalize_id(id))
13
+ end
14
+ end
15
+
16
+ def normalize_id(id)
17
+ Digest::MD5.hexdigest( sigflat id ).hex
18
+ end
19
+
20
+ def sigflat(id)
21
+ if id.class == Hash
22
+ arr = []
23
+ id.each do |key, value|
24
+ arr << "#{sigflat key}=>#{sigflat value}"
25
+ end
26
+ id = arr
27
+ end
28
+ if id.class == Array
29
+ str = ''
30
+ id.map! do |value|
31
+ sigflat value
32
+ end.sort!.each do |value|
33
+ str << value
34
+ end
35
+ end
36
+ if id.class != String
37
+ id = id.to_s << id.class.to_s
38
+ end
39
+ id
40
+ end
41
+
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,16 @@
1
+ module Demode
2
+ module Generator
3
+ class << self
4
+
5
+ def company_name(id)
6
+ Fields.get(id,:company_names)
7
+ end
8
+
9
+ def company_domain(id)
10
+ domain_suffix = Fields.get(id,:domain_suffixes)
11
+ [company_name(id).downcase, domain_suffix].join('.')
12
+ end
13
+
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,44 @@
1
+ module Demode
2
+ module Fields
3
+ class << self
4
+
5
+ def get(id,field)
6
+ array = self.send(field)
7
+ array[id % array.size]
8
+ end
9
+
10
+ # person fields
11
+
12
+ def first_names
13
+ %w(Aaliyah Aaron Abagail Abbey Abbie Abbigail Abby Abdiel Abdul Abdullah Abe Abel Abelardo Abigail Abigale Abigayle Abner Abraham Ada Adah Adalberto Adaline Adam Adan Addie Addison Adela Adelbert Adele Adelia Adeline Adell Adella Adelle Aditya Adolf Adolfo Adolph Adolphus Adonis Adrain Adrian Adriana Adrianna Adriel Adrien Adrienne Afton Aglae Agnes Agustin Agustina Ahmad Ahmed Aida Aidan Aiden Aileen Aimee Aisha Aiyana Akeem Al Alaina Alan Alana Alanis Alanna Alayna Alba Albert Alberta Albertha Alberto Albin Albina Alda Alden Alec Aleen Alejandra Alejandrin Alek Alena Alene Alessandra Alessandro Alessia Aletha Alex Alexa Alexander Alexandra Alexandre Alexandrea Alexandria Alexandrine Alexandro Alexane Alexanne Alexie Alexis Alexys Alexzander Alf Alfonso Alfonzo Alford Alfred Alfreda Alfredo Ali Alia Alice Alicia Alisa Alisha Alison Alivia Aliya Aliyah Aliza Alize Allan Allen Allene Allie Allison Ally Alphonso Alta Althea Alva Alvah Alvena Alvera Alverta Alvina Alvis Alyce Alycia Alysa Alysha Alyson Alysson Amalia Amanda Amani Amara Amari Amaya Amber Ambrose Amelia Amelie Amely America Americo Amie Amina Amir Amira Amiya Amos Amparo Amy Amya Ana Anabel Anabelle Anahi Anais Anastacio Anastasia Anderson Andre Andreane Andreanne Andres Andrew Andy Angel Angela Angelica Angelina Angeline Angelita Angelo Angie Angus Anibal Anika Anissa Anita Aniya Aniyah Anjali Anna Annabel Annabell Annabelle Annalise Annamae Annamarie Anne Annetta Annette Annie Ansel Ansley Anthony Antoinette Antone Antonetta Antonette Antonia Antonietta Antonina Antonio Antwan Antwon Anya April Ara Araceli Aracely Arch Archibald Ardella Arden Ardith Arely Ari Ariane Arianna Aric Ariel Arielle Arjun Arlene Arlie Arlo Armand Armando Armani Arnaldo Arne Arno Arnold Arnoldo Arnulfo Aron Art Arthur Arturo Arvel Arvid Arvilla Aryanna Asa Asha Ashlee Ashleigh Ashley Ashly Ashlynn Ashton Ashtyn Asia Assunta Astrid Athena Aubree Aubrey Audie Audra Audreanne Audrey August Augusta Augustine Augustus Aurelia Aurelie Aurelio Aurore Austen Austin Austyn Autumn Ava Avery Avis Axel Ayana Ayden Ayla Aylin Baby Bailee Bailey Barbara Barney Baron Barrett Barry Bart Bartholome Barton Baylee Beatrice Beau Beaulah Bell Bella Belle Ben Benedict Benjamin Bennett Bennie Benny Benton Berenice Bernadette Bernadine Bernard Bernardo Berneice Bernhard Bernice Bernie Berniece Bernita Berry Bert Berta Bertha Bertram Bertrand Beryl Bessie Beth Bethany Bethel Betsy Bette Bettie Betty Bettye Beulah Beverly Bianka Bill Billie Billy Birdie Blair Blaise Blake Blanca Blanche Blaze Bo Bobbie Bobby Bonita Bonnie Boris Boyd Brad Braden Bradford Bradley Bradly Brady Braeden Brain Brandi Brando Brandon Brandt Brandy Brandyn Brannon Branson Brant Braulio Braxton Brayan Breana Breanna Breanne Brenda Brendan Brenden Brendon Brenna Brennan Brennon Brent Bret Brett Bria Brian Briana Brianne Brice Bridget Bridgette Bridie Brielle Brigitte Brionna Brisa Britney Brittany Brock Broderick Brody Brook Brooke Brooklyn Brooks Brown Bruce Bryana Bryce Brycen Bryon Buck Bud Buddy Buford Bulah Burdette Burley Burnice Buster Cade Caden Caesar Caitlyn Cale Caleb Caleigh Cali Calista Callie Camden Cameron Camila Camilla Camille Camren Camron Camryn Camylle Candace Candelario Candice Candida Candido Cara Carey Carissa Carlee Carleton Carley Carli Carlie Carlo Carlos Carlotta Carmel Carmela Carmella Carmelo Carmen Carmine Carol Carolanne Carole Carolina Caroline Carolyn Carolyne Carrie Carroll Carson Carter Cary Casandra Casey Casimer Casimir Casper Cassandra Cassandre Cassidy Cassie Catalina Caterina Catharine Catherine Cathrine Cathryn Cathy Cayla Ceasar Cecelia Cecil Cecile Cecilia Cedrick Celestine Celestino Celia Celine Cesar Chad Chadd Chadrick Chaim Chance Chandler Chanel Chanelle Charity Charlene Charles Charley Charlie Charlotte Chase Chasity Chauncey Chaya Chaz Chelsea Chelsey Chelsie Chesley Chester Chet Cheyanne Cheyenne Chloe Chris Christ Christa Christelle Christian Christiana Christina Christine Christop Christophe Christopher Christy Chyna Ciara Cicero Cielo Cierra Cindy Citlalli Clair Claire Clara Clarabelle Clare Clarissa Clark Claud Claude Claudia Claudie Claudine Clay Clemens Clement Clementina Clementine Clemmie Cleo Cleora Cleta Cletus Cleve Cleveland Clifford Clifton Clint Clinton Clotilde Clovis Cloyd Clyde Coby Cody Colby Cole Coleman Colin Colleen Collin Colt Colten Colton Columbus Concepcion Conner Connie Connor Conor Conrad Constance Constantin Consuelo Cooper Cora Coralie Corbin Cordelia Cordell Cordia Cordie Corene Corine Cornelius Cornell Corrine Cortez Cortney Cory Coty Courtney Coy Craig Crawford Creola Cristal Cristian Cristina Cristobal Cristopher Cruz Crystal Crystel Cullen Curt Curtis Cydney Cynthia Cyril Cyrus Dagmar Dahlia Daija Daisha Daisy Dakota Dale Dallas Dallin Dalton Damaris Dameon Damian Damien Damion Damon Dan Dana Dandre Dane D'angelo Dangelo Danial Daniela Daniella Danielle Danika Dannie Danny Dante Danyka Daphne Daphnee Daphney Darby Daren Darian Dariana Darien Dario Darion Darius Darlene Daron Darrel Darrell Darren Darrick Darrin Darrion Darron Darryl Darwin Daryl Dashawn Dasia Dave David Davin Davion Davon Davonte Dawn Dawson Dax Dayana Dayna Dayne Dayton Dean Deangelo Deanna Deborah Declan Dedric Dedrick Dee Deion Deja Dejah Dejon Dejuan Delaney Delbert Delfina Delia Delilah Dell Della Delmer Delores Delpha Delphia Delphine Delta Demarco Demarcus Demario Demetris Demetrius Demond Dena Denis Dennis Deon Deondre Deontae Deonte Dereck Derek Derick Deron Derrick Deshaun Deshawn Desiree Desmond Dessie Destany Destin Destinee Destiney Destini Destiny Devan Devante Deven Devin Devon Devonte Devyn Dewayne Dewitt Dexter Diamond Diana Dianna Diego Dillan Dillon Dimitri Dina Dino Dion Dixie Dock Dolly Dolores Domenic Domenica Domenick Domenico Domingo Dominic Dominique Don Donald Donato Donavon Donna Donnell Donnie Donny Dora Dorcas Dorian Doris Dorothea Dorothy Dorris Dortha Dorthy Doug Douglas Dovie Doyle Drake Drew Duane Dudley Dulce Duncan Durward Dustin Dusty Dwight Dylan Earl Earlene Earline Earnest Earnestine Easter Easton Ebba Ebony Ed Eda Edd Eddie Eden Edgar Edgardo Edison Edmond Edmund Edna Eduardo Edward Edwardo Edwin Edwina Edyth Edythe Effie Efrain Efren Eileen Einar Eino Eladio Elaina Elbert Elda Eldon Eldora Eldred Eldridge Eleanora Eleanore Eleazar Electa Elena Elenor Elenora Eleonore Elfrieda Eli Elian Eliane Elias Eliezer Elijah Elinor Elinore Elisa Elisabeth Elise Eliseo Elisha Elissa Eliza Elizabeth Ella Ellen Ellie Elliot Elliott Ellis Ellsworth Elmer Elmira Elmo Elmore Elna Elnora Elody Eloisa Eloise Elouise Eloy Elroy Elsa Else Elsie Elta Elton Elva Elvera Elvie Elvis Elwin Elwyn Elyse Elyssa Elza Emanuel Emelia Emelie Emely Emerald Emerson Emery Emie Emil Emile Emilia Emiliano Emilie Emilio Emily Emma Emmalee Emmanuel Emmanuelle Emmet Emmett Emmie Emmitt Emmy Emory Ena Enid Enoch Enola Enos Enrico Enrique Ephraim Era Eriberto Eric Erica Erich Erick Ericka Erik Erika Erin Erling Erna Ernest Ernestina Ernestine Ernesto Ernie Ervin Erwin Eryn Esmeralda Esperanza Esta Esteban Estefania Estel Estell Estella Estelle Estevan Esther Estrella Etha Ethan Ethel Ethelyn Ethyl Ettie Eudora Eugene Eugenia Eula Eulah Eulalia Euna Eunice Eusebio Eva Evalyn Evan Evangeline Evans Eve Eveline Evelyn Everardo Everett Everette Evert Evie Ewald Ewell Ezekiel Ezequiel Ezra Fabian Fabiola Fae Fannie Fanny Fatima Faustino Fausto Favian Fay Faye Federico Felicia Felicita Felicity Felipa Felipe Felix Felton Fermin Fern Fernando Ferne Fidel Filiberto Filomena Finn Fiona Flavie Flavio Fleta Fletcher Flo Florence Florencio Florian Florida Florine Flossie Floy Floyd Ford Forest Forrest Foster Frances Francesca Francesco Francis Francisca Francisco Franco Frank Frankie Franz Fred Freda Freddie Freddy Frederic Frederick Frederik Frederique Fredrick Fredy Freeda Freeman Freida Frida Frieda Friedrich Fritz Furman Gabe Gabriel Gabriella Gabrielle Gaetano Gage Gail Gardner Garett Garfield Garland Garnet Garnett Garret Garrett Garrick Garrison Garry Garth Gaston Gavin Gay Gayle Gaylord Gene General Genesis Genevieve Gennaro Genoveva Geo Geoffrey George Georgette Georgiana Georgianna Geovanni Geovanny Geovany Gerald Geraldine Gerard Gerardo Gerda Gerhard Germaine German Gerry Gerson Gertrude Gia Gianni Gideon Gilbert Gilberto Gilda Giles Gillian Gina Gino Giovani Giovanna Giovanni Giovanny Gisselle Giuseppe Gladyce Gladys Glen Glenda Glenna Glennie Gloria Godfrey Golda Golden Gonzalo Gordon Grace Gracie Graciela Grady Graham Grant Granville Grayce Grayson Green Greg Gregg Gregoria Gregorio Gregory Greta Gretchen Greyson Griffin Grover Guadalupe Gudrun Guido Guillermo Guiseppe Gunnar Gunner Gus Gussie Gust Gustave Guy Gwen Gwendolyn Hadley Hailee Hailey Hailie Hal Haleigh Haley Halie Halle Hallie Hank Hanna Hannah Hans Hardy Harley Harmon Harmony Harold Harrison Harry Harvey Haskell Hassan Hassie Hattie Haven Hayden Haylee Hayley Haylie Hazel Hazle Heath Heather Heaven Heber Hector Heidi Helen Helena Helene Helga Hellen Helmer Heloise Henderson Henri Henriette Henry Herbert Herman Hermann Hermina Herminia Herminio Hershel Herta Hertha Hester Hettie Hilario Hilbert Hilda Hildegard Hillard Hillary Hilma Hilton Hipolito Hiram Hobart Holden Hollie Hollis Holly Hope Horace Horacio Hortense Hosea Houston Howard Howell Hoyt Hubert Hudson Hugh Hulda Humberto Hunter Hyman Ian Ibrahim Icie Ida Idell Idella Ignacio Ignatius Ike Ila Ilene Iliana Ima Imani Imelda Immanuel Imogene Ines Irma Irving Irwin Isaac Isabel Isabell Isabella Isabelle Isac Isadore Isai Isaiah Isaias Isidro Ismael Isobel Isom Israel Issac Itzel Iva Ivah Ivory Ivy Izabella Izaiah Jabari Jace Jacey Jacinthe Jacinto Jack Jackeline Jackie Jacklyn Jackson Jacky Jaclyn Jacquelyn Jacques Jacynthe Jada Jade Jaden Jadon Jadyn Jaeden Jaida Jaiden Jailyn Jaime Jairo Jakayla Jake Jakob Jaleel Jalen Jalon Jalyn Jamaal Jamal Jamar Jamarcus Jamel Jameson Jamey Jamie Jamil Jamir Jamison Jammie Jan Jana Janae Jane Janelle Janessa Janet Janice Janick Janie Janis Janiya Jannie Jany Jaquan Jaquelin Jaqueline Jared Jaren Jarod Jaron Jarred Jarrell Jarret Jarrett Jarrod Jarvis Jasen Jasmin Jason Jasper Jaunita Javier Javon Javonte Jay Jayce Jaycee Jayda Jayde Jayden Jaydon Jaylan Jaylen Jaylin Jaylon Jayme Jayne Jayson Jazlyn Jazmin Jazmyn Jazmyne Jean Jeanette Jeanie Jeanne Jed Jedediah Jedidiah Jeff Jefferey Jeffery Jeffrey Jeffry Jena Jenifer Jennie Jennifer Jennings Jennyfer Jensen Jerad Jerald Jeramie Jeramy Jerel Jeremie Jeremy Jermain Jermaine Jermey Jerod Jerome Jeromy Jerrell Jerrod Jerrold Jerry Jess Jesse Jessica Jessie Jessika Jessy Jessyca Jesus Jett Jettie Jevon Jewel Jewell Jillian Jimmie Jimmy Jo Joan Joana Joanie Joanne Joannie Joanny Joany Joaquin Jocelyn Jodie Jody Joe Joel Joelle Joesph Joey Johan Johann Johanna Johathan John Johnathan Johnathon Johnnie Johnny Johnpaul Johnson Jolie Jon Jonas Jonatan Jonathan Jonathon Jordan Jordane Jordi Jordon Jordy Jordyn Jorge Jose Josefa Josefina Joseph Josephine Josh Joshua Joshuah Josiah Josiane Josianne Josie Josue Jovan Jovani Jovanny Jovany Joy Joyce Juana Juanita Judah Judd Jude Judge Judson Judy Jules Julia Julian Juliana Julianne Julie Julien Juliet Julio Julius June Junior Junius Justen Justice Justina Justine Juston Justus Justyn Juvenal Juwan Kacey Kaci Kacie Kade Kaden Kadin Kaela Kaelyn Kaia Kailee Kailey Kailyn Kaitlin Kaitlyn Kale Kaleb Kaleigh Kaley Kali Kallie Kameron Kamille Kamren Kamron Kamryn Kane Kara Kareem Karelle Karen Kari Kariane Karianne Karina Karine Karl Karlee Karley Karli Karlie Karolann Karson Kasandra Kasey Kassandra Katarina Katelin Katelyn Katelynn Katharina Katherine Katheryn Kathleen Kathlyn Kathryn Kathryne Katlyn Katlynn Katrina Katrine Kattie Kavon Kay Kaya Kaycee Kayden Kayla Kaylah Kaylee Kayleigh Kayley Kayli Kaylie Kaylin Keagan Keanu Keara Keaton Keegan Keeley Keely Keenan Keira Keith Kellen Kelley Kelli Kellie Kelly Kelsi Kelsie Kelton Kelvin Ken Kendall Kendra Kendrick Kenna Kennedi Kennedy Kenneth Kennith Kenny Kenton Kenya Kenyatta Kenyon Keon Keshaun Keshawn Keven Kevin Kevon Keyon Keyshawn Khalid Khalil Kian Kiana Kianna Kiara Kiarra Kiel Kiera Kieran Kiley Kim Kimberly King Kip Kira Kirk Kirsten Kirstin Kitty Kobe Koby Kody Kolby Kole Korbin Korey Kory Kraig Kris Krista Kristian Kristin Kristina Kristofer Kristoffer Kristopher Kristy Krystal Krystel Krystina Kurt Kurtis Kyla Kyle Kylee Kyleigh Kyler Kylie Kyra Lacey Lacy Ladarius Lafayette Laila Laisha Lamar Lambert Lamont Lance Landen Lane Laney Larissa Laron Larry Larue Laura Laurel Lauren Laurence Lauretta Lauriane Laurianne Laurie Laurine Laury Lauryn Lavada Lavern Laverna Laverne Lavina Lavinia Lavon Lavonne Lawrence Lawson Layla Layne Lazaro Lea Leann Leanna Leanne Leatha Leda Lee Leif Leila Leilani Lela Lelah Leland Lelia Lempi Lemuel Lenna Lennie Lenny Lenora Lenore Leo Leola Leon Leonard Leonardo Leone Leonel Leonie Leonor Leonora Leopold Leopoldo Leora Lera Lesley Leslie Lesly Lessie Lester Leta Letha Letitia Levi Lew Lewis Lexi Lexie Lexus Lia Liam Liana Libbie Libby Lila Lilian Liliana Liliane Lilla Lillian Lilliana Lillie Lilly Lily Lilyan Lina Lincoln Linda Lindsay Lindsey Linnea Linnie Linwood Lionel Lisa Lisandro Lisette Litzy Liza Lizeth Lizzie Llewellyn Lloyd Logan Lois Lola Lolita Loma Lon London Lonie Lonnie Lonny Lonzo Lora Loraine Loren Lorena Lorenz Lorenza Lorenzo Lori Lorine Lorna Lottie Lou Louie Louisa Lourdes Louvenia Lowell Loy Loyal Loyce Lucas Luciano Lucie Lucienne Lucile Lucinda Lucio Lucious Lucius Lucy Ludie Ludwig Lue Luella Luigi Luis Luisa Lukas Lula Lulu Luna Lupe Lura Lurline Luther Luz Lyda Lydia Lyla Lynn Lyric Lysanne Mabel Mabelle Mable Mac Macey Maci Macie Mack Mackenzie Macy Madaline Madalyn Maddison Madeline Madelyn Madelynn Madge Madie Madilyn Madisen Madison Madisyn Madonna Madyson Mae Maegan Maeve Mafalda Magali Magdalen Magdalena Maggie Magnolia Magnus Maia Maida Maiya Major Makayla Makenna Makenzie Malachi Malcolm Malika Malinda Mallie Mallory Malvina Mandy Manley Manuel Manuela Mara Marc Marcel Marcelina Marcelino Marcella Marcelle Marcellus Marcelo Marcia Marco Marcos Marcus Margaret Margarete Margarett Margaretta Margarette Margarita Marge Margie Margot Margret Marguerite Maria Mariah Mariam Marian Mariana Mariane Marianna Marianne Mariano Maribel Marie Mariela Marielle Marietta Marilie Marilou Marilyne Marina Mario Marion Marisa Marisol Maritza Marjolaine Marjorie Marjory Mark Markus Marlee Marlen Marlene Marley Marlin Marlon Marques Marquis Marquise Marshall Marta Martin Martina Martine Marty Marvin Mary Maryam Maryjane Maryse Mason Mateo Mathew Mathias Mathilde Matilda Matilde Matt Matteo Mattie Maud Maude Maudie Maureen Maurice Mauricio Maurine Maverick Mavis Max Maxie Maxime Maximilian Maximillia Maximillian Maximo Maximus Maxine Maxwell May Maya Maybell Maybelle Maye Maymie Maynard Mayra Mazie Mckayla Mckenna Mckenzie Meagan Meaghan Meda Megane Meggie Meghan Mekhi Melany Melba Melisa Melissa Mellie Melody Melvin Melvina Melyna Melyssa Mercedes Meredith Merl Merle Merlin Merritt Mertie Mervin Meta Mia Micaela Micah Michael Michaela Michale Micheal Michel Michele Michelle Miguel Mikayla Mike Mikel Milan Miles Milford Miller Millie Milo Milton Mina Minerva Minnie Miracle Mireille Mireya Misael Missouri Misty Mitchel Mitchell Mittie Modesta Modesto Mohamed Mohammad Mohammed Moises Mollie Molly Mona Monica Monique Monroe Monserrat Monserrate Montana Monte Monty Morgan Moriah Morris Mortimer Morton Mose Moses Moshe Mossie Mozell Mozelle Muhammad Muriel Murl Murphy Murray Mustafa Mya Myah Mylene Myles Myra Myriam Myrl Myrna Myron Myrtice Myrtie Myrtis Myrtle Nadia Nakia Name Nannie Naomi Naomie Napoleon Narciso Nash Nasir Nat Natalia Natalie Natasha Nathan Nathanael Nathanial Nathaniel Nathen Nayeli Neal Ned Nedra Neha Neil Nelda Nella Nelle Nellie Nels Nelson Neoma Nestor Nettie Neva Newell Newton Nia Nicholas Nicholaus Nichole Nick Nicklaus Nickolas Nico Nicola Nicolas Nicole Nicolette Nigel Nikita Nikki Nikko Niko Nikolas Nils Nina Noah Noble Noe Noel Noelia Noemi Noemie Noemy Nola Nolan Nona Nora Norbert Norberto Norene Norma Norris Norval Norwood Nova Novella Nya Nyah Nyasia Obie Oceane Ocie Octavia Oda Odell Odessa Odie Ofelia Okey Ola Olaf Ole Olen Oleta Olga Olin Oliver Ollie Oma Omari Omer Ona Onie Opal Ophelia Ora Oral Oran Oren Orie Orin Orion Orland Orlando Orlo Orpha Orrin Orval Orville Osbaldo Osborne Oscar Osvaldo Oswald Oswaldo Otha Otho Otilia Otis Ottilie Ottis Otto Ova Owen Ozella Pablo Paige Palma Pamela Pansy Paolo Paris Parker Pascale Pasquale Pat Patience Patricia Patrick Patsy Pattie Paul Paula Pauline Paxton Payton Pearl Pearlie Pearline Pedro Peggie Penelope Percival Percy Perry Pete Peter Petra Peyton Philip Phoebe Phyllis Pierce Pierre Pietro Pink Pinkie Piper Polly Porter Precious Presley Preston Price Prince Princess Priscilla Providenci Prudence Queen Queenie Quentin Quincy Quinn Quinten Quinton Rachael Rachel Rachelle Rae Raegan Rafael Rafaela Raheem Rahsaan Rahul Raina Raleigh Ralph Ramiro Ramon Ramona Randal Randall Randi Randy Ransom Raoul Raphael Raphaelle Raquel Rashad Rashawn Rasheed Raul Raven Ray Raymond Raymundo Reagan Reanna Reba Rebeca Rebecca Rebeka Rebekah Reece Reed Reese Regan Reggie Reginald Reid Reilly Reina Reinhold Remington Rene Renee Ressie Reta Retha Retta Reuben Reva Rex Rey Reyes Reymundo Reyna Reynold Rhea Rhett Rhianna Rhiannon Rhoda Ricardo Richard Richie Richmond Rick Rickey Rickie Ricky Rico Rigoberto Riley Rita River Robb Robbie Robert Roberta Roberto Robin Robyn Rocio Rocky Rod Roderick Rodger Rodolfo Rodrick Rodrigo Roel Rogelio Roger Rogers Rolando Rollin Roma Romaine Roman Ron Ronaldo Ronny Roosevelt Rory Rosa Rosalee Rosalia Rosalind Rosalinda Rosalyn Rosamond Rosanna Rosario Roscoe Rose Rosella Roselyn Rosemarie Rosemary Rosendo Rosetta Rosie Rosina Roslyn Ross Rossie Rowan Rowena Rowland Roxane Roxanne Roy Royal Royce Rozella Ruben Rubie Ruby Rubye Rudolph Rudy Rupert Russ Russel Russell Rusty Ruth Ruthe Ruthie Ryan Ryann Ryder Rylan Rylee Ryleigh Ryley Sabina Sabrina Sabryna Sadie Sadye Sage Saige Sallie Sally Salma Salvador Salvatore Sam Samanta Samantha Samara Samir Sammie Sammy Samson Sandra Sandrine Sandy Sanford Santa Santiago Santina Santino Santos Sarah Sarai Sarina Sasha Saul Savanah Savanna Savannah Savion Scarlett Schuyler Scot Scottie Scotty Seamus Sean Sebastian Sedrick Selena Selina Selmer Serena Serenity Seth Shad Shaina Shakira Shana Shane Shanel Shanelle Shania Shanie Shaniya Shanna Shannon Shanny Shanon Shany Sharon Shaun Shawn Shawna Shaylee Shayna Shayne Shea Sheila Sheldon Shemar Sheridan Sherman Sherwood Shirley Shyann Shyanne Sibyl Sid Sidney Sienna Sierra Sigmund Sigrid Sigurd Silas Sim Simeon Simone Sincere Sister Skye Skyla Skylar Sofia Soledad Solon Sonia Sonny Sonya Sophia Sophie Spencer Stacey Stacy Stan Stanford Stanley Stanton Stefan Stefanie Stella Stephan Stephania Stephanie Stephany Stephen Stephon Sterling Steve Stevie Stewart Stone Stuart Summer Sunny Susan Susana Susanna Susie Suzanne Sven Syble Sydnee Sydney Sydni Sydnie Sylvan Sylvester Sylvia Tabitha Tad Talia Talon Tamara Tamia Tania Tanner Tanya Tara Taryn Tate Tatum Tatyana Taurean Tavares Taya Taylor Teagan Ted Telly Terence Teresa Terrance Terrell Terrence Terrill Terry Tess Tessie Tevin Thad Thaddeus Thalia Thea Thelma Theo Theodora Theodore Theresa Therese Theresia Theron Thomas Thora Thurman Tia Tiana Tianna Tiara Tierra Tiffany Tillman Timmothy Timmy Timothy Tina Tito Titus Tobin Toby Tod Tom Tomas Tomasa Tommie Toney Toni Tony Torey Torrance Torrey Toy Trace Tracey Tracy Travis Travon Tre Tremaine Tremayne Trent Trenton Tressa Tressie Treva Trever Trevion Trevor Trey Trinity Trisha Tristian Tristin Triston Troy Trudie Trycia Trystan Turner Twila Tyler Tyra Tyree Tyreek Tyrel Tyrell Tyrese Tyrique Tyshawn Tyson Ubaldo Ulices Ulises Una Unique Urban Uriah Uriel Ursula Vada Valentin Valentina Valentine Valerie Vallie Van Vance Vanessa Vaughn Veda Velda Vella Velma Velva Vena Verda Verdie Vergie Verla Verlie Vern Verna Verner Vernice Vernie Vernon Verona Veronica Vesta Vicenta Vicente Vickie Vicky Victor Victoria Vida Vidal Vilma Vince Vincent Vincenza Vincenzo Vinnie Viola Violet Violette Virgie Virgil Virginia Virginie Vita Vito Viva Vivian Viviane Vivianne Vivien Vivienne Vladimir Wade Waino Waldo Walker Wallace Walter Walton Wanda Ward Warren Watson Wava Waylon Wayne Webster Weldon Wellington Wendell Wendy Werner Westley Weston Whitney Wilber Wilbert Wilburn Wiley Wilford Wilfred Wilfredo Wilfrid Wilhelm Wilhelmine Will Willa Willard William Willie Willis Willow Willy Wilma Wilmer Wilson Wilton Winfield Winifred Winnifred Winona Winston Woodrow Wyatt Wyman Xander Xavier Xzavier Yadira Yasmeen Yasmin Yasmine Yazmin Yesenia Yessenia Yolanda Yoshiko Yvette Yvonne Zachariah Zachary Zachery Zack Zackary Zackery Zakary Zander Zane Zaria Zechariah Zelda Zella Zelma Zena Zetta Zion Zita Zoe Zoey Zoie Zoila Zola Zora Zula)
14
+ end
15
+
16
+ def last_names
17
+ %w(Abbott Abernathy Abshire Adams Altenwerth Anderson Ankunding Armstrong Auer Aufderhar Bahringer Bailey Balistreri Barrows Bartell Bartoletti Barton Bashirian Batz Bauch Baumbach Bayer Beahan Beatty Bechtelar Becker Bednar Beer Beier Berge Bergnaum Bergstrom Bernhard Bernier Bins Blanda Blick Block Bode Boehm Bogan Bogisich Borer Bosco Botsford Boyer Boyle Bradtke Brakus Braun Breitenberg Brekke Brown Bruen Buckridge Carroll Carter Cartwright Casper Cassin Champlin Christiansen Cole Collier Collins Conn Connelly Conroy Considine Corkery Cormier Corwin Cremin Crist Crona Cronin Crooks Cruickshank Cummerata Cummings Dach D'Amore Daniel Dare Daugherty Davis Deckow Denesik Dibbert Dickens Dicki Dickinson Dietrich Donnelly Dooley Douglas Doyle DuBuque Durgan Ebert Effertz Eichmann Emard Emmerich Erdman Ernser Fadel Fahey Farrell Fay Feeney Feest Feil Ferry Fisher Flatley Frami Franecki Friesen Fritsch Funk Gaylord Gerhold Gerlach Gibson Gislason Gleason Gleichner Glover Goldner Goodwin Gorczany Gottlieb Goyette Grady Graham Grant Green Greenfelder Greenholt Grimes Gulgowski Gusikowski Gutkowski Gutmann Haag Hackett Hagenes Hahn Haley Halvorson Hamill Hammes Hand Hane Hansen Harber Harris Hartmann Harvey Hauck Hayes Heaney Heathcote Hegmann Heidenreich Heller Herman Hermann Hermiston Herzog Hessel Hettinger Hickle Hilll Hills Hilpert Hintz Hirthe Hodkiewicz Hoeger Homenick Hoppe Howe Howell Hudson Huel Huels Hyatt Jacobi Jacobs Jacobson Jakubowski Jaskolski Jast Jenkins Jerde Jewess Johns Johnson Johnston Jones Kassulke Kautzer Keebler Keeling Kemmer Kerluke Kertzmann Kessler Kiehn Kihn Kilback King Kirlin Klein Kling Klocko Koch Koelpin Koepp Kohler Konopelski Koss Kovacek Kozey Krajcik Kreiger Kris Kshlerin Kub Kuhic Kuhlman Kuhn Kulas Kunde Kunze Kuphal Kutch Kuvalis Labadie Lakin Lang Langosh Langworth Larkin Larson Leannon Lebsack Ledner Leffler Legros Lehner Lemke Lesch Leuschke Lind Lindgren Littel Little Lockman Lowe Lubowitz Lueilwitz Luettgen Lynch Macejkovic Maggio Mann Mante Marks Marquardt Marvin Mayer Mayert McClure McCullough McDermott McGlynn McKenzie McLaughlin Medhurst Mertz Metz Miller Mills Mitchell Moen Mohr Monahan Moore Morar Morissette Mosciski Mraz Mueller Muller Murazik Murphy Murray Nader Nicolas Nienow Nikolaus Nitzsche Nolan Oberbrunner O'Connell O'Conner O'Hara O'Keefe O'Kon Okuneva Olson Ondricka O'Reilly Orn Ortiz Osinski Pacocha Padberg Pagac Parisian Parker Paucek Pfannerstill Pfeffer Pollich Pouros Powlowski Predovic Price Prohaska Prosacco Purdy Quigley Quitzon Rath Ratke Rau Raynor Reichel Reichert Reilly Reinger Rempel Renner Reynolds Rice Rippin Ritchie Robel Roberts Rodriguez Rogahn Rohan Rolfson Romaguera Roob Rosenbaum Rowe Ruecker Runolfsdottir Runolfsson Runte Russel Rutherford Ryan Sanford Satterfield Sauer Sawayn Schaden Schaefer Schamberger Schiller Schimmel Schinner Schmeler Schmidt Schmitt Schneider Schoen Schowalter Schroeder Schulist Schultz Schumm Schuppe Schuster Senger Shanahan Shields Simonis Sipes Skiles Smith Smitham Spencer Spinka Sporer Stamm Stanton Stark Stehr Steuber Stiedemann Stokes Stoltenberg Stracke Streich Stroman Strosin Swaniawski Swift Terry Thiel Thompson Tillman Torp Torphy Towne Toy Trantow Tremblay Treutel Tromp Turcotte Turner Ullrich Upton Vandervort Veum Volkman Von VonRueden Waelchi Walker Walsh Walter Ward Waters Watsica Weber Wehner Weimann Weissnat Welch West White Wiegand Wilderman Wilkinson Will Williamson Willms Windler Wintheiser Wisoky Wisozk Witting Wiza Wolf Wolff Wuckert Wunsch Wyman Yost Yundt Zboncak Zemlak Ziemann Zieme Zulauf)
18
+ end
19
+
20
+ def free_emails
21
+ %w(gmail.com yahoo.com hotmail.com)
22
+ end
23
+
24
+ def username_formats
25
+ [ lambda { |first,last| first.gsub(/\W/, '').downcase },
26
+ lambda { |first,last| first.gsub(/\W/, '').downcase },
27
+ lambda { |first,last| [first,last].map {|n| n.gsub(/\W/, '') }.join('.').downcase },
28
+ lambda { |first,last| [first,last].map {|n| n.gsub(/\W/, '') }.join('_').downcase } ]
29
+ end
30
+
31
+ # account fields
32
+
33
+ def company_names
34
+ %w(Ganzkix Y-plus Sancon Bamstreet Toughfix Zertech Fixcorporation Zotdox Technophase Highmedia Nimelectrics Technofax Zimlab X-zimkix Unazozap Tannix Solzoom Sumhouse Hexdom Howtechno Trustdrill Blackbase Qvo-dox Ronbase Randox Careace Single-dox Quadplanet Technodox Blackfix D-in Ontobam Hotholdings Anrunmedia Zamdexon Ganzdom Street-lux Silgreen Finzarkix Fasezim Lattrans Stanlane Retechi Isdomron Ranking Silverzim Zumcone Stanstreet Hat-job Matace Zapquote Ranlab Bigdrill Key-zim Tampsanity Yearfan Sonredit Quojob Hotlax Alphadax Namcare Techno-texon Kaycode Zendexon Consaolane Solocom Fasecity Openunadex Careex Finzumcare Groovelax Anlux Matredcon Trisplanet Doubletaxon Jobhouse Hotlab Kindox Donglane Treetexon Ishouse Grooveway Zapdrill Anace Dongdex Plus-quote Techity Rankcode Opengreen Kay-holdings Blackware Islux Supertex Plexjoyhow D-can Yearfind Ventola Yearcare Groovetax Zoncane Vilazoom Namsolotone Ton-zap Fasetone Zooholdings Sailzimity Indigolane Hextechno Codezattam Highzoom Finunocane Openzim Fasehex Duoice Flexlux Hexgreen Lexitouch Alphacone Sancon Tran-core Stanlane Ronflex Greenelectronics Donron Namphase Conlane Zumcity True-cone D-hex Canemedia Icephase Zoom-media Codeice Incity Quo-dax Lanedexon Zumis Zuncone Lablex Keytechnology Voltplanet Citycan Lexicon Conecode Haylax Fasesaokix Santechno Blueplanet Tempzocon Rondoron Linetouch Voyacane Donzone Scotin Ontolane Zathplanet Zoogeocity Plexplanet Zathfind Treeice Tresdox Vialatplus Qvodom Labvialam Vilatonin Waretechno Spanzim Damtaxon Techiholdings Freeaning Zummafase Yearhigh Finex Y-electronics Zammedia Stimmedia Acezap Tripplejob Konunatech Quadex Zooplex Linefix Zoomtax Uno-zoom Temptechno Ancan Scotcore Freshnix Lathouse Linebase Tamtinflex Voyatone Can-zim Lamkeyfind Opefan Superis Geosaofax Trisdom Zertamnix Sunjob Faxline Volcan Transfan Qvoron Tamtax Quotelax Ozerline Jobgreen Toughsilin Conlane Vilasailace Saosanline Techitex Canholding Retexon Overron Mathdax Stanlam Gold-drill Goldelectronics Citynix Newcone Duocode Laron Scotcare Movekix Daltkix Ronlane Volcanity Flexzone Howsunhex Yearity Kanholdings Transsunit Doublehex Vilaholding Indigodex Kon-lane Ventofind Tristechno Alphaex Donlax Ventodax Nimstrip Doubledom Tonzatzone Tanranbase Donway Ozerway Dingkix Kinfind Viaranfan Konkhigh Statsailcom Konkity Carelab Requote Canline Trustzoom Mathphase Saltzenin Zimtrax Unolux Temptrax Xxx-media Ontoin Faseis Daltphase Daltace Opentech Hotcon White-tech Indiware Domlane X-it Insailfan Techsiltam Medstrip Ranice Zoomtechi Vaiaelectrics Ozerdom Lamtechnology Betatech Tinholding Planet-how Indigogreen Newelectronics Tampflex Transdex Quadcare Techihigh Unafind Indigolab Inchfind Zath-ron Kayjotone Drillron Dentotrax Donline Sailline Canedax J-planet Overcare Zimtechnology Fasedrill Zoodax Basephase Howfix Lottam Indiit Salttouch Kondom Zon-electronics Tonstreet Latelectronics Ganjafax Saocity Toughron J-ity Plexin Graveace Sumfind Groovela Finbase Freshzim Whitedrill Voltdexon Donfase Scotdrill Ozercorporation Treshottom Trisuninix Newtechnology Saotech Ansilbase Hotity Trandamace Vivamedia Trueis Suntexon Plexlab Tree-is Treeway Zumtom Tamptechno Alphajob Lab-technology Haytraxhex Soloplus Matplex Indigonix Voyaelectrics Hotmedia Toughbase Hotholding E-kix Ozerstrip Singleplanet Stripkix Hotstrip Zonhow Mathcon Lanebam Y-lux Solofase Apzamlab Zun-tech Redsunkix Medron Roundzone Highcore Fasehouse Trustice High-lab Lamplanet Quote-ing Voyaholdings Tampzoom Vaiatexon Highdexon Qvozoex Daltjaylax Treegreen Movetaxon O-dex Golden-trax Voltkix Zumcity Funice Zimelectrics Kinnix Matcane Damfind Stronghouse K-technology J-jaygreen Ronjihex Highdox Ganja-ware Lamhex Fax-care Solholding Singleway Canlotity Zerplanet Ancare Cansontrax Can-job Dam-technology Cityplanet Haydax Drillcorporation Dinghigh Viahouse Hatcity Ronzim Superplex Kayice K-zone U-fase Tontex Nimcity Zoozim Freshtexon Hottrax Silvertaxon Jobcandox Matphase Zammedia Techiing D-dax Soloex Funlane Jobdexon Round-ing Isfind Trans-electrics E-canflex Hayvivatech Zertechi Tinzap Indigoway Howcane Kanway D-fintouch Dongstrip Cityfax Saobase K-biodex Ventoware Redace Opendomkix D-domquote Cityware Beta-lax Fixroning Y-dom Ranlux Daltlab Betahouse Ishouse Gravetex Statcare Danvolin Freenaming Highex Med-dax Tamptex Zotelectrics Icetechi Trusthex Goodzoom Solsilware Gravelux Plus-can Temptrax Tintechno Redtouch Sanozefase Plex-electronics K-quote Flexhex Saltzooron Cancore Lotdexon Templotbam Retax Ganztech Vaiatex Joyfase Runsailplus Apjoyhex Fase-trans Faseholdings Freeelectrics Pluscore Rankzone U-can Trescone Salttexon Hatity Kantrans Sunlax Runcode Damzoom Howtantech Bigflex Mediatexon Whitetech Saltstrip Flextam Linefind Truegreen Scotware Zimcane Hotsanlab Roundcone Viladexon Ontodex Silver-lex Y-planet Singlestrip Lazamtech Lambiocon Canware Bluenix Isfase Overtamcon Hexquote Plustrans Zotlex Villalam Mat-lab Tempzimcom Fasebase Bigtechnology Technolane Code-electronics D-hatlab Silverfind Goldendrill Lattrax Taning Basejob Kintrans Medialax O-trans Mathtrans Kintouch Basetex K-planet Hexdax Zuntechi Ganzdomity Apsuntam Volfind Anron Acedaming Qvomedia Zaam-lane Icedax Toughron Ozercare Transtechnology Zenjob Codedonron Careelectronics Silvertaxon Runtax Spanlab Zimfan Nimcon Gravenix Don-dox Domcity Superzap Roundlab Zenhatcare Transplus Zuntechi Dentoing Careelectrics Zimzim Danbam Translane Don-ity Geobam City-techno Zaamron Zapquadlab Iscare Striphouse Hexhouse Stimron Goldenit Newflex Zimice Apcare Greentechno Haytax Onto-find Tamis Zenhouse Gogocone Zoomron Lexidrill Konktrax Geodom Nimsaolax Flextechnology Conjayis Yearsolotam Keytam Siltom Techin Jaytechi Physfan Funbam Flexzim Linenix Sontanfase Unoplex U-planet Zapsancode J-way D-qvolane Faxzarhigh Icezumity Donquote Dalt-tam Dongcore Gogocan Singlelane Runsilzap Newmatfind J-can Zerholding Superdexon Trantaxon Ganztex Dentoace Lattone Movesildom Trantriptax Jobtexon Zathkayit J-ace Hatware Planethigh Greenhow Y-code Streetzone Donguniice Trancon Stripace Soltam U-lane Connix Trueflex Roundlux Quadway Voltex Zenmatware Pluselectronics Quotecan Dongla Gravenix Donelectrics J-tax Canesancom Kayfan Zerlab Ganztrax Faxlam D-code Saocone Keylex Newplanet Laneelectrics Quadex Zaamtrax Singleron Domplanet Canefind Trantech Fasesilex Jobnamtech Tristechi Lamcore Tempphase Zunnamline Damzim Vivatom Whiteelectronics Volt-dox Toughflex Greentechnology Kinsunhex Itcorporation Codetone Gogotom Zathtechi Ozer-nix Zamplus Sondom Finphase Biostreet Vilaelectrics Quaddom Saillane Greentax Fixtrax Zummais Doncorporation Hothouse Silquotech Streetfase Apelectrics Flexjayity Dripstreet Donis Stanway X-fix Namquote Kanfind Volzim Goldholding Strongcane Sailelectrics Stimstrip Hay-lane Gold-lux Tamp-lane Plex-lam E-com Tamlex O-high K-quadzim Tempzone Citytom Strongtex Anplex Unatech Domjifix Triomatlab Unoquote Lane-lane Linehow Biotom Icesaildex Villabam Lotelectronics Solozone Viaelectronics Ranfase Danplex Zapzone Movetechi Inditechnology Truenix Hotquadzoom Mattam Zapdex Sailcare Biotech Techtam Triotexon Transtechi Carecorporation Linedamfan San-zoom E-lam Contex Siltinline Haylex Overla Lotcity Zamlux Voyakeydex Physstreet Ranvivakix Kayjob Goldendox Hotfase Fixdexon Silvercorporation Citybam Donglex Kontax Solodonfix How-con Linekix Hexdom Itphase Redelectrics Flextom Hatzap Saltron Dripgreen Tran-media Stripis Faxhow Voyatom Openholding Villabam Lanetrans Tranhigh Strongace Doubledrill Blacktexon Keyjob Lattexon Zooozelab Inchstrip Zensanlane Latcorporation Moveace Dentoron Hayfan Dandax Spanlux Domline Bluetouch Opecom Ran-zoom Blacktechnology Zot-city Jobtechno Bighotfind Joycare Zoomline Trioplus Movetouch Dentolax Tampphase Lot-lane Yeartam Zumdex Toughit Gravecom Findrill Saotexon Opequote Overcon Betamedia Jobkeyhex Zummaplex Viadexon Latam Freebase Icetam Techifan Hatcone K-lax Tanity Lanestrip Planetace Scottamfix Haytechi U-taxon Jayway Toncorporation Ganjalab Transtreet J-how Stanflex Inchmedia Basecone Warefix Finfix Unizap Goodcode Lexiplus Tempplex Icezatla Duotom Viastrip Bamunaway Jay-dexon Basegreen Graveplanet Big-corporation Zammedia Labquote Tonway Zoom-phase Zon-kix Key-trax Ventotom Zimdrill Sundex Matlux Transcon Villagreen Striping Zonunodox Kinquote Zimla Damtech Dripgreen Medstreet Ganzhex Technotax Tintechnology Coneice Techtom Joystrip Trisnix Inch-holdings Stathotdom X-cane Tamtexon Zoomcane Zamdexon Freecan Vila-zone Donfan Goldfind Inzoom Plextrans Vaiastreet Dalttex K-electrics Transhouse Vivalane Unophase U-zoom Techicorporation Vaiahow Zimlex Zamdax Ranlab Y-high Lanetexon Dongcan Donzoomnix Drill-bam Alphacare Damla Runtechnology Dom-kix Labelectrics Plushow Unoplanet Dongtech Damelectrics Tranzoolex Hot-planet Kayice Planetphase Tempzim Hatlax Inditaxon Silverdrill Treszumfax Anholdings)
35
+ end
36
+
37
+ def domain_suffixes
38
+ %w(com com com com com com co.uk net uk ca biz io org)
39
+ end
40
+
41
+
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,26 @@
1
+ module Demode
2
+ module Generator
3
+ class << self
4
+
5
+ def name(id)
6
+ first_name = Fields.get(id,:first_names)
7
+ last_name = Fields.get(id,:last_names)
8
+ [first_name, last_name].join(' ')
9
+ end
10
+
11
+ def email(id)
12
+ prefix = username(id)
13
+ suffix = Fields.get(id,:free_emails)
14
+ [prefix, suffix].join('@')
15
+ end
16
+
17
+ def username(id)
18
+ format = Fields.get(id,:username_formats)
19
+ first_name = Fields.get(id,:first_names)
20
+ last_name = Fields.get(id,:last_names)
21
+ format.call(first_name,last_name)
22
+ end
23
+
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,3 @@
1
+ module Demode
2
+ VERSION = "0.0.1"
3
+ end
data/lib/demode.rb ADDED
@@ -0,0 +1,41 @@
1
+ require 'demode/configuration'
2
+
3
+ require 'demode/generate'
4
+
5
+ module Demode
6
+
7
+ class << self
8
+ # A configuration object. Must like a hash and return sensible values for all
9
+ # configuration options. See Demode::Configuration
10
+ attr_accessor :configuration
11
+
12
+ # Call this method to modify the configuration in your initializers
13
+ def configure
14
+ self.configuration ||= Configuration.new
15
+
16
+ yield(configuration) if block_given?
17
+
18
+ configuration.validate!
19
+
20
+ setup if configuration.enabled?
21
+ end
22
+
23
+ def setup
24
+ id_field = self.configuration.id_field
25
+ self.configuration.replacements.each do |klass, method, replacement|
26
+
27
+ # alias the method we're about to replace
28
+ replaced_method = "_old_#{method}".to_sym
29
+ klass.send(:alias_method, replaced_method, method)
30
+
31
+ # replace the method with a call to our generator
32
+ klass.send(:define_method, method) do
33
+ id = self.send(id_field)
34
+ Demode::Generate.get(id, replacement)
35
+ end
36
+
37
+ end
38
+ end
39
+
40
+ end
41
+ end
data/readme.md ADDED
@@ -0,0 +1,59 @@
1
+ Demode Gem
2
+ ===
3
+ Allow your app to easily display fake, consistant data from your models when in demo mode.
4
+
5
+ Randomness inspired by the faker gem (https://github.com/btelles/faker).
6
+
7
+ Installation
8
+ ---
9
+
10
+ In your Gemfile:
11
+
12
+ ```ruby
13
+ gem 'demode'
14
+ ```
15
+
16
+ Configuration
17
+ ---
18
+
19
+ Configure Demode to define which fields on your models should be replaced with fake data. This probably should go in `demode.rb` in your initializers folder.
20
+
21
+ ```ruby
22
+ Demode.configure do |config|
23
+
24
+ config.check_enabled = Rails.env.development?
25
+
26
+ config.replacements = [
27
+ [ Person, :name, :name ],
28
+ [ Person, :email, :email ],
29
+ [ Account, :name, :company_name ]
30
+ ]
31
+
32
+ end
33
+ ```
34
+
35
+ You should provide an array of Class, method to replace, random generation method for each method on each class that you'd like to mask.
36
+
37
+ License
38
+ ---
39
+
40
+ Permission is hereby granted, free of charge, to any person obtaining
41
+ a copy of this software and associated documentation files (the
42
+ "Software"), to deal in the Software without restriction, including
43
+ without limitation the rights to use, copy, modify, merge, publish,
44
+ distribute, sublicense, and/or sell copies of the Software, and to
45
+ permit persons to whom the Software is furnished to do so, subject to
46
+ the following conditions:
47
+
48
+ The above copyright notice and this permission notice shall be
49
+ included in all copies or substantial portions of the Software.
50
+
51
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
52
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
53
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
54
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
55
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
56
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
57
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
58
+
59
+ Copyright (c) 2013 Christopher Gooley & Eric Garcia, Preact / Less Neglect, Inc. See LICENSE.txt for further details.
@@ -0,0 +1,7 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe "Demode" do
4
+ it "fails" do
5
+ #fail "hey buddy, you should probably rename this file and start specing for real"
6
+ end
7
+ end
@@ -0,0 +1,12 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
3
+ require 'rspec'
4
+ require 'demode'
5
+
6
+ # Requires supporting files with custom matchers and macros, etc,
7
+ # in ./support/ and its subdirectories.
8
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
9
+
10
+ RSpec.configure do |config|
11
+
12
+ end
metadata ADDED
@@ -0,0 +1,149 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: demode
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Christopher Gooley
9
+ - Eric Garcia
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2013-06-18 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rest-client
17
+ requirement: !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: '0'
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ! '>='
29
+ - !ruby/object:Gem::Version
30
+ version: '0'
31
+ - !ruby/object:Gem::Dependency
32
+ name: rspec
33
+ requirement: !ruby/object:Gem::Requirement
34
+ none: false
35
+ requirements:
36
+ - - ~>
37
+ - !ruby/object:Gem::Version
38
+ version: 2.3.0
39
+ type: :development
40
+ prerelease: false
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ~>
45
+ - !ruby/object:Gem::Version
46
+ version: 2.3.0
47
+ - !ruby/object:Gem::Dependency
48
+ name: bundler
49
+ requirement: !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 1.0.0
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ none: false
59
+ requirements:
60
+ - - ~>
61
+ - !ruby/object:Gem::Version
62
+ version: 1.0.0
63
+ - !ruby/object:Gem::Dependency
64
+ name: jeweler
65
+ requirement: !ruby/object:Gem::Requirement
66
+ none: false
67
+ requirements:
68
+ - - ~>
69
+ - !ruby/object:Gem::Version
70
+ version: 1.6.4
71
+ type: :development
72
+ prerelease: false
73
+ version_requirements: !ruby/object:Gem::Requirement
74
+ none: false
75
+ requirements:
76
+ - - ~>
77
+ - !ruby/object:Gem::Version
78
+ version: 1.6.4
79
+ - !ruby/object:Gem::Dependency
80
+ name: rcov
81
+ requirement: !ruby/object:Gem::Requirement
82
+ none: false
83
+ requirements:
84
+ - - ! '>='
85
+ - !ruby/object:Gem::Version
86
+ version: '0'
87
+ type: :development
88
+ prerelease: false
89
+ version_requirements: !ruby/object:Gem::Requirement
90
+ none: false
91
+ requirements:
92
+ - - ! '>='
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
95
+ description: Library to allow you to easily fake data during demos
96
+ email: gooley@preact.io
97
+ executables: []
98
+ extensions: []
99
+ extra_rdoc_files:
100
+ - LICENSE.txt
101
+ files:
102
+ - .document
103
+ - .rspec
104
+ - .ruby-gemset
105
+ - .ruby-version
106
+ - Gemfile
107
+ - Gemfile.lock
108
+ - LICENSE.txt
109
+ - Rakefile
110
+ - demode.gemspec
111
+ - lib/demode.rb
112
+ - lib/demode/configuration.rb
113
+ - lib/demode/generate.rb
114
+ - lib/demode/generator/company.rb
115
+ - lib/demode/generator/fields.rb
116
+ - lib/demode/generator/person.rb
117
+ - lib/demode/version.rb
118
+ - readme.md
119
+ - spec/demode_spec.rb
120
+ - spec/spec_helper.rb
121
+ homepage: http://github.com/preact/demode
122
+ licenses:
123
+ - MIT
124
+ post_install_message:
125
+ rdoc_options: []
126
+ require_paths:
127
+ - lib
128
+ required_ruby_version: !ruby/object:Gem::Requirement
129
+ none: false
130
+ requirements:
131
+ - - ! '>='
132
+ - !ruby/object:Gem::Version
133
+ version: '0'
134
+ segments:
135
+ - 0
136
+ hash: 3326504334897834967
137
+ required_rubygems_version: !ruby/object:Gem::Requirement
138
+ none: false
139
+ requirements:
140
+ - - ! '>='
141
+ - !ruby/object:Gem::Version
142
+ version: '0'
143
+ requirements: []
144
+ rubyforge_project:
145
+ rubygems_version: 1.8.25
146
+ signing_key:
147
+ specification_version: 3
148
+ summary: Consistent demo data masking
149
+ test_files: []