diff --git a/doc/unreleased/music/show.md b/doc/unreleased/music/show.md new file mode 100644 index 0000000000..f9aa688380 --- /dev/null +++ b/doc/unreleased/music/show.md @@ -0,0 +1,7 @@ +# Faker::Music::Show + +```ruby +Faker::Music::Show.adult_musical # => "West Side Story" +Faker::Music::Show.kids_musical # => "Into the Woods JR." +Faker::Music::Show.play # => "Death of a Salesman" +``` diff --git a/lib/faker/music/show.rb b/lib/faker/music/show.rb new file mode 100644 index 0000000000..4498875844 --- /dev/null +++ b/lib/faker/music/show.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +module Faker + class Show < Base + class << self + ## + # Produces the name of a musical for an older audience + # + # @return [String] + # + # @example + # Faker::Alphanumeric.alpha + # #=> "West Side Story" + # + # @faker.version next + def adult_musical + fetch('show.adult_musical') + end + + ## + # Produces the name of a musical for a younger audience + # + # @return [String] + # + # @example + # Faker::Alphanumeric.alpha + # #=> "Into the Woods JR." + # + # @faker.version next + def kids_musical + fetch('show.kids_musical') + end + + ## + # Produces the name of a play + # + # @return [String] + # + # @example + # Faker::Alphanumeric.alpha + # #=> "Death of a Salesman" + # + # @faker.version next + def play + fetch('show.play') + end + end + end +end diff --git a/lib/locales/en/show.yml b/lib/locales/en/show.yml new file mode 100644 index 0000000000..027067bfb8 --- /dev/null +++ b/lib/locales/en/show.yml @@ -0,0 +1,597 @@ +en: + faker: + show: + adult_musical: + - "Elton John and Tim Rice's Aida" + - "Ain't Misbehavin'" + - "Aladdin (Prince Street Players Version)" + - "Disney's Aladdin Dual Language Edition" + - "Alice in Wonderland (Prince Street Players Version)" + - "All in Love" + - "The All Night Strut!" + - "The All Night Strut! A Jumpin' Jivin' Jam" + - "Amen Corner" + - "Green Day's American Idiot" + - "Annabelle Broom, The Unhappy Witch" + - "Anne of Green Gables" + - "Annie" + - "Annie Warbucks" + - "The Ant and the Elephant" + - "Anyone Can Whistle" + - "The Apple Tree" + - "Archy & Mehitabel" + - "Assassins" + - "Avenue Q" + - "Baby" + - "Back to the 80's" + - "The Baker's Wife" + - "Band Geeks" + - "Band Geeks-Expanded Cast Version" + - "Disney's Beauty and the Beast" + - "Bendigo Boswell" + - "Berlin to Broadway with Kurt Weill A Musical Voyage" + - "Big The Musical" + - "Billy Elliot The Musical" + - "Birds of Paradise" + - "Blame It on the Movies!" + - "Bloody Bloody Andrew Jackson" + - "Blues in the Night" + - "Bonnie & Clyde" + - "Sandy Wilson's The Boy Friend" + - "Brandon Finds His Star" + - "The Bridges of Madison County" + - "Brigadoon" + - "Bring in the Morning" + - "Bring It On The Musical" + - "Bugsy Malone" + - "Bullets over Broadway The Musical" + - "The Burnt Part Boys" + - "By the Beautiful Sea" + - "Camelot" + - "Disney's Camp Rock: The Musical" + - "Candide (1974 Version)" + - "Candide (1999 Version)" + - "Canterbury Tales" + - "Captain Stirrick" + - "Caroline, or Change" + - "Dr. Seuss's The Cat in the Hat" + - "Catch Me If You Can" + - "Celebration" + - "A Charles Dickens Christmas" + - "Children of Eden" + - "Chitty Chitty Bang Bang" + - "A Christmas Carol (Broadway Version)" + - "The Christmas Schooner" + - "Cinderella (Prince Street Players Version)" + - "The Civil War" + - "Maltby and Shire's Closer Than Ever" + - "Colette Collage" + - "Come from Away" + - "Company" + - "Barry Manilow's Copacabana" + - "Cry-Baby" + - "Cyrano" + - "Daddy Long Legs" + - "Damn Yankees" + - "The Day Before Spring" + - "Dear Edwina" + - "Dessa Rose" + - "Dirty Rotten Scoundrels" + - "Disaster!" + - "Disco Inferno" + - "Divorce Me, Darling!" + - "Do You Wanna Dance?" + - "Doctor Dolittle" + - "Dogfight" + - "Downriver" + - "Dracula The Musical" + - "Drake" + - "The Drowsy Chaperone" + - "The Drunkard" + - "Edges" + - "Elephant & Piggie's 'We Are in a Play!'" + - "Elf The Musical" + - "The Emperor's New Clothes (Ahrens & Flaherty's)" + - "The Emperor's New Clothes (Prince Street Players Version)" + - "Ernest in Love" + - "Eubie!" + - "Fame The Musical" + - "A Family Affair" + - "The Fantasticks" + - "Fiddler on the Roof" + - "Fiorello!" + - "Five Guys Named Moe" + - "The Fix" + - "Follies" + - "Follies (Concert Version)" + - "Footprints on the Moon" + - "Forever Plaid" + - "Forever Plaid: Plaid Tidings" + - "4 Guys Named Jose... and una Mujer Named Maria" + - "Frankly Ben" + - "Freaky Friday" + - "Freckleface Strawberry The Musical" + - "Freckleface Strawberry The Musical (Expanded Version)" + - "Freedom Train" + - "The Frogs" + - "The Full Monty" + - "A Funny Thing Happened on the Way to the Forum" + - "The Game of Love" + - "A Gentleman's Guide to Love and Murder" + - "The Glorious Ones" + - "Kurt Vonnegut's God Bless You, Mr. Rosewater" + - "Godspell" + - "Godspell 2012" + - "Goldilocks and the Three Bears" + - "The Goodbye Girl" + - "Grand Hotel: The Musical" + - "Greenwillow" + - "Guys and Dolls" + - "Guys and Dolls (Concert Version)" + - "Hairspray" + - "Harry Connick, Jr.'s The Happy Elf" + - "Happy Hunting" + - "Heidi" + - "Hello! My Baby" + - "Disney's High School Musical 2" + - "Disney's High School Musical 2 (One-Act Version)" + - "Disney's High School Musical" + - "Disney's High School Musical (One-Act Version)" + - "Honeymoon in Vegas" + - "Honk!" + - "Hot Mikado" + - "How to Succeed in Business without Really Trying" + - "The Hunchback of Notre Dame" + - "I Do! I Do!" + - "I Do! I Do! I Do! I Do!" + - "If/Then" + - "In the Beginning" + - "Into the Woods" + - "It Shoulda Been You" + - "Jack & the Beanstalk (Prince Street Players Version)" + - "Jack Spratt, VC" + - "Roald Dahl's James and the Giant Peach" + - "Jane Eyre" + - "Jekyll & Hyde" + - "Jekyll and Hyde (Youth Version)" + - "John & Jen" + - "Junie B. Jones, The Musical" + - "Just So" + - "Kean" + - "Kinky Boots" + - "Kismet" + - "Knuffle Bunny: A Cautionary Musical" + - "Lady Audley's Secret" + - "The Last Five Years" + - "Leap of Faith" + - "Legally Blonde The Musical" + - "Les Misérables" + - "Les Petits Rats" + - "Let 'Em Eat Cake" + - "Let 'Em Eat Cake (Concert Version)" + - "Disney's The Little Mermaid" + - "Little Miss Sunshine" + - "A Little Night Music" + - "A Little Princess" + - "Little Shop of Horrors" + - "Little Women" + - "Loserville" + - "Love's Labour's Lost" + - "Loving Repeating" + - "Lucky in the Rain" + - "Lucky Stiff" + - "Magdalena" + - "The Main Street Kids' Club: A MathStart Musical" + - "Make Me a Song: The Music of William Finn" + - "Mamma Mia!" + - "A Man of No Importance" + - "Marry Me a Little" + - "Disney and Cameron Mackintosh's Mary Poppins" + - "Roald Dahl's Matilda The Musical" + - "Merrily We Roll Along" + - "Meredith Willson's Miracle on 34th Street The Musical" + - "Mirette" + - "Miss Saigon" + - "Miss Saigon School Edition" + - "Moby Dick! The Musical" + - "The Most Happy Fella" + - "The Adventures of Mr. Toad" + - "Murder Ballad" + - "The Music Man" + - "The Music Man (Concert Version)" + - "My Fair Lady" + - "My Favorite Year" + - "Disney's My Son Pinocchio: Geppetto's Musical Tale" + - "New Girl in Town" + - "Newsies" + - "Next to Normal" + - "9 to 5 The Musical" + - "The No-Frills Revue" + - "Of Thee I Sing" + - "Of Thee I Sing (Concert Version)" + - "Oh, Coward!" + - "Oil City Symphony" + - "Oliver!" + - "Once" + - "Once on This Island" + - "Pacific Overtures" + - "Paint Your Wagon " + - "The Pajama Game" + - "Parade" + - "Passion" + - "Peter and the Starcatcher" + - "Peter Pan (1954 Broadway Version)" + - "Phantom of the Country Opera" + - "The Phantom Tollbooth" + - "Philemon" + - "Pinocchio (Prince Street Players Version)" + - "Pippin" + - "The Pirates of Penzance" + - "A Pocketful of Rhymes (Prince Street Players Version)" + - "Portable Pioneer and Prairie Show" + - "The Prince and the Pauper" + - "The Producers" + - "Putting It Together (1993 MTC Version)" + - "Putting It Together (1999 Broadway Version)" + - "Quilt, A Musical Celebration" + - "The Ragged Child" + - "Ragtime (Version 1)" + - "Ragtime (Version 2)" + - "Ragtime School Edition" + - "Rapunzel" + - "Red Hot and Cole" + - "Redhead" + - "Rent" + - "Rent School Edition" + - "Riverwind" + - "Road Show" + - "Roadside" + - "The Robber Bridegroom" + - "Rock Nativity" + - "The Roman Invasion of Ramsbottom" + - "The Rothschilds" + - "Salvation" + - "Saturday Night" + - "Schoolhouse Rock Live Too!" + - "Schoolhouse Rock Live!" + - "The Scottsboro Boys" + - "Scrooge, The Stingiest Man in Town" + - "Secrets Every Smart Traveler Should Know" + - "Seussical" + - "Seven Brides for Seven Brothers" + - "1776" + - "She Loves Me" + - "SHOUT! The Mod Musical" + - "Showtune: Celebrating the Words & Music of Jerry Herman" + - "Shrek The Musical" + - "Side by Side by Sondheim" + - "Singin' in the Rain" + - "Sister Act" + - "Six Women with Brain Death or Expiring Minds Want to Know " + - "Sleeping Beauty (Prince Street Players Version)" + - "Smike" + - "Snapshots: A Musical Scrapbook" + - "Snow White Goes West (Prince Street Players Version)" + - "Snow White, Rose Red (and Fred)" + - "Something Rotten!" + - "Sondheim on Sondheim" + - "Songs for a New World" + - "The Sound of Plaid: The Glee Club Version of Forever Plaid" + - "Spring Awakening" + - "Starting Here, Starting Now" + - "The Story of My Life" + - "Strike up the Band" + - "Strike up the Band (Concert Version)" + - "Sunday in the Park with George" + - "Sweeney Todd" + - "Sweeney Todd School Edition" + - "Talent Springs Eternal - Fame Forever" + - "Tarzan" + - "Teddy & Alice" + - "Tenderloin" + - "The Theory of Relativity" + - "13" + - "The Thirteen Clocks" + - "13 Daughters" + - "Thoroughly Modern Millie" + - "The Three Little Pigs" + - "Tick, Tick... Boom!" + - "Timbuktu!" + - "Tin Pan Ali" + - "Tintypes" + - "The Adventures of Tom Sawyer" + - "Tomfoolery" + - "The Who's Tommy" + - "The Toxic Avenger" + - "Treasure Island (Prince Street Players Version)" + - "Triumph of Love" + - "The 25th Annual Putnam County Spelling Bee" + - "The Unsinkable Molly Brown" + - "Urinetown" + - "The Velveteen Rabbit" + - "Violet" + - "The Wedding Singer" + - "West Side Story" + - "Western Star" + - "What about Luv?" + - "When the Cookie Crumbles, You Can Still Pick up the Pieces " + - "Where's Charley?" + - "Andrew Lippa's Wild Party" + - "Wildcat on Safari" + - "Roald Dahl's Willy Wonka" + - "Wish You Were Here" + - "Witches of Eastwick" + - "The Wizard of Oz (Prince Street Players Version)" + - "Women on the Verge of a Nervous Breakdown" + - "Wonderland High" + - "Working" + - "Working (2012 Revised Version)" + - "The World Goes 'Round" + - "Xanadu" + - "A Year with Frog and Toad" + - "You're Gonna Love Tomorrow" + - "Young Frankenstein" + play: + - "A-Haunting We Will Go" + - "A Counterfeit Presentment" + - "A Delicate Balance" + - "A Streetcar Named Desire" + - "A Memory of Two Mondays" + - "A View from the Bridge" + - "After the Fall" + - "Agnes of God" + - "The Aliens" + - "All Because of Agatha" + - "All My Sons" + - "All New People" + - "All the Way" + - "All the Way Home" + - "The American Clock" + - "The American Dream" + - "The American Way" + - "And Still I Rise" + - "Anna Christie" + - "Anne of the Thousand Days" + - "And Things That Go Bump in the Night" + - "As You Like It, or Anything You Want To" + - "Awake and Sing!" + - "Bad Habits" + - "Battle of Angels" + - "Black Nativity" + - "Born Yesterday" + - "Botticelli" + - "Bride of Brackenloch" + - "Bringing It All Back Home" + - "Broken Glass" + - "Bullets Over Broadway" + - "By the Sea" + - "Candles to the Sun" + - "Cat on a Hot Tin Roof" + - "The Cocktail Party" + - "Come on Strong" + - "The Confidential Clerk" + - "The Cop and the Anthem" + - "Corpus Christi" + - "The Creation of the World and Other Business" + - "The Crucible" + - "Death" + - "Death of a Salesman" + - "The Death of Bessie Smith" + - "Dedication or The Stuff of Dreams" + - "Desire Under the Elms" + - "Deuce" + - "Diary of a Mad Black Woman" + - "Dinner at Eight" + - "Don't Drink the Water" + - "Don't Go Away Mad" + - "Don't You Want to be Free?" + - "The Egotist" + - "The Elder Statesman" + - "Elmer and Lily" + - "Emma" + - "The Emperor Jones" + - "Emperor of Haiti" + - "Faith of Our Fathers" + - "The Family Reunion" + - "The Feast of Ortolans" + - "Fortitude" + - "The Fifth Column" + - "Finishing the Picture" + - "The Floating Light Bulb" + - "The Flying Machine: A One-Act Play for Three Men" + - "Frankie and Johnny in the Clair de Lune" + - "Fugitive Kind" + - "God" + - "Gods of the Lightning" + - "The Golden Years" + - "The Great God Brown" + - "The Great Disobedience" + - "The Grass Still Grows" + - "Gypsy" + - "The Hairy Ape" + - "The Half-Bridge" + - "Happy Birthday, Wanda June" + - "Hello Out There" + - "Hidden Agendas" + - "High Tor" + - "Honors at Dawn" + - "I Think About You a Great Deal" + - "In Abraham's Bosom" + - "Incident at Vichy" + - "It's Only a Play" + - "Jerico-Jim Crow" + - "Jim Dandy" + - "Key Largo" + - "Knickerbocker Holiday" + - "The Last Yankee" + - "The Leather Apron Club" + - "Lettering" + - "Lips Together, Teeth Apart" + - "The Lisbon Traviata" + - "Listen My Children (1939" + - "Little Ham" + - "The Live Wire" + - "The Lost Colony" + - "Love! Valour! Compassion!" + - "The Maid of Arran" + - "The Man Who Had All the Luck" + - "Master Class" + - "The Masque of Kings" + - "Mary of Scotland" + - "The Meadow" + - "Mockingbird (2003" + - "Mourning Becomes Electra" + - "Mr Peter's Connections" + - "Mule Bone" + - "Murder in the Cathedral" + - "My Heart's in the Highlands" + - "Next" + - "Night Over Taos" + - "Night Riders" + - "No Villain" + - "Noon (1968), second segment of Morning, Noon and Night" + - "The Odd Couple" + - "Once Upon a Single Bound" + - "Our Mrs. McChesney" + - "Outside Looking In" + - "The Ox-Bow Incident (1976), adapted by Jim Beaver" + - "The Parsley Garden" + - "The Petrified Forest" + - "Pillar of Fire and Other Plays" + - "Play It Again, Sam" + - "Prelude and Liebestod" + - "Pressing Engagements" + - "The Price" + - "The Rat Race" + - "Resurrection Blues" + - "The Ride Down Mt. Morgan" + - "The Ritz" + - "The Rock" + - "The Royal Family" + - "Saturday's Children" + - "Second Overture" + - "Semper Fi" + - "Sidekick" + - "Simply Heavenly" + - "The Slaughter of the Innocents" + - "The Smile of the World" + - "Some Men" + - "Something Cloudy, Something Clear" + - "Spades" + - "Stage Door" + - "Starstruck" + - "The Stendhal Syndrome" + - "The Stolen Secret" + - "Subway Circus" + - "Summer and Smoke" + - "The Sunshine Boys" + - "The Sleeping Car" + - "The Star-Wagon" + - "Sweeney Agonistes" + - "Sweet Eros" + - "Talking to You" + - "Tambourines to Glory" + - "They Too Arise" + - "The Time of Your Life" + - "They're Made Out of Meat" + - "Troubled Island" + - "Truth, Justice, and the Texican Way" + - "Two for the Seesaw" + - "Valley Forge" + - "Van Zorn" + - "Vanya and Sonia and Masha and Spike" + - "Verdigris" + - "The Very First Christmas Morning" + - "Visit to a Small Planet" + - "Visiting Mr. Green" + - "Weekend" + - "What Price Glory" + - "Where Has Tommy Flowers Gone?" + - "Whigs, Pigs, and Greyhounds" + - "Whiskey" + - "White Desert" + - "Who's Afraid of Virginia Woolf?" + - "The Wingless Victory" + - "Winterset" + - "The Wonderful Ice Cream Suit and Other Plays" + - "You're Welcome America (2009)" + - "Zero Hour" + - "Zorro in Hell" + - "The Zoo Story" + kids_musical: + - "Disney's Aladdin JR." + - "Disney's Aladdin KIDS" + - "Disney's Alice in Wonderland JR." + - "Annie JR." + - "Annie KIDS" + - "Disney's The Aristocats KIDS" + - "Disney's Beauty and the Beast JR." + - "Bugsy Malone JR." + - "Captain Louie JR." + - "Chitty Chitty Bang Bang JR. " + - "Disney's Cinderella KIDS" + - "Dear Edwina JR." + - "Doctor Dolittle JR." + - "Elf The Musical JR." + - "Fame The Musical JR." + - "Fiddler on the Roof JR." + - "Finian's Rainbow JR." + - "The Musical Adventures of Flat Stanley JR." + - "Godspell JR." + - "Guys and Dolls JR." + - "Hairspray JR." + - "Disney's High School Musical 2 JR." + - "Disney's High School Musical JR." + - "Honk! JR." + - "Into the Woods JR." + - "Roald Dahl's James and the Giant Peach JR." + - "Disney's The Jungle Book KIDS" + - "Junie B. Jones The Musical JR. " + - "Legally Blonde The Musical JR." + - "Disney's The Lion King JR." + - "Disney's The Lion King KIDS" + - "Disney's The Little Mermaid JR." + - "Madagascar - A Musical Adventure JR." + - "Magic Tree House: A Ghost Tale for Mr. Dickens JR." + - "Magic Tree House: Dinosaurs before Dark KIDS" + - "Magic Tree House: Pirates Past Noon KIDS " + - "Magic Tree House: The Knight at Dawn KIDS" + - "Disney and Cameron Mackintosh's Mary Poppins JR. " + - "Disney's Mulan JR." + - "The Music Man JR." + - "The Music Man KIDS" + - "Disney's My Son Pinocchio JR." + - "Once on This Island JR." + - "Disney's 101 Dalmatians KIDS" + - "Peter Pan JR." + - "Disney's Peter Pan JR." + - "The Phantom Tollbooth JR." + - "The Pirates of Penzance JR." + - "Schoolhouse Rock Live! JR." + - "Seussical JR." + - "Seussical KIDS" + - "Shrek The Musical JR." + - "Singin' in the Rain JR." + - "Disney's Sleeping Beauty KIDS" + - "Thoroughly Modern Millie JR." + - "Roald Dahl's Willy Wonka JR." + - "Roald Dahl's Willy Wonka KIDS" + - "Disney's Winnie the Pooh KIDS" + - "Xanadu JR." + - "A Year with Frog and Toad KIDS" + - "Elton John and Tim Rice's Aida School Edition" + - "Avenue Q School Edition" + - "Les Misérables School Edition" + - "Big The Musical TYA" + - "Captain Louie TYA" + - "Chitty Chitty Bang Bang TYA" + - "Curious George: The Golden Meatball TYA" + - "The Musical Adventures of Flat Stanley TYA" + - "Roald Dahl's James and the Giant Peach TYA" + - "Madagascar - A Musical Adventure TYA" + - "The Phantom Tollbooth TYA" + - "Seussical TYA" + - "Shrek The Musical TYA" + - "The Adventures of Tom Sawyer TYA" + - "Roald Dahl's Willy Wonka TYA" + - "A Year with Frog and Toad TYA" diff --git a/test/faker/music/test_faker_show.rb b/test/faker/music/test_faker_show.rb new file mode 100644 index 0000000000..b8664284de --- /dev/null +++ b/test/faker/music/test_faker_show.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +require_relative '../../test_helper' + +class TestFakerShow < Test::Unit::TestCase + def test_adult_musical + assert Faker::Show.adult_musical.match(/\w+/) + end + + def test_kids_musical + assert Faker::Show.kids_musical.match(/\w+/) + end + + def test_play + assert Faker::Show.play.match(/\w+/) + end +end diff --git a/unreleased_README.md b/unreleased_README.md new file mode 100644 index 0000000000..79985eeb4b --- /dev/null +++ b/unreleased_README.md @@ -0,0 +1,365 @@ + +![logotype a happy-07](https://user-images.githubusercontent.com/36028424/40263395-4318481e-5b44-11e8-92e5-3dcc1ce169b3.png) + +# Faker +[![Build Status](https://travis-ci.org/stympy/faker.svg?branch=master)](https://travis-ci.org/stympy/faker) +[![Gem Version](https://badge.fury.io/rb/faker.svg)](https://badge.fury.io/rb/faker) +[![Inline docs](http://inch-ci.org/github/stympy/faker.svg?branch=master)](http://inch-ci.org/github/stympy/faker) +[![Test Coverage](https://api.codeclimate.com/v1/badges/ef54c7f9df86e965d64b/test_coverage)](https://codeclimate.com/github/stympy/faker/test_coverage) +[![Maintainability](https://api.codeclimate.com/v1/badges/ef54c7f9df86e965d64b/maintainability)](https://codeclimate.com/github/stympy/faker/maintainability) + +This gem is a port of [Perl's Data::Faker library](https://metacpan.org/pod/Data::Faker) that generates fake data. + +It comes in very handy for taking screenshots (taking screenshots for my +project, [Catch the Best](http://catchthebest.com/) was the original impetus +for the creation of this gem), having real-looking test data, and having your +database populated with more than one or two records while you're doing +development. + +- [Installing](#installing) +- [Usage](#usage) + - [Ensuring unique values](#ensuring-unique-values) + - [Deterministic Random](#deterministic-random) +- [Generators](#generators) + - [Default](#default) + - [Blockchain](#blockchain) + - [Books](#books) + - [Creature](#creature) + - [Games](#games) + - [Japanese Media](#japanese-media) + - [Movies](#movies) + - [Music](#music) + - [Quotes](#quotes) + - [Sports](#sports) + - [TV Shows](#tv-shows) +- [Customization](#customization) +- [Contributing](#contributing) +- [Contact](#contact) +- [License](#license) + +### NOTE +* While Faker generates data at random, returned values are not guaranteed to be unique by default. + You must explicity specify when you require unique values, see [details](#ensuring-unique-values). + Values also can be deterministic if you use the deterministic feature, see [details](#deterministic-random) +* This is the `master` branch of Faker and may contain changes that are not yet released. + Please refer the README of your version for the available methods. + List of all versions is [available here](https://github.com/stympy/faker/releases). + +## Installing +```bash +gem install faker +``` +Note: if you are getting a `uninitialized constant Faker::[some_class]` error, your version of the gem is behind the one documented here. To make sure that your gem is the one documented here, change the line in your Gemfile to: + +```ruby +gem 'faker', :git => 'https://github.com/stympy/faker.git', :branch => 'master' +``` + +## Usage +```ruby +require 'faker' + +Faker::Name.name #=> "Christophe Bartell" + +Faker::Internet.email #=> "kirsten.greenholt@corkeryfisher.info" +``` + +### CLI + +Usage Instructions [available here](https://github.com/stympy/faker/blob/master/lib/cli/README.md) + +```bash +$ faker +``` + +### Ensuring unique values +Prefix your method call with `unique`. For example: +```ruby +Faker::Name.unique.name # This will return a unique name every time it is called +``` + +If too many unique values are requested from a generator that has a limited +number of potential values, a `Faker::UniqueGenerator::RetryLimitExceeded` +exception may be raised. It is possible to clear the record of unique values +that have been returned, for example between tests. +```ruby +Faker::Name.unique.clear # Clears used values for Faker::Name +Faker::UniqueGenerator.clear # Clears used values for all generators +``` + +You also can give some already used values to the unique generator if you have +collisions with the generated data (i.e: using FactoryBot with random and +manually set values). + +```ruby +# Usage: +# Faker::.unique.exclude(method, arguments, list) + +# Add 'azerty' and 'wxcvbn' to the string generator with 6 char length +Faker::Lorem.unique.exclude :string, [6], %w[azerty wxcvbn] +``` + +### Deterministic Random +Faker supports seeding of its pseudo-random number generator (PRNG) to provide deterministic output of repeated method calls. + +```ruby +Faker::Config.random = Random.new(42) +Faker::Company.bs #=> "seize collaborative mindshare" +Faker::Company.bs #=> "engage strategic platforms" +Faker::Config.random = Random.new(42) +Faker::Company.bs #=> "seize collaborative mindshare" +Faker::Company.bs #=> "engage strategic platforms" + +Faker::Config.random = nil # seeds the PRNG using default entropy sources +Faker::Config.random.seed #=> 185180369676275068918401850258677722187 +Faker::Company.bs #=> "cultivate viral synergies" +``` + +## Generators +**NOTE: Some of the generators below aren't released yet. If you want to use them, change the line in your gemfile to:** + +```ruby +gem 'faker', :git => 'https://github.com/stympy/faker.git', :branch => 'master' +``` + +### Default + - [Faker::Address](doc/unreleased/default/address.md) + - [Faker::Alphanumeric](doc/unreleased/default/alphanumeric.md) + - [Faker::Ancient](doc/unreleased/default/ancient.md) + - [Faker::App](doc/unreleased/default/app.md) + - [Faker::Appliance](doc/unreleased/default/appliance.md) + - [Faker::Artist](doc/unreleased/default/artist.md) + - [Faker::Avatar](doc/unreleased/default/avatar.md) + - [Faker::Bank](doc/unreleased/default/bank.md) + - [Faker::Beer](doc/unreleased/default/beer.md) + - [Faker::Boolean](doc/unreleased/default/boolean.md) + - [Faker::BossaNova](doc/unreleased/default/bossa_nova.md) + - [Faker::Business](doc/unreleased/default/business.md) + - [Faker::Cannabis](doc/unreleased/default/cannabis.md) + - [Faker::ChileRut](doc/unreleased/default/chile_rut.md) + - [Faker::ChuckNorris](doc/unreleased/default/chuck_norris.md) + - [Faker::Code](doc/unreleased/default/code.md) + - [Faker::Coffee](doc/unreleased/default/coffee.md) + - [Faker::Coin](doc/unreleased/default/coin.md) + - [Faker::Color](doc/unreleased/default/color.md) + - [Faker::Commerce](doc/unreleased/default/commerce.md) + - [Faker::Company](doc/unreleased/default/company.md) + - [Faker::Compass](doc/unreleased/default/compass.md) + - [Faker::Construction](doc/unreleased/default/construction.md) + - [Faker::Cosmere](doc/unreleased/default/cosmere.md) + - [Faker::Crypto](doc/unreleased/default/crypto.md) + - [Faker::CryptoCoin](doc/unreleased/default/crypto_coin.md) + - [Faker::Currency](doc/unreleased/default/currency.md) + - [Faker::Date](doc/unreleased/default/date.md) + - [Faker::DcComics](doc/unreleased/default/dc_comics.md) + - [Faker::Demographic](doc/unreleased/default/demographic.md) + - [Faker::Dessert](doc/unreleased/default/dessert.md) + - [Faker::Device](doc/unreleased/default/device.md) + - [Faker::DrivingLicence](doc/unreleased/default/driving_licence.md) + - [Faker::Educator](doc/unreleased/default/educator.md) + - [Faker::ElectricalComponents](doc/unreleased/default/electrical_components.md) + - [Faker::Esport](doc/unreleased/default/esport.md) + - [Faker::File](doc/unreleased/default/file.md) + - [Faker::Fillmurray](doc/unreleased/default/fillmurray.md) + - [Faker::Finance](doc/unreleased/default/finance.md) + - [Faker::Food](doc/unreleased/default/food.md) + - [Faker::Football](doc/unreleased/default/football.md) + - [Faker::FunnyName](doc/unreleased/default/funny_name.md) + - [Faker::Gender](doc/unreleased/default/gender.md) + - [Faker::GreekPhilosophers](doc/unreleased/default/greek_philosophers.md) + - [Faker::Hacker](doc/unreleased/default/hacker.md) + - [Faker::Hipster](doc/unreleased/default/hipster.md) + - [Faker::House](doc/unreleased/default/house.md) + - [Faker::IDNumber](doc/unreleased/default/id_number.md) + - [Faker::IndustrySegments](doc/unreleased/default/industry_segments.md) + - [Faker::Internet](doc/unreleased/default/internet.md) + - [Faker::Invoice](doc/unreleased/default/invoice.md) + - [Faker::Job](doc/unreleased/default/job.md) + - [Faker::Json](doc/unreleased/default/json.md) + - [Faker::Kpop](doc/unreleased/default/kpop.md) + - [Faker::Lorem](doc/unreleased/default/lorem.md) + - [Faker::LoremFlickr](doc/unreleased/default/lorem_flickr.md) + - [Faker::LoremPixel](doc/unreleased/default/lorem_pixel.md) + - [Faker::Markdown](doc/unreleased/default/markdown.md) + - [Faker::Marketing](doc/unreleased/default/marketing.md) + - [Faker::Measurement](doc/unreleased/default/measurement.md) + - [Faker::Military](doc/unreleased/default/military.md) + - [Faker::Name](doc/unreleased/default/name.md) + - [Faker::Nation](doc/unreleased/default/nation.md) + - [Faker::NatoPhoneticAlphabet](doc/unreleased/default/nato_phonetic_alphabet.md) + - [Faker::NationalHealthService](doc/unreleased/default/national_health_service.md) + - [Faker::Number](doc/unreleased/default/number.md) + - [Faker::Omniauth](doc/unreleased/default/omniauth.md) + - [Faker::PhoneNumber](doc/unreleased/default/phone_number.md) + - [Faker::Placeholdit](doc/unreleased/default/placeholdit.md) + - [Faker::ProgrammingLanguage](doc/unreleased/default/programming_language.md) + - [Faker::Relationship](doc/unreleased/default/relationship.md) + - [Faker::Restaurant](doc/unreleased/default/restaurant.md) + - [Faker::Science](doc/unreleased/default/science.md) + - [Faker::SlackEmoji](doc/unreleased/default/slack_emoji.md) + - [Faker::Source](doc/unreleased/default/source.md) + - [Faker::SouthAfrica](doc/unreleased/default/south_africa.md) + - [Faker::Space](doc/unreleased/default/space.md) + - [Faker::String](doc/unreleased/default/string.md) + - [Faker::Stripe](doc/unreleased/default/stripe.md) + - [Faker::Subscription](doc/unreleased/default/subscription.md) + - [Faker::Superhero](doc/unreleased/default/superhero.md) + - [Faker::Team](doc/unreleased/default/team.md) + - [Faker::Time](doc/unreleased/default/time.md) + - [Faker::Twitter](doc/unreleased/default/twitter.md) + - [Faker::Types](doc/unreleased/default/types.md) + - [Faker::University](doc/unreleased/default/university.md) + - [Faker::Vehicle](doc/unreleased/default/vehicle.md) + - [Faker::Verbs](doc/unreleased/default/verbs.md) + - [Faker::WorldCup](doc/unreleased/default/world_cup.md) + +### Blockchain + - [Faker::Blockchain::Bitcoin](doc/unreleased/blockchain/bitcoin.md) + - [Faker::Blockchain::Ethereum](doc/unreleased/blockchain/ethereum.md) + - [Faker::Blockchain::Tezos](doc/unreleased/blockchain/tezos.md) + +### Books + - [Faker::Book](doc/unreleased/books/book.md) + - [Faker::Books::CultureSeries](doc/unreleased/books/culture_series.md) + - [Faker::Books::Dune](doc/unreleased/books/dune.md) + - [Faker::Books::Lovecraft](doc/unreleased/books/lovecraft.md) + +### Creature + - [Faker::Creature::Animal](doc/unreleased/creature/animal.md) + - [Faker::Creature::Cat](doc/unreleased/creature/cat.md) + - [Faker::Creature::Dog](doc/unreleased/creature/dog.md) + - [Faker::Creature::Horse](doc/unreleased/creature/horse.md) + +### Games + - [Faker::Games::Dota](doc/unreleased/games/dota.md) + - [Faker::Games::ElderScrolls](doc/unreleased/games/elder_scrolls.md) + - [Faker::Games::Fallout](doc/unreleased/games/fallout.md) + - [Faker::Games::HalfLife](doc/unreleased/games/half_life.md) + - [Faker::Games::Heroes](doc/unreleased/games/heroes.md) + - [Faker::Games::HeroesOfTheStorm](doc/unreleased/games/heroes_of_the_storm.md) + - [Faker::Games::LeagueOfLegends](doc/unreleased/games/league_of_legends.md) + - [Faker::Games::Myst](doc/unreleased/games/myst.md) + - [Faker::Games::Overwatch](doc/unreleased/games/overwatch.md) + - [Faker::Games::Pokemon](doc/unreleased/games/pokemon.md) + - [Faker::Games::SonicTheHedgehog](doc/unreleased/games/sonic_the_hedgehog.md) + - [Faker::Games::SuperSmashBros](doc/unreleased/games/super_smash_bros.md) + - [Faker::Games::Witcher](doc/unreleased/games/witcher.md) + - [Faker::Games::WorldOfWarcraft](doc/unreleased/games/world_of_warcraft.md) + - [Faker::Games::Zelda](doc/unreleased/games/zelda.md) + +### Japanese Media + - [Faker::JapaneseMedia::DragonBall](doc/unreleased/japanese_media/dragon_ball.md) + - [Faker::JapaneseMedia::OnePiece](doc/unreleased/japanese_media/one_piece.md) + - [Faker::JapaneseMedia::SwordArtOnline](doc/unreleased/japanese_media/sword_art_online.md) + +### Movies + - [Faker::Movie](doc/unreleased/movies/movie.md) + - [Faker::Movies::BackToTheFuture](doc/unreleased/movies/back_to_the_future.md) + - [Faker::Movies::Ghostbusters](doc/unreleased/movies/ghostbusters.md) + - [Faker::Movies::HarryPotter](doc/unreleased/movies/harry_potter.md) + - [Faker::Movies::HitchhikersGuideToTheGalaxy](doc/unreleased/movies/hitchhikers_guide_to_the_galaxy.md) + - [Faker::Movies::Hobbit](doc/unreleased/movies/hobbit.md) + - [Faker::Movies::Lebowski](doc/unreleased/movies/lebowski.md) + - [Faker::Movies::LordOfTheRings](doc/unreleased/movies/lord_of_the_rings.md) + - [Faker::Movies::PrincessBride](doc/unreleased/movies/princess_bride.md) + - [Faker::Movies::StarWars](doc/unreleased/movies/star_wars.md) + - [Faker::Movies::VForVendetta](doc/unreleased/movies/v_for_vendetta.md) + +### Music + - [Faker::Music](doc/unreleased/music/music.md) + - [Faker::Music::GratefulDead](doc/music/grateful_dead.md) + - [Faker::Music::Phish](doc/unreleased/music/phish.md) + - [Faker::Music::RockBand](doc/unreleased/music/rock_band.md) + - [Faker::Music::Show](doc/unreleased/music/show.md) + - [Faker::Music::UmphreysMcgee](doc/unreleased/music/umphreys_mcgee.md) + +### Quotes + - [Faker::Quote](doc/unreleased/quotes/quote.md) + - [Faker::Quotes::Shakespeare](doc/unreleased/quotes/shakespeare.md) + +### Sports + - [Faker::Sports::Basketball](doc/unreleased/sports/basketball.md) + - [Faker::Sports::Football](doc/unreleased/sports/football.md) + +### Tv Shows + - [Faker::TvShows::AquaTeenHungerForce](doc/unreleased/tv_shows/aqua_teen_hunger_force.md) + - [Faker::TvShows::BojackHorseman](doc/unreleased/tv_shows/bojack_horseman.md) + - [Faker::TvShows::BreakingBad](doc/unreleased/tv_shows/breaking_bad.md) + - [Faker::TvShows::Buffy](doc/unreleased/tv_shows/buffy.md) + - [Faker::TvShows::Community](doc/unreleased/tv_shows/community.md) + - [Faker::TvShows::DrWho](doc/unreleased/tv_shows/dr_who.md) + - [Faker::TvShows::DumbAndDumber](doc/unreleased/tv_shows/dumb_and_dumber.md) + - [Faker::TvShows::FamilyGuy](doc/unreleased/tv_shows/family_guy.md) + - [Faker::TvShows::Friends](doc/unreleased/tv_shows/friends.md) + - [Faker::TvShows::GameOfThrones](doc/unreleased/tv_shows/game_of_thrones.md) + - [Faker::TvShows::HeyArnold](doc/unreleased/tv_shows/hey_arnold.md) + - [Faker::TvShows::HowIMetYourMother](doc/unreleased/tv_shows/how_i_met_your_mother.md) + - [Faker::TvShows::MichaelScott](doc/unreleased/tv_shows/michael_scott.md) + - [Faker::TvShows::NewGirl](doc/unreleased/tv_shows/new_girl.md) + - [Faker::TvShows::ParksAndRec](doc/unreleased/tv_shows/parks_and_rec.md) + - [Faker::TvShows::RickAndMorty](doc/unreleased/tv_shows/rick_and_morty.md) + - [Faker::TvShows::RuPaul](doc/unreleased/tv_shows/rupaul.md) + - [Faker::TvShows::Seinfeld](doc/unreleased/tv_shows/seinfeld.md) + - [Faker::TvShows::SiliconValley](doc/unreleased/tv_shows/silicon_valley.md) + - [Faker::TvShows::Simpsons](doc/unreleased/tv_shows/simpsons.md) + - [Faker::TvShows::SouthPark](doc/unreleased/tv_shows/south_park.md) + - [Faker::TvShows::StarTrek](doc/unreleased/tv_shows/star_trek.md) + - [Faker::TvShows::Stargate](doc/unreleased/tv_shows/stargate.md) + - [Faker::TvShows::StrangerThings](doc/unreleased/tv_shows/stranger_things.md) + - [Faker::TvShows::TheExpanse](doc/unreleased/tv_shows/the_expanse.md) + - [Faker::TvShows::TheFreshPrinceOfBelAir](doc/unreleased/tv_shows/the_fresh_prince_of_bel_air.md) + - [Faker::TvShows::TheITCrowd](doc/unreleased/tv_shows/the_it_crowd.md) + - [Faker::TvShows::TheThickOfIt](doc/unreleased/tv_shows/the_thick_of_it.md) + - [Faker::TvShows::TwinPeaks](doc/unreleased/tv_shows/twin_peaks.md) + - [Faker::TvShows::VentureBros](doc/unreleased/tv_shows/venture_bros.md) + +## Customization +Since you may want to make addresses and other types of data look different +depending on where in the world you are (US postal codes vs. UK postal codes, +for example), Faker uses the I18n gem to store strings (like state names) and +formats (US postal codes are NNNNN while UK postal codes are AAN NAA), +allowing you to get different formats by switching locales. Just set +Faker::Config.locale to the locale you want, and Faker will take care of the +rest. + +If your locale doesn't already exist, create it in the `lib/locales` directory +and you can then override or add elements to suit your needs. See more about how to +use locales [here](lib/locales/README.md) + +```yaml +en-au-ocker: + faker: + name: + # Existing faker field, new data + first_name: + - Charlotte + - Ava + - Chloe + - Emily + + # New faker fields + ocker_first_name: + - Bazza + - Bluey + - Davo + - Johno + - Shano + - Shazza + region: + - South East Queensland + - Wide Bay Burnett + - Margaret River + - Port Pirie + - Gippsland + - Elizabeth + - Barossa +``` + +## Contributing +See [CONTRIBUTING.md](https://github.com/stympy/faker/blob/master/CONTRIBUTING.md). + +## Contact +Comments and feedback are welcome. Send an email to Benjamin Curtis via the [google group](http://groups.google.com/group/ruby-faker). + +## License +This code is free to use under the terms of the MIT license.