diff --git a/README.md b/README.md index bb7dd3f444..74a379cde9 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/doc/heroes_of_the_storm.md b/doc/heroes_of_the_storm.md new file mode 100644 index 0000000000..837ccd070d --- /dev/null +++ b/doc/heroes_of_the_storm.md @@ -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!!!" +``` diff --git a/lib/faker.rb b/lib/faker.rb index 788a1cc683..3b77a5c128 100644 --- a/lib/faker.rb +++ b/lib/faker.rb @@ -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' diff --git a/lib/faker/games/heroes_of_the_storm.rb b/lib/faker/games/heroes_of_the_storm.rb new file mode 100644 index 0000000000..ae1bb726ff --- /dev/null +++ b/lib/faker/games/heroes_of_the_storm.rb @@ -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 diff --git a/lib/locales/en/heroes_of_the_storm.yml b/lib/locales/en/heroes_of_the_storm.yml new file mode 100644 index 0000000000..378c183361 --- /dev/null +++ b/lib/locales/en/heroes_of_the_storm.yml @@ -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."] \ No newline at end of file diff --git a/test/test_faker_games_heroes_of_the_storm.rb b/test/test_faker_games_heroes_of_the_storm.rb new file mode 100644 index 0000000000..7ba2e5ba42 --- /dev/null +++ b/test/test_faker_games_heroes_of_the_storm.rb @@ -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