Skip to content

Commit

Permalink
Add Conan to the JapaneseMedia category (faker-ruby#2142)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmai0512 authored and droznyk committed Oct 23, 2020
1 parent 1d289b4 commit 97b8fa0
Show file tree
Hide file tree
Showing 5 changed files with 250 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
- [Faker::JapaneseMedia::SwordArtOnline](doc/japanese_media/sword_art_online.md)
- [Faker::JapaneseMedia::Naruto](doc/japanese_media/naruto.md)
- [Faker::JapaneseMedia::Doraemon](doc/japanese_media/doraemon.md)
- [Faker::JapaneseMedia::Conan](doc/japanese_media/conan.md)

### Movies
- [Faker::Movie](doc/movies/movie.md)
Expand Down
9 changes: 9 additions & 0 deletions doc/japanese_media/conan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Faker::JapaneseMedia::Conan

```ruby
Faker::JapaneseMedia::Conan.character #=> "Conan Edogawa"

Faker::JapaneseMedia::Conan.gadget #=> "Voice-Changing Bowtie"

Faker::JapaneseMedia::Conan.vehicle #=> "Agasa's Volkswagen Beetle"
```
48 changes: 48 additions & 0 deletions lib/faker/japanese_media/conan.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# frozen_string_literal: true

module Faker
class JapaneseMedia
class Conan < Base
class << self
##
# Produces a character from Conan.
#
# @return [String]
#
# @example
# Faker::JapaneseMedia::Conan.character #=> "Conan Edogawa"
#
# @faker.version next
def character
fetch('conan.characters')
end

##
# Produces a gadget from Conan.
#
# @return [String]
#
# @example
# Faker::JapaneseMedia::Conan.gadget #=> "Voice-Changing Bowtie"
#
# @faker.version next
def gadget
fetch('conan.gadgets')
end

##
# Produces a vehicle from Conan.
#
# @return [String]
#
# @example
# Faker::JapaneseMedia::Conan.vehicle #=> "Agasa's Volkswagen Beetle"
#
# @faker.version next
def vehicle
fetch('conan.vehicles')
end
end
end
end
end
171 changes: 171 additions & 0 deletions lib/locales/en/conan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
en:
faker:
conan:
characters:
- Shinichi Kudo
- Conan Edogawa
- Ran Mouri
- Kogoro Mouri
- Ai Haibara
- Ayumi Yoshida
- Mitsuhiko Tsuburaya
- Genta Kojima
- Hiroshi Agasa
- Sonoko Suzuki
- Eri Kisaki
- Yusaku Kudo
- Yukiko Kudo
- Heiji Hattori
- Kazuha Toyama
- Yoko Okino
- Sumiko Kobayashi
- Tomoaki Araide
- Makoto Kyogoku
- Shizuka Hattori
- Jirokichi Suzuki
- Eisuke Hondou
- Azusa Enomoto
- Subaru Okiya
- Masumi Sera
- Shukichi Haneda
- Sakurako Yonehara
- Juzo Megure
- Ninzaburo Shiratori
- Miwako Sato
- Wataru Takagi
- Kazunobu Chiba
- Yumi Miyamoto
- Naeko Miike
- Kiyonaga Matsumoto
- Inspector Yuminaga
- Shintaro Chaki
- Hyoue Kuroda
- Heizo Hattori
- Ginshiro Toyama
- Goro Otaki
- Kansuke Yamato
- Yui Uehara
- Taka'aki Morofushi (Komei)
- Sango Yokomizo
- Misao Yamamura
- Jugo Yokomizo
- Fumimaro Ayanokoji
- Rei Furuya (Bourbon)
- Hiromitsu Morofushi (Scotch)
- Yuya Kazami
- Shuichi Akai
- Jodie Starling (Jodie Saintemillion)
- James Black
- Andre Camel
- Hidemi Hondou (Kir)
- Ethan Hondou
- Mary Sera
- Tsutomu Akai
- Gin
- Vodka
- Chris Vineyard (Vermouth)
- Chianti
- Korn
- Shiho Miyano (Sherry)
- Akemi Miyano
- Elena Miyano
- Atsushi Miyano
- Tequila
- Kenzo Masuyama (Pisco)
- Calvados
- Rikumichi Kusuda
- Ki'ichiro Numabuchi
- Kaito Kuroba
- Kaitou Kid
- Aoko Nakamori
- Ginzo Nakamori
- Toichi Kuroba
- Chikage Kuroba
- Konosuke Jii
- Kaitou Corbeau
- Akako Koizumi
- Saguru Hakuba
- Snake
- Spider
- Scar Akai
- Kohji Haneda
- Asaka
- Momiji Ooka
- Rumi Wakasa
- Kanenori Wakita
- Muga Iori

gadgets:
- Voice-Changing Bowtie
- Power-Enhancing Kick Shoes
- Glasses Modification (Microphone)
- Stun-Gun Wristwatch
- Portable Bento Box Fax
- Detective Boys Badge
- Turbo Engine Skateboard
- Criminal Tracking Glasses
- Transmitter
- Elasticity Suspenders
- Button Speaker
- Earring Cellphone
- Electronic Notebook Map
- Wristwatch Flashlight
- Kamen Yaiba Voice Changer/Pen Voice Changer
- Voice-Changing Face Mask
- Anywhere Ball Dispensing Belt
- Voice-Changing Choker
- Glasses Modification (Bullet Proof Lenses)
- Glasses Modification (Telescopic Lenses)
- Hang Glider/Paraglider
- Cuff Link Speakers
- Mini Air Tank
- Turbo Engine Snowboard
- Satellite-Telephone Wristwatch
- Drone
- Card Gun
- Hang Glider Cape
- Turbo Engine Scooter
- Turbo Engine Skates

vehicles:
- Agasa's Volkswagen Beetle
- Yukiko's Jaguar E-Type
- Masumi's Yamaha Artesia XT400
- Jirokichi's Harley Davidson Electra Glide
- Okiya's Subaru 360
- Eri's Mini Cooper
- Baya's Cobra
- Jii's Vanden Plas Princess 1100
- Fusae's Jaguar Mark 2
- Sato's Mazda RX-7
- Takagi's Nissan Tiida Latio
- Takagi's Skyline ER34
- Chiba's Fiat 500
- Chiba's Nissan GT-R R35 (2017)
- Uehara's Honda Inspire
- Gin's Porsche 356 A
- Chianti's Dodge Viper
- Vermouth's Harley-Davidson V-Rod
- Rei's Mazda RX-7
- Vodka's Porsche 914
- Chianti's Ducati 1098
- Araide's Toyota Prius (XW10)
- Vermouth's De Tomaso Pantera
- Shuichi's Chevrolet C-1500
- Shuichi's Ford Mustang
- James' Mercedes CLK320
- Jodie's Peugeot 607
- Hidemi's Citroën BX
- FBI's Toyota HiAce/Regius Ace
- FBI's Volvo S40
- FBI's Lexus GS
- FBI's Mercedes CLK320
- Isuzu Cubic bus
- Nissan X-Trail
- Toichi's Car
- Hidemi's Motorcycle
- Heiji's Motorcycle
- Snake's car
- Shiratori's car
- Kusuda's Nissan
- Yukiko's Motorcycle
21 changes: 21 additions & 0 deletions test/faker/japanese_media/test_faker_conan.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# frozen_string_literal: true

require_relative '../../test_helper'

class TestFakerJapaneseConan < Test::Unit::TestCase
def setup
@tester = Faker::JapaneseMedia::Conan
end

def test_character
assert @tester.character.match(/\w+/)
end

def test_gadget
assert @tester.gadget.match(/\w+/)
end

def test_vehicle
assert @tester.vehicle.match(/\w+/)
end
end

0 comments on commit 97b8fa0

Please sign in to comment.