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 planets and races to DragonBall #1786

Merged
merged 4 commits into from
Sep 28, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 2 additions & 0 deletions doc/japanese_media/dragon_ball.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ Available since version 1.8.0.

```ruby
Faker::JapaneseMedia::DragonBall.character #=> "Goku"
Faker::JapaneseMedia::DragonBall.race #=> "Saiyan"
Faker::JapaneseMedia::DragonBall.planet #=> "Namek"
```
26 changes: 26 additions & 0 deletions lib/faker/japanese_media/dragon_ball.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,32 @@ class << self
def character
fetch('dragon_ball.characters')
end

##
# Produces the name of a race from Dragon Ball.
#
# @return [String]
#
# @example
# Faker::Games::DragonBall.race #=> "Saiyan"
#
# @faker.version 1.8.0
mathisto marked this conversation as resolved.
Show resolved Hide resolved
def race
fetch('dragon_ball.races')
end

##
# Produces the name of a planet from Dragon Ball.
#
# @return [String]
#
# @example
# Faker::Games::DragonBall.planet #=> "Namek"
#
# @faker.version 1.8.0
def planet
fetch('dragon_ball.planets')
end
end
end
end
Expand Down
2 changes: 2 additions & 0 deletions lib/locales/en/dragon_ball.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ en:
faker:
dragon_ball:
characters: ["Goku", "Bulma", "Kami", "Yamcha", "Krillin", "Tien", "Piccolo", "Gohan", "Vegeta", "Kid Trunks", "Goten", "Future Trunks", "Pan", "Android 18", "Android 16", "Android 17", "Android 19", "Android 20", "Beerus", "Chaozu", "Chi-Chi", "Launch", "Mr. Satan", "Oolong", "Puar", "Videl", "Whis", "Yajirobe", "Demon King Piccolo", "Freeza", "Cell", "Majin Buu", "Goku Black", "Zamasu", "Baba", "Bra", "Bardock", "Champa", "Dende", "Dr. Gero", "Captain Ginyu", "Grandpa Gohan", "Jaco", "King Kai", "Supreme Kai", "Elder Kai", "Mr. Popo", "Nappa", "Uub", "Pilaf", "Raditz", "Shenron", "Vados", "Zarbon", "Broly", "Cooler", "King Cold", "Garlic Jr", "King Vegeta", "Nail", "Guru", "Hit", "Super Saiyan Goku", "Super Saiyan 2 Goku", "Super Saiyan 3 Goku", "Super Saiyan Vegeta", "Super Saiyan 2 Vegeta", "Majin Vegeta", "Super Saiyan Gohan", "Super Saiyan 2 Gohan", "Super Saiyan Goten", "Super Saiyan Trunks", "Vegito", "Gogeta", "Super Saiyan Blue Goku", "Super Saiyan Blue Vegeta", "Mystic Gohan", "Caulifla", "Baby", "Shenlong", "Ryan Shenlong", "Uh Shenlong", "Ryuu Shenlong", "Chi Shenlong", "Su Shenlong", "San Shenlong", "Li Shenlong"]
races: ["Android", "Angel", "Core Person", "Demon", "Dragon", "Earthling", "Majin", "Namekian", "Saiyan", "Tuffle", "Arlian", "Arcosian", "Bas", "Beenz", "Bio-Man", "Bio-Warrior", "Dinosaur", "Fairy", "Fishman", "Fish Snake", "Gelboian", "Ghost", "Giant Fish", "Giras", "Glass Tribe", "Imeckian", "Jiang Shi", "Jiggler", "Kabochan", "Kanassan", "Kashvar", "Kawa", "Konatsian", "Litt", "Machine Mutant", "Makyan", "Martian", "Meatian", "Mermaid", "Metalman", "Metamoran", "Neko Majin", "Niko", "Octo", "Ogre", "Plantian", "Saibaman", "Shamoian", "Shirt", "Skeleton", "Snackian", "Space Lemur", "Sprite", "Tech-Tech", "Three-Eyed People", "Toadmen", "Tritekian", "Vampa Beast", "Vampa Beetle", "Vampire", "Wolf Person", "Yardrat", "Zombie"]
mathisto marked this conversation as resolved.
Show resolved Hide resolved
planets: ["Alpha", "Arcose", "Arlia", "Babari", "Bas", "Big Gete Star", "Banna", "Beehay", "Beenz", "Chaos Area", "Cooler #6", "Cooler #98", "Cooler #256", "Core Area", "Cretaceous", "Daldon", "Dark Star", "Dorakiya", "Earth", "Eros", "Fake Namek", "Frieza #17", "Frieza #79", "Frieza #448", "Gaspa", "Gelbo", "Heaven", "Hera", "Ikonda", "Imecka", "Jung", "Jupiter", "Kaishin", "Kabocha", "Kanassa", "Konats", "Kuhn", "Litt", "Luud", "M-2", "Makyo Star", "Manu", "Mars", "Mayonnai", "Meat", "Metamor", "Mogina", "Monmaasu", "Monser", "Namchek", "Namchinno", "Name", "Namek", "Netfiss", "New Namek", "New Vegeta", "Nikochan", "Nutts", "Octo", "Outa", "Pital", "Polaris", "Popol", "DBS Potaufeu Screenshot 8", "Potaufeu", "Rudeeze", "Rygol 7", "Sacred World of the Kai", "Sadala", "Saute", "Shamo", "Shikk", "Slug", "Slum Area", "Snack", "Sweetz", "Synthesizer", "Tazba", "Tech-Tech", "Tigere", "Todokama", "Towale", "Tritek", "Vampa", "Vegeta", "Wagashi", "Watrin", "Yardrat", "Zoon", "Zorert"]
8 changes: 8 additions & 0 deletions test/faker/japanese_media/test_faker_dragon_ball.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,12 @@ def setup
def test_character
assert @tester.character.match(/\w+/)
end

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

def test_planet
assert @tester.planet.match(/\w+/)
end
end