faker 2.4.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +34 -0
- data/lib/faker/default/app.rb +2 -1
- data/lib/faker/default/avatar.rb +2 -1
- data/lib/faker/default/chuck_norris.rb +1 -1
- data/lib/faker/default/date.rb +59 -2
- data/lib/faker/default/internet.rb +4 -1
- data/lib/faker/default/nation.rb +48 -5
- data/lib/faker/default/number.rb +124 -0
- data/lib/faker/default/restaurant.rb +54 -2
- data/lib/faker/default/time.rb +85 -8
- data/lib/faker/games/zelda.rb +1 -1
- data/lib/faker/japanese_media/one_piece.rb +54 -0
- data/lib/faker/movies/back_to_the_future.rb +28 -0
- data/lib/faker/movies/ghostbusters.rb +28 -0
- data/lib/faker/movies/harry_potter.rb +54 -0
- data/lib/faker/movies/hitchhikers_guide_to_the_galaxy.rb +69 -0
- data/lib/faker/movies/lebowski.rb +27 -0
- data/lib/faker/movies/lord_of_the_rings.rb +28 -0
- data/lib/faker/movies/princess_bride.rb +19 -0
- data/lib/faker/movies/star_wars.rb +94 -0
- data/lib/faker/movies/v_for_vendetta.rb +29 -0
- data/lib/faker/music/umphreys_mcgee.rb +9 -0
- data/lib/faker/sports/basketball.rb +36 -0
- data/lib/faker/sports/football.rb +45 -0
- data/lib/faker/tv_shows/aqua_teen_hunger_force.rb +9 -0
- data/lib/faker/tv_shows/bojack_horseman.rb +28 -0
- data/lib/faker/tv_shows/buffy.rb +45 -0
- data/lib/faker/tv_shows/community.rb +19 -0
- data/lib/faker/tv_shows/dr_who.rb +78 -2
- data/lib/faker/tv_shows/dumb_and_dumber.rb +28 -0
- data/lib/faker/tv_shows/family_guy.rb +28 -0
- data/lib/faker/tv_shows/friends.rb +27 -0
- data/lib/faker/tv_shows/game_of_thrones.rb +46 -0
- data/lib/faker/tv_shows/hey_arnold.rb +27 -0
- data/lib/faker/tv_shows/how_i_met_your_mother.rb +37 -0
- data/lib/faker/tv_shows/michael_scott.rb +13 -0
- data/lib/faker/tv_shows/new_girl.rb +19 -0
- data/lib/faker/tv_shows/parks_and_rec.rb +18 -0
- data/lib/faker/tv_shows/rick_and_morty.rb +28 -0
- data/lib/faker/tv_shows/ru_paul.rb +18 -0
- data/lib/faker/tv_shows/seinfeld.rb +28 -0
- data/lib/faker/tv_shows/silicon_valley.rb +75 -0
- data/lib/faker/tv_shows/simpsons.rb +28 -0
- data/lib/faker/tv_shows/south_park.rb +19 -0
- data/lib/faker/tv_shows/star_trek.rb +36 -0
- data/lib/faker/tv_shows/stargate.rb +28 -0
- data/lib/faker/tv_shows/stranger_things.rb +19 -0
- data/lib/faker/tv_shows/the_expanse.rb +36 -0
- data/lib/faker/tv_shows/the_fresh_prince_of_bel_air.rb +28 -0
- data/lib/faker/tv_shows/the_it_crowd.rb +37 -0
- data/lib/faker/tv_shows/the_thick_of_it.rb +28 -0
- data/lib/faker/tv_shows/twin_peaks.rb +28 -0
- data/lib/faker/tv_shows/venture_bros.rb +38 -0
- data/lib/faker/version.rb +1 -1
- data/lib/locales/en-TH.yml +360 -0
- data/lib/locales/en/color.yml +1 -1
- data/lib/locales/en/dr_who.yml +1 -1
- data/lib/locales/th.yml +380 -0
- metadata +6 -4
@@ -4,30 +4,99 @@ module Faker
|
|
4
4
|
class Movies
|
5
5
|
class HitchhikersGuideToTheGalaxy < Base
|
6
6
|
class << self
|
7
|
+
##
|
8
|
+
# Produces a character from The Hitchhiker's Guide to the Galaxy.
|
9
|
+
#
|
10
|
+
# @return [String]
|
11
|
+
#
|
12
|
+
# @example
|
13
|
+
# Faker::Movies::HitchhikersGuideToTheGalaxy.character #=> "Marvin"
|
14
|
+
#
|
15
|
+
# @faker.version 1.8.0
|
7
16
|
def character
|
8
17
|
fetch('hitchhikers_guide_to_the_galaxy.characters')
|
9
18
|
end
|
10
19
|
|
20
|
+
##
|
21
|
+
# Produces a location from The Hitchhiker's Guide to the Galaxy.
|
22
|
+
#
|
23
|
+
# @return [String]
|
24
|
+
#
|
25
|
+
# @example
|
26
|
+
# Faker::Movies::HitchhikersGuideToTheGalaxy.location
|
27
|
+
# #=> "Arthur Dent's house"
|
28
|
+
#
|
29
|
+
# @faker.version 1.8.0
|
11
30
|
def location
|
12
31
|
fetch('hitchhikers_guide_to_the_galaxy.locations')
|
13
32
|
end
|
14
33
|
|
34
|
+
##
|
35
|
+
# Produces a Marvin quote from The Hitchhiker's Guide to the Galaxy.
|
36
|
+
#
|
37
|
+
# @return [String]
|
38
|
+
#
|
39
|
+
# @example
|
40
|
+
# Faker::Movies::HitchhikersGuideToTheGalaxy.marvin_quote
|
41
|
+
# #=> "Life? Don't talk to me about life."
|
42
|
+
#
|
43
|
+
# @faker.version 1.8.0
|
15
44
|
def marvin_quote
|
16
45
|
fetch('hitchhikers_guide_to_the_galaxy.marvin_quote')
|
17
46
|
end
|
18
47
|
|
48
|
+
##
|
49
|
+
# Produces a planet from The Hitchhiker's Guide to the Galaxy.
|
50
|
+
#
|
51
|
+
# @return [String]
|
52
|
+
#
|
53
|
+
# @example
|
54
|
+
# Faker::Movies::HitchhikersGuideToTheGalaxy.planet
|
55
|
+
# #=> "Magrathea"
|
56
|
+
#
|
57
|
+
# @faker.version 1.8.0
|
19
58
|
def planet
|
20
59
|
fetch('hitchhikers_guide_to_the_galaxy.planets')
|
21
60
|
end
|
22
61
|
|
62
|
+
##
|
63
|
+
# Produces a quote from The Hitchhiker's Guide to the Galaxy.
|
64
|
+
#
|
65
|
+
# @return [String]
|
66
|
+
#
|
67
|
+
# @example
|
68
|
+
# Faker::Movies::HitchhikersGuideToTheGalaxy.quote
|
69
|
+
# #=> "In the beginning, the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."
|
70
|
+
#
|
71
|
+
# @faker.version 1.8.0
|
23
72
|
def quote
|
24
73
|
fetch('hitchhikers_guide_to_the_galaxy.quotes')
|
25
74
|
end
|
26
75
|
|
76
|
+
##
|
77
|
+
# Produces a species from The Hitchhiker's Guide to the Galaxy.
|
78
|
+
#
|
79
|
+
# @return [String]
|
80
|
+
#
|
81
|
+
# @example
|
82
|
+
# Faker::Movies::HitchhikersGuideToTheGalaxy.specie
|
83
|
+
# #=> "Perfectly Normal Beast"
|
84
|
+
#
|
85
|
+
# @faker.version 1.8.0
|
27
86
|
def specie
|
28
87
|
fetch('hitchhikers_guide_to_the_galaxy.species')
|
29
88
|
end
|
30
89
|
|
90
|
+
##
|
91
|
+
# Produces a starship from The Hitchhiker's Guide to the Galaxy.
|
92
|
+
#
|
93
|
+
# @return [String]
|
94
|
+
#
|
95
|
+
# @example
|
96
|
+
# Faker::Movies::HitchhikersGuideToTheGalaxy.starship
|
97
|
+
# #=> "Vogon Constructor Fleet"
|
98
|
+
#
|
99
|
+
# @faker.version 1.8.0
|
31
100
|
def starship
|
32
101
|
fetch('hitchhikers_guide_to_the_galaxy.starships')
|
33
102
|
end
|
@@ -4,14 +4,41 @@ module Faker
|
|
4
4
|
class Movies
|
5
5
|
class Lebowski < Base
|
6
6
|
class << self
|
7
|
+
##
|
8
|
+
# Produces an actor from The Big Lebowski.
|
9
|
+
#
|
10
|
+
# @return [String]
|
11
|
+
#
|
12
|
+
# @example
|
13
|
+
# Faker::Movies::Lebowski.actor #=> "John Goodman"
|
14
|
+
#
|
15
|
+
# @faker.version 1.8.8
|
7
16
|
def actor
|
8
17
|
fetch('lebowski.actors')
|
9
18
|
end
|
10
19
|
|
20
|
+
##
|
21
|
+
# Produces a character from The Big Lebowski.
|
22
|
+
#
|
23
|
+
# @return [String]
|
24
|
+
#
|
25
|
+
# @example
|
26
|
+
# Faker::Movies::Lebowski.character #=> "Jackie Treehorn"
|
27
|
+
#
|
28
|
+
# @faker.version 1.8.8
|
11
29
|
def character
|
12
30
|
fetch('lebowski.characters')
|
13
31
|
end
|
14
32
|
|
33
|
+
##
|
34
|
+
# Produces a quote from The Big Lebowski.
|
35
|
+
#
|
36
|
+
# @return [String]
|
37
|
+
#
|
38
|
+
# @example
|
39
|
+
# Faker::Movies::Lebowski.quote #=> "Forget it, Donny, you're out of your element!"
|
40
|
+
#
|
41
|
+
# @faker.version 1.8.8
|
15
42
|
def quote
|
16
43
|
fetch('lebowski.quotes')
|
17
44
|
end
|
@@ -4,14 +4,42 @@ module Faker
|
|
4
4
|
class Movies
|
5
5
|
class LordOfTheRings < Base
|
6
6
|
class << self
|
7
|
+
##
|
8
|
+
# Produces a character from Lord of the Rings.
|
9
|
+
#
|
10
|
+
# @return [String]
|
11
|
+
#
|
12
|
+
# @example
|
13
|
+
# Faker::Movies::LordOfTheRings.character #=> "Legolas"
|
14
|
+
#
|
15
|
+
# @faker.version 1.7.0
|
7
16
|
def character
|
8
17
|
fetch('lord_of_the_rings.characters')
|
9
18
|
end
|
10
19
|
|
20
|
+
##
|
21
|
+
# Produces a location from Lord of the Rings.
|
22
|
+
#
|
23
|
+
# @return [String]
|
24
|
+
#
|
25
|
+
# @example
|
26
|
+
# Faker::Movies::LordOfTheRings.location #=> "Helm's Deep"
|
27
|
+
#
|
28
|
+
# @faker.version 1.7.0
|
11
29
|
def location
|
12
30
|
fetch('lord_of_the_rings.locations')
|
13
31
|
end
|
14
32
|
|
33
|
+
##
|
34
|
+
# Produces a quote from Lord of the Rings.
|
35
|
+
#
|
36
|
+
# @return [String]
|
37
|
+
#
|
38
|
+
# @example
|
39
|
+
# Faker::Movies::LordOfTheRings.quote
|
40
|
+
# #=> "I wish the Ring had never come to me. I wish none of this had happened."
|
41
|
+
#
|
42
|
+
# @faker.version 1.9.0
|
15
43
|
def quote
|
16
44
|
fetch('lord_of_the_rings.quotes')
|
17
45
|
end
|
@@ -4,10 +4,29 @@ module Faker
|
|
4
4
|
class Movies
|
5
5
|
class PrincessBride < Base
|
6
6
|
class << self
|
7
|
+
##
|
8
|
+
# Produces a character from The Princess Bride.
|
9
|
+
#
|
10
|
+
# @return [String]
|
11
|
+
#
|
12
|
+
# @example
|
13
|
+
# Faker::Movies::PrincessBride.character #=> "Dread Pirate Roberts"
|
14
|
+
#
|
15
|
+
# @faker.version 1.9.0
|
7
16
|
def character
|
8
17
|
fetch('princess_bride.characters')
|
9
18
|
end
|
10
19
|
|
20
|
+
##
|
21
|
+
# Produces a quote from The Princess Bride.
|
22
|
+
#
|
23
|
+
# @return [String]
|
24
|
+
#
|
25
|
+
# @example
|
26
|
+
# Faker::Movies::PrincessBride.quote
|
27
|
+
# #=> "Hello. My name is Inigo Montoya. You killed my father. Prepare to die!"
|
28
|
+
#
|
29
|
+
# @faker.version 1.9.0
|
11
30
|
def quote
|
12
31
|
fetch('princess_bride.quotes')
|
13
32
|
end
|
@@ -4,38 +4,118 @@ module Faker
|
|
4
4
|
class Movies
|
5
5
|
class StarWars < Base
|
6
6
|
class << self
|
7
|
+
##
|
8
|
+
# Produces a call squadron from Star Wars.
|
9
|
+
#
|
10
|
+
# @return [String]
|
11
|
+
#
|
12
|
+
# @example
|
13
|
+
# Faker::Movies::StarWars.call_squadron #=> "Green"
|
14
|
+
#
|
15
|
+
# @faker.version 1.6.2
|
7
16
|
def call_squadron
|
8
17
|
sample(call_squadrons)
|
9
18
|
end
|
10
19
|
|
20
|
+
##
|
21
|
+
# Produces a call sign from Star Wars.
|
22
|
+
#
|
23
|
+
# @return [String]
|
24
|
+
#
|
25
|
+
# @example
|
26
|
+
# Faker::Movies::StarWars.call_sign #=> "Grey 5"
|
27
|
+
#
|
28
|
+
# @faker.version 1.6.2
|
11
29
|
def call_sign
|
12
30
|
numerify(parse('star_wars.call_sign'))
|
13
31
|
end
|
14
32
|
|
33
|
+
##
|
34
|
+
# Produces a call number from Star Wars.
|
35
|
+
#
|
36
|
+
# @return [String]
|
37
|
+
#
|
38
|
+
# @example
|
39
|
+
# Faker::Movies::StarWars.call_number #=> "Leader"
|
40
|
+
#
|
41
|
+
# @faker.version 1.6.2
|
15
42
|
def call_number
|
16
43
|
sample(call_numbers)
|
17
44
|
end
|
18
45
|
|
46
|
+
##
|
47
|
+
# Produces a character from Star Wars.
|
48
|
+
#
|
49
|
+
# @return [String]
|
50
|
+
#
|
51
|
+
# @example
|
52
|
+
# Faker::Movies::StarWars.character #=> "Anakin Skywalker"
|
53
|
+
#
|
54
|
+
# @faker.version 1.6.2
|
19
55
|
def character
|
20
56
|
sample(characters)
|
21
57
|
end
|
22
58
|
|
59
|
+
##
|
60
|
+
# Produces a droid from Star Wars.
|
61
|
+
#
|
62
|
+
# @return [String]
|
63
|
+
#
|
64
|
+
# @example
|
65
|
+
# Faker::Movies::StarWars.droid #=> "C-3PO"
|
66
|
+
#
|
67
|
+
# @faker.version 1.6.2
|
23
68
|
def droid
|
24
69
|
sample(droids)
|
25
70
|
end
|
26
71
|
|
72
|
+
##
|
73
|
+
# Produces a planet from Star Wars.
|
74
|
+
#
|
75
|
+
# @return [String]
|
76
|
+
#
|
77
|
+
# @example
|
78
|
+
# Faker::Movies::StarWars.planet #=> "Tatooine"
|
79
|
+
#
|
80
|
+
# @faker.version 1.6.2
|
27
81
|
def planet
|
28
82
|
sample(planets)
|
29
83
|
end
|
30
84
|
|
85
|
+
##
|
86
|
+
# Produces a species from Star Wars.
|
87
|
+
#
|
88
|
+
# @return [String]
|
89
|
+
#
|
90
|
+
# @example
|
91
|
+
# Faker::Movies::StarWars.specie #=> "Gungan"
|
92
|
+
#
|
93
|
+
# @faker.version 1.6.2
|
31
94
|
def specie
|
32
95
|
sample(species)
|
33
96
|
end
|
34
97
|
|
98
|
+
##
|
99
|
+
# Produces a vehicle from Star Wars.
|
100
|
+
#
|
101
|
+
# @return [String]
|
102
|
+
#
|
103
|
+
# @example
|
104
|
+
# Faker::Movies::StarWars.vehicle #=> "Sandcrawler"
|
105
|
+
#
|
106
|
+
# @faker.version 1.6.2
|
35
107
|
def vehicle
|
36
108
|
sample(vehicles)
|
37
109
|
end
|
38
110
|
|
111
|
+
# Produces a wookiee sentence from Star Wars.
|
112
|
+
#
|
113
|
+
# @return [String]
|
114
|
+
#
|
115
|
+
# @example
|
116
|
+
# Faker::Movies::StarWars.wookiee_sentence #=> "Yrroonn ru ooma roo ahuma ur roooarrgh hnn-rowr."
|
117
|
+
#
|
118
|
+
# @faker.version 1.6.2
|
39
119
|
def wookiee_sentence
|
40
120
|
sentence = sample(wookiee_words).capitalize
|
41
121
|
|
@@ -44,6 +124,20 @@ module Faker
|
|
44
124
|
sentence + sample(['.', '?', '!'])
|
45
125
|
end
|
46
126
|
|
127
|
+
##
|
128
|
+
# Produces a quote from Star Wars.
|
129
|
+
#
|
130
|
+
# @param character [String] The name of a character to derive a quote from.
|
131
|
+
# @return [String]
|
132
|
+
#
|
133
|
+
# @example
|
134
|
+
# Faker::Movies::StarWars.quote #=> "Aren't you a little short for a Stormtrooper?"
|
135
|
+
#
|
136
|
+
# @example
|
137
|
+
# Faker::Movies::StarWars.quote(character: "leia_organa")
|
138
|
+
# #=> "Aren't you a little short for a Stormtrooper?"
|
139
|
+
#
|
140
|
+
# @faker.version 1.6.2
|
47
141
|
def quote(legacy_character = NOT_GIVEN, character: nil)
|
48
142
|
warn_for_deprecated_arguments do |keywords|
|
49
143
|
keywords << :character if legacy_character != NOT_GIVEN
|
@@ -4,14 +4,43 @@ module Faker
|
|
4
4
|
class Movies
|
5
5
|
class VForVendetta < Base
|
6
6
|
class << self
|
7
|
+
##
|
8
|
+
# Produces a character from V For Vendetta.
|
9
|
+
#
|
10
|
+
# @return [String]
|
11
|
+
#
|
12
|
+
# @example
|
13
|
+
# Faker::Movies::VForVendetta.character #=> "V"
|
14
|
+
#
|
15
|
+
# @faker.version 1.8.5
|
7
16
|
def character
|
8
17
|
fetch('v_for_vendetta.characters')
|
9
18
|
end
|
10
19
|
|
20
|
+
##
|
21
|
+
# Produces a speech from V For Vendetta.
|
22
|
+
#
|
23
|
+
# @return [String]
|
24
|
+
#
|
25
|
+
# @example
|
26
|
+
# Faker::Movies::VForVendetta.speech
|
27
|
+
# #=> "Remember, remember, the Fifth of November, the Gunpowder Treason and Plot. I know of no reason why the Gunpowder Treason should ever be forgot..."
|
28
|
+
#
|
29
|
+
# @faker.version 1.8.5
|
11
30
|
def speech
|
12
31
|
fetch('v_for_vendetta.speeches')
|
13
32
|
end
|
14
33
|
|
34
|
+
##
|
35
|
+
# Produces a quote from V For Vendetta.
|
36
|
+
#
|
37
|
+
# @return [String]
|
38
|
+
#
|
39
|
+
# @example
|
40
|
+
# Faker::Movies::VForVendetta.quote
|
41
|
+
# #=> "People should not be afraid of their governments. Governments should be afraid of their people."
|
42
|
+
#
|
43
|
+
# @faker.version 1.8.5
|
15
44
|
def quote
|
16
45
|
fetch('v_for_vendetta.quotes')
|
17
46
|
end
|
@@ -4,6 +4,15 @@ module Faker
|
|
4
4
|
class Music
|
5
5
|
class UmphreysMcgee < Base
|
6
6
|
class << self
|
7
|
+
##
|
8
|
+
# Produces the name of a song by Umphrey's McGee.
|
9
|
+
#
|
10
|
+
# @return [String]
|
11
|
+
#
|
12
|
+
# @example
|
13
|
+
# Faker::Music::UmphreysMcgee.song #=> "Dump City"
|
14
|
+
#
|
15
|
+
# @faker.version 1.8.3
|
7
16
|
def song
|
8
17
|
fetch('umphreys_mcgee.song')
|
9
18
|
end
|
@@ -4,18 +4,54 @@ module Faker
|
|
4
4
|
class Sports
|
5
5
|
class Basketball < Base
|
6
6
|
class << self
|
7
|
+
##
|
8
|
+
# Produces the name of a basketball team.
|
9
|
+
#
|
10
|
+
# @return [String]
|
11
|
+
#
|
12
|
+
# @example
|
13
|
+
# Faker::Sports::Basketball.team #=> "Golden State Warriors"
|
14
|
+
#
|
15
|
+
# @faker.version 1.9.4
|
7
16
|
def team
|
8
17
|
fetch('basketball.teams')
|
9
18
|
end
|
10
19
|
|
20
|
+
##
|
21
|
+
# Produces the name of a basketball player.
|
22
|
+
#
|
23
|
+
# @return [String]
|
24
|
+
#
|
25
|
+
# @example
|
26
|
+
# Faker::Sports::Basketball.player #=> "LeBron James"
|
27
|
+
#
|
28
|
+
# @faker.version 1.9.4
|
11
29
|
def player
|
12
30
|
fetch('basketball.players')
|
13
31
|
end
|
14
32
|
|
33
|
+
##
|
34
|
+
# Produces the name of a basketball coach.
|
35
|
+
#
|
36
|
+
# @return [String]
|
37
|
+
#
|
38
|
+
# @example
|
39
|
+
# Faker::Sports::Basketball.coach #=> "Gregg Popovich"
|
40
|
+
#
|
41
|
+
# @faker.version 1.9.4
|
15
42
|
def coach
|
16
43
|
fetch('basketball.coaches')
|
17
44
|
end
|
18
45
|
|
46
|
+
##
|
47
|
+
# Produces a position in basketball.
|
48
|
+
#
|
49
|
+
# @return [String]
|
50
|
+
#
|
51
|
+
# @example
|
52
|
+
# Faker::Sports::Basketball.position #=> "Point Guard"
|
53
|
+
#
|
54
|
+
# @faker.version 1.9.4
|
19
55
|
def position
|
20
56
|
fetch('basketball.positions')
|
21
57
|
end
|