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

Deprecate HeroesOfTheStorm.class #2031

Merged
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/games/heroes_of_the_storm.md
Expand Up @@ -3,7 +3,7 @@
```ruby
Faker::Games::HeroesOfTheStorm.battleground #=> "Towers of Doom"

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

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

Expand Down
21 changes: 16 additions & 5 deletions lib/faker/games/heroes_of_the_storm.rb
Expand Up @@ -18,16 +18,27 @@ def battleground
end

##
# Produces a class from Heroes of the Storm.
# This method is deprecated. The implementation will be removed in a near future release.
Zeragamba marked this conversation as resolved.
Show resolved Hide resolved
# Use `HeroesOfTheStorm.class_name` instead.
#
# @deprecated Use {#class_name} instead.
def class
warn '`HeroesOfTheStorm.class` is deprecated. Use `HeroesOfTheStorm.class_name` instead.'

super
end

##
# Produces a class name from Heroes of the Storm.
#
# @return [String]
#
# @example
# Faker::Games::HeroesOfTheStorm.class #=> "Support"
# Faker::Games::HeroesOfTheStorm.class_name #=> "Support"
#
# @faker.version 1.9.2
def class
fetch('heroes_of_the_storm.classes')
# @faker.version next
def class_name
fetch('heroes_of_the_storm.class_names')
end

##
Expand Down
2 changes: 1 addition & 1 deletion lib/locales/en/heroes_of_the_storm.yml
Expand Up @@ -2,6 +2,6 @@ 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 Temple", "Haunted Mines", "Infernal Shrines", "Sky Temple", "Tomb of the Spider Queen", "Towers of Doom", "Volskaya Foundry", "Warhead Junction"]
classes: ["Bruiser", "Healer", "Melee Assassin", "Ranged Assassin", "Support", "Tank"]
class_names: ["Bruiser", "Healer", "Melee Assassin", "Ranged Assassin", "Support", "Tank"]
heroes: ["Abathur", "Alarak", "Alexstrasza", "Ana", "Anduin", "Anub'arak", "Artanis", "Arthas", "Auriel", "Azmodan", "Blaze", "Brightwing", "Cassia", "Chen", "Cho", "Chromie", "D.Va", "Deckard", "Dehaka", "Diablo", "E.T.C.", "Falstad", "Fenix", "Gall", "Garrosh", "Gazlowe", "Genji", "Greymane", "Gul'dan", "Hanzo", "Illidan", "Imperius", "Jaina", "Johanna", "Junkrat", "Kael'thas", "Kel'Thuzad", "Kerrigan", "Kharazim", "Leoric", "Li Li", "Li-Ming", "Lt. Morales", "Lunara", "Lúcio", "Maiev", "Mal'Ganis", "Malfurion", "Malthael", "Medivh", "Mephisto", "Muradin", "Murky", "Nazeebo", "Nova", "Orphea", "Probius", "Ragnaros", "Raynor", "Rehgar", "Rexxar", "Samuro", "Sgt. Hammer", "Sonya", "Stitches", "Stukov", "Sylvanas", "Tassadar", "The Butcher", "The Lost Vikings", "Thrall", "Tracer", "Tychus", "Tyrael", "Tyrande", "Uther", "Valeera", "Valla", "Whitemane", "Xul", "Yrel", "Zagara", "Zarya", "Zeratul", "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."]
4 changes: 2 additions & 2 deletions test/faker/games/test_faker_heroes_of_the_storm.rb
Expand Up @@ -11,8 +11,8 @@ def test_battleground
assert @tester.battleground.match(/\w+/)
end

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

def test_hero
Expand Down