Skip to content

Commit

Permalink
Added Doctor Who
Browse files Browse the repository at this point in the history
  • Loading branch information
Raimund Hübel authored and stympy committed Jul 9, 2017
1 parent 5638858 commit acfbce0
Show file tree
Hide file tree
Showing 6 changed files with 181 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Contents
- [Faker::Demographic](doc/demographic.md)
- [Faker::Dessert](doc/dessert.md)
- [Faker::DragonBall](doc/dragon_ball.md)
- [Faker::DrWho](doc/dr_who.md)
- [Faker::Educator](doc/educator.md)
- [Faker::FamilyGuy](doc/family_guy.md)
- [Faker::File](doc/file.md)
Expand Down
15 changes: 15 additions & 0 deletions doc/dr_who.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Faker::DrWho

```ruby
Faker::DrWho.character #=> "Captain Jack Harness"

Faker::DrWho.the_doctor #=> "Ninth Doctor"

Faker::DrWho.catch_phrase #=> "Fantastic!"

Faker::DrWho.quote #=> "Lots of planets have a north!"

Faker::DrWho.villian #=> "The Master"

Faker::DrWho.specie #=> "Dalek"
```
34 changes: 34 additions & 0 deletions lib/faker/dr_who.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#encoding: utf-8
#frozen_string_literal: true

module Faker

class DrWho < Base

def self.character
fetch('dr_who.character')
end

def self.the_doctor
fetch('dr_who.the_doctors')
end

def self.catch_phrase
fetch('dr_who.catch_phrases')
end

def self.quote
fetch('dr_who.quotes')
end

def self.villian
fetch('dr_who.villians')
end

def self.specie
fetch('dr_who.species')
end

end #class DrWho

end #module Faker
6 changes: 6 additions & 0 deletions lib/locales/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,10 @@ de:
simpsons:
characters: [ "Homer Simpson", "Marge Simpson", "Bart Simpson", "Lisa Simpson", "Maggie Simpson", "Grampa Simpson", "Abraham Jedediah \"Abe\" Simpson", "Patty Bouvier", "Selma Bouvier", "Mona Bouvier", "Charles Montgomery Burns", "Waylon Smithers", "Lenford \"Lenny\" Leonard", "Carl Carlson", "Charlie", "Ned Flanders", "Maude Flanders", "Rod Flanders", "Todd Flanders", "Janey Powell", "Ralph Wiggum", "Becky", "Alison Taylor", "Database", "Lewis", "Martin Prince", "Milhouse van Houten", "Nelson Muntz", "Richard", "Jaffee", "Melissa", "Sherri", "Terri", "Wendell Borton", "Dolphin Starbeam", "Jimbo Jones", "Kearney Zzyzwicz", "Uter Zörker", "Rektor Seymour Skinner", "Oberschulrat Chalmers", "Edna Krabappel", "Elizabeth Hoover", "Dewey Largo", "Sportlehrer Mr. Krupt", "Dr. J. Loren Pryor", "Hausmeister Willie", "Küchenhilfe Doris Peterson", "Otto Mann", "Krusty der Clown", "Herschel Krustofski", "Sideshow Raheem", "Tingeltangel-Bob", "Tingeltangel-Mel", "Mr. Teeny", "Bubbles", "Itchy", "Scratchy", "Bienenmann", "Scott Christian", "Kent Brockman", "Arnie Pye", "Rainier Wolfcastle", "Troy McClure", "Lurleen Lumpkin", "Duffman", "Chief Clancy Wiggum", "Lou", "Eddie", "Comicbuchverkäufer", "Roger Meyers Junior", "Artie Ziff", "Horatio McCallister", "Alter Kapitän", "Lothar Folkman", "Luigi Risotto", "Aristotle Amadopolis", "Herman", "Lindsay Naegle", "Cookie Kwan", "Dr. Julius Hibbert", "Dr. Nick Riviera", "Dr. Marvin Monroe", "Jasper Beardley", "Ralph Melish", "Hans Maulwurf", "Asa", "Mrs. Glick", "Sylvia Winfield", "Mr. Winfield", "Morris \"Moe\" Szyslak", "Barney Gumble", "Sam", "Larry", "Akira", "Joseph Quimby", "Freddy Quimby", "Mary Bailey", "Roy Snyder", "Constance Harm", "Lionel Hutz", "Blauhaariger Anwalt", "Gil Gunderson", "Der alte Gil", "In der Kirche", "Reverend Timothy Lovejoy", "Helen Lovejoy", "Jessica Lovejoy", "Anthony \"Fat Tony\" D'Amico", "Legs", "Louie", "Johnny", "Schmallippe", "Jacques Brunswick", "Disco Stu", "Eleanor Abernathy", "Katzenlady", "Prof. Frink", "Kirk van Houten", "Luann van Houten", "Shauna Tifton", "Prinzessin Kashmir", "Snake", "Jeremy Peterson", "Agnes Skinner", "Cletus Spuckler", "Brandine Spuckler", "Mary Spuckler", "Apu Nahasapeemapetilon", "Manjula Nahasapeemapetilon", "Zahnfleischbluter Murphy", "Reicher Texaner", "Hyman Krustofski", "Laura Powers", "Ruth Powers", "Drederick Tatum", "Kang", "Kodos" ]
locations_TODO: []
dr_who:
the_doctors: [
"Erster Doktor", "Zweiter Doktor", "Dritter Doktor", "Vierter Doktor", "Fünfter Doktor", "Sechster Doktor",
"Siebenter Doktor", "Achter Doktor", "Neunter Doktor", "Zehnter Doktor", "Elfter Doktor", "Zwölfter Doktor"
]
catch_phrases_TODO: []
quotes_TODO: []
74 changes: 74 additions & 0 deletions lib/locales/en/dr_who.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
en:
faker:
dr_who:
character: [
"Dr. Who", "The Doctor", "Tardis", "Rose Tyler", "Adam Mitchell", "Mickey Smith", "Donna Noble", "Martha Jones",
"Captain Jack Harness", "Astrid Peth", "Sarah Jane Smith", "Jackson Lake", "Lady Christina de Souza",
"Adelaide Brooke", "Wilfred Mott" ]
the_doctors: [
"First Doctor", "Second Doctor", "Third Doctor", "Fourth Doctor", "Fifth Doctor", "Seventh Doctor",
"Eighth Doctor", "Ninth Doctor", "Tenth Doctor", "Eleventh Doctor", "Twelfth Doctor"
]
catch_phrases: [
"Fantastic!", "I’m sorry. I’m so sorry.", "Bow ties are cool.", "Mmm I wonder ... Aha!",
"Brave heart, Tegan.", "Would you care for a jelly baby?", "Reverse the polarity of the neutron flow.",
"Somewhere there’s danger, somewhere there’s injustice, somewhere else, the tea’s getting cold.",
"When I say run, run. (pause) RUN!", "Mm? What’s that, my boy?"
]
quotes: [
"Lots of planets have a north!",
]
villians: [
"Helen A", "Abzorbaloff", "Animus", "The Master",
]
species: [
"Time Lord", "Dalek", "Thal", "Dal", "Voord", "Sensorite", "Slyther", "Didonian", "Sand Beast", "Animus",
"Zarbi", "Larvae Gun", "Menoptra", "Morok", "Xeron", "Aridian", "Mire Beast", "Gubbage Cone", "Rill",
"Great Old One", "Drahvin", "Varga Plant", "Representatives of the 7 Galaxies", "Visian", "Screamer",
"Monoid", "Refusian", "Celestial Toymaker", "Elder", "Cybermen (Mondas)", "Fish People", "Macra",
"Chameleon", "Cybermat", "The Moon", "Great Intelligence", "Ice Warrior", "Seaweed Creature", "Dominator",
"Dulcian", "Master Brain", "Land of Fiction beings", "Kroton", "Gond", "Seed Pod", "Auton", "Nestene Consciousness",
"Silurian", "Ambassadors", "Primord", "Keller Machine", "Axos/Axon/Axonite", "Uxariean", "Dæmon",
"Ogron", "Arcturan", "Alpha Centauran", "Aggedor", "Peladonian", "Sea Devil", "Solonian", "Chronovore",
"Minotaur", "Anti-matter organism", "Lurman", "Drashig", "Inter Minorian", "Wallarian", "Draconian", "Spiridon",
"Giant Maggots", "Sontaran", "Dinosaur", "Exxilon", "Eight Legs", "Wirrn", "Kaled", "Vogan", "Zygon", "Skarasen",
"Morestran", "Sutekh", "Osiran", "Kraal", "Sisterhood of Karn", "Hoothi", "Krynoid", "Mandragora Helix", "Kastrian",
"Giant Rat", "Rutan", "Swarm (Virus)", "Fendahl", "Usurian", "Minyan", "Vardan", "Guardian", "Ribosian",
"Levithian", "Shrivenzale", "Zanak Humanoid", "Diplosian", "Ogri", "Megara", "Taran", "Taran Beast",
"Swampie", "Kroll", "The Shadow", "Mute", "Sirian", "Jagaroth", "Chloris Humanoid", "Tythonian", "Wolfweed",
"Mandrel", "Skonnan", "Nimon", "Anethan", "Crinothian", "Drornidian", "Krarg", "Argolin", "Foamasi",
"Tigellan", "Zolfa-Thuran", "Gaztak", "Bell Plant", "Alzarian", "Marshman", "Marshspider", "Great Vampire",
"Tharil", "Trakenite", "Logopolitan", "Castrovalvan", "Urbankan", "Mara", "Kinda", "Terileptil", "Plasmaton",
"Xeraphin", "The Ergon", "Manussan", "Trion", "Garm", "Eternal", "Myrka", "Malus", "Tractator", "Magma Beast",
"Queen Bat", "Gastropod", "Jadondan", "Cryon", "Mentor", "Gee-Jee fly", "Androgum", "Karfelon", "Morlox",
"Bandril", "Andromedan", "Thoros Alphan", "Krontep", "Posicarian", "Raak", "Vervoid", "Mogarian", "Lakertyan",
"Tetrap", "Time Brain", "Chimeron", "Navarino", "Bannermen", "Proamonian", "Dragon", "Stigorax", "Pipe Person",
"Validium", "Gods of Ragnorak", "Werewolf", "The Destroyer", "Light", "Fenric", "Haemovore", "Cheetah People",
"Kitling", "Deathworm Morphant", "Lady Cassandra O'Brien.∆17", "Boekind", "Crespallion", "Trees of Cheem",
"Pakoo", "Balhoonian", "New Human", "Protohuman", "Digihuman", "Gelth", "Raxacoricofallapatorian",
"Space Pig", "Jagrafess", "Reaper", "Empty Child", "Nanogene", "Chula", "Barcelonian Dogs", "Sycorax",
"Graske", "Catkind", "New Human", "Krillitane", "Cyberman (Pete's World)", "The Wire", "The Beast",
"Ood", "Pallushi", "Hoix", "Abzorbaloff", "Isolus", "Flying Stingray", "Weevil", "Sex Gas", "Fairy",
"Arcateenian", "Racnoss", "Dogon", "Abaddon", "Bane", "Xylok", "Judoon", "Plasmavore", "Carrionite",
"Pig Slave", "Dalek/Human Hybrid", "Richard Lazarus", "Torajii Sun", "Family of Blood", "Scarecrow",
"Weeping Angel", "Futurekind", "Malmooth", "Toclafane", "Gorgon", "Uvodni", "The Trickster", "Verron",
"Sto Humanoid", "Zocci", "Blowfish", "Cell 114", "Cash Cow", "Mayfly", "Duroc", "Nostrovite", "Night Travellers",
"Tumor Alien", "Cowled Ghost", "Adipose", "Pyrovile", "Ood Brain", "Hath", "Vespiform", "Vashta Nerada",
"Time Beetle", "Shadow Proclamation Humanoids", "Bees (Melissa Majoria)", "Pied Piper", "Ancient Lights",
"Berserker", "Travist Polong", "Cybershade", "The Swarm", "Tritovore", "Hitchhiker", "The 4-5-6", "Veil",
"Eve", "Jixen", "Erasmus Darkening", "International Gallery Paintings", "The Flood", "Vinvocci",
"Dauntless Prison Inmates", "Korven", "Fear Entity", "Gryffen Family Ghosts", "Bodach", "Anubian",
"Oroborus", "Mede", "Multi-form", "Atraxi", "Aeolian", "Star Whale", "Winder", "Centuripede", "The Hunger",
"Aplan", "Ukkan", "Saturnyn", "Psychic Pollen", "Eknodine", "Etydion", "Krafayis", "Vishklar", "Shansheeth",
"Groske", "Qetesh", "Dark Hoarde", "Chelonian", "Haemogoth", "Sky Fish", "The Silence", "Siren",
"Patchwork Person", "Ganger", "Headless Monk", "Brain Parasite", "Tenza", "Peg Doll", "The Blessing Messenger",
"Apalapucian", "The Blessing", "Tivolian", "Minotaur", "Metalkind", "Fleshkind", "Hetocumtek", "Skullion",
"Androzani Tree", "Dalek Puppet", "Kahler", "Orderly", "Shakri", "Memory Worm", "Snowmen", "Akhaten Humanoid",
"Pan-Babylonian", "Lugal-Irra-Kush", "Lucanian", "Hooloovoo", "Terraberserker", "Ultramancer", "Vigil",
"Crooked Person", "Time Zombie", "Mr. Sweet", "Cybermite", "Whisper Men", "The Teller", "Skovox Blitzer",
"Spider Germ", "The Foretold", "Boneless", "Kantrofarri", "The Fisher King", "The Mire", "Leonian",
"The Sandmen", "Janus", "Quantum Shade", "The Veil", "Hydroflax", "Shoal of the Winter Harmony", "Rhodian",
"Quill", "Shadow Kin", "Arn", "Lothan", "Leaf Dragon", "Lankin", "Killer petals", "Lorr", "Sentient oil",
"Vardy", "Sea Creature", "Lure Fish", "Dryad", "The Monks"
]

51 changes: 51 additions & 0 deletions test/test_faker_dr_who.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#encoding: utf-8
#frozen_string_literal: true

require File.expand_path(File.dirname(__FILE__) + '/test_helper')

class TestFakerDrWho < Test::Unit::TestCase

def setup
Faker::Config.locale = nil
end


def test_character
10.times { assert Faker::DrWho.character.match(/[\w]+/) }
end

def test_the_doctor
10.times { assert Faker::DrWho.the_doctor.match(/[\w]+/) }
end

def test_catch_phrase
10.times { assert Faker::DrWho.catch_phrase.match(/[\w]+/) }
end

def test_quote
10.times { assert Faker::DrWho.quote.match(/[\w]+/) }
end

def test_villian
10.times { assert Faker::DrWho.villian.match(/[\w]+/) }
end

def test_specie
10.times { assert Faker::DrWho.specie.match(/[\w]+/) }
end


def test_locales
[nil,'en','de',#...
].each do |locale_name|
Faker::Config.locale = 'de'
assert Faker::DrWho.character .is_a? String
assert Faker::DrWho.the_doctor .is_a? String
assert Faker::DrWho.catch_phrase.is_a? String
assert Faker::DrWho.quote .is_a? String
assert Faker::DrWho.villian .is_a? String
assert Faker::DrWho.specie .is_a? String
end
end

end #class TestFakerDrWho

0 comments on commit acfbce0

Please sign in to comment.