faker 1.8.7 → 1.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +146 -6
- data/README.md +44 -4
- data/lib/extensions/array.rb +10 -10
- data/lib/extensions/symbol.rb +0 -1
- data/lib/faker.rb +42 -35
- data/lib/faker/address.rb +39 -13
- data/lib/faker/app.rb +1 -3
- data/lib/faker/appliance.rb +13 -0
- data/lib/faker/avatar.rb +2 -2
- data/lib/faker/bank.rb +72 -15
- data/lib/faker/beer.rb +0 -1
- data/lib/faker/bitcoin.rb +4 -5
- data/lib/faker/bojack_horseman.rb +17 -0
- data/lib/faker/breaking_bad.rb +0 -3
- data/lib/faker/business.rb +1 -2
- data/lib/faker/cannabis.rb +42 -0
- data/lib/faker/chuck_norris.rb +3 -2
- data/lib/faker/code.rb +59 -20
- data/lib/faker/coffee.rb +4 -0
- data/lib/faker/color.rb +2 -2
- data/lib/faker/commerce.rb +3 -4
- data/lib/faker/community.rb +13 -0
- data/lib/faker/company.rb +80 -24
- data/lib/faker/currency.rb +17 -0
- data/lib/faker/date.rb +13 -27
- data/lib/faker/demographic.rb +2 -2
- data/lib/faker/device.rb +29 -0
- data/lib/faker/dota.rb +25 -0
- data/lib/faker/dr_who.rb +7 -8
- data/lib/faker/dumb_and_dumber.rb +1 -1
- data/lib/faker/dune.rb +4 -4
- data/lib/faker/elder_scrolls.rb +16 -0
- data/lib/faker/electrical_components.rb +19 -0
- data/lib/faker/ethereum.rb +12 -0
- data/lib/faker/famous_last_words.rb +11 -0
- data/lib/faker/file.rb +2 -5
- data/lib/faker/fillmurray.rb +3 -4
- data/lib/faker/finance.rb +3 -4
- data/lib/faker/food.rb +21 -1
- data/lib/faker/football.rb +21 -0
- data/lib/faker/gender.rb +13 -0
- data/lib/faker/greek_philosophers.rb +13 -0
- data/lib/faker/hacker.rb +9 -11
- data/lib/faker/harry_potter.rb +4 -0
- data/lib/faker/hipster.rb +12 -4
- data/lib/faker/id_number.rb +24 -9
- data/lib/faker/internet.rb +69 -57
- data/lib/faker/invoice.rb +94 -0
- data/lib/faker/job.rb +10 -3
- data/lib/faker/lebowski.rb +2 -2
- data/lib/faker/lord_of_the_rings.rb +5 -1
- data/lib/faker/lorem.rb +32 -8
- data/lib/faker/lorem_flickr.rb +43 -0
- data/lib/faker/lorem_pixel.rb +20 -5
- data/lib/faker/lovecraft.rb +12 -5
- data/lib/faker/markdown.rb +12 -4
- data/lib/faker/measurement.rb +35 -80
- data/lib/faker/michael_scott.rb +9 -0
- data/lib/faker/military.rb +25 -0
- data/lib/faker/music.rb +13 -1
- data/lib/faker/myst.rb +25 -0
- data/lib/faker/name.rb +22 -8
- data/lib/faker/nation.rb +24 -0
- data/lib/faker/nato_phonetic_alphabet.rb +9 -0
- data/lib/faker/new_girl.rb +13 -0
- data/lib/faker/number.rb +12 -12
- data/lib/faker/omniauth.rb +110 -122
- data/lib/faker/parks_and_rec.rb +13 -0
- data/lib/faker/phone_number.rb +11 -19
- data/lib/faker/placeholdit.rb +11 -2
- data/lib/faker/princess_bride.rb +13 -0
- data/lib/faker/rick_and_morty.rb +1 -1
- data/lib/faker/science.rb +4 -2
- data/lib/faker/seinfeld.rb +1 -1
- data/lib/faker/shakespeare.rb +0 -3
- data/lib/faker/silicon_valley.rb +4 -0
- data/lib/faker/simpsons.rb +3 -8
- data/lib/faker/singular_siegler.rb +9 -0
- data/lib/faker/slack_emoji.rb +0 -2
- data/lib/faker/source.rb +18 -0
- data/lib/faker/space.rb +4 -0
- data/lib/faker/star_trek.rb +2 -2
- data/lib/faker/star_wars.rb +5 -6
- data/lib/faker/stranger_thing.rb +13 -0
- data/lib/faker/string.rb +45 -0
- data/lib/faker/stripe.rb +63 -0
- data/lib/faker/sword_art_online.rb +21 -0
- data/lib/faker/team.rb +4 -1
- data/lib/faker/the_it_crowd.rb +21 -0
- data/lib/faker/time.rb +10 -10
- data/lib/faker/twin_peaks.rb +2 -2
- data/lib/faker/twitter.rb +1 -1
- data/lib/faker/types.rb +36 -40
- data/lib/faker/university.rb +3 -3
- data/lib/faker/vehicle.rb +72 -10
- data/lib/faker/verb.rb +25 -0
- data/lib/faker/version.rb +1 -1
- data/lib/faker/world_cup.rb +25 -0
- data/lib/helpers/char.rb +19 -20
- data/lib/helpers/unique_generator.rb +7 -1
- data/lib/locales/ca-CAT.yml +1 -1
- data/lib/locales/da-DK.yml +1 -0
- data/lib/locales/de-AT.yml +3 -2
- data/lib/locales/de.yml +6 -5
- data/lib/locales/ee.yml +59 -0
- data/lib/locales/en-CA.yml +23 -1
- data/lib/locales/en-GB.yml +1 -0
- data/lib/locales/en-NZ.yml +4 -3
- data/lib/locales/en-US.yml +2 -0
- data/lib/locales/en.yml +2 -2
- data/lib/locales/en/appliance.yml +5 -0
- data/lib/locales/en/bank.yml +274 -59
- data/lib/locales/en/bojack_horseman.yml +6 -0
- data/lib/locales/en/cannabis.yml +12 -0
- data/lib/locales/en/community.yml +33 -0
- data/lib/locales/en/currency.yml +6 -0
- data/lib/locales/en/dessert.yml +3 -3
- data/lib/locales/en/device.yml +7 -0
- data/lib/locales/en/dota.yml +102 -0
- data/lib/locales/en/dr_who.yml +5 -1
- data/lib/locales/en/dumb_and_dumber.yml +1 -1
- data/lib/locales/en/elder_scrolls.yml +8 -5
- data/lib/locales/en/electrical_components.yml +6 -0
- data/lib/locales/en/famous_last_words.yml +4 -0
- data/lib/locales/en/food.yml +6 -3
- data/lib/locales/en/football.yml +7 -0
- data/lib/locales/en/gender.yml +5 -0
- data/lib/locales/en/greek_philosophers.yml +26 -0
- data/lib/locales/en/harry_potter.yml +2 -1
- data/lib/locales/en/invoice.yml +6 -0
- data/lib/locales/en/job.yml +2 -2
- data/lib/locales/en/lord_of_the_rings.yml +1 -0
- data/lib/locales/en/lorem.yml +4 -0
- data/lib/locales/en/michael_scott.yml +45 -0
- data/lib/locales/en/military.yml +8 -0
- data/lib/locales/en/music.yml +29 -1
- data/lib/locales/en/myst.yml +47 -0
- data/lib/locales/en/name.yml +13 -12
- data/lib/locales/en/nation.yml +8 -0
- data/lib/locales/en/nato_phonetic_alphabet.yml +4 -0
- data/lib/locales/en/new_girl.yml +40 -0
- data/lib/locales/en/overwatch.yml +3 -2
- data/lib/locales/en/parks_and_rec.yml +7 -0
- data/lib/locales/en/princess_bride.yml +5 -0
- data/lib/locales/en/programming_language.yml +2 -1
- data/lib/locales/en/science.yml +1 -0
- data/lib/locales/en/silicon_valley.yml +1 -0
- data/lib/locales/en/singular_siegler.yml +37 -0
- data/lib/locales/en/source.yml +16 -0
- data/lib/locales/en/space.yml +2 -1
- data/lib/locales/en/star_wars.yml +10 -0
- data/lib/locales/en/stranger_thing.yml +36 -0
- data/lib/locales/en/stripe.yml +42 -0
- data/lib/locales/en/sword_art_online.yml +334 -0
- data/lib/locales/en/team.yml +1 -1
- data/lib/locales/en/the_it_crowd.yml +155 -0
- data/lib/locales/en/vehicle.yml +24 -0
- data/lib/locales/en/verbs.yml +8 -0
- data/lib/locales/en/world_cup.yml +271 -0
- data/lib/locales/es.yml +6 -1
- data/lib/locales/fi-FI.yml +9 -4
- data/lib/locales/fr-CA.yml +90 -0
- data/lib/locales/fr-CH.yml +73 -0
- data/lib/locales/fr.yml +4 -2
- data/lib/locales/it.yml +1 -1
- data/lib/locales/ja.yml +11 -0
- data/lib/locales/lv.yml +53 -0
- data/lib/locales/nl.yml +1 -1
- data/lib/locales/no.yml +7 -0
- data/lib/locales/pl.yml +1 -0
- data/lib/locales/pt-BR.yml +21 -13
- data/lib/locales/pt.yml +1 -0
- data/lib/locales/sv.yml +4 -4
- data/lib/locales/tr.yml +8 -0
- data/lib/locales/uk.yml +9 -0
- metadata +167 -3
data/lib/faker/coffee.rb
CHANGED
data/lib/faker/color.rb
CHANGED
@@ -2,7 +2,7 @@ module Faker
|
|
2
2
|
class Color < Base
|
3
3
|
class << self
|
4
4
|
def hex_color
|
5
|
-
'#%06x'
|
5
|
+
format('#%06x', (rand * 0xffffff))
|
6
6
|
end
|
7
7
|
|
8
8
|
def color_name
|
@@ -14,7 +14,7 @@ module Faker
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def rgb_color
|
17
|
-
3
|
17
|
+
Array.new(3) { single_rgb_color }
|
18
18
|
end
|
19
19
|
|
20
20
|
# returns [hue, saturation, lightness]
|
data/lib/faker/commerce.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
module Faker
|
2
2
|
class Commerce < Base
|
3
|
-
|
4
3
|
class << self
|
5
4
|
def color
|
6
5
|
fetch('color.name')
|
@@ -32,11 +31,11 @@ module Faker
|
|
32
31
|
fetch('commerce.product_name.material')
|
33
32
|
end
|
34
33
|
|
35
|
-
def price(range=0..100.0, as_string=false)
|
36
|
-
price = (rand(range) * 100).floor/100.0
|
34
|
+
def price(range = 0..100.0, as_string = false)
|
35
|
+
price = (rand(range) * 100).floor / 100.0
|
37
36
|
if as_string
|
38
37
|
price_parts = price.to_s.split('.')
|
39
|
-
price = price_parts[0] + price_parts[-1].ljust(2,
|
38
|
+
price = price_parts[0] + '.' + price_parts[-1].ljust(2, '0')
|
40
39
|
end
|
41
40
|
price
|
42
41
|
end
|
data/lib/faker/company.rb
CHANGED
@@ -17,7 +17,7 @@ module Faker
|
|
17
17
|
|
18
18
|
# Generate a buzzword-laden catch phrase.
|
19
19
|
def catch_phrase
|
20
|
-
translate('faker.company.buzzwords').collect {|list| sample(list) }.join(' ')
|
20
|
+
translate('faker.company.buzzwords').collect { |list| sample(list) }.join(' ')
|
21
21
|
end
|
22
22
|
|
23
23
|
def buzzword
|
@@ -26,29 +26,39 @@ module Faker
|
|
26
26
|
|
27
27
|
# When a straight answer won't do, BS to the rescue!
|
28
28
|
def bs
|
29
|
-
translate('faker.company.bs').collect {|list| sample(list) }.join(' ')
|
29
|
+
translate('faker.company.bs').collect { |list| sample(list) }.join(' ')
|
30
30
|
end
|
31
31
|
|
32
32
|
def ein
|
33
|
-
('%09d'
|
33
|
+
format('%09d', rand(10**9)).gsub(/(\d{2})(\d{7})/, '\\1-\\2')
|
34
34
|
end
|
35
35
|
|
36
36
|
def duns_number
|
37
|
-
('%09d'
|
37
|
+
format('%09d', rand(10**9)).gsub(/(\d{2})(\d{3})(\d{4})/, '\\1-\\2-\\3')
|
38
38
|
end
|
39
39
|
|
40
40
|
# Get a random company logo url in PNG format.
|
41
41
|
def logo
|
42
|
-
rand_num = rand(13)
|
42
|
+
rand_num = rand(1..13)
|
43
43
|
"https://pigment.github.io/fake-logos/logos/medium/color/#{rand_num}.png"
|
44
44
|
end
|
45
45
|
|
46
|
+
def type
|
47
|
+
fetch('company.type')
|
48
|
+
end
|
49
|
+
|
50
|
+
def profession
|
51
|
+
fetch('company.profession')
|
52
|
+
end
|
53
|
+
|
54
|
+
# rubocop:disable Style/AsciiComments
|
46
55
|
# Get a random Spanish organization number. See more here https://es.wikipedia.org/wiki/Número_de_identificación_fiscal
|
56
|
+
# rubocop:enable Style/AsciiComments
|
47
57
|
def spanish_organisation_number
|
48
58
|
# Valid leading character: A, B, C, D, E, F, G, H, J, N, P, Q, R, S, U, V, W
|
49
59
|
# 7 digit numbers
|
50
|
-
letters = [
|
51
|
-
base = [sample(letters), ('%07d'
|
60
|
+
letters = %w[A B C D E F G H J N P Q R S U V W]
|
61
|
+
base = [sample(letters), format('%07d', rand(10**7))].join
|
52
62
|
base
|
53
63
|
end
|
54
64
|
|
@@ -57,10 +67,21 @@ module Faker
|
|
57
67
|
# Valid leading digit: 1, 2, 3, 5, 6, 7, 8, 9
|
58
68
|
# Valid third digit: >= 2
|
59
69
|
# Last digit is a control digit
|
60
|
-
base = [sample([1, 2, 3, 5, 6, 7, 8, 9]), sample((0..9).to_a), sample((2..9).to_a), ('%06d'
|
70
|
+
base = [sample([1, 2, 3, 5, 6, 7, 8, 9]), sample((0..9).to_a), sample((2..9).to_a), format('%06d', rand(10**6))].join
|
61
71
|
base + luhn_algorithm(base).to_s
|
62
72
|
end
|
63
73
|
|
74
|
+
def czech_organisation_number
|
75
|
+
sum = 0
|
76
|
+
base = []
|
77
|
+
[8, 7, 6, 5, 4, 3, 2].each do |weight|
|
78
|
+
base << sample((0..9).to_a)
|
79
|
+
sum += (weight * base.last)
|
80
|
+
end
|
81
|
+
base << (11 - (sum % 11)) % 10
|
82
|
+
base.join
|
83
|
+
end
|
84
|
+
|
64
85
|
# Get a random French SIREN number. See more here https://fr.wikipedia.org/wiki/Syst%C3%A8me_d%27identification_du_r%C3%A9pertoire_des_entreprises
|
65
86
|
def french_siren_number
|
66
87
|
base = (1..8).map { rand(10) }.join
|
@@ -78,24 +99,42 @@ module Faker
|
|
78
99
|
# Valid leading digit: 8, 9
|
79
100
|
mod11_check = nil
|
80
101
|
while mod11_check.nil?
|
81
|
-
base = [sample([8, 9]), ('%07d'
|
102
|
+
base = [sample([8, 9]), format('%07d', rand(10**7))].join
|
82
103
|
mod11_check = mod11(base)
|
83
104
|
end
|
84
105
|
base + mod11_check.to_s
|
85
106
|
end
|
86
107
|
|
87
108
|
def australian_business_number
|
88
|
-
base = ('%09d'
|
109
|
+
base = format('%09d', rand(10**9))
|
89
110
|
abn = "00#{base}"
|
90
111
|
|
91
112
|
(99 - (abn_checksum(abn) % 89)).to_s + base
|
92
113
|
end
|
93
114
|
|
94
|
-
|
95
|
-
|
115
|
+
# Get a random Polish taxpayer identification number More info https://pl.wikipedia.org/wiki/NIP
|
116
|
+
def polish_taxpayer_identification_number
|
117
|
+
result = []
|
118
|
+
weights = [6, 5, 7, 2, 3, 4, 5, 6, 7]
|
119
|
+
loop do
|
120
|
+
result = Array.new(3) { rand(1..9) } + Array.new(7) { rand(10) }
|
121
|
+
break if (weight_sum(result, weights) % 11) == result[9]
|
122
|
+
end
|
123
|
+
result.join('')
|
124
|
+
end
|
125
|
+
|
126
|
+
# Get a random Polish register of national economy number. More info https://pl.wikipedia.org/wiki/REGON
|
127
|
+
def polish_register_of_national_economy(length = 9)
|
128
|
+
raise ArgumentError, 'Length should be 9 or 14' unless [9, 14].include? length
|
129
|
+
random_digits = []
|
130
|
+
loop do
|
131
|
+
random_digits = Array.new(length) { rand(10) }
|
132
|
+
break if collect_regon_sum(random_digits) == random_digits.last
|
133
|
+
end
|
134
|
+
random_digits.join('')
|
96
135
|
end
|
97
136
|
|
98
|
-
|
137
|
+
private
|
99
138
|
|
100
139
|
# Mod11 functionality from https://github.com/badmanski/mod11/blob/master/lib/mod11.rb
|
101
140
|
def mod11(number)
|
@@ -122,11 +161,11 @@ module Faker
|
|
122
161
|
multiplications = []
|
123
162
|
|
124
163
|
number.split(//).each_with_index do |digit, i|
|
125
|
-
if i.even?
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
164
|
+
multiplications << if i.even?
|
165
|
+
digit.to_i * 2
|
166
|
+
else
|
167
|
+
digit.to_i
|
168
|
+
end
|
130
169
|
end
|
131
170
|
|
132
171
|
sum = 0
|
@@ -137,17 +176,17 @@ module Faker
|
|
137
176
|
end
|
138
177
|
end
|
139
178
|
|
140
|
-
if sum % 10
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
179
|
+
control_digit = if (sum % 10).zero?
|
180
|
+
0
|
181
|
+
else
|
182
|
+
(sum / 10 + 1) * 10 - sum
|
183
|
+
end
|
145
184
|
|
146
185
|
control_digit
|
147
186
|
end
|
148
187
|
|
149
188
|
def abn_checksum(abn)
|
150
|
-
abn_weights = [10,1,3,5,7,9,11,13,15,17,19]
|
189
|
+
abn_weights = [10, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19]
|
151
190
|
sum = 0
|
152
191
|
|
153
192
|
abn_weights.each_with_index do |weight, i|
|
@@ -157,6 +196,23 @@ module Faker
|
|
157
196
|
sum
|
158
197
|
end
|
159
198
|
|
199
|
+
def collect_regon_sum(array)
|
200
|
+
weights = if array.size == 9
|
201
|
+
[8, 9, 2, 3, 4, 5, 6, 7]
|
202
|
+
else
|
203
|
+
[2, 4, 8, 5, 0, 9, 7, 3, 6, 1, 2, 4, 8]
|
204
|
+
end
|
205
|
+
sum = weight_sum(array, weights) % 11
|
206
|
+
sum == 10 ? 0 : sum
|
207
|
+
end
|
208
|
+
|
209
|
+
def weight_sum(array, weights)
|
210
|
+
sum = 0
|
211
|
+
(0..weights.size - 1).each do |index|
|
212
|
+
sum += (array[index] * weights[index])
|
213
|
+
end
|
214
|
+
sum
|
215
|
+
end
|
160
216
|
end
|
161
217
|
end
|
162
218
|
end
|
data/lib/faker/date.rb
CHANGED
@@ -9,7 +9,7 @@ module Faker
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def between_except(from, to, excepted)
|
12
|
-
raise ArgumentError,
|
12
|
+
raise ArgumentError, 'From date, to date and excepted date must not be the same' if from == to && to == excepted
|
13
13
|
excepted = get_date_object(excepted)
|
14
14
|
|
15
15
|
loop do
|
@@ -34,44 +34,30 @@ module Faker
|
|
34
34
|
|
35
35
|
def birthday(min_age = 18, max_age = 65)
|
36
36
|
t = ::Date.today
|
37
|
-
top_bound, bottom_bound = prepare_bounds(t, min_age, max_age)
|
38
|
-
years = handled_leap_years(top_bound, bottom_bound)
|
39
37
|
|
40
|
-
from =
|
41
|
-
to =
|
38
|
+
from = birthday_date(t, max_age)
|
39
|
+
to = birthday_date(t, min_age)
|
42
40
|
|
43
41
|
between(from, to).to_date
|
44
42
|
end
|
45
43
|
|
46
44
|
private
|
47
45
|
|
48
|
-
def
|
49
|
-
|
50
|
-
end
|
46
|
+
def birthday_date(date, age)
|
47
|
+
year = date.year - age
|
51
48
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
else
|
59
|
-
[top_bound, bottom_bound]
|
60
|
-
end
|
61
|
-
end
|
49
|
+
day =
|
50
|
+
if date.day == 29 && date.month == 2 && !::Date.leap?(year)
|
51
|
+
28
|
52
|
+
else
|
53
|
+
date.day
|
54
|
+
end
|
62
55
|
|
63
|
-
|
64
|
-
if (bound % 4) != 0
|
65
|
-
bound += 1 if increase
|
66
|
-
bound -= 1 unless increase
|
67
|
-
customized_bound(bound, increase)
|
68
|
-
else
|
69
|
-
bound
|
70
|
-
end
|
56
|
+
::Date.new(year, date.month, day)
|
71
57
|
end
|
72
58
|
|
73
59
|
def get_date_object(date)
|
74
|
-
date = ::Date.parse(date) if date.is_a?(String)
|
60
|
+
date = ::Date.parse(date) if date.is_a?(::String)
|
75
61
|
date = date.to_date if date.respond_to?(:to_date)
|
76
62
|
date
|
77
63
|
end
|
data/lib/faker/demographic.rb
CHANGED
@@ -25,9 +25,9 @@ module Faker
|
|
25
25
|
case unit
|
26
26
|
when :imperial
|
27
27
|
inches = rand_in_range(57, 86)
|
28
|
-
|
28
|
+
"#{inches / 12} ft, #{inches % 12} in"
|
29
29
|
when :metric
|
30
|
-
|
30
|
+
rand_in_range(1.45, 2.13).round(2).to_s
|
31
31
|
end
|
32
32
|
end
|
33
33
|
end
|
data/lib/faker/device.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
module Faker
|
2
|
+
class Device < Base
|
3
|
+
class << self
|
4
|
+
def build_number
|
5
|
+
Faker::Number.between(1, 500)
|
6
|
+
end
|
7
|
+
|
8
|
+
def manufacturer
|
9
|
+
fetch('device.manufacturer')
|
10
|
+
end
|
11
|
+
|
12
|
+
def model_name
|
13
|
+
fetch('device.model_name')
|
14
|
+
end
|
15
|
+
|
16
|
+
def platform
|
17
|
+
fetch('device.platform')
|
18
|
+
end
|
19
|
+
|
20
|
+
def serial
|
21
|
+
fetch('device.serial')
|
22
|
+
end
|
23
|
+
|
24
|
+
def version
|
25
|
+
Faker::Number.between(1, 1000)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
data/lib/faker/dota.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
module Faker
|
2
|
+
class Dota < Base
|
3
|
+
class << self
|
4
|
+
def hero
|
5
|
+
fetch('dota.hero')
|
6
|
+
end
|
7
|
+
|
8
|
+
def item
|
9
|
+
fetch('dota.item')
|
10
|
+
end
|
11
|
+
|
12
|
+
def team
|
13
|
+
fetch('dota.team')
|
14
|
+
end
|
15
|
+
|
16
|
+
def player
|
17
|
+
fetch('dota.player')
|
18
|
+
end
|
19
|
+
|
20
|
+
def quote(hero = 'abaddon')
|
21
|
+
fetch("dota.#{hero}.quote")
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/lib/faker/dr_who.rb
CHANGED
@@ -1,10 +1,7 @@
|
|
1
|
-
#
|
2
|
-
#frozen_string_literal: true
|
1
|
+
# frozen_string_literal: true
|
3
2
|
|
4
3
|
module Faker
|
5
|
-
|
6
4
|
class DrWho < Base
|
7
|
-
|
8
5
|
def self.character
|
9
6
|
fetch('dr_who.character')
|
10
7
|
end
|
@@ -13,6 +10,10 @@ module Faker
|
|
13
10
|
fetch('dr_who.the_doctors')
|
14
11
|
end
|
15
12
|
|
13
|
+
def self.actor
|
14
|
+
fetch('dr_who.actors')
|
15
|
+
end
|
16
|
+
|
16
17
|
def self.catch_phrase
|
17
18
|
fetch('dr_who.catch_phrases')
|
18
19
|
end
|
@@ -28,7 +29,5 @@ module Faker
|
|
28
29
|
def self.specie
|
29
30
|
fetch('dr_who.species')
|
30
31
|
end
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
end #module Faker
|
32
|
+
end
|
33
|
+
end
|