-
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 Naruto to the JapaneseMedia category (#2139)
* Add Naruto to the JapaneseMedia category * Fix rubocop issues * Use dash syntax for yaml arrays * Update README Co-authored-by: Stephen A. Wilson <[email protected]>
- Loading branch information
1 parent
fe65b43
commit cb72197
Showing
5 changed files
with
329 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,11 @@ | ||
# Faker::JapaneseMedia::Naruto | ||
|
||
```ruby | ||
Faker::JapaneseMedia::Naruto.character #=> "Naruto Uzumaki" | ||
|
||
Faker::JapaneseMedia::Naruto.village #=> "Konohagakure (Leaf Village)" | ||
|
||
Faker::JapaneseMedia::Naruto.eye #=> "Konohagakure (Byakugan)" | ||
|
||
Faker::JapaneseMedia::Naruto.demon #=> "Nine-Tails (Kurama)" | ||
``` |
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,61 @@ | ||
# frozen_string_literal: true | ||
|
||
module Faker | ||
class JapaneseMedia | ||
class Naruto < Base | ||
class << self | ||
## | ||
# Produces a character from Naruto. | ||
# | ||
# @return [String] | ||
# | ||
# @example | ||
# Faker::JapaneseMedia::Naruto.character #=> "Naruto Uzumaki" | ||
# | ||
# @faker.version next | ||
def character | ||
fetch('naruto.characters') | ||
end | ||
|
||
## | ||
# Produces a village from Naruto. | ||
# | ||
# @return [String] | ||
# | ||
# @example | ||
# Faker::JapaneseMedia::Naruto.village #=> "Konohagakure (Leaf Village)" | ||
# | ||
# @faker.version next | ||
def village | ||
fetch('naruto.villages') | ||
end | ||
|
||
## | ||
# Produces a eye from Naruto. | ||
# | ||
# @return [String] | ||
# | ||
# @example | ||
# Faker::JapaneseMedia::Naruto.eye #=> "Konohagakure (Byakugan)" | ||
# | ||
# @faker.version next | ||
def eye | ||
fetch('naruto.eyes') | ||
end | ||
|
||
## | ||
# Produces a demon from Naruto. | ||
# | ||
# @return [String] | ||
# | ||
# @example | ||
# Faker::JapaneseMedia::Naruto.demon #=> "Nine-Tails (Kurama)" | ||
# | ||
# @faker.version next | ||
def demon | ||
fetch('naruto.demons') | ||
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,231 @@ | ||
en: | ||
faker: | ||
naruto: | ||
characters: | ||
- "Naruto Uzumaki" | ||
- "Kakashi Hatake" | ||
- "Sasuke Uchiha" | ||
- "Minato Namikaze" | ||
- "Obito Uchiha" | ||
- "Itachi Uchiha" | ||
- "Abiru" | ||
- "Agara" | ||
- "Agari" | ||
- "Agari Kaisen" | ||
- "Ageha" | ||
- "Agira Ryūdōin" | ||
- "Ahiko" | ||
- "Aho Bird" | ||
- "Aino" | ||
- "Ajisai" | ||
- "Akaboshi" | ||
- "Akahoshi" | ||
- "Akamaru" | ||
- "Akane" | ||
- "kane (Kunoichi)" | ||
- "Akane's Father" | ||
- "Akari Tatsushiro" | ||
- "Akatsuchi" | ||
- "Akemaru" | ||
- "Akino" | ||
- "Akio" | ||
- "Akita Inuzuka" | ||
- "Akkun" | ||
- "Amachi" | ||
- "Amado" | ||
- "Amagi" | ||
- "Amai" | ||
- "Amaru" | ||
- "Amayo" | ||
- "Ameno" | ||
- "Ameyuki" | ||
- "Ameyuri Ringo" | ||
- "Ami" | ||
- "Amino" | ||
- "Amuda" | ||
- "Anato" | ||
- "Anbu Commander" | ||
- "Aniki" | ||
- "Anko Mitarashi" | ||
- "Ao" | ||
- "Aoba Yamashiro" | ||
- "Aoba Yamashiro" | ||
- "Aoda" | ||
- "Aoi (game)" | ||
- "Aoi Rokushō" | ||
- "Aoneko" | ||
- "Arai" | ||
- "Arashi" | ||
- "Arashi Umeya" | ||
- "Araya" | ||
- "Armadiko" | ||
- "Asaka" | ||
- "Asaki" | ||
- "Asami" | ||
- "Ashimaru" | ||
- "Ashina" | ||
- "Ashina Uzumaki" | ||
- "Ashitaba" | ||
- "Asuma Sarutobi" | ||
- "Asura Path (character)" | ||
- "Asura Ōtsutsuki" | ||
- "Atsui" | ||
- "Ayame" | ||
- "Azami" | ||
- "Azure Fang" | ||
- "Baiu" | ||
- "Baji" | ||
- "Baki" | ||
- "Baku" | ||
- "Baku (Anbu)" | ||
- "Bakuto" | ||
- "Bando" | ||
- "Bandō" | ||
- "Banna" | ||
- "Bansai" | ||
- "Baraki" | ||
- "Baru Uchiha" | ||
- "Beekeeper" | ||
- "Bekkō" | ||
- "Benga" | ||
- "Benten" | ||
- "Bird-Masked Anbu Member" | ||
- "Bisuke" | ||
- "Biwako Sarutobi" | ||
- "Black Shadow" | ||
- "Black Zetsu" | ||
- "Blue B" | ||
- "Boar-Masked Anbu Member" | ||
- "Boro" | ||
- "Boruto Uzumaki" | ||
- "Boxing Kangaroos" | ||
- "Breeze Dancer" | ||
- "Bull" | ||
- "Buna" | ||
- "Bunpuku" | ||
- "Buntan Kurosuki" | ||
- "Bunzō" | ||
- "Burami" | ||
- "Buriko Nekoka" | ||
- "Butsuma Senju" | ||
- "Byakuren" | ||
- "Captain of the Ghost Ship" | ||
- "Chamaru" | ||
- "Chamū" | ||
- "Chen" | ||
- "Chibi" | ||
- "Chichiatsu" | ||
- "Chikara" | ||
- "Chino" | ||
- "Chiriku" | ||
- "Chishima" | ||
- "Chiyo" | ||
- "Chiyo (princess)" | ||
- "Chiyomatsu" | ||
- "Chōbee Akimichi" | ||
- "Chōchō Akimichi" | ||
- "Chōhan" | ||
- "Chōji Akimichi" | ||
- "Chōji's Mothe" | ||
- "Chōjūrō" | ||
- "Chōmei" | ||
- "Chōseki" | ||
- "Chōza Akimichi" | ||
- "Chūji" | ||
- "Chūkaku" | ||
- "Chūkichi" | ||
- "Chūshin" | ||
- "Claw Daimyō" | ||
- "Code" | ||
- "Conch King" | ||
- "Condor" | ||
- "Crimson Fist" | ||
- "Curse Jutsu Master" | ||
- "Cursed Warrior" | ||
- "Daen Nara" | ||
- "Daibutsu" | ||
- "Daichi" | ||
- "Daikoku Funeno" | ||
- "Daimaru" | ||
- "Dajimu" | ||
- "Dan Katō" | ||
- "Dango Mitsuki" | ||
- "Dangō" | ||
- "Danjō" | ||
- "Danzō Shimura" | ||
- "Daore Dōtonbori" | ||
- "Darui" | ||
- "Datsuji" | ||
- "Deepa" | ||
- "Deidara" | ||
- "Delta" | ||
- "Demonic Statue of the Outer Path" | ||
- "Dengaku" | ||
- "Denka" | ||
- "Denki Kaminarimon" | ||
- "Disonasu" | ||
- "Dodai" | ||
- "Dokan" | ||
- "Doki" | ||
- "Dokku" | ||
- "Don" | ||
- "Doragu" | ||
- "Dosu Kinuta" | ||
- "Dotō Kazahana" | ||
- "Dread Lion" | ||
- "Dōshin" | ||
- "Dōshu Goetsu" | ||
- "Dōtō Akimichi" | ||
- "Eagle-Masked Anbu Member" | ||
- "Earth Daimyō" | ||
- "Earth Prison Golem" | ||
- "Ebisu" | ||
- "Ebizō" | ||
- "Ehō Norimaki" | ||
- "Emi" | ||
- "Emina" | ||
- "Emiru" | ||
- "En no Gyōja" | ||
- "En Oyashiro" | ||
- "Enchū Nara" | ||
- "Enko Onikuma" | ||
- "Enra" | ||
- "Ensui Nara" | ||
- "Enzo Tenrō" | ||
- "Ereki Kaminarimon" | ||
- "Erimaki Sharo" | ||
- "Etoro Konjiki" | ||
- "Evil Minister of the Tea Daimyō" | ||
- "F" | ||
- "Fang Daimyō" | ||
- "Faz" | ||
- "Fire Daimyō (Part I-II)" | ||
- "First Animal Path (character)" | ||
- "First Hoshikage" | ||
- "Former Leader of Nadeshiko Village" | ||
- "Fox-Masked Anbu Member" | ||
villages: | ||
- "Konohagakure (Leaf Village)" | ||
- "Sunagakure (Sand Village)" | ||
- "Kirigakure (Mist Village)" | ||
- "Kumogakure (Cloud Village)" | ||
- "Iwagakure (Stone Village)" | ||
eyes: | ||
- "Byakugan" | ||
- "Sharingan" | ||
- "Jōgan" | ||
- "Mangekyō Sharingan" | ||
- "Rinnegan" | ||
- "Tenseigan" | ||
- "Rinne-Sharingan" | ||
demons: | ||
- "One-Tails (Shukaku)" | ||
- "Two-Tails (Matatabi)" | ||
- "Three-Tails (Isobu)" | ||
- "Four-Tails (Son Goku)" | ||
- "Five-Tails (Kokuo)" | ||
- "Six-Tails (Saiken)" | ||
- "Seven-Tails (Chomei)" | ||
- "Eight-Tails (Gyuki)" | ||
- "Nine-Tails (Kurama)" | ||
- "Ten-Tails (Shinju)" |
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,25 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative '../../test_helper' | ||
|
||
class TestFakerJapaneseNaruto < Test::Unit::TestCase | ||
def setup | ||
@tester = Faker::JapaneseMedia::Naruto | ||
end | ||
|
||
def test_character | ||
assert @tester.character.match(/\w+/) | ||
end | ||
|
||
def test_village | ||
assert @tester.village.match(/\w+/) | ||
end | ||
|
||
def test_eye | ||
assert @tester.eye.match(/\w+/) | ||
end | ||
|
||
def test_demon | ||
assert @tester.demon.match(/\w+/) | ||
end | ||
end |