Skip to content

Commit

Permalink
adds Zelda
Browse files Browse the repository at this point in the history
  • Loading branch information
audy committed Jan 18, 2017
1 parent 63e0b07 commit 47e8372
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ Contents
- [Faker::TwinPeaks](doc/twin_peaks.md)
- [Faker::University](doc/university.md)
- [Faker::Vehicle](doc/vehicle.md)
- [Faker::Zelda](doc/zelda.md)
- [Customization](#customization)
- [Contributing](#contributing)
- [Contact](#contact)
Expand Down
9 changes: 9 additions & 0 deletions doc/zelda.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Faker::Zelda

```ruby
# Random Zelda game
Faker::Zelda.game #=> "Ocarina of Time"

# Random Zelda character
Faker::Zelda.character #=> "Guru-Guru"
```
1 change: 1 addition & 0 deletions lib/faker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ def unique(max_retries = 10_000)
require 'faker/fillmurray'
require 'faker/job'
require 'faker/demographic'
require 'faker/zelda'

require 'extensions/array'
require 'extensions/symbol'
Expand Down
14 changes: 14 additions & 0 deletions lib/faker/zelda.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module Faker
class Zelda < Base
flexible :space
class << self
def game
fetch('zelda.game')
end

def character
fetch('zelda.character')
end
end
end
end
3 changes: 3 additions & 0 deletions lib/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,9 @@ en:
lord_of_the_rings:
characters: ["Frodo Baggins", "Gandalf the Grey", "Samwise Gamgee", "Meriadoc Brandybuck", "Peregrin Took", "Aragorn", "Legolas", "Gimli", "Boromir", "Sauron", "Golum", "Bilbo Baggins", "Tom Bombadil", "Glorfindel", "Elrond", "Arwen Evenstar", "Galadriel", "Saruman the White", "Éomer", "Théoden", "Éowyn", "Grìma Wormtongue", "Shadowfax", "Treebeard", "Quickbeam", "Shelob", "Faramir", "Denethor", "Beregond", "Barliman Butterbur"]
locations: ["Aglarond", "Aldburg", "Andustar", "Angband", "Argonath", "Bag End", "Barad-dûr", "Black Gate", "Bridge of Khazad-dûm", "Carchost", "Cirith Ungol", "Coldfells", "Crack of Doom", "Dark Land", "Dol Guldur", "Dome of Stars", "Doors of Durin", "Doriath", "East Beleriand", "Eastfarthing", "East Road", "Eithel Sirion", "Elostirion", "Enchanted Isles", "Endless Stair", "Eä", "Falls of Rauros", "Fens of Serech", "Field of Celebrant", "Fords of Isen", "The Forsaken Inn", "Gap of Rohan", "Gladden Fields", "Gorgoroth", "Greenway", "Haudh-en-Nirnaeth", "Haven of the Eldar", "Helm's Deep", "Henneth Annûn", "Hobbit-hole", "Houses of Healing", "Hyarnustar", "Ilmen", "Inn of the Prancing Pony", "Isengard", "Isenmouthe", "Isle of Balar", "Land of the Sun", "Losgar", "Luthany", "Lothlorièn", "Maglor's Gap", "Marish", "Meduseld", "Minas Tirith", "Minhiriath", "Máhanaxar", "Narchost", "Nargothrond", "Núath", "Old Ford", "Old Forest", "Old Forest Road", "Orthanc", "Parth Galen", "Paths of the Dead", "Pelennor Fields", "Rath Dínen", "Regions of the Shire", "Rivendell", "The Rivers and Beacon-Hills of Gondor", "Sarn Ford", "Taur-en-Faroth", "Taur-im-Duinath", "Timeless Halls", "Tol Brandir", "Tol Galen", "Tol Morwen", "Tol-in-Gaurhoth", "Tumladen", "Utumno", "Vaiya", "Vista", "The Void", "Warning beacons of Gondor"]
zelda:
games: [ "A Link to the Past", "Four Swords", "Link's Awakening", "Majora's Mask", "Ocarina of Time", "Oracle of Seasons - Oracle of Ages", "Phantom Hourglass", "The Legend of Zelda", "The Minish Cap", "The Wind Waker", "Twilight Princess", "Zelda II: Adventure of Link" ]
characters: [ "Abe", "Agahnim", "Alder", "Anju", "Anju's Mother", "Aryll", "Astrid", "Aveil", "Baby Goron", "Bagu", "Beedle", "Belari", "Beth", "Biggoron", "Bipin", "Bipin and Blossom's son", "Blade Brothers", "Blaino", "Blossom", "Bombers", "Borlov", "Bow-Wow", "Brocco", "Captain", "Carlov", "Carpenters", "Chef Bear", "Cheval", "Christine", "Ciela", "Colin", "Comedians", "Crazy Tracy", "Cucco Keeper", "Curiosity Shop Guy", "Cyclos", "Dampe", "Dampé", "Daphnes Nohansen Hyrule", "Darmani III", "Darunia", "Decci", "Deities", "Dekki", "Deku Royalty", "Deku Tree Sprout", "Deppi", "Dimitri", "Din", "Doc Bandam", "Dr.Troy", "Eddo", "Epona", "Ezlo", "Fado", "Fairies", "Fairy", "Fairy Queen", "Farore", "Festari", "Fishermen", "Fishman", "Flat", "Forest Minish", "Fortune Teller", "Ganon", "Ganondorf", "Gentari", "Ghost", "Gibdo Man", "Golden Chief Cylos", "Gongoron", "Gorman", "Goron Elder", "Grandma", "Grandma Ulrira", "Great Deku Tree", "Great Fairies", "Great Fairy", "Great Moblin", "Grog", "Guru-Guru", "Happy Mask Salesman", "Hurdy Gurdy Man", "Ilia", "Impa", "Indigo-Go's", "Ingo", "Jabun", "Joel", "Kaepora Gaebora", "Kafei", "Kamaro", "Kayo", "Keaton", "Kiki", "Killer Bees", "King Daltus", "King Zora", "King of Hyrule", "King of Red Lions", "Knights of Hyrule", "Komali", "Koume and Kotake", "Laruto", "Leaf", "Lenzo", "Librari", "Linebeck", "Link", "Link (Goron)", "Link's Uncle", "Lord Jabu-Jabu", "Louise", "Mad Batter", "Madam Aroma", "Madam MeowMeow", "Maggie and her father", "Main Antagonist", "Majora's Mask (Boss)", "Makar", "Maku Tree", "Malo", "Malon", "Mamamu Yan", "Mamu", "Manbo", "Maple", "Marathon Man", "Marin", "Martha", "Mayor Dotour", "Mayor Hagen", "Medigoron", "Melari", "Mesa", "Midna", "Mido", "Mikau", "Mila and her father", "Monkey", "Moosh", "Mountain Minish", "Mr. Barten", "Mr. Write", "Mrs. Marie", "Mrs. Ruul", "Mutoh", "Nabooru", "Navi", "Nayru", "Neri", "Nightmare", "Nyave", "Nyeve", "Old Lady from Bomb Shop", "Old Men", "Old Wayfarer", "Old Woman", "Onox", "Ooccoo", "Orca", "Oshus", "Owl", "Pamela", "Papahl and family", "Patch", "Percy", "Photographer", "Pina", "Plen", "Poe salesman", "Postman", "Potho", "Prince Ralis", "Prince of Hyrule", "Princess Ruto", "Princess Zelda", "Professor Shikashi", "Queen Ambi", "Queen Rutela", "Quill", "Rabbits", "Ralph", "Rauru", "Rem", "Renado", "Richard", "Ricky", "Rito Chieftain", "Romani and Cremia", "Rosa", "Rosa Sisters", "Rose", "Ruul", "Sages", "Sahasrahla", "Sakon", "Sale", "Salvatore", "Saria", "Schule Donavitch", "Sharp", "Sheik", "Shiro", "Shop Keeper", "Shopkeeper", "Shrine Maidens", "Simon", "Skull Kid", "Smith", "Sokra", "Stockwell", "Sturgeon", "Subrosian Queen", "Sue-Belle", "Syrup", "Tael", "Talo", "Talon", "Tarin", "Tatl", "Teller of Treasures", "Telma", "Tetra", "The Pirates", "Tingle", "Tokkey", "Toto", "Tott", "Town Minish", "Traveling Merchants", "Turtle", "Twinrova", "Ulrira", "Vaati", "Valoo", "Vasu", "Veran", "Viscen", "Walrus", "Wheaton and Pita", "Wind Fish", "Yeta", "Yeto", "Zant", "Zauz", "Zelda", "Zephos", "Zill", "Zunari" ]
rock_band:
name: ["Led Zeppelin", "The Beatles", "Pink Floyd", "The Jimi Hendrix Experience", "Van Halen", "Queen", "The Eagles", "Metallica", "U2", "Bob Marley and the Wailers", "The Police", "The Doors", "Stone Temple Pilots", "Rush", "Genesis", "Prince and the Revolution", "Yes", "Earth Wind and Fire", "The Bee Gees", "The Rolling Stones", "The Beach Boys", "Soundgarden", "The Who", "Steely Dan", "James Brown and the JBs", "AC/DC", "Fleetwood Mac", "Crosby, Stills, Nash and Young", "The Allman Brothers", "ZZ Top", "Aerosmith", "Cream", "Bruce Springsteen & The E Street Band", "The Grateful Dead", "Guns 'N Roses", "Pearl Jam", "Boston", "Dire Straits", "King Crimson", "Parliament Funkadelic", "Red Hot Chili Peppers", "Bon Jovi", "Dixie Chicks", "Foreigner", "David Bowie and The Spiders From Mars", "The Talking Heads", "Jethro Tull", "The Band", "The Beastie Boys", "Nirvana", "Rage Against The Machine", "Sly and the Family Stone", "The Clash", "Tool", "Journey", "No Doubt", "Creedence Clearwater Revival", "Deep Purple", "Alice In Chains", "Orbital", "Little Feat", "Duran Duran", "Living Colour", "Frank Zappa and the Mothers of Invention", "The Carpenters", "Audioslave", "The Pretenders", "Primus", "Blondie", "Black Sabbath", "Lynyrd Skynyrd", "Sex Pistols", "Isaac Hayes and the Movement", "R.E.M.", "Traffic", "Buffalo Springfield", "Derek and the Dominos", "The Jackson Five", "The O'Jays", "Harold Melvin and the Blue Notes", "Underworld", "Thievery Corporation", "Motley Crue", "Janis Joplin and Big Brother and the Holding Company", "Blind Faith", "The Animals", "The Roots", "The Velvet Underground", "The Kinks", "Radiohead", "The Scorpions", "Kansas", "Iron Maiden", "Motorhead", "Judas Priest", "The Orb", "The Cure", "Coldplay", "Slayer", "Black Eyed Peas"]
job:
Expand Down
16 changes: 16 additions & 0 deletions test/test_faker_zelda.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')

class TestFakerZelda < Test::Unit::TestCase
def setup
@tester = Faker::Zelda
end

def test_game
assert @tester.game.match(/\w+\.?/)
end

def test_character
assert @tester.character.match(/\w+\.?/)
end

end

0 comments on commit 47e8372

Please sign in to comment.