Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add races and class names to WorldOfWarcraft #1787

Merged
merged 7 commits into from
Sep 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions doc/games/world_of_warcraft.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# Faker::Games::WorldOfWarcraft

```ruby
# Generate random character from the World of Warcraft
# Generate a random character from World of Warcraft
Faker::Games::WorldOfWarcraft.hero #=> "Uther the Lightbringer"

# Generate random quote from the World of Warcraft
# Generate a random class name from World of Warcraft
Faker::Games::WorldOfWarcraft.class_name #=> "Druid"

# Generate a random class name from World of Warcraft
Faker::Games::WorldOfWarcraft.race #=> "Night elf"

# Generate a random quote from World of Warcraft
Faker::Games::WorldOfWarcraft.quote #=> "These are dark times indeed."
```
27 changes: 26 additions & 1 deletion lib/faker/games/world_of_warcraft.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,32 @@ class << self
#
# @faker.version 1.9.2
def hero
fetch('games.world_of_warcraft.hero')
fetch('games.world_of_warcraft.heros')
end

##
# Produces a class name from World of Warcraft.
#
# @return [String]
#
# @example
# Faker::Games::WorldOfWarcraft.class_name #=> "Druid"
#
# @faker.version next
def class_name
fetch('games.world_of_warcraft.class_names')
end

# Produces the name of a race from World of Warcraft.
#
# @return [String]
#
# @example
# Faker::Games::WorldOfWarcraft.race #=> "Druid"
#
# @faker.version next
def race
fetch('games.world_of_warcraft.races')
end

##
Expand Down
126 changes: 122 additions & 4 deletions lib/locales/en/world_of_warcraft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,125 @@ en:
faker:
games:
world_of_warcraft:
hero: ["Gul'dan", "Durotan", "Khadgar", "Orgrim Doomhammer", "Medivh", "Blackhand", "Anduin Lothar", "Garona Halforcen", "Antonidas", "King Llane Wrynn", "Moroes",
"Lady Taria", "Jaina Proudmoore", "Illidan Stormrage", "Kael'thas Sunstrider", "Archimonde", "Kil'jaeden", "Mannoroth", "Ner'zhul", "Sargeras", "Balnazzar", "Magtheridon", "Mal'Ganis", "Brann Bronzebeard", "Muradin Bronzebeard", "Sylvanas Windrunner", "Malfurion Stormrage", "Millhouse Manastorm", "Anduin Lothar", "Arthas Menthil", "Bolvar Fordragon", "Uther the Lightbringer", "Varian Wrynn"]

quotes: ["An'u belore delen'na.","Anaria Shola.","Bal'a dash, malanore.","Glory to the Sin'dorei.","Our enemies will fall!","State your business.","The dark times will pass.","The Eternal Sun guides us.","Victory lies ahead!","We will persevere!","What business have you?","Yes?","Death to all who oppose us!", "Farewell.", "Hold your head high.", "Keep your wits about you.", "Remember the Sunwell.", "Sela'ma ashal'anore!", "Shorel'aran.", "Stay the course", "The reckoning is at hand!", "Time is of the essence.", "We will have justice!", "Ah, you have a death wish.", "I do not suffer fools easily.", "I had little patience to begin with!", "Mind yourself.", "Not very intelligent, are you?", "Run away pest!", "These are dark times indeed.", "Why do you linger?", "You waste my time.", "Choose wisely.", "Do not loiter.", "Everything has a price.", "I have one of a kind items.", "What do you seek?", "Your gold is welcome here.", "Glory to the Sin'dorei.", "State your Business!", "Anu'belore Dela'na.", "The Eternal Sun guides us.", "What Business have you?", "Victory lies ahead.", "Our enemies will fall.", "Anaria'shoala.", "You waste my time.", "I had little patience to begin with.", "It is a wonder you have lived this long.", "Ah, you have a death wish.", "I sell only the finest goods.", "Your gold is welcome here.", "Everything has a price.", "Do not loiter."]
heros:
- Gul'dan
- Durotan
- Khadgar
- Orgrim Doomhammer
- Medivh
- Blackhand
- Anduin Lothar
- Garona Halforcen
- Antonidas
- King Llane Wrynn
- Moroes
- Lady Taria
- Jaina Proudmoore
- Illidan Stormrage
- Kael'thas Sunstrider
- Archimonde
- Kil'jaeden
- Mannoroth
- Ner'zhul
- Sargeras
- Balnazzar
- Magtheridon
- Mal'Ganis
- Brann Bronzebeard
- Muradin Bronzebeard
- Sylvanas Windrunner
- Malfurion Stormrage
- Millhouse Manastorm
- Anduin Lothar
- Arthas Menthil
- Bolvar Fordragon
- Uther the Lightbringer
- Varian Wrynn
quotes:
- An'u belore delen'na.
- Anaria Shola.
- Bal'a dash, malanore.
- Glory to the Sin'dorei.
- Our enemies will fall!
- State your business.
- The dark times will pass.
- The Eternal Sun guides us.
- Victory lies ahead!
- We will persevere!
- What business have you?
- Death to all who oppose us!
- Hold your head high.
- Keep your wits about you.
- Remember the Sunwell.
- Sela'ma ashal'anore!
- Shorel'aran.
- Stay the course
- The reckoning is at hand!
- Time is of the essence.
- We will have justice!
- Ah, you have a death wish.
- I do not suffer fools easily.
- I had little patience to begin with!
- Mind yourself.
- Not very intelligent, are you?
- Run away pest!
- These are dark times indeed.
- Why do you linger?
- You waste my time.
- Choose wisely.
- Do not loiter.
- Everything has a price.
- I have one of a kind items.
- What do you seek?
- Your gold is welcome here.
- Glory to the Sin'dorei.
- State your Business!
- Anu'belore Dela'na.
- The Eternal Sun guides us.
- What Business have you?
- Victory lies ahead.
- Our enemies will fall.
- Anaria'shoala.
- You waste my time.
- I had little patience to begin with.
- It is a wonder you have lived this long.
- Ah, you have a death wish.
- I sell only the finest goods.
- Your gold is welcome here.
- Everything has a price.
- Do not loiter.
class_names:
- Death Knight
- Demon Hunter
- Druid
- Hunter
- Mage
- Monk
- Paladin
- Priest
- Rogue
- Shaman
- Warlock
- Warrior
races:
- Draenei
- Dwarf
- Gnome
- Human
- Night elf
- Worgen
- Void elf
- Lightforged
- Dark Iron
- Kul Tiran
- Pandaren
- Blood elf
- Goblin
- Orc
- Tauren
- Troll
- Undead
- Nightborne
- Highmountain
- Mag'har
- Zandalari
8 changes: 8 additions & 0 deletions test/faker/games/test_faker_world_of_warcraft.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ def test_heroes
assert @tester.hero.match(/\w+/)
end

def test_class_names
assert @tester.class_name.match(/\w+/)
end

def test_races
assert @tester.race.match(/\w+/)
end

def test_quotes
assert @tester.quote.match(/\w+/)
end
Expand Down