janrandom 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,9 +1,12 @@
1
1
  en-janrain:
2
2
  faker:
3
3
  name:
4
- female_name_common: [Mary, Patricia, Linda, Barbara, Elizabeth, Jennifer, Maria, Susan, Margaret, Dorothy, Lisa, Nancy, Karen, Betty, Helen, Sandra, Donna, Carol, Ruth, Sharon, Michelle, Laura, Sarah, Kimberly, Deborah, Jessica, Shirley, Cynthia, Angela, Melissa, Brenda, Amy, Anna, Rebecca, Virginia, Kathleen, Pamela, Martha, Debra, Amanda, Stephanie, Carolyn, Christine, Marie, Janet, Catherine, Frances, Ann, Joyce, Diane, Alice, Julie, Heather, Teresa, Doris, Gloria, Evelyn, Jean, Cheryl, Mildred, Katherine, Joan, Ashley, Judith, Rose, Janice, Kelly, Nicole, Judy, Christina, Kathy, Theresa, Beverly, Denise, Tammy, Irene, Jane, Lori, Rachel, Marilyn, Andrea, Kathryn, Louise, Sara, Anne, Jacqueline, Wanda, Bonnie, Julia, Ruby, Lois, Tina, Phyllis, Norma, Paula, Diana, Annie, Lillian, Emily, Robin, Peggy, Crystal, Gladys, Rita, Dawn, Connie, Florence, Tracy, Edna, Tiffany, Carmen, Rosa, Cindy, Grace, Wendy, Victoria, Edith, Kim, Sherry, Sylvia, Josephine, Thelma, Shannon, Sheila, Ethel, Ellen, Elaine, Marjorie, Carrie, Charlotte, Monica, Esther, Pauline, Emma, Juanita, Anita, Rhonda, Hazel, Amber, Eva, Debbie, April, Leslie, Clara, Lucille, Jamie, Joanne, Eleanor, Valerie, Danielle, Megan, Alicia, Suzanne, Michele, Gail, Bertha, Darlene, Veronica, Jill, Erin, Geraldine, Lauren, Cathy, Joann, Lorraine, Lynn, Sally, Regina, Erica, Beatrice, Dolores, Bernice, Audrey, Yvonne, Annette, June, Samantha, Marion, Dana, Stacy, Ana, Renee, Ida, Vivian, Roberta, Holly, Brittany, Melanie, Loretta, Yolanda, Jeanette, Laurie, Katie, Kristen, Vanessa, Alma, Sue, Elsie, Beth, Jeanne, Vicki, Carla, Tara, Rosemary, Eileen, Terri, Gertrude, Lucy, Tonya, Ella, Stacey, Wilma, Gina, Kristin, Jessie, Natalie, Agnes, Vera, Willie, Charlene, Bessie, Delores, Melinda, Pearl, Arlene, Maureen, Colleen, Allison, Tamara, Joy, Georgia, Constance, Lillie, Claudia, Jackie, Marcia, Tanya, Nellie, Minnie, Marlene, Heidi, Glenda, Lydia, Viola, Courtney, Marian, Stella, Caroline, Dora, Jo, Vickie, Mattie, Terry, Maxine, Irma, Mabel, Marsha, Myrtle, Lena, Christy, Deanna, Patsy, Hilda, Gwendolyn, Jennie, Nora, Margie, Nina, Cassandra, Leah, Penny, Kay, Priscilla, Naomi, Carole, Brandy, Olga, Billie, Dianne, Tracey, Leona, Jenny, Felicia, Sonia, Miriam, Velma, Becky, Bobbie, Violet, Kristina, Toni, Misty, Mae, Shelly, Daisy, Ramona, Sherri, Erika, Katrina, Claire, Lindsey, Lindsay, Geneva, Guadalupe, Belinda, Margarita, Sheryl, Cora, Faye, Ada, Natasha, Sabrina, Isabel, Marguerite, Hattie, Harriet, Molly, Cecilia, Kristi, Brandi, Blanche, Sandy, Rosie, Joanna, Iris, Eunice, Angie, Inez, Lynda, Madeline, Amelia, Alberta, Genevieve, Monique, Jodi, Janie, Maggie, Kayla, Sonya, Jan, Lee, Kristine, Candace, Fannie, Maryann, Opal, Alison, Yvette, Melody, Luz, Susie, Olivia, Flora, Shelley, Kristy, Mamie, Lula, Lola, Verna, Beulah, Antoinette, Candice, Juana, Jeannette, Pam, Kelli, Hannah, Whitney, Bridget, Karla, Celia, Latoya, Patty, Shelia, Gayle, Della, Vicky, Lynne, Sheri, Marianne, Kara, Jacquelyn, Erma, Blanca, Myra, Leticia, Pat, Krista, Roxanne, Angelica, Johnnie, Robyn, Francisx,]
4
+ female_name_common: [Mary, Patricia, Linda, Barbara, Elizabeth, Jennifer, Maria, Susan, Margaret, Dorothy, Lisa, Nancy, Karen, Betty, Helen, Sandra, Donna, Carol, Ruth, Sharon, Michelle, Laura, Sarah, Kimberly, Deborah, Jessica, Shirley, Cynthia, Angela, Melissa, Brenda, Amy, Anna, Rebecca, Virginia, Kathleen, Pamela, Martha, Debra, Amanda, Stephanie, Carolyn, Christine, Marie, Janet, Catherine, Frances, Ann, Joyce, Diane, Alice, Julie, Heather, Teresa, Doris, Gloria, Evelyn, Jean, Cheryl, Mildred, Katherine, Joan, Ashley, Judith, Rose, Janice, Kelly, Nicole, Judy, Christina, Kathy, Theresa, Beverly, Denise, Tammy, Irene, Jane, Lori, Rachel, Marilyn, Andrea, Kathryn, Louise, Sara, Anne, Jacqueline, Wanda, Bonnie, Julia, Ruby, Lois, Tina, Phyllis, Norma, Paula, Diana, Annie, Lillian, Emily, Robin, Peggy, Crystal, Gladys, Rita, Dawn, Connie, Florence, Tracy, Edna, Tiffany, Carmen, Rosa, Cindy, Grace, Wendy, Victoria, Edith, Kim, Sherry, Sylvia, Josephine, Thelma, Shannon, Sheila, Ethel, Ellen, Elaine, Marjorie, Carrie, Charlotte, Monica, Esther, Pauline, Emma, Juanita, Anita, Rhonda, Hazel, Amber, Eva, Debbie, April, Leslie, Clara, Lucille, Jamie, Joanne, Eleanor, Valerie, Danielle, Megan, Alicia, Suzanne, Michele, Gail, Bertha, Darlene, Veronica, Jill, Erin, Geraldine, Lauren, Cathy, Joann, Lorraine, Lynn, Sally, Regina, Erica, Beatrice, Dolores, Bernice, Audrey, Yvonne, Annette, June, Samantha, Marion, Dana, Stacy, Ana, Renee, Ida, Vivian, Roberta, Holly, Brittany, Melanie, Loretta, Yolanda, Jeanette, Laurie, Katie, Kristen, Vanessa, Alma, Sue, Elsie, Beth, Jeanne, Vicki, Carla, Tara, Rosemary, Eileen, Terri, Gertrude, Lucy, Tonya, Ella, Stacey, Wilma, Gina, Kristin, Jessie, Natalie, Agnes, Vera, Willie, Charlene, Bessie, Delores, Melinda, Pearl, Arlene, Maureen, Colleen, Allison, Tamara, Joy, Georgia, Constance, Lillie, Claudia, Jackie, Marcia, Tanya, Nellie, Minnie, Marlene, Heidi, Glenda, Lydia, Viola, Courtney, Marian, Stella, Caroline, Dora, Jo, Vickie, Mattie, Terry, Maxine, Irma, Mabel, Marsha, Myrtle, Lena, Christy, Deanna, Patsy, Hilda, Gwendolyn, Jennie, Nora, Margie, Nina, Cassandra, Leah, Penny, Kay, Priscilla, Naomi, Carole, Brandy, Olga, Billie, Dianne, Tracey, Leona, Jenny, Felicia, Sonia, Miriam, Velma, Becky, Bobbie, Violet, Kristina, Toni, Misty, Mae, Shelly, Daisy, Ramona, Sherri, Erika, Katrina, Claire, Lindsey, Lindsay, Geneva, Guadalupe, Belinda, Margarita, Sheryl, Cora, Faye, Ada, Natasha, Sabrina, Isabel, Marguerite, Hattie, Harriet, Molly, Cecilia, Kristi, Brandi, Blanche, Sandy, Rosie, Joanna, Iris, Eunice, Angie, Inez, Lynda, Madeline, Amelia, Alberta, Genevieve, Monique, Jodi, Janie, Maggie, Kayla, Sonya, Jan, Lee, Kristine, Candace, Fannie, Maryann, Opal, Alison, Yvette, Melody, Luz, Susie, Olivia, Flora, Shelley, Kristy, Mamie, Lula, Lola, Verna, Beulah, Antoinette, Candice, Juana, Jeannette, Pam, Kelli, Hannah, Whitney, Bridget, Karla, Celia, Latoya, Patty, Shelia, Gayle, Della, Vicky, Lynne, Sheri, Marianne, Kara, Jacquelyn, Erma, Blanca, Myra, Leticia, Pat, Krista, Roxanne, Angelica, Johnnie, Robyn, Francis]
5
5
  male_name_common: [James, John, Robert, Michael, William, David, Richard, Charles, Joseph, Thomas, Christopher, Daniel, Paul, Mark, Donald, George, Kenneth, Steven, Edward, Brian, Ronald, Anthony, Kevin, Jason, Matthew, Gary, Timothy, Jose, Larry, Jeffrey, Frank, Scott, Eric, Stephen, Andrew, Raymond, Gregory, Joshua, Jerry, Dennis, Walter, Patrick, Peter, Harold, Douglas, Henry, Carl, Arthur, Ryan, Roger, Joe, Juan, Jack, Albert, Jonathan, Justin, Terry, Gerald, Keith, Samuel, Willie, Ralph, Lawrence, Nicholas, Roy, Benjamin, Bruce, Brandon, Adam, Harry, Fred, Wayne, Billy, Steve, Louis, Jeremy, Aaron, Randy, Howard, Eugene, Carlos, Russell, Bobby, Victor, Martin, Ernest, Phillip, Todd, Jesse, Craig, Alan, Shawn, Clarence, Sean, Philip, Chris, Johnny, Earl, Jimmy, Antonio, Danny, Bryan, Tony, Luis, Mike, Stanley, Leonard, Nathan, Dale, Manuel, Rodney, Curtis, Norman, Allen, Marvin, Vincent, Glenn, Jeffery, Travis, Jeff, Chad, Jacob, Lee, Melvin, Alfred, Kyle, Francis, Bradley, Jesus, Herbert, Frederick, Ray, Joel, Edwin, Don, Eddie, Ricky, Troy, Randall, Barry, Alexander, Bernard, Mario, Leroy, Francisco, Marcus, Micheal, Theodore, Clifford, Miguel, Oscar, Jay, Jim, Tom, Calvin, Alex, Jon, Ronnie, Bill, Lloyd, Tommy, Leon, Derek, Warren, Darrell, Jerome, Floyd, Leo, Alvin, Tim, Wesley, Gordon, Dean, Greg, Jorge, Dustin, Pedro, Derrick, Dan, Lewis, Zachary, Corey, Herman, Maurice, Vernon, Roberto, Clyde, Glen, Hector, Shane, Ricardo, Sam, Rick, Lester, Brent, Ramon, Charlie, Tyler, Gilbert, Gene, Marc, Reginald, Ruben, Brett, Angel, Nathaniel, Rafael, Leslie, Edgar, Milton, Raul, Ben, Chester, Cecil, Duane, Franklin, Andre, Elmer, Brad, Gabriel, Ron, Mitchell, Roland, Arnold, Harvey, Jared, Adrian, Karl, Cory, Claude, Erik, Darryl, Jamie, Neil, Jessie, Christian, Javier, Fernando, Clinton, Ted, Mathew, Tyrone, Darren, Lonnie, Lance, Cody, Julio, Kelly, Kurt, Allan, Nelson, Guy, Clayton, Hugh, Max, Dwayne, Dwight, Armando, Felix, Jimmie, Everett, Jordan, Ian, Wallace, Ken, Bob, Jaime, Casey, Alfredo, Alberto, Dave, Ivan, Johnnie, Sidney, Byron, Julian, Isaac, Morris, Clifton, Willard, Daryl, Ross, Virgil, Andy, Marshall, Salvador, Perry, Kirk, Sergio, Marion, Tracy, Seth, Kent, Terrance, Rene, Eduardo, Terrence, Enrique, Freddie, Wade]
6
6
  lorem:
7
7
  interests: [aerobics, amusement parks, baking, baseball, bicycling, bird-watching, canoeing, carpentry, cats, coding, cooking, dogs, exercising, fishing, football, gardening, geneology, hang-gliding, hiking, hunting, kayaking, knitting, macrame, model trains, motorcycles, music (performing), parenting, quilting, racing, reading, roller coasters, rowing, running, sailing, scrapbooking, skiing, skydiving, soccer, strategy games, swimming, surfing, tennis, travel, writing, video games]
8
8
  music: ["The Beatles", "Elvis Presley", "Michael Jackson", "Madonna", "Elton John", "Led Zeppelin", "Pink Floyd", "Mariah Carey", "Celine Dion", "Whitney Houston", "AC/DC", "The Rolling Stones", "Queen", "ABBA", "Garth Brooks", "Eagles", "U2", "Billy Joel", "Bruce Springsteen", "Barbra Streisand", "Phil Collins", "Aerosmith", "Frank Sinatra", "Genesis", "Donna Summer", "Neil Diamond", "Bee Gees", "Julio Iglesias", "Dire Straits", "Taylor Swift", "Rihanna", "Metallica", "Eminem", "Britney Spears", "Bon Jovi", "Fleetwood Mac", "Rod Stewart", "Backstreet Boys", "Guns 'N Roses", "Prince", "Kenny Rogers", "Janet Jackson", "Chicago", "The Carpenters", "George Michael", "Def Leppard", "Bob Dylan", "Bryan Adams", "Cher", "Lionel Richie", "Olivia Newton-John", "Linda Ronstadt", "Tina Turner", "Stevie Wonder", "The Beach Boys", "Kiss", "Paul McCartney", "The Who", "Barry White", "Robin Thicke", "Miley Cyrus", "Jay-Z", "Daft Punk", "One Direction", "Bruno Mars", "Selena Gomez", "Maroon 5", "Phillip Phillips", "Justin Timberlake", "Pink", "Blake Shelton", "Darius Rucker", "Jason Aldean", "Keith Urban", "Carrie Underwood", "Train", "Collective Soul", "Pitbull", "Lil Wayne", "The 5th Dimension", "Brad Paisley", "Mumford & Sons", "Kelly Clarkson", "James Blunt", "Drake", "Kanye West", "Zac Brown Band", "Lady Antebellum", "Fun.", "Kid Rock", "Edward Sharpe and the Magnetic Zeros", "Outkast", "White Stripes", "Black Keys", "Sly and the Family Stone", "Beyonce", "Jimi Hendrix", "Christina Aguilera", "Neil Young", "Van Morrison", "Lady Gaga"]
9
9
  movies: ["The Shawshank Redemption", "The Godfather", "The Godfather: Part II", "Pulp Fiction", "The Good, the Bad and the Ugly", "The Dark Knight", "12 Angry Men", "Schindler's List", "The Lord of the Rings: The Return of the King", "Fight Club", "Star Wars: Episode V - The Empire Strikes Back", "The Lord of the Rings: The Fellowship of the Ring", "One Flew Over the Cuckoo's Nest", "Inception", "Goodfellas", "Star Wars", "Seven Samurai", "Forrest Gump", "The Matrix", "The Lord of the Rings: The Two Towers", "City of God", "Se7en", "The Silence of the Lambs", "Once Upon a Time in the West", "Casablanca", "The Usual Suspects", "Raiders of the Lost Ark", "Rear Window", "It's a Wonderful Life", "Psycho", "Léon: The Professional", "Sunset Blvd.", "American History X", "Apocalypse Now", "Terminator 2: Judgment Day", "Memento", "Saving Private Ryan", "City Lights", "Dr. Strangelove or: How I Learned to Stop Worrying and Love the Bomb", "Alien", "Spirited Away", "Modern Times", "North by Northwest", "Back to the Future", "Citizen Kane", "Life Is Beautiful", "The Shining", "The Pianist", "The Departed", "M", "Vertigo", "Django Unchained", "Paths of Glory", "The Dark Knight Rises", "Taxi Driver", "American Beauty", "Aliens", "Double Indemnity", "The Intouchables", "WALL·E", "Gladiator", "The Green Mile", "Toy Story 3", "The Lives of Others", "The Great Dictator", "A Clockwork Orange", "The Prestige", "Amélie", "Lawrence of Arabia", "To Kill a Mockingbird", "Reservoir Dogs", "Das Boot", "Cinema Paradiso", "The Lion King", "The Treasure of the Sierra Madre", "The Third Man", "Requiem for a Dream", "Star Wars: Episode VI - Return of the Jedi", "Once Upon a Time in America", "Eternal Sunshine of the Spotless Mind", "Full Metal Jacket", "Braveheart", "Oldboy", "L.A. Confidential", "Chinatown", "Singin' in the Rain", "Bicycle Thieves", "Monty Python and the Holy Grail", "Some Like It Hot", "Metropolis", "Princess Mononoke", "Rashomon", "Amadeus", "2001: A Space Odyssey", "The Sting", "All About Eve", "The Apartment", "Unforgiven", "Indiana Jones and the Last Crusade", "Grave of the Fireflies", "Witness for the Prosecution", "Raging Bull", "The Bridge on the River Kwai", "Die Hard", "Batman Begins", "A Separation", "Yojimbo", "Inglourious Basterds", "For a Few Dollars More", "Snatch.", "The Great Escape", "Toy Story", "Mr. Smith Goes to Washington", "Up", "Downfall", "Pan's Labyrinth", "On the Waterfront", "The General", "The Seventh Seal", "Heat", "The Elephant Man", "The Maltese Falcon", "The Kid", "Blade Runner", "Scarface", "Wild Strawberries", "Rebecca", "Gran Torino", "Fargo", "Ran", "Ikiru", "The Big Lebowski", "Touch of Evil", "The Gold Rush", "The Deer Hunter", "Cool Hand Luke", "Lock, Stock and Two Smoking Barrels", "It Happened One Night", "No Country for Old Men", "Casino", "Sin City", "The Sixth Sense", "Good Will Hunting", "Strangers on a Train", "Platoon", "Jaws", "The Thing", "Butch Cassidy and the Sundance Kid", "Trainspotting", "The Wizard of Oz", "Kill Bill: Vol. 1", "Warrior", "High Noon", "The Secret in Their Eyes", "Hotel Rwanda", "The Grapes of Wrath", "Gone with the Wind", "Annie Hall", "The Avengers", "My Neighbor Totoro", "Finding Nemo", "V for Vendetta", "Notorious", "Dial M for Murder", "Into the Wild", "How to Train Your Dragon", "Life of Brian", "The Night of the Hunter", "There Will Be Blood", "Network", "The Terminator", "Ben-Hur", "Million Dollar Baby", "The King's Speech", "The Big Sleep", "Stand by Me", "The Hunt", "The Best Years of Our Lives", "Groundhog Day", "The 40 Blows", "Twelve Monkeys", "Mary and Max", "Donnie Darko", "Dog Day Afternoon", "Howl's Moving Castle", "Amores Perros", "The Bourne Ultimatum", "Persona", "Gandhi", "The Killing", "A Beautiful Mind", "Black Swan", "The Graduate", "The Princess Bride", "8½", "Who's Afraid of Virginia Woolf?", "The Hustler", "La Strada", "Rocky", "Star Trek Into Darkness", "Slumdog Millionaire", "Anatomy of a Murder", "The Man Who Shot Liberty Valance", "The Manchurian Candidate", "Rope", "The Exorcist", "The Wild Bunch", "Barry Lyndon", "Life of Pi", "In the Name of the Father", "Stalag 17", "Monsters, Inc.", "Infernal Affairs", "Fanny and Alexander", "Roman Holiday", "Sleuth", "Memories of Murder", "The Truman Show", "Pirates of the Caribbean: The Curse of the Black Pearl", "Stalker", "The Hobbit: An Unexpected Journey", "3 Idiots", "Like Stars on Earth", "Harry Potter and the Deathly Hallows: Part 2", "A Fistful of Dollars", "Star Trek", "Jurassic Park", "Ip Man", "The Artist", "Incendies", "District 9", "Ratatouille", "A Streetcar Named Desire", "La Haine", "Shutter Island", "The Diving Bell and the Butterfly", "Rain Man", "All Quiet on the Western Front", "Beauty and the Beast", "Rosemary's Baby", "Nausicaä of the Valley of the Wind", "Papillon", "Harvey", "Mystic River", "Before Sunrise", "Spring, Summer, Fall, Winter... and Spring", "The Untouchables", "In the Mood for Love", "The Celebration", "Manhattan", "Iron Man 3", "Despicable Me 2", "Man of Steel", "Monsters University", "Fast & Furious 6", "Oz the Great and Powerful", "Star Trek Into Darkness", "World War Z", "The Croods", "The Great Gatsby", "The Heat", "Identity Thief", "G.I. Joe: Retaliation", "Now You See Me", "The Hangover Part III", "Grown Ups 2", "Epic", "Olympus Has Fallen", "This Is The End", "42"]
10
+ books: ["The Adventures of Huckleberry Finn", "The Adventures of Augie March", "All the King's Men", "American Pastoral", "An American Tragedy", "Animal Farm", "Appointment in Samarra", "Are You There God? It's Me, Margaret", "The Assistant", "At Swim-Two-Birds", "Atonement", "Beloved", "The Berlin Stories", "The Big Sleep", "The Blind Assassin", "Blood Meridian", "Brideshead Revisited", "The Bridge of San Luis Rey", "Call It Sleep", "Catch-22", "The Catcher in the Rye", "A Clockwork Orange", "The Confessions of Nat Turner", "The Corrections", "The Crying of Lot 49", "A Dance to the Music of Time", "The Day of the Locust", "Death Comes for the Archbishop", "A Death in the Family", "The Death of the Heart", "Deliverance", "Dog Soldiers", "Falconer", "The French Lieutenant's Woman", "The Golden Notebook", "Go Tell it on the Mountain", "Gone With the Wind", "The Grapes of Wrath", "Gravity's Rainbow", "The Great Gatsby", "A Handful of Dust", "The Heart is A Lonely Hunter", "The Heart of the Matter", "Herzog", "Housekeeping", "A House for Mr. Biswas", "I, Claudius", "Infinite Jest", "Invisible Man", "Light in August", "The Lion, The Witch and the Wardrobe", "Lolita", "Lord of the Flies", "The Lord of the Rings", "The Moviegoer", "Loving", "Lucky Jim", "The Man Who Loved Children", "Midnight's Children", "Money", "Mrs. Dalloway", "Naked Lunch", "Native Son", "Neuromancer", "Never Let Me Go", "1984", "On the Road", "One Flew Over the Cuckoo's Nest", "The Painted Bird", "Pale Fire", "A Passage to India", "Play It As It Lays", "Portnoy's Complaint", "Possession", "The Power and the Glory", "The Prime of Miss Jean Brodie", "Rabbit, Run", "Ragtime", "The Recognitions", "Red Harvest", "Revolutionary Road", "The Sheltering Sky", "Slaughterhouse Five", "Snow Crash", "The Sot-Weed Factor", "The Sound and the Fury", "The Sportswriter", "The Spy Who Came in From the Cold", "The Sun Also Rises", "Their Eyes Were Watching God", "Things Fall Apart", "To Kill a Mockingbird", "To the Lighthouse", "Tropic of Cancer", "Ubik", "Under the Net", "Under the Volcano", "Watchmen", "White Noise", "White Teeth", "Wide Sargasso Sea", "The Cuckoo's Calling", "The English Girl", "Inferno", "And The Mountains Echoed", "Hidden Order", "Light of the World", "Second Honeymoon", "Gone Girl", "The White Princess", "Pulse", "The Silent Wife", "Time for Love", "Bombshell", "Ender's Game", "First Sight", "The Ocean at the End of the Lane", "The Witness", "Fear of Falling", "The Casual Vacancy", "Bad Monkey", "Entwined With You", "Collide", "Fifty Shades of Grey", "One Week Girlfriend", "The Light Between Oceans"]
11
+
12
+ # vi: syntax=no
@@ -0,0 +1,28 @@
1
+ module Faker
2
+ class Base
3
+ class << self
4
+
5
+ def fetch_with_weighting(key)
6
+ fetched = translate("faker.#{key}")
7
+ num = rand(fetched.length) + rand(fetched.length) - fetched.length
8
+ fetched = fetched[num.abs] if fetched.respond_to?(:sample)
9
+ if fetched.match(/^\//) and fetched.match(/\/$/) # A regex
10
+ regexify(fetched)
11
+ else
12
+ fetched
13
+ end
14
+ end
15
+
16
+ def random_in_range( from, to )
17
+ from, to = to, from if to < from
18
+ rand * (to - from ) + from
19
+ end
20
+
21
+ def bell_random_in_range( from, to )
22
+ from, to = to, from if to < from
23
+ ( rand * (to - from ) + rand * (to - from ) ) / 2 + from
24
+ end
25
+
26
+ end
27
+ end
28
+ end
data/lib/janrandom.rb CHANGED
@@ -47,6 +47,9 @@ require 'rest_client'
47
47
  require 'faker'
48
48
  require 'terminal-table'
49
49
 
50
+ require_relative 'faker_custom_methods'
51
+ require_relative 'user_attributes'
52
+
50
53
  class JanRandom < Thor
51
54
  option :verbose, :type => :boolean
52
55
 
@@ -265,111 +268,6 @@ class JanRandom < Thor
265
268
 
266
269
  end
267
270
 
268
- module Faker
269
- class Base
270
- class << self
271
-
272
- def fetch_with_weighting(key)
273
- fetched = translate("faker.#{key}")
274
- num = rand(fetched.length) + rand(fetched.length) - fetched.length
275
- fetched = fetched[num.abs] if fetched.respond_to?(:sample)
276
- if fetched.match(/^\//) and fetched.match(/\/$/) # A regex
277
- regexify(fetched)
278
- else
279
- fetched
280
- end
281
- end
282
-
283
- def random_in_range( from, to )
284
- from, to = to, from if to < from
285
- rand * (to - from ) + from
286
- end
287
-
288
- def bell_random_in_range( from, to )
289
- from, to = to, from if to < from
290
- ( rand * (to - from ) + rand * (to - from ) ) / 2 + from
291
- end
292
-
293
- end
294
- end
295
- end
296
-
297
- class UserAttrs
298
- def initialize
299
- @aboutMe
300
- @birthday
301
- @givenName
302
- @middleName
303
- @displayName
304
- @familyName
305
- @email
306
- @currentLocation
307
- @gender
308
- @interests
309
- @music
310
- @movies
311
- end
312
-
313
- def aboutMe
314
- @aboutMe ||= Faker::Lorem.paragraph
315
- end
316
-
317
- def birthday
318
- now = Time.now().to_i()
319
- d = Faker::Base.bell_random_in_range( now - 13 * 365 * 24 * 3600, now - 60 * 365 * 24 * 3600 )
320
- Time.at(d).strftime('%Y-%m-%d')
321
- end
322
-
323
- def givenName
324
- gender = gender()
325
- @givenName ||= (gender == 'female') ?
326
- Faker::Base.fetch_with_weighting('name.female_name_common')
327
- : Faker::Base.fetch_with_weighting('name.male_name_common')
328
- end
329
-
330
- def middleName
331
- gender = gender()
332
- @middleName ||= (gender == 'female') ?
333
- Faker::Base.fetch_with_weighting('name.female_name_common')
334
- : Faker::Base.fetch_with_weighting('name.male_name_common')
335
- end
336
-
337
- def displayName
338
- @displayName ||= [givenName(),familyName()].join(' ')
339
- end
340
-
341
- def familyName
342
- @familyName ||= Faker::Name.last_name
343
- end
344
-
345
- def email
346
- @email ||= Faker::Internet.email([givenName(),familyName()].join(' '))
347
- end
348
-
349
- def currentLocation
350
- @currentLocation ||= Faker::Address.city + ', ' + Faker::Address.state
351
- end
352
-
353
- def gender
354
- @gender ||= ['male', 'female'].sample
355
- end
356
-
357
- def interests
358
- @interests ||= Random.rand(12).times.map{ Faker::Base.fetch_with_weighting('lorem.interests') }.uniq
359
- end
360
-
361
- def music
362
- @music ||= Random.rand(12).times.map{ Faker::Base.fetch_with_weighting('lorem.music') }.uniq
363
- end
364
-
365
- def movies
366
- @movies ||= Random.rand(12).times.map{ Faker::Base.fetch_with_weighting('lorem.movies') }.uniq
367
- end
368
-
369
- def janRandomGenerated
370
- "Y"
371
- end
372
- end
373
271
 
374
272
  # Create and run the application
375
273
  JanRandom.start(ARGV)
@@ -0,0 +1,81 @@
1
+ class UserAttrs
2
+ def initialize
3
+ @aboutMe
4
+ @birthday
5
+ @givenName
6
+ @middleName
7
+ @displayName
8
+ @familyName
9
+ @email
10
+ @currentLocation
11
+ @gender
12
+ @interests
13
+ @music
14
+ @movies
15
+ @books
16
+ end
17
+
18
+ def aboutMe
19
+ @aboutMe ||= Faker::Lorem.paragraph
20
+ end
21
+
22
+ def birthday
23
+ now = Time.now().to_i()
24
+ d = Faker::Base.bell_random_in_range( now - 13 * 365 * 24 * 3600, now - 60 * 365 * 24 * 3600 )
25
+ Time.at(d).strftime('%Y-%m-%d')
26
+ end
27
+
28
+ def givenName
29
+ gender = gender()
30
+ @givenName ||= (gender == 'female') ?
31
+ Faker::Base.fetch_with_weighting('name.female_name_common')
32
+ : Faker::Base.fetch_with_weighting('name.male_name_common')
33
+ end
34
+
35
+ def middleName
36
+ gender = gender()
37
+ @middleName ||= (gender == 'female') ?
38
+ Faker::Base.fetch_with_weighting('name.female_name_common')
39
+ : Faker::Base.fetch_with_weighting('name.male_name_common')
40
+ end
41
+
42
+ def displayName
43
+ @displayName ||= [givenName(),familyName()].join(' ')
44
+ end
45
+
46
+ def familyName
47
+ @familyName ||= Faker::Name.last_name
48
+ end
49
+
50
+ def email
51
+ @email ||= Faker::Internet.email([givenName(),familyName()].join(' '))
52
+ end
53
+
54
+ def currentLocation
55
+ @currentLocation ||= Faker::Address.city + ', ' + Faker::Address.state
56
+ end
57
+
58
+ def gender
59
+ @gender ||= ['male', 'female'].sample
60
+ end
61
+
62
+ def interests
63
+ @interests ||= Random.rand(12).times.map{ Faker::Base.fetch_with_weighting('lorem.interests') }.uniq
64
+ end
65
+
66
+ def music
67
+ @music ||= Random.rand(12).times.map{ Faker::Base.fetch_with_weighting('lorem.music') }.uniq
68
+ end
69
+
70
+ def movies
71
+ @movies ||= Random.rand(12).times.map{ Faker::Base.fetch_with_weighting('lorem.movies') }.uniq
72
+ end
73
+
74
+ def books
75
+ @books ||= Random.rand(12).times.map{ Faker::Base.fetch_with_weighting('lorem.books') }.uniq
76
+ end
77
+
78
+ def janRandomGenerated
79
+ "Y"
80
+ end
81
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: janrandom
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-14 00:00:00.000000000 Z
12
+ date: 2013-11-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
@@ -100,6 +100,8 @@ extensions: []
100
100
  extra_rdoc_files: []
101
101
  files:
102
102
  - lib/janrandom.rb
103
+ - lib/faker_custom_methods.rb
104
+ - lib/user_attributes.rb
103
105
  - lib/data/en-janrain.yml
104
106
  - bin/janrandom
105
107
  homepage: http://github.com/thanj/janrandom