faker 3.2.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 +437 -2
- data/README.md +29 -14
- 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 +64 -18
- data/lib/faker/default/company.rb +99 -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/finance.rb +2 -2
- 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 +19 -53
- data/lib/faker/default/invoice.rb +3 -3
- data/lib/faker/default/json.rb +9 -4
- data/lib/faker/default/lorem.rb +6 -3
- 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 +4 -4
- 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/types.rb +5 -6
- data/lib/faker/default/vehicle.rb +23 -11
- data/lib/faker/games/final_fantasy_xiv.rb +73 -0
- data/lib/faker/games/heroes_of_the_storm.rb +0 -11
- data/lib/faker/japanese_media/fullmetal_alchemist_brotherhood.rb +10 -10
- data/lib/faker/locations/australia.rb +40 -38
- 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/travel/airport.rb +2 -2
- 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/the_fresh_prince_of_bel_air.rb +0 -13
- data/lib/faker/version.rb +1 -1
- data/lib/faker.rb +20 -8
- 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/bg.yml +0 -1
- data/lib/locales/da-DK.yml +529 -35
- data/lib/locales/de-AT.yml +3487 -26
- 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/archer.yml +75 -0
- data/lib/locales/en/australia.yml +106 -105
- data/lib/locales/en/bank.yml +1 -1
- data/lib/locales/en/cosmere.yml +1 -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 +2 -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/id_number.yml +1 -1
- data/lib/locales/en/internet.yml +0 -4
- data/lib/locales/en/minecraft.yml +4 -4
- 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/{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 -9
- data/lib/locales/en-IND.yml +1259 -17
- data/lib/locales/en-KE.yml +212 -0
- data/lib/locales/en-MS.yml +364 -18
- data/lib/locales/en-NEP.yml +212 -38
- data/lib/locales/en-NZ.yml +1153 -124
- data/lib/locales/en-PAK.yml +392 -11
- data/lib/locales/en-SG.yml +581 -17
- data/lib/locales/en-US.yml +6914 -74
- data/lib/locales/en-au-ocker.yml +266 -24
- data/lib/locales/es-AR.yml +4569 -4600
- data/lib/locales/es-MX.yml +0 -1
- data/lib/locales/es.yml +0 -1
- data/lib/locales/fr/address.yml +761 -8
- 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 +0 -1
- data/lib/locales/fr.yml +3 -1
- data/lib/locales/hy.yml +3624 -120
- data/lib/locales/id.yml +839 -12
- data/lib/locales/it.yml +1304 -33
- 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/touhou.yml +466 -0
- data/lib/locales/ko.yml +1361 -21
- data/lib/locales/lt.yml +297 -16
- data/lib/locales/lv.yml +0 -1
- data/lib/locales/nb-NO.yml +518 -30
- data/lib/locales/nl.yml +9 -2
- data/lib/locales/pl.yml +0 -1
- data/lib/locales/pt-BR.yml +8205 -665
- data/lib/locales/pt.yml +844 -45
- data/lib/locales/ru.yml +1353 -70
- data/lib/locales/sk.yml +4410 -44
- data/lib/locales/sv.yml +99 -0
- data/lib/locales/tr.yml +0 -2
- data/lib/locales/uk.yml +1808 -45
- data/lib/locales/zh-CN/bank.yml +17 -0
- metadata +26 -154
- data/History.md +0 -176
@@ -4,12 +4,14 @@ module Faker
|
|
4
4
|
class PhoneNumber < Base
|
5
5
|
class << self
|
6
6
|
##
|
7
|
-
# Produces a
|
7
|
+
# Produces a phone number in a random format without the country code and it can have different dividers.
|
8
8
|
#
|
9
9
|
# @return [String]
|
10
10
|
#
|
11
11
|
# @example
|
12
|
-
# Faker::PhoneNumber.phone_number #=> "
|
12
|
+
# Faker::PhoneNumber.phone_number #=> "(504) 113-1705"
|
13
|
+
# Faker::PhoneNumber.phone_number #=> "662.291.7201"
|
14
|
+
# Faker::PhoneNumber.phone_number #=> "9415283713"
|
13
15
|
#
|
14
16
|
# @faker.version 0.3.0
|
15
17
|
def phone_number
|
@@ -17,12 +19,14 @@ module Faker
|
|
17
19
|
end
|
18
20
|
|
19
21
|
##
|
20
|
-
# Produces a random cell phone number in a random format
|
22
|
+
# Produces a random cell phone number in a random format without the country code and it can have different dividers.
|
21
23
|
#
|
22
24
|
# @return [String]
|
23
25
|
#
|
24
26
|
# @example
|
25
|
-
# Faker::PhoneNumber.cell_phone #=> "(
|
27
|
+
# Faker::PhoneNumber.cell_phone #=> "(836) 115-8995"
|
28
|
+
# Faker::PhoneNumber.cell_phone #=> "382-597-5739"
|
29
|
+
# Faker::PhoneNumber.cell_phone #=> "316.828.1822"
|
26
30
|
#
|
27
31
|
# @faker.version 1.0.0
|
28
32
|
def cell_phone
|
@@ -36,10 +40,12 @@ module Faker
|
|
36
40
|
#
|
37
41
|
# @example
|
38
42
|
# Faker::PhoneNumber.country_code #=> "+20"
|
43
|
+
# Faker::PhoneNumber.country_code #=> "+39"
|
44
|
+
# Faker::PhoneNumber.country_code #=> "+852"
|
39
45
|
#
|
40
46
|
# @faker.version 1.9.2
|
41
47
|
def country_code
|
42
|
-
"+#{fetch('country_code')}"
|
48
|
+
"+#{fetch('phone_number.country_code')}"
|
43
49
|
end
|
44
50
|
|
45
51
|
##
|
@@ -48,7 +54,9 @@ module Faker
|
|
48
54
|
# @return [String]
|
49
55
|
#
|
50
56
|
# @example
|
51
|
-
# Faker::PhoneNumber.phone_number_with_country_code #=> "+
|
57
|
+
# Faker::PhoneNumber.phone_number_with_country_code #=> "+55 466-746-6882"
|
58
|
+
# Faker::PhoneNumber.phone_number_with_country_code #=> "+81 3718219558"
|
59
|
+
# Faker::PhoneNumber.phone_number_with_country_code #=> "+49 140 957 9846"
|
52
60
|
#
|
53
61
|
# @faker.version 1.9.2
|
54
62
|
def phone_number_with_country_code
|
@@ -61,7 +69,9 @@ module Faker
|
|
61
69
|
# @return [String]
|
62
70
|
#
|
63
71
|
# @example
|
64
|
-
# Faker::PhoneNumber.cell_phone_with_country_code #=> "+
|
72
|
+
# Faker::PhoneNumber.cell_phone_with_country_code #=> "+852 (190) 987-9034"
|
73
|
+
# Faker::PhoneNumber.cell_phone_with_country_code #=> "+64 (820) 583-6474"
|
74
|
+
# Faker::PhoneNumber.cell_phone_with_country_code #=> "+1 591.871.7985"
|
65
75
|
#
|
66
76
|
# @faker.version 1.9.2
|
67
77
|
def cell_phone_with_country_code
|
@@ -69,12 +79,14 @@ module Faker
|
|
69
79
|
end
|
70
80
|
|
71
81
|
##
|
72
|
-
# Produces a random phone number in e164 format.
|
82
|
+
# Produces a random phone number in e164 format, i.e., without any dividers.
|
73
83
|
#
|
74
84
|
# @return [String]
|
75
85
|
#
|
76
86
|
# @example
|
77
|
-
# Faker::PhoneNumber.cell_phone_in_e164 #=> "+
|
87
|
+
# Faker::PhoneNumber.cell_phone_in_e164 #=> "+542024834991"
|
88
|
+
# Faker::PhoneNumber.cell_phone_in_e164 #=> "+8522846847703"
|
89
|
+
# Faker::PhoneNumber.cell_phone_in_e164 #=> "+649477546575"
|
78
90
|
#
|
79
91
|
# @faker.version 1.9.2
|
80
92
|
def cell_phone_in_e164
|
@@ -82,49 +94,56 @@ module Faker
|
|
82
94
|
end
|
83
95
|
|
84
96
|
##
|
85
|
-
# Produces a random
|
97
|
+
# Produces a random area code.
|
86
98
|
#
|
87
99
|
# @return [String]
|
88
100
|
#
|
89
101
|
# @example
|
90
102
|
# Faker::PhoneNumber.area_code #=> "201"
|
103
|
+
# Faker::PhoneNumber.area_code #=> "613"
|
104
|
+
# Faker::PhoneNumber.area_code #=> "321"
|
91
105
|
#
|
92
106
|
# @faker.version 1.3.0
|
93
107
|
def area_code
|
94
108
|
fetch('phone_number.area_code')
|
95
|
-
rescue I18n::MissingTranslationData
|
96
|
-
nil
|
97
109
|
end
|
98
110
|
|
99
111
|
##
|
100
|
-
# Produces a random
|
112
|
+
# Produces a random exchange code.
|
101
113
|
#
|
102
114
|
# @return [String]
|
103
115
|
#
|
104
116
|
# @example
|
105
117
|
# Faker::PhoneNumber.exchange_code #=> "208"
|
118
|
+
# Faker::PhoneNumber.exchange_code #=> "415"
|
119
|
+
# Faker::PhoneNumber.exchange_code #=> "652"
|
106
120
|
#
|
107
121
|
# @faker.version 1.3.0
|
108
122
|
def exchange_code
|
109
123
|
fetch('phone_number.exchange_code')
|
110
|
-
rescue I18n::MissingTranslationData
|
111
|
-
nil
|
112
124
|
end
|
113
125
|
|
114
126
|
##
|
115
|
-
# Produces a random
|
127
|
+
# Produces a random extension / subscriber number. Can be used for both extensions and last four digits of phone number.
|
116
128
|
#
|
117
|
-
# @param length [Integer] Specifies the length of the return value.
|
129
|
+
# @param length [Integer] Specifies the length of the return value. Defaults to 4.
|
118
130
|
# @return [String]
|
119
131
|
#
|
120
132
|
# @example
|
121
133
|
# Faker::PhoneNumber.subscriber_number #=> "3873"
|
122
134
|
# Faker::PhoneNumber.subscriber_number(length: 2) #=> "39"
|
123
135
|
# Faker::PhoneNumber.extension #=> "3764"
|
136
|
+
# Faker::PhoneNumber.extension(length: 2) => "37"
|
124
137
|
#
|
125
138
|
# @faker.version 1.3.0
|
126
139
|
def subscriber_number(length: 4)
|
127
|
-
|
140
|
+
if !length.is_a?(Integer) || length > 10
|
141
|
+
raise ArgumentError, 'length must be an Integer and be lesser than 10'
|
142
|
+
end
|
143
|
+
|
144
|
+
generate(:string) do |g|
|
145
|
+
g.int(length: length)
|
146
|
+
end
|
128
147
|
end
|
129
148
|
|
130
149
|
alias extension subscriber_number
|
@@ -13,7 +13,7 @@ module Faker
|
|
13
13
|
#
|
14
14
|
# @faker.version 1.9.2
|
15
15
|
def id_number
|
16
|
-
Faker::
|
16
|
+
Faker::IdNumber.south_african_id_number
|
17
17
|
end
|
18
18
|
|
19
19
|
##
|
@@ -26,7 +26,7 @@ module Faker
|
|
26
26
|
#
|
27
27
|
# @faker.version 1.9.2
|
28
28
|
def valid_id_number
|
29
|
-
Faker::
|
29
|
+
Faker::IdNumber.valid_south_african_id_number
|
30
30
|
end
|
31
31
|
|
32
32
|
##
|
@@ -39,7 +39,7 @@ module Faker
|
|
39
39
|
#
|
40
40
|
# @faker.version 1.9.2
|
41
41
|
def invalid_id_number
|
42
|
-
Faker::
|
42
|
+
Faker::IdNumber.invalid_south_african_id_number
|
43
43
|
end
|
44
44
|
|
45
45
|
##
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Faker
|
4
|
-
class
|
4
|
+
class Theater < Base
|
5
5
|
class << self
|
6
6
|
##
|
7
7
|
# Produces the name of a musical for an older audience
|
@@ -9,12 +9,12 @@ module Faker
|
|
9
9
|
# @return [String]
|
10
10
|
#
|
11
11
|
# @example
|
12
|
-
# Faker::
|
13
|
-
# #=> "
|
12
|
+
# Faker::Theater.adult_musical
|
13
|
+
# #=> "Mamma Mia!"
|
14
14
|
#
|
15
15
|
# @faker.version 2.13.0
|
16
16
|
def adult_musical
|
17
|
-
fetch('
|
17
|
+
fetch('theater.adult_musical')
|
18
18
|
end
|
19
19
|
|
20
20
|
##
|
@@ -23,12 +23,12 @@ module Faker
|
|
23
23
|
# @return [String]
|
24
24
|
#
|
25
25
|
# @example
|
26
|
-
# Faker::
|
26
|
+
# Faker::Theater.kids_musical
|
27
27
|
# #=> "Into the Woods JR."
|
28
28
|
#
|
29
29
|
# @faker.version 2.13.0
|
30
30
|
def kids_musical
|
31
|
-
fetch('
|
31
|
+
fetch('theater.kids_musical')
|
32
32
|
end
|
33
33
|
|
34
34
|
##
|
@@ -37,12 +37,12 @@ module Faker
|
|
37
37
|
# @return [String]
|
38
38
|
#
|
39
39
|
# @example
|
40
|
-
# Faker::
|
40
|
+
# Faker::Theater.play
|
41
41
|
# #=> "Death of a Salesman"
|
42
42
|
#
|
43
43
|
# @faker.version 2.13.0
|
44
44
|
def play
|
45
|
-
fetch('
|
45
|
+
fetch('theater.play')
|
46
46
|
end
|
47
47
|
end
|
48
48
|
end
|
data/lib/faker/default/types.rb
CHANGED
@@ -18,11 +18,9 @@ module Faker
|
|
18
18
|
# @faker.version 1.8.6
|
19
19
|
def rb_string(words: 1)
|
20
20
|
resolved_num = resolve(words)
|
21
|
-
word_list =
|
22
|
-
translate('faker.lorem.words')
|
23
|
-
|
21
|
+
word_list = translate('faker.lorem.words')
|
24
22
|
word_list *= ((resolved_num / word_list.length) + 1)
|
25
|
-
|
23
|
+
sample(word_list, resolved_num).join(' ')
|
26
24
|
end
|
27
25
|
|
28
26
|
##
|
@@ -97,12 +95,13 @@ module Faker
|
|
97
95
|
# @example
|
98
96
|
# Faker::Types.rb_array #=> ["a"]
|
99
97
|
# Faker::Types.rb_array(len: 4) #=> ["a", 1, 2, "bob"]
|
98
|
+
# Faker::Types.rb_array(len: 2, type: -> { Faker::Types.rb_string }) #=> ["cat", "foo"]
|
100
99
|
#
|
101
100
|
# @faker.version 1.8.6
|
102
|
-
def rb_array(len: 1)
|
101
|
+
def rb_array(len: 1, type: -> { random_type })
|
103
102
|
[].tap do |ar|
|
104
103
|
len.times do
|
105
|
-
ar.push
|
104
|
+
ar.push type.is_a?(Proc) ? type.call : type
|
106
105
|
end
|
107
106
|
end
|
108
107
|
end
|
@@ -22,14 +22,25 @@ module Faker
|
|
22
22
|
#
|
23
23
|
# @faker.version 1.6.4
|
24
24
|
def vin
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
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
|
33
44
|
end
|
34
45
|
|
35
46
|
# Produces a random vehicle manufacturer.
|
@@ -37,12 +48,13 @@ module Faker
|
|
37
48
|
# @return [String]
|
38
49
|
#
|
39
50
|
# @example
|
40
|
-
# Faker::Vehicle.
|
51
|
+
# Faker::Vehicle.manufacturer #=> "Lamborghini"
|
41
52
|
#
|
42
53
|
# @faker.version 1.6.4
|
43
|
-
def
|
44
|
-
fetch('vehicle.
|
54
|
+
def manufacturer
|
55
|
+
fetch('vehicle.manufacturer')
|
45
56
|
end
|
57
|
+
alias manufacture manufacturer
|
46
58
|
|
47
59
|
##
|
48
60
|
# Produces a random vehicle make.
|
@@ -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
|
#
|
@@ -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
|
@@ -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
|