Skip to content

Commit

Permalink
Add planets and races to DragonBall (#1786)
Browse files Browse the repository at this point in the history
* Add planets and races to DragonBall

* Use version next in generators

* Use hypenated yaml array lists
  • Loading branch information
Matt Kelly authored Sep 28, 2020
1 parent 82f1489 commit d2a44db
Show file tree
Hide file tree
Showing 4 changed files with 279 additions and 1 deletion.
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 next
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 next
def planet
fetch('dragon_ball.planets')
end
end
end
end
Expand Down
244 changes: 243 additions & 1 deletion lib/locales/en/dragon_ball.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,246 @@
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"]
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
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

0 comments on commit d2a44db

Please sign in to comment.