faker 3.0.0 → 3.5.2
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 +598 -1
- data/README.md +203 -107
- data/lib/faker/books/lovecraft.rb +2 -3
- data/lib/faker/default/address.rb +2 -2
- data/lib/faker/default/alphanumeric.rb +1 -1
- data/lib/faker/default/chile_rut.rb +23 -17
- data/lib/faker/default/code.rb +65 -19
- data/lib/faker/default/company.rb +112 -5
- data/lib/faker/default/crypto.rb +13 -4
- data/lib/faker/default/date.rb +61 -5
- data/lib/faker/default/driving_licence.rb +19 -8
- data/lib/faker/default/drone.rb +1 -1
- data/lib/faker/default/finance.rb +2 -2
- data/lib/faker/default/food.rb +14 -1
- data/lib/faker/default/hipster.rb +2 -3
- data/lib/faker/default/html.rb +230 -0
- data/lib/faker/default/id_number.rb +38 -24
- data/lib/faker/default/internet.rb +85 -78
- data/lib/faker/default/invoice.rb +4 -4
- data/lib/faker/default/json.rb +9 -4
- data/lib/faker/default/lorem.rb +24 -16
- data/lib/faker/default/marketing.rb +1 -1
- data/lib/faker/default/measurement.rb +8 -8
- data/lib/faker/default/{nhs.rb → national_health_service.rb} +8 -4
- data/lib/faker/default/number.rb +1 -1
- data/lib/faker/default/omniauth.rb +5 -5
- data/lib/faker/default/phone_number.rb +37 -18
- data/lib/faker/default/placeholdit.rb +1 -1
- data/lib/faker/default/south_africa.rb +3 -3
- data/lib/faker/{music/show.rb → default/theater.rb} +8 -8
- data/lib/faker/default/twitter.rb +4 -6
- data/lib/faker/default/types.rb +5 -6
- data/lib/faker/default/vehicle.rb +26 -36
- data/lib/faker/games/clash_of_clans.rb +1 -1
- data/lib/faker/games/dnd.rb +49 -7
- data/lib/faker/games/final_fantasy_xiv.rb +73 -0
- data/lib/faker/games/heroes_of_the_storm.rb +0 -11
- data/lib/faker/games/minecraft.rb +1 -1
- data/lib/faker/games/myst.rb +1 -1
- data/lib/faker/japanese_media/cowboy_bebop.rb +61 -0
- data/lib/faker/japanese_media/fullmetal_alchemist_brotherhood.rb +10 -10
- data/lib/faker/locations/australia.rb +40 -38
- data/lib/faker/movies/avatar.rb +49 -0
- data/lib/faker/movies/star_wars.rb +1 -1
- data/lib/faker/movies/{room.rb → the_room.rb} +4 -4
- data/lib/faker/music/smashing_pumpkins.rb +64 -0
- data/lib/faker/quotes/quote.rb +13 -0
- data/lib/faker/sports/chess.rb +90 -0
- data/lib/faker/sports/sport.rb +9 -3
- data/lib/faker/travel/airport.rb +43 -0
- data/lib/faker/travel/train_station.rb +54 -0
- data/lib/faker/tv_shows/archer.rb +51 -0
- data/lib/faker/tv_shows/buffy.rb +0 -13
- data/lib/faker/tv_shows/dr_who.rb +0 -13
- data/lib/faker/tv_shows/south_park.rb +15 -0
- data/lib/faker/tv_shows/spongebob.rb +50 -0
- data/lib/faker/tv_shows/the_fresh_prince_of_bel_air.rb +0 -13
- data/lib/faker/version.rb +1 -1
- data/lib/faker.rb +20 -9
- data/lib/helpers/deprecator.rb +118 -0
- data/lib/helpers/positional_generator.rb +480 -0
- data/lib/locales/README.md +18 -2
- data/lib/locales/ar.yml +1 -0
- data/lib/locales/bg.yml +1 -2
- data/lib/locales/da-DK.yml +529 -35
- data/lib/locales/de-AT.yml +3487 -27
- data/lib/locales/de-CH.yml +4359 -12
- data/lib/locales/de.yml +7182 -100
- data/lib/locales/ee.yml +0 -1
- data/lib/locales/en/address.yml +1826 -561
- data/lib/locales/en/airport.yml +381 -0
- data/lib/locales/en/archer.yml +75 -0
- data/lib/locales/en/australia.yml +106 -105
- data/lib/locales/en/avatar.yml +31 -0
- data/lib/locales/en/bank.yml +1 -1
- data/lib/locales/en/chess.yml +103 -0
- data/lib/locales/en/company.yml +1 -0
- data/lib/locales/en/cosmere.yml +1 -1
- data/lib/locales/en/cowboy_bebop.yml +163 -0
- data/lib/locales/en/dnd.yml +186 -1
- data/lib/locales/en/dog.yml +262 -7
- data/lib/locales/en/dota.yml +120 -67
- data/lib/locales/en/final_fantasy_xiv.yml +754 -0
- data/lib/locales/en/finance.yml +4 -4
- data/lib/locales/en/food.yml +14 -1
- data/lib/locales/en/{fma_brotherhood.yml → fullmetal_alchemist_brotherhood.yml} +3 -3
- data/lib/locales/en/harry_potter.yml +1 -1
- data/lib/locales/en/heroes.yml +0 -0
- data/lib/locales/en/id_number.yml +1 -1
- data/lib/locales/en/internet.yml +3 -4
- data/lib/locales/en/minecraft.yml +4 -4
- data/lib/locales/en/mitch_hedberg.yml +46 -0
- data/lib/locales/en/music.yml +25 -25
- data/lib/locales/en/opera.yml +1 -1
- data/lib/locales/en/phone_number.yml +78 -3
- data/lib/locales/en/restaurant.yml +1 -1
- data/lib/locales/en/smashing_pumpkins.yml +382 -0
- data/lib/locales/en/south_park.yml +360 -2
- data/lib/locales/en/spongebob.yml +489 -0
- data/lib/locales/en/star_wars.yml +1 -1
- data/lib/locales/en/{room.yml → the_room.yml} +1 -1
- data/lib/locales/en/{show.yml → theater.yml} +1 -1
- data/lib/locales/en/train_station.yml +280 -0
- data/lib/locales/en/vehicle.yml +1 -1
- data/lib/locales/en-AU.yml +718 -47
- data/lib/locales/en-CA.yml +373 -19
- data/lib/locales/en-GB.yml +116 -8
- data/lib/locales/en-IND.yml +1259 -17
- data/lib/locales/en-KE.yml +212 -0
- data/lib/locales/en-MS.yml +364 -17
- data/lib/locales/en-NEP.yml +212 -38
- data/lib/locales/en-NG.yml +1 -0
- data/lib/locales/en-NZ.yml +1153 -123
- data/lib/locales/en-PAK.yml +392 -10
- data/lib/locales/en-SG.yml +581 -16
- data/lib/locales/en-UG.yml +1 -0
- data/lib/locales/en-US.yml +6914 -74
- data/lib/locales/en-ZA.yml +1 -1
- data/lib/locales/en-au-ocker.yml +266 -22
- data/lib/locales/es-AR.yml +4569 -4599
- data/lib/locales/es-MX.yml +1 -2
- data/lib/locales/es.yml +2 -3
- data/lib/locales/fi-FI.yml +1 -0
- data/lib/locales/fr/address.yml +761 -9
- data/lib/locales/fr/internet.yml +0 -1
- data/lib/locales/fr/name.yml +2 -1
- data/lib/locales/fr-CA.yml +2733 -44
- data/lib/locales/fr-CH.yml +1 -2
- data/lib/locales/fr.yml +3 -1
- data/lib/locales/hy.yml +3624 -119
- data/lib/locales/id.yml +839 -12
- data/lib/locales/it.yml +1304 -32
- data/lib/locales/ja/book.yml +492 -3
- data/lib/locales/ja/football.yml +115 -0
- data/lib/locales/ja/lorem.yml +1 -1
- data/lib/locales/ja/sport.yml +130 -0
- data/lib/locales/ja/super_mario.yml +1 -1
- data/lib/locales/ja/touhou.yml +466 -0
- data/lib/locales/ko.yml +1361 -20
- data/lib/locales/lt.yml +297 -17
- data/lib/locales/lv.yml +0 -1
- data/lib/locales/mi-NZ.yml +2 -0
- data/lib/locales/nb-NO.yml +518 -29
- data/lib/locales/nl.yml +10 -2
- data/lib/locales/pl.yml +1 -2
- data/lib/locales/pt-BR.yml +8205 -664
- data/lib/locales/pt.yml +844 -45
- data/lib/locales/ru.yml +1353 -69
- data/lib/locales/sk.yml +4410 -43
- data/lib/locales/sv.yml +100 -0
- data/lib/locales/tr.yml +1 -2
- data/lib/locales/uk.yml +1808 -44
- data/lib/locales/vi.yml +1 -0
- data/lib/locales/zh-CN/bank.yml +17 -0
- data/lib/locales/zh-CN.yml +1 -0
- data/lib/locales/zh-TW.yml +1 -0
- metadata +37 -156
- data/History.md +0 -176
- data/lib/faker/default/fillmurray.rb +0 -36
- data/lib/faker/default/lorem_pixel.rb +0 -64
@@ -6,10 +6,9 @@ module Faker
|
|
6
6
|
|
7
7
|
MILEAGE_MIN = 10_000
|
8
8
|
MILEAGE_MAX = 90_000
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
VIN_REGEX = /^([A-HJ-NPR-Z0-9]){3}[A-HJ-NPR-Z0-9]{5}[A-HJ-NPR-Z0-9]{1}[A-HJ-NPR-Z0-9]{1}[A-HJ-NPR-Z0-9]{1}[A-HJ-NPR-Z0-9]{1}\d{5}$/.freeze
|
9
|
+
VIN_KEYSPACE = %w[A B C D E F G H J K L M N P R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9].freeze
|
10
|
+
VIN_TRANSLITERATION = { A: 1, B: 2, C: 3, D: 4, E: 5, F: 6, G: 7, H: 8, J: 1, K: 2, L: 3, M: 4, N: 5, P: 7, R: 9, S: 2, T: 3, U: 4, V: 5, W: 6, X: 7, Y: 8, Z: 9 }.freeze
|
11
|
+
VIN_WEIGHT = [8, 7, 6, 5, 4, 3, 2, 10, 0, 9, 8, 7, 6, 5, 4, 3, 2].freeze
|
13
12
|
SG_CHECKSUM_WEIGHTS = [3, 14, 2, 12, 2, 11, 1].freeze
|
14
13
|
SG_CHECKSUM_CHARS = 'AYUSPLJGDBZXTRMKHEC'
|
15
14
|
|
@@ -23,7 +22,25 @@ module Faker
|
|
23
22
|
#
|
24
23
|
# @faker.version 1.6.4
|
25
24
|
def vin
|
26
|
-
|
25
|
+
generate(:string) do |g|
|
26
|
+
g.letter(name: :wmi, ranges: ['100'..'199', '400'..'499', '500'..'599', '700'..'799', '7A0'..'7F9'])
|
27
|
+
g.letter(name: :vds, length: 5, ranges: [VIN_KEYSPACE])
|
28
|
+
g.computed(name: :checksum, deps: %i[wmi vds model_year plant_code vis]) do |wmi, vds, model_year, plant_code, vis|
|
29
|
+
checksum = "#{wmi}#{vds}0#{model_year}#{plant_code}#{vis}".chars.each_with_index.map do |char, i|
|
30
|
+
value = (char =~ /\A\d\z/ ? char.to_i : VIN_TRANSLITERATION[char.to_sym])
|
31
|
+
value * VIN_WEIGHT[i]
|
32
|
+
end.inject(:+) % 11
|
33
|
+
|
34
|
+
if checksum == 10
|
35
|
+
'X'
|
36
|
+
else
|
37
|
+
checksum
|
38
|
+
end
|
39
|
+
end
|
40
|
+
g.letter(name: :model_year, length: 1, ranges: [VIN_KEYSPACE - %w[U Z 0]])
|
41
|
+
g.letter(name: :plant_code, length: 1, ranges: [VIN_KEYSPACE])
|
42
|
+
g.int(name: :vis, length: 6)
|
43
|
+
end
|
27
44
|
end
|
28
45
|
|
29
46
|
# Produces a random vehicle manufacturer.
|
@@ -31,12 +48,13 @@ module Faker
|
|
31
48
|
# @return [String]
|
32
49
|
#
|
33
50
|
# @example
|
34
|
-
# Faker::Vehicle.
|
51
|
+
# Faker::Vehicle.manufacturer #=> "Lamborghini"
|
35
52
|
#
|
36
53
|
# @faker.version 1.6.4
|
37
|
-
def
|
38
|
-
fetch('vehicle.
|
54
|
+
def manufacturer
|
55
|
+
fetch('vehicle.manufacturer')
|
39
56
|
end
|
57
|
+
alias manufacture manufacturer
|
40
58
|
|
41
59
|
##
|
42
60
|
# Produces a random vehicle make.
|
@@ -299,34 +317,6 @@ module Faker
|
|
299
317
|
|
300
318
|
private
|
301
319
|
|
302
|
-
def first_eight(number)
|
303
|
-
return number[0...8] unless number.nil?
|
304
|
-
|
305
|
-
regexify(VIN_REGEX)
|
306
|
-
end
|
307
|
-
alias last_eight first_eight
|
308
|
-
|
309
|
-
def calculate_vin_check_digit(vin)
|
310
|
-
sum = 0
|
311
|
-
|
312
|
-
vin.each_char.with_index do |c, i|
|
313
|
-
n = vin_char_to_number(c).to_i
|
314
|
-
weight = VIN_WEIGHTS[i].to_i
|
315
|
-
sum += weight * n
|
316
|
-
end
|
317
|
-
|
318
|
-
mod = sum % 11
|
319
|
-
mod == 10 ? 'X' : mod
|
320
|
-
end
|
321
|
-
|
322
|
-
def vin_char_to_number(char)
|
323
|
-
index = VIN_LETTERS.chars.index(char)
|
324
|
-
|
325
|
-
return char.to_i if index.nil?
|
326
|
-
|
327
|
-
VIN_MAP[index]
|
328
|
-
end
|
329
|
-
|
330
320
|
def singapore_checksum(plate_number)
|
331
321
|
padded_alphabets = format('%3s', plate_number[/^[A-Z]+/]).tr(' ', '-').chars
|
332
322
|
padded_digits = format('%04d', plate_number[/\d+/]).chars.map(&:to_i)
|
data/lib/faker/games/dnd.rb
CHANGED
@@ -43,6 +43,19 @@ module Faker
|
|
43
43
|
fetch('dnd.cities')
|
44
44
|
end
|
45
45
|
|
46
|
+
##
|
47
|
+
# Produces the first name of a character or monster from Dungeons and Dragons.
|
48
|
+
#
|
49
|
+
# @return [String]
|
50
|
+
#
|
51
|
+
# @example
|
52
|
+
# Faker::Games::DnD.name #=> "Eilonwy"
|
53
|
+
#
|
54
|
+
# @faker.version next
|
55
|
+
def first_name
|
56
|
+
fetch('dnd.name.first_name')
|
57
|
+
end
|
58
|
+
|
46
59
|
##
|
47
60
|
# Produces the name of a class from Dungeons and Dragons (PHB).
|
48
61
|
#
|
@@ -69,6 +82,19 @@ module Faker
|
|
69
82
|
fetch('dnd.languages')
|
70
83
|
end
|
71
84
|
|
85
|
+
##
|
86
|
+
# Produces a last name from Dungeons and Dragons.
|
87
|
+
#
|
88
|
+
# @return [String]
|
89
|
+
#
|
90
|
+
# @example
|
91
|
+
# Faker::Games::DnD.last_name #=> "Leafwhisper"
|
92
|
+
#
|
93
|
+
# @faker.version next
|
94
|
+
def last_name
|
95
|
+
fetch('dnd.name.last_name')
|
96
|
+
end
|
97
|
+
|
72
98
|
##
|
73
99
|
# Produces the name of a melee weapon from Dungeons and Dragons.
|
74
100
|
#
|
@@ -95,6 +121,19 @@ module Faker
|
|
95
121
|
fetch('dnd.monsters')
|
96
122
|
end
|
97
123
|
|
124
|
+
##
|
125
|
+
# Produces a full name from Dungeons and Dragons.
|
126
|
+
#
|
127
|
+
# @return [String]
|
128
|
+
#
|
129
|
+
# @example
|
130
|
+
# Faker::Games::DnD.name #=> "Drakon Blackthorn"
|
131
|
+
#
|
132
|
+
# @faker.version next
|
133
|
+
def name
|
134
|
+
"#{fetch('dnd.name.first_name')} #{fetch('dnd.name.last_name')}"
|
135
|
+
end
|
136
|
+
|
98
137
|
##
|
99
138
|
# Produces the name of a race from Dungeons and Dragons (PHB).
|
100
139
|
#
|
@@ -121,14 +160,17 @@ module Faker
|
|
121
160
|
fetch('dnd.ranged_weapons')
|
122
161
|
end
|
123
162
|
|
124
|
-
|
125
|
-
#
|
163
|
+
##
|
164
|
+
# Produces a last name from Dungeons and Dragons.
|
126
165
|
#
|
127
|
-
# @
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
166
|
+
# @return [String]
|
167
|
+
#
|
168
|
+
# @example
|
169
|
+
# Faker::Games::DnD.title_name #=> "Corvus the Cunning"
|
170
|
+
#
|
171
|
+
# @faker.version next
|
172
|
+
def title_name
|
173
|
+
"#{fetch('dnd.name.first_name')} #{fetch('dnd.name.title')}"
|
132
174
|
end
|
133
175
|
end
|
134
176
|
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Faker
|
4
|
+
class Games
|
5
|
+
class FinalFantasyXIV < Base
|
6
|
+
class << self
|
7
|
+
##
|
8
|
+
# Produces the name of a character from FFXIV.
|
9
|
+
#
|
10
|
+
# @return [String]
|
11
|
+
#
|
12
|
+
# @example
|
13
|
+
# Faker::Games::FinalFantasyXIV.character #=> "Y'shtola Rhul"
|
14
|
+
#
|
15
|
+
# @faker.version next
|
16
|
+
def character
|
17
|
+
fetch('games.final_fantasy_xiv.characters')
|
18
|
+
end
|
19
|
+
|
20
|
+
##
|
21
|
+
# Produces a job name from Final Fantasy XIV. Either a battle or non-battle playable job.
|
22
|
+
#
|
23
|
+
# @return [String]
|
24
|
+
#
|
25
|
+
# @example
|
26
|
+
# Faker::Games::FinalFantasyXIV.job #=> "Paladin"
|
27
|
+
#
|
28
|
+
# @faker.version next
|
29
|
+
def job
|
30
|
+
fetch('games.final_fantasy_xiv.jobs')
|
31
|
+
end
|
32
|
+
|
33
|
+
# Produces the name of a playable race from Final Fantasy XIV.
|
34
|
+
#
|
35
|
+
# @return [String]
|
36
|
+
#
|
37
|
+
# @example
|
38
|
+
# Faker::Games::FinalFantasyXIV.race #=> "Miqo'te"
|
39
|
+
#
|
40
|
+
# @faker.version next
|
41
|
+
def race
|
42
|
+
fetch('games.final_fantasy_xiv.races')
|
43
|
+
end
|
44
|
+
|
45
|
+
##
|
46
|
+
# Produces a data center from Final Fantasy XIV.
|
47
|
+
#
|
48
|
+
# @return [String]
|
49
|
+
#
|
50
|
+
# @example
|
51
|
+
# Faker::Games::FinalFantasyXIV.data_center #=> "Aether"
|
52
|
+
#
|
53
|
+
# @faker.version next
|
54
|
+
def data_center
|
55
|
+
fetch('games.final_fantasy_xiv.data_centers')
|
56
|
+
end
|
57
|
+
|
58
|
+
##
|
59
|
+
# Produces a geographical zone from Final Fantasy XIV.
|
60
|
+
#
|
61
|
+
# @return [String]
|
62
|
+
#
|
63
|
+
# @example
|
64
|
+
# Faker::Games::FinalFantasyXIV.zone #=> "Eastern La Noscea"
|
65
|
+
#
|
66
|
+
# @faker.version next
|
67
|
+
def zone
|
68
|
+
fetch('games.final_fantasy_xiv.zones')
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -17,17 +17,6 @@ module Faker
|
|
17
17
|
fetch('heroes_of_the_storm.battlegrounds')
|
18
18
|
end
|
19
19
|
|
20
|
-
##
|
21
|
-
# This method is deprecated. The implementation will be removed in a near future release.
|
22
|
-
# Use `HeroesOfTheStorm.class_name` instead.
|
23
|
-
#
|
24
|
-
# @deprecated Use {#class_name} instead.
|
25
|
-
def class
|
26
|
-
warn '`HeroesOfTheStorm.class` is deprecated. Use `HeroesOfTheStorm.class_name` instead.'
|
27
|
-
|
28
|
-
super
|
29
|
-
end
|
30
|
-
|
31
20
|
##
|
32
21
|
# Produces a class name from Heroes of the Storm.
|
33
22
|
#
|
data/lib/faker/games/myst.rb
CHANGED
@@ -0,0 +1,61 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Faker
|
4
|
+
class JapaneseMedia
|
5
|
+
class CowboyBebop < Base
|
6
|
+
class << self
|
7
|
+
##
|
8
|
+
# Produces a character from Cowboy Bebop.
|
9
|
+
#
|
10
|
+
# @return [String]
|
11
|
+
#
|
12
|
+
# @example
|
13
|
+
# Faker::JapaneseMedia::CowboyBebop.character #=> "Spike Spiegel"
|
14
|
+
#
|
15
|
+
# @faker.version next
|
16
|
+
def character
|
17
|
+
fetch('cowboy_bebop.character')
|
18
|
+
end
|
19
|
+
|
20
|
+
##
|
21
|
+
# Produces an episode from Cowboy Bebop.
|
22
|
+
#
|
23
|
+
# @return [String]
|
24
|
+
#
|
25
|
+
# @example
|
26
|
+
# Faker::JapaneseMedia::CowboyBebop.episode #=> "Honky Tonk Women"
|
27
|
+
#
|
28
|
+
# @faker.version next
|
29
|
+
def episode
|
30
|
+
fetch('cowboy_bebop.episode')
|
31
|
+
end
|
32
|
+
|
33
|
+
##
|
34
|
+
# Produces a song title from Cowboy Bebop.
|
35
|
+
#
|
36
|
+
# @return [String]
|
37
|
+
#
|
38
|
+
# @example
|
39
|
+
# Faker::JapaneseMedia::CowboyBebop.songs #=> "Live in Baghdad"
|
40
|
+
#
|
41
|
+
# @faker.version next
|
42
|
+
def song
|
43
|
+
fetch('cowboy_bebop.song')
|
44
|
+
end
|
45
|
+
|
46
|
+
##
|
47
|
+
# Produces a quote from Cowboy Bebop.
|
48
|
+
#
|
49
|
+
# @return [String]
|
50
|
+
#
|
51
|
+
# @example
|
52
|
+
# Faker::JapaneseMedia::CowboyBebop.quote #=> "Bang!!!"
|
53
|
+
#
|
54
|
+
# @faker.version next
|
55
|
+
def quote
|
56
|
+
fetch('cowboy_bebop.quote')
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -2,45 +2,45 @@
|
|
2
2
|
|
3
3
|
module Faker
|
4
4
|
class JapaneseMedia
|
5
|
-
class
|
5
|
+
class FullmetalAlchemistBrotherhood < Base
|
6
6
|
class << self
|
7
7
|
##
|
8
|
-
# Produces a character from
|
8
|
+
# Produces a character from FullmetalAlchemistBrotherhood.
|
9
9
|
#
|
10
10
|
# @return [String]
|
11
11
|
#
|
12
12
|
# @example
|
13
|
-
# Faker::JapaneseMedia::
|
13
|
+
# Faker::JapaneseMedia::FullmetalAlchemistBrotherhood.character #=> "Edward Elric"
|
14
14
|
#
|
15
15
|
# @faker.version next
|
16
16
|
def character
|
17
|
-
fetch('
|
17
|
+
fetch('fullmetal_alchemist_brotherhood.characters')
|
18
18
|
end
|
19
19
|
|
20
20
|
##
|
21
|
-
# Produces a cities from
|
21
|
+
# Produces a cities from FullmetalAlchemistBrotherhood.
|
22
22
|
#
|
23
23
|
# @return [String]
|
24
24
|
#
|
25
25
|
# @example
|
26
|
-
# Faker::JapaneseMedia::
|
26
|
+
# Faker::JapaneseMedia::FullmetalAlchemistBrotherhood.city #=> "Central City"
|
27
27
|
#
|
28
28
|
# @faker.version next
|
29
29
|
def city
|
30
|
-
fetch('
|
30
|
+
fetch('fullmetal_alchemist_brotherhood.cities')
|
31
31
|
end
|
32
32
|
|
33
33
|
##
|
34
|
-
# Produces a country from
|
34
|
+
# Produces a country from FullmetalAlchemistBrotherhood.
|
35
35
|
#
|
36
36
|
# @return [String]
|
37
37
|
#
|
38
38
|
# @example
|
39
|
-
# Faker::JapaneseMedia::
|
39
|
+
# Faker::JapaneseMedia::FullmetalAlchemistBrotherhood.country #=> "Xing"
|
40
40
|
#
|
41
41
|
# @faker.version next
|
42
42
|
def country
|
43
|
-
fetch('
|
43
|
+
fetch('fullmetal_alchemist_brotherhood.countries')
|
44
44
|
end
|
45
45
|
end
|
46
46
|
end
|
@@ -1,46 +1,48 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Faker
|
4
|
-
class
|
5
|
-
class
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
4
|
+
class Locations
|
5
|
+
class Australia < Base
|
6
|
+
class << self
|
7
|
+
##
|
8
|
+
# Produces a location in Australia
|
9
|
+
#
|
10
|
+
# @return [String]
|
11
|
+
#
|
12
|
+
# @example
|
13
|
+
# Faker::Locations::Australia.location
|
14
|
+
# #=> "Sydney"
|
15
|
+
#
|
16
|
+
# @faker.version next
|
17
|
+
def location
|
18
|
+
fetch('locations.australia.locations')
|
19
|
+
end
|
19
20
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
21
|
+
# Produces an Australian animal
|
22
|
+
#
|
23
|
+
# @return [String]
|
24
|
+
#
|
25
|
+
# @example
|
26
|
+
# Faker::Locations::Australia.animal
|
27
|
+
# #=> "Dingo"
|
28
|
+
#
|
29
|
+
# @faker.version next
|
30
|
+
def animal
|
31
|
+
fetch('locations.australia.animals')
|
32
|
+
end
|
32
33
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
34
|
+
# Produces an Australian State or Territory
|
35
|
+
#
|
36
|
+
# @return [String]
|
37
|
+
#
|
38
|
+
# @example
|
39
|
+
# Faker::Locations::Australia.state
|
40
|
+
# #=> "New South Wales"
|
41
|
+
#
|
42
|
+
# @faker.version next
|
43
|
+
def state
|
44
|
+
fetch('locations.australia.states')
|
45
|
+
end
|
44
46
|
end
|
45
47
|
end
|
46
48
|
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Faker
|
4
|
+
class Movies
|
5
|
+
class Avatar < Base
|
6
|
+
class << self
|
7
|
+
##
|
8
|
+
# Produces a character from Avatar.
|
9
|
+
#
|
10
|
+
# @return [String]
|
11
|
+
#
|
12
|
+
# @example
|
13
|
+
# Faker::Movies::Avatar.character #=> "Jake Sully"
|
14
|
+
#
|
15
|
+
# @faker.version next
|
16
|
+
def character
|
17
|
+
fetch('avatar.characters')
|
18
|
+
end
|
19
|
+
|
20
|
+
##
|
21
|
+
# Produces a date from Avatar.
|
22
|
+
#
|
23
|
+
# @return [String]
|
24
|
+
#
|
25
|
+
# @example
|
26
|
+
# Faker::Movies::Avatar.date #=> "December 15, 2022"
|
27
|
+
#
|
28
|
+
# @faker.version next
|
29
|
+
def date
|
30
|
+
fetch('avatar.dates')
|
31
|
+
end
|
32
|
+
|
33
|
+
##
|
34
|
+
# Produces a quote from Avatar.
|
35
|
+
#
|
36
|
+
# @return [String]
|
37
|
+
#
|
38
|
+
# @example
|
39
|
+
# Faker::Movies::Avatar.quote
|
40
|
+
# #=> "If it ain't raining, we ain't training."
|
41
|
+
#
|
42
|
+
# @faker.version next
|
43
|
+
def quote
|
44
|
+
fetch('avatar.quotes')
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -14,7 +14,7 @@ module Faker
|
|
14
14
|
#
|
15
15
|
# @faker.version next
|
16
16
|
def actor
|
17
|
-
fetch('
|
17
|
+
fetch('the_room.actors')
|
18
18
|
end
|
19
19
|
|
20
20
|
##
|
@@ -27,7 +27,7 @@ module Faker
|
|
27
27
|
#
|
28
28
|
# @faker.version next
|
29
29
|
def character
|
30
|
-
fetch('
|
30
|
+
fetch('the_room.characters')
|
31
31
|
end
|
32
32
|
|
33
33
|
##
|
@@ -40,7 +40,7 @@ module Faker
|
|
40
40
|
#
|
41
41
|
# @faker.version next
|
42
42
|
def location
|
43
|
-
fetch('
|
43
|
+
fetch('the_room.locations')
|
44
44
|
end
|
45
45
|
|
46
46
|
##
|
@@ -55,7 +55,7 @@ module Faker
|
|
55
55
|
#
|
56
56
|
# @faker.version next
|
57
57
|
def quote
|
58
|
-
fetch('
|
58
|
+
fetch('the_room.quotes')
|
59
59
|
end
|
60
60
|
end
|
61
61
|
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'music'
|
4
|
+
|
5
|
+
module Faker
|
6
|
+
class Music
|
7
|
+
class SmashingPumpkins < Base
|
8
|
+
class << self
|
9
|
+
##
|
10
|
+
# Produces the name of a member of the Smashing Pumpkins (current and former)
|
11
|
+
#
|
12
|
+
# @return [String]
|
13
|
+
#
|
14
|
+
# @example
|
15
|
+
# Faker::Music::SmashingPumpkins.musician #=> "Billy Corgan"
|
16
|
+
#
|
17
|
+
# @faker.version next
|
18
|
+
def musician
|
19
|
+
fetch('smashing_pumpkins.musicians')
|
20
|
+
end
|
21
|
+
|
22
|
+
##
|
23
|
+
# Produces the name of an album by the Smashing Pumpkins.
|
24
|
+
#
|
25
|
+
# @return [String]
|
26
|
+
#
|
27
|
+
# @example
|
28
|
+
# Faker::Music::SmashingPumpkins.album #=> "Siamese Dream"
|
29
|
+
#
|
30
|
+
# @faker.version next
|
31
|
+
def album
|
32
|
+
fetch('smashing_pumpkins.albums')
|
33
|
+
end
|
34
|
+
|
35
|
+
##
|
36
|
+
# Produces a random Smashing Pumpkins song lyric.
|
37
|
+
#
|
38
|
+
# @return [String]
|
39
|
+
#
|
40
|
+
# @example
|
41
|
+
# Faker::Music::SmashingPumpkins.lyric #=> "Despite all my rage, I am still just a rat in a cage"
|
42
|
+
# Faker::Music::SmashingPumpkins.lyric #=> "Breathin' underwater, and livin' under glass"
|
43
|
+
#
|
44
|
+
# @faker.version next
|
45
|
+
def lyric
|
46
|
+
fetch('smashing_pumpkins.lyric')
|
47
|
+
end
|
48
|
+
|
49
|
+
##
|
50
|
+
# Produces the name of a song by the Smashing Pumpkins.
|
51
|
+
#
|
52
|
+
# @return [String]
|
53
|
+
#
|
54
|
+
# @example
|
55
|
+
# Faker::Music::SmashingPumpkins.song #=> "Stand Inside My Love"
|
56
|
+
#
|
57
|
+
# @faker.version next
|
58
|
+
def song
|
59
|
+
fetch('smashing_pumpkins.songs')
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
data/lib/faker/quotes/quote.rb
CHANGED
@@ -106,6 +106,19 @@ module Faker
|
|
106
106
|
def fortune_cookie
|
107
107
|
fetch('quote.fortune_cookie')
|
108
108
|
end
|
109
|
+
|
110
|
+
##
|
111
|
+
# Produces a quote from comedian Mitch Hedberg.
|
112
|
+
#
|
113
|
+
# @return [String]
|
114
|
+
#
|
115
|
+
# @example
|
116
|
+
# Faker::Quote.mitch_hedberg # => "I like Kit-Kats, unless I'm with four or more people."
|
117
|
+
#
|
118
|
+
# @faker.version next
|
119
|
+
def mitch_hedberg
|
120
|
+
fetch('quote.mitch_hedberg')
|
121
|
+
end
|
109
122
|
end
|
110
123
|
end
|
111
124
|
end
|