-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Clash Of Clans to the Game category (#2143)
* Add Conan to the JapaneseMedia category * Updated README * Fix the clash_of_clan yaml file * Changed the english mistake in clash_of_clans.md file * Removed the line
- Loading branch information
1 parent
396e01a
commit 1447abf
Showing
5 changed files
with
180 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Faker::Games::ClashOfClans | ||
|
||
```ruby | ||
Faker::Games::ClashOfClans.troop #=> "Barbarian" | ||
|
||
Faker::Games::ClashOfClans.rank #=> "Legend" | ||
|
||
Faker::Games::ClashOfClans.defensive_building #=> "Cannon" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# frozen_string_literal: true | ||
|
||
module Faker | ||
class Games | ||
class ClashOfClans < Base | ||
class << self | ||
## | ||
# Produces the name of a troop from Clash of Clans. | ||
# | ||
# @return [String] | ||
# | ||
# @example | ||
# Faker::Games::ClashOfClans.troop #=> "Barbarian" | ||
# | ||
# @faker.version next | ||
def troop | ||
fetch('games.clash_of_clans.troops') | ||
end | ||
|
||
## | ||
# Produces the name of a rank from Clash Of Clans. | ||
# | ||
# @return [String] | ||
# | ||
# @example | ||
# Faker::Games::ClashOfClans.rank #=> "Legend" | ||
# | ||
# @faker.version next | ||
def rank | ||
fetch('games.clash_of_clans.ranks') | ||
end | ||
|
||
## | ||
# Produces the name of a defensive buiding from Clash Of Clans. | ||
# | ||
# @return [String] | ||
# | ||
# @example | ||
# Faker::Games::ClashOfClans.defensive_building #=> "Cannon" | ||
# | ||
# @faker.version next | ||
def defensive_building | ||
fetch('games.clash_of_clans.defensive_buildings') | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
en: | ||
faker: | ||
games: | ||
clash_of_clans: | ||
troops: | ||
- Barbarian | ||
- Archer | ||
- Giant | ||
- Goblin | ||
- Wall Breaker | ||
- Balloon | ||
- Wizard | ||
- Healer | ||
- Dragon | ||
- P.E.K.K.A | ||
- Baby Dragon | ||
- Miner | ||
- Electro Dragon | ||
- Yeti (Yetimite) | ||
- Ice Wizard | ||
- Battle Ram (Barbarian) | ||
- Pumpkin Barbarian (Barbarian) | ||
- Giant Skeleton | ||
- Skeleton Barrel (Skeleton) | ||
- El Primo | ||
- Party Wizard | ||
- Royal Ghost | ||
- Minion | ||
- Hog Rider | ||
- Valkyrie | ||
- Golem (Golemite) | ||
- Witch (Skeleton) | ||
- Lava Hound (Lava Pup) | ||
- Bowler | ||
- Ice Golem | ||
- Headhunter | ||
- Raged Barbarian | ||
- Sneaky Archer | ||
- Boxer Giant | ||
- Beta Minion | ||
- Bomber | ||
- Baby Dragon | ||
- Cannon Cart | ||
- Night Witch (Bat) | ||
- Drop Ship (Skeleton) | ||
- Super P.E.K.K.A | ||
- Hog Glider (Hog Rider) | ||
|
||
ranks: | ||
- Unranked | ||
- Bronze III | ||
- Bronze II | ||
- Bronze I | ||
- Silver III | ||
- Silver II | ||
- Silver I | ||
- Gold III | ||
- Gold II | ||
- Gold I | ||
- Crystal III | ||
- Crystal II | ||
- Crystal I | ||
- Master III | ||
- Master II | ||
- Master I | ||
- Champion III | ||
- Champion II | ||
- Champion I | ||
- Titan III | ||
- Titan II | ||
- Titan I | ||
- Legend | ||
|
||
defensive_buildings: | ||
- Cannon | ||
- Archer Tower | ||
- Mortar | ||
- Air Defense | ||
- Wizard Tower | ||
- Air Sweeper | ||
- Hidden Tesla | ||
- Bomb Tower | ||
- X-Bow | ||
- Inferno Tower | ||
- Eagle Artillery | ||
- Giga Tesla | ||
- Giga Inferno | ||
- Scattershot | ||
- Walls | ||
- Traps | ||
- Double Cannon | ||
- Firecrackers | ||
- Crusher | ||
- Guard Post | ||
- Air Bombs | ||
- Multi Mortar | ||
- Roaster | ||
- Giant Cannon | ||
- Mega Tesla | ||
- Lava Launcher | ||
- Traps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative '../../test_helper' | ||
|
||
class TestFakerClashOfClans < Test::Unit::TestCase | ||
def setup | ||
@tester = Faker::Games::ClashOfClans | ||
end | ||
|
||
def test_troop | ||
assert @tester.troop.match(/\w+/) | ||
end | ||
|
||
def test_rank | ||
assert @tester.rank.match(/\w+/) | ||
end | ||
|
||
def test_defensive_building | ||
assert @tester.defensive_building.match(/\w+/) | ||
end | ||
end |