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 Faker::Games::HeroesOfTheStorm #1399

Merged
merged 3 commits into from
Oct 11, 2018
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ Contents
- [Faker::GreekPhilosophers](doc/greek_philosophers.md)
- [Faker::Hacker](doc/hacker.md)
- [Faker::HarryPotter](doc/harry_potter.md)
- [Faker::Games::HeroesOfTheStorm](doc/heroes_of_the_storm.md)
- [Faker::HeyArnold](doc/hey_arnold.md)
- [Faker::Hipster](doc/hipster.md)
- [Faker::HitchhikersGuideToTheGalaxy](doc/hitchhikers_guide_to_the_galaxy.md)
Expand Down
13 changes: 13 additions & 0 deletions doc/heroes_of_the_storm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Faker::Games::HeroesOfTheStorm

It might be available in the next version.

```ruby
Faker::Games::HeroesOfTheStorm.battleground #=> "Towers of Doom"

Faker::Games::HeroesOfTheStorm.class #=> "Support"

Faker::Games::HeroesOfTheStorm.hero #=> "Illidan"

Faker::Games::HeroesOfTheStorm.quote #=> "MEAT!!!"
```
2 changes: 1 addition & 1 deletion lib/faker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def disable_enforce_available_locales

Dir.glob(File.join(File.dirname(__FILE__), 'faker', '*.rb')).sort.each { |f| require f }

require 'faker/games/half_life'
Dir.glob(File.join(File.dirname(__FILE__), 'faker', 'games', '*.rb')).sort.each { |f| require f }

require 'helpers/char'
require 'helpers/unique_generator'
Expand Down
25 changes: 25 additions & 0 deletions lib/faker/games/heroes_of_the_storm.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# frozen_string_literal: true

module Faker
module Games
class HeroesOfTheStorm < Base
class << self
def battleground
fetch('heroes_of_the_storm.battlegrounds')
end

def class
fetch('heroes_of_the_storm.classes')
end

def hero
fetch('heroes_of_the_storm.heroes')
end

def quote
fetch('heroes_of_the_storm.quotes')
end
end
end
end
end
7 changes: 7 additions & 0 deletions lib/locales/en/heroes_of_the_storm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
en:
faker:
heroes_of_the_storm:
battlegrounds: ["Alterac Pass", "Battlefield of Eternity", "Blackheart's Bay", "Braxis Holdout", "Cursed Hollow", "Dragon Shire", "Garden of Terror", "Hanamura", "Haunted Mines", "Infernal Shrines", "Sky Temple", "Tomb of the Spider Queen", "Towers of Doom", "Volskaya Foundry", "Warhead Junction"]
classes: ["Assasin", "Multiclass", "Specialist", "Support", "Warrior"]
heroes: ["Abathur", "Alarak", "Alexstrasza", "Ana", "Ana", "Anub'arak", "Artanis", "Artanis", "Arthas", "Arthas", "Auriel", "Auriel", "Azmodan", "Azmodan", "Blaze", "Blaze", "Brightwing", "Brightwing", "Cassia", "Cassia", "Chen", "Chen", "Cho", "Cho", "Chromie", "Chromie", "D.Va", "D.Va", "Deckard", "Deckard", "Dehaka", "Dehaka", "Diablo", "Diablo", "E.T.C.", "E.T.C.", "Falstad", "Falstad", "Fenix", "Fenix", "Gall", "Gall", "Garrosh", "Garrosh", "Gazlowe", "Gazlowe", "Genji", "Genji", "Greymane", "Greymane", "Gul'dan", "Gul'dan", "Hanzo", "Hanzo", "Illidan", "Illidan", "Jaina", "Jaina", "Johanna", "Johanna", "Junkrat", "Junkrat", "Kael'thas", "Kael'thas", "Kel'Thuzad", "Kel'Thuzad", "Kerrigan", "Kerrigan", "Kharazim", "Kharazim", "Leoric", "Leoric", "Li Li", "Li Li", "Li-Ming", "Li-Ming", "Lt. Morales", "Lt. Morales", "Lunara", "Lunara", "Lúcio", "Lúcio", "Maiev", "Maiev", "Mal'Ganis", "Mal'Ganis", "Malfurion", "Malfurion", "Malthael", "Malthael", "Medivh", "Medivh", "Mephisto", "Mephisto", "Multi-class Multiclass\t", "Muradin", "Muradin", "Murky", "Murky", "Nazeebo", "Nazeebo", "Nova", "Nova", "Probius", "Probius", "Ragnaros", "Ragnaros", "Raynor", "Raynor", "Rehgar", "Rehgar", "Rexxar", "Rexxar", "Samuro", "Samuro", "Sgt. Hammer", "Sgt. Hammer", "Sonya", "Sonya", "Specialist Specialist\tAbathur", "Stitches", "Stitches", "Stukov", "Stukov", "Support Support\tAlexstrasza", "Sylvanas", "Sylvanas", "Tassadar", "Tassadar", "The Butcher", "The Butcher", "The Lost Vikings", "The Lost Vikings", "Thrall", "Thrall", "Tracer", "Tracer", "Tychus", "Tychus", "Tyrael", "Tyrael", "Tyrande", "Tyrande", "Uther", "Uther", "Valeera", "Valeera", "Valla", "Valla", "Warrior Warrior\tAnub'arak", "Whitemane", "Whitemane", "Xul", "Xul", "Yrel", "Yrel", "Zagara", "Zagara", "Zarya", "Zarya", "Zeratul", "Zeratul", "Zul'jin", "Zul'jin"]
quotes: ["Beat them like they owe you money!", "Careful wizard, your kind has upset the balance beforeo I become re-dead? Deader? ... Alive?\"", "Don't forget to check the pocket!", "Have you ever considered aiming anywhere other than the face?", "Hey, you look like the cover of E.T.C.s new album!", "Human words are hard to make together talking for expressing... things!", "I like happy things! Like puppies, and rainbows, and dead enemies!", "I must leave and I blame this failure upon you.", "Mrgrgrlrgrlgr!!!", "Oh my God, I can't believe I just killed a panda.", "Taunting life form; you are weak! And physically unappealing!", "Teammates. Much to improve.\" is a pretty good contender.", "That was easy! You were easy to kill!", "This will only hurt until you die.", "Ugh, I've known much better healers.", "We drink first blood!", "You look like you could actually be of use here!", "You might be a king, or just a street sweeper... yet sooner or later you dance with the reaper.", "You see this hero yes? Then kill them!", "You think us fools?", "You waste both my time and your breath, and the former has value."]
25 changes: 25 additions & 0 deletions test/test_faker_games_heroes_of_the_storm.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# frozen_string_literal: true

require_relative 'test_helper'

class TestFakerGamesHeroesOfTheStorm < Test::Unit::TestCase
def setup
@tester = Faker::Games::HeroesOfTheStorm
end

def test_battleground
assert @tester.battleground.match(/\w+/)
end

def test_class
assert @tester.class.match(/\w+/)
end

def test_hero
assert @tester.hero.match(/\w+/)
end

def test_quote
assert @tester.quote.match(/\w+/)
end
end