faker 2.1.2 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +113 -7
- data/README.md +4 -4
- data/lib/faker.rb +56 -1
- data/lib/faker/blockchain/aeternity.rb +70 -0
- data/lib/faker/blockchain/bitcoin.rb +26 -0
- data/lib/faker/blockchain/ethereum.rb +10 -0
- data/lib/faker/blockchain/tezos.rb +62 -6
- data/lib/faker/books/book.rb +36 -0
- data/lib/faker/books/culture_series.rb +49 -0
- data/lib/faker/books/dune.rb +66 -5
- data/lib/faker/books/lovecraft.rb +210 -7
- data/lib/faker/creature/animal.rb +9 -0
- data/lib/faker/creature/cat.rb +27 -0
- data/lib/faker/creature/dog.rb +72 -0
- data/lib/faker/creature/horse.rb +18 -0
- data/lib/faker/default/address.rb +25 -5
- data/lib/faker/default/alphanumeric.rb +56 -7
- data/lib/faker/default/app.rb +54 -1
- data/lib/faker/default/appliance.rb +18 -0
- data/lib/faker/default/artist.rb +9 -0
- data/lib/faker/default/avatar.rb +42 -1
- data/lib/faker/default/bank.rb +10 -2
- data/lib/faker/default/boolean.rb +16 -1
- data/lib/faker/default/chile_rut.rb +12 -2
- data/lib/faker/default/code.rb +16 -3
- data/lib/faker/default/commerce.rb +17 -3
- data/lib/faker/default/company.rb +10 -2
- data/lib/faker/default/crypto_coin.rb +15 -3
- data/lib/faker/default/date.rb +37 -5
- data/lib/faker/default/demographic.rb +5 -1
- data/lib/faker/default/dessert.rb +27 -0
- data/lib/faker/default/device.rb +54 -0
- data/lib/faker/default/driving_licence.rb +10 -4
- data/lib/faker/default/electrical_components.rb +27 -0
- data/lib/faker/default/file.rb +19 -2
- data/lib/faker/default/fillmurray.rb +9 -1
- data/lib/faker/default/finance.rb +5 -1
- data/lib/faker/default/gender.rb +18 -0
- data/lib/faker/default/greek_philosophers.rb +18 -0
- data/lib/faker/default/hacker.rb +59 -1
- data/lib/faker/default/hipster.rb +45 -6
- data/lib/faker/default/house.rb +18 -0
- data/lib/faker/default/id_number.rb +11 -3
- data/lib/faker/default/industry_segments.rb +36 -0
- data/lib/faker/default/internet.rb +94 -13
- data/lib/faker/default/invoice.rb +16 -3
- data/lib/faker/default/json.rb +19 -2
- data/lib/faker/default/lorem.rb +81 -10
- data/lib/faker/default/lorem_flickr.rb +38 -5
- data/lib/faker/default/lorem_pixel.rb +10 -1
- data/lib/faker/default/markdown.rb +6 -1
- data/lib/faker/default/marketing.rb +9 -0
- data/lib/faker/default/measurement.rb +40 -8
- data/lib/faker/default/military.rb +45 -0
- data/lib/faker/default/name.rb +5 -1
- data/lib/faker/default/nato_phonetic_alphabet.rb +9 -0
- data/lib/faker/default/nhs.rb +5 -1
- data/lib/faker/default/number.rb +56 -11
- data/lib/faker/default/omniauth.rb +92 -9
- data/lib/faker/default/phone_number.rb +5 -1
- data/lib/faker/default/placeholdit.rb +11 -1
- data/lib/faker/default/programming_language.rb +18 -0
- data/lib/faker/default/relationship.rb +5 -1
- data/lib/faker/default/science.rb +27 -0
- data/lib/faker/default/source.rb +59 -3
- data/lib/faker/default/string.rb +5 -1
- data/lib/faker/default/stripe.rb +20 -4
- data/lib/faker/default/subscription.rb +45 -0
- data/lib/faker/default/superhero.rb +45 -0
- data/lib/faker/default/time.rb +37 -4
- data/lib/faker/default/twitter.rb +32 -18
- data/lib/faker/default/types.rb +27 -5
- data/lib/faker/default/vehicle.rb +17 -4
- data/lib/faker/default/world_cup.rb +11 -2
- data/lib/faker/games/dota.rb +52 -1
- data/lib/faker/games/elder_scrolls.rb +72 -0
- data/lib/faker/games/fallout.rb +37 -0
- data/lib/faker/games/game.rb +27 -0
- data/lib/faker/games/half_life.rb +27 -0
- data/lib/faker/games/heroes.rb +27 -0
- data/lib/faker/games/heroes_of_the_storm.rb +36 -0
- data/lib/faker/games/league_of_legends.rb +54 -0
- data/lib/faker/games/myst.rb +45 -0
- data/lib/faker/games/overwatch.rb +27 -0
- data/lib/faker/games/pokemon.rb +27 -0
- data/lib/faker/games/sonic_the_hedgehog.rb +27 -0
- data/lib/faker/games/super_smash_bros.rb +18 -0
- data/lib/faker/games/witcher.rb +54 -0
- data/lib/faker/games/world_of_warcraft.rb +18 -0
- data/lib/faker/games/zelda.rb +36 -0
- data/lib/faker/japanese_media/dragon_ball.rb +9 -0
- data/lib/faker/japanese_media/sword_art_online.rb +36 -0
- data/lib/faker/movies/hobbit.rb +37 -0
- data/lib/faker/movies/movie.rb +9 -0
- data/lib/faker/movies/star_wars.rb +6 -4
- data/lib/faker/music/grateful_dead.rb +18 -0
- data/lib/faker/music/phish.rb +9 -0
- data/lib/faker/music/rock_band.rb +9 -0
- data/lib/faker/tv_shows/breaking_bad.rb +18 -0
- data/lib/faker/version.rb +1 -1
- data/lib/locales/en-CA.yml +1 -1
- data/lib/locales/en/science.yml +1 -1
- data/lib/locales/ja.yml +8 -9
- metadata +31 -14
@@ -3,7 +3,12 @@
|
|
3
3
|
module Faker
|
4
4
|
class Twitter < Base
|
5
5
|
class << self
|
6
|
-
def user(include_status: true, include_email: false)
|
6
|
+
def user(legacy_include_status = NOT_GIVEN, legacy_include_email = NOT_GIVEN, include_status: true, include_email: false)
|
7
|
+
warn_for_deprecated_arguments do |keywords|
|
8
|
+
keywords << :include_status if legacy_include_status != NOT_GIVEN
|
9
|
+
keywords << :include_email if legacy_include_email != NOT_GIVEN
|
10
|
+
end
|
11
|
+
|
7
12
|
user_id = id
|
8
13
|
background_image_url = Faker::LoremPixel.image(size: '600x400') # TODO: Make the dimensions change
|
9
14
|
profile_image_url = Faker::Avatar.image(slug: user_id, size: '48x48')
|
@@ -15,7 +20,7 @@ module Faker
|
|
15
20
|
default_profile_image: Faker::Boolean.boolean(true_ratio: 0.1),
|
16
21
|
default_profile: Faker::Boolean.boolean(true_ratio: 0.1),
|
17
22
|
description: Faker::Lorem.sentence,
|
18
|
-
entities:
|
23
|
+
entities: user_entities,
|
19
24
|
favourites_count: Faker::Number.between(to: 1, from: 100_000),
|
20
25
|
follow_request_sent: false,
|
21
26
|
followers_count: Faker::Number.between(to: 1, from: 10_000_000),
|
@@ -54,7 +59,12 @@ module Faker
|
|
54
59
|
user
|
55
60
|
end
|
56
61
|
|
57
|
-
def status(include_user: true, include_photo: false)
|
62
|
+
def status(legacy_include_user = NOT_GIVEN, legacy_include_photo = NOT_GIVEN, include_user: true, include_photo: false)
|
63
|
+
warn_for_deprecated_arguments do |keywords|
|
64
|
+
keywords << :include_user if legacy_include_user != NOT_GIVEN
|
65
|
+
keywords << :include_photo if legacy_include_photo != NOT_GIVEN
|
66
|
+
end
|
67
|
+
|
58
68
|
status_id = id
|
59
69
|
status = {
|
60
70
|
id: status_id,
|
@@ -62,7 +72,7 @@ module Faker
|
|
62
72
|
contributors: nil,
|
63
73
|
coordinates: nil,
|
64
74
|
created_at: created_at,
|
65
|
-
entities:
|
75
|
+
entities: status_entities(include_photo: include_photo),
|
66
76
|
favorite_count: Faker::Number.between(to: 1, from: 10_000),
|
67
77
|
favorited: false,
|
68
78
|
geo: nil,
|
@@ -76,7 +86,7 @@ module Faker
|
|
76
86
|
place: nil,
|
77
87
|
possibly_sensitive: Faker::Boolean.boolean(true_ratio: 0.1),
|
78
88
|
retweet_count: Faker::Number.between(to: 1, from: 10_000),
|
79
|
-
retweeted_status:
|
89
|
+
retweeted_status: nil,
|
80
90
|
retweeted: false,
|
81
91
|
source: "<a href=\"#{Faker::Internet.url(host: 'example.com')}\" rel=\"nofollow\">#{Faker::Company.name}</a>",
|
82
92
|
text: Faker::Lorem.sentence,
|
@@ -107,21 +117,25 @@ module Faker
|
|
107
117
|
|
108
118
|
def user_entities
|
109
119
|
{
|
110
|
-
url:
|
120
|
+
url: {
|
111
121
|
urls: []
|
112
122
|
},
|
113
|
-
description:
|
123
|
+
description: {
|
114
124
|
urls: []
|
115
125
|
}
|
116
126
|
}
|
117
127
|
end
|
118
128
|
|
119
|
-
def status_entities(include_photo: false)
|
129
|
+
def status_entities(legacy_include_photo = NOT_GIVEN, include_photo: false)
|
130
|
+
warn_for_deprecated_arguments do |keywords|
|
131
|
+
keywords << :include_photo if legacy_include_photo != NOT_GIVEN
|
132
|
+
end
|
133
|
+
|
120
134
|
entities = {
|
121
|
-
hashtags:
|
122
|
-
symbols:
|
123
|
-
user_mentions:
|
124
|
-
urls:
|
135
|
+
hashtags: [],
|
136
|
+
symbols: [],
|
137
|
+
user_mentions: [],
|
138
|
+
urls: []
|
125
139
|
}
|
126
140
|
entities[:media] = [photo_entity] if include_photo
|
127
141
|
entities
|
@@ -135,7 +149,7 @@ module Faker
|
|
135
149
|
{
|
136
150
|
id: media_id,
|
137
151
|
id_str: media_id.to_s,
|
138
|
-
indices:
|
152
|
+
indices: [
|
139
153
|
103,
|
140
154
|
126
|
141
155
|
],
|
@@ -145,23 +159,23 @@ module Faker
|
|
145
159
|
display_url: 'example.com',
|
146
160
|
expanded_url: Faker::Internet.url(host: 'example.com'),
|
147
161
|
type: 'photo',
|
148
|
-
sizes:
|
149
|
-
medium:
|
162
|
+
sizes: {
|
163
|
+
medium: {
|
150
164
|
w: 1064,
|
151
165
|
h: 600,
|
152
166
|
resize: 'fit'
|
153
167
|
},
|
154
|
-
large:
|
168
|
+
large: {
|
155
169
|
w: 1064,
|
156
170
|
h: 600,
|
157
171
|
resize: 'fit'
|
158
172
|
},
|
159
|
-
small:
|
173
|
+
small: {
|
160
174
|
w: 680,
|
161
175
|
h: 383,
|
162
176
|
resize: 'fit'
|
163
177
|
},
|
164
|
-
thumb:
|
178
|
+
thumb: {
|
165
179
|
w: 150,
|
166
180
|
h: 150,
|
167
181
|
resize: 'crop'
|
data/lib/faker/default/types.rb
CHANGED
@@ -7,7 +7,11 @@ module Faker
|
|
7
7
|
COMPLEX_TYPES = %i[hash array].freeze
|
8
8
|
|
9
9
|
class << self
|
10
|
-
def rb_string(words: 1)
|
10
|
+
def rb_string(legacy_words = NOT_GIVEN, words: 1)
|
11
|
+
warn_for_deprecated_arguments do |keywords|
|
12
|
+
keywords << :words if legacy_words != NOT_GIVEN
|
13
|
+
end
|
14
|
+
|
11
15
|
resolved_num = resolve(words)
|
12
16
|
word_list =
|
13
17
|
translate('faker.lorem.words')
|
@@ -20,11 +24,21 @@ module Faker
|
|
20
24
|
sample(CHARACTERS)
|
21
25
|
end
|
22
26
|
|
23
|
-
def rb_integer(from: 0, to: 100)
|
27
|
+
def rb_integer(legacy_from = NOT_GIVEN, legacy_to = NOT_GIVEN, from: 0, to: 100)
|
28
|
+
warn_for_deprecated_arguments do |keywords|
|
29
|
+
keywords << :from if legacy_from != NOT_GIVEN
|
30
|
+
keywords << :to if legacy_to != NOT_GIVEN
|
31
|
+
end
|
32
|
+
|
24
33
|
rand(from..to).to_i
|
25
34
|
end
|
26
35
|
|
27
|
-
def rb_hash(number: 1, type: random_type)
|
36
|
+
def rb_hash(legacy_number = NOT_GIVEN, legacy_type = NOT_GIVEN, number: 1, type: random_type)
|
37
|
+
warn_for_deprecated_arguments do |keywords|
|
38
|
+
keywords << :number if legacy_number != NOT_GIVEN
|
39
|
+
keywords << :type if legacy_type != NOT_GIVEN
|
40
|
+
end
|
41
|
+
|
28
42
|
{}.tap do |hsh|
|
29
43
|
Lorem.words(number: number * 2).uniq.first(number).each do |s|
|
30
44
|
hsh.merge!(s.to_sym => type)
|
@@ -32,11 +46,19 @@ module Faker
|
|
32
46
|
end
|
33
47
|
end
|
34
48
|
|
35
|
-
def complex_rb_hash(number: 1)
|
49
|
+
def complex_rb_hash(legacy_number = NOT_GIVEN, number: 1)
|
50
|
+
warn_for_deprecated_arguments do |keywords|
|
51
|
+
keywords << :number if legacy_number != NOT_GIVEN
|
52
|
+
end
|
53
|
+
|
36
54
|
rb_hash(number: number, type: random_complex_type)
|
37
55
|
end
|
38
56
|
|
39
|
-
def rb_array(len: 1)
|
57
|
+
def rb_array(legacy_len = NOT_GIVEN, len: 1)
|
58
|
+
warn_for_deprecated_arguments do |keywords|
|
59
|
+
keywords << :len if legacy_len != NOT_GIVEN
|
60
|
+
end
|
61
|
+
|
40
62
|
[].tap do |ar|
|
41
63
|
len.times do
|
42
64
|
ar.push random_type
|
@@ -9,7 +9,7 @@ module Faker
|
|
9
9
|
VIN_LETTERS = 'ABCDEFGHJKLMNPRSTUVWXYZ'
|
10
10
|
VIN_MAP = '0123456789X'
|
11
11
|
VIN_WEIGHTS = '8765432X098765432'
|
12
|
-
VIN_REGEX = /^[A-Z0-9]{3}[A-Z0-9]{5}[A-Z0-9]{1}[A-Z0-9]{1}[A-Z0-0]{1}[A-Z0-9]{1}\d{5}
|
12
|
+
VIN_REGEX = /^[A-Z0-9]{3}[A-Z0-9]{5}[A-Z0-9]{1}[A-Z0-9]{1}[A-Z0-0]{1}[A-Z0-9]{1}\d{5}$/.freeze
|
13
13
|
SG_CHECKSUM_WEIGHTS = [3, 14, 2, 12, 2, 11, 1].freeze
|
14
14
|
SG_CHECKSUM_CHARS = 'AYUSPLJGDBZXTRMKHEC'
|
15
15
|
|
@@ -26,7 +26,11 @@ module Faker
|
|
26
26
|
fetch('vehicle.makes')
|
27
27
|
end
|
28
28
|
|
29
|
-
def model(make_of_model: '')
|
29
|
+
def model(legacy_make_of_model = NOT_GIVEN, make_of_model: '')
|
30
|
+
warn_for_deprecated_arguments do |keywords|
|
31
|
+
keywords << :make_of_model if legacy_make_of_model != NOT_GIVEN
|
32
|
+
end
|
33
|
+
|
30
34
|
return fetch("vehicle.models_by_make.#{make}") if make_of_model.empty?
|
31
35
|
|
32
36
|
fetch("vehicle.models_by_make.#{make_of_model}")
|
@@ -85,13 +89,22 @@ module Faker
|
|
85
89
|
Faker::Time.backward(days: rand_in_range(365, 5475), period: :all, format: '%Y').to_i
|
86
90
|
end
|
87
91
|
|
88
|
-
def mileage(min: MILEAGE_MIN, max: MILEAGE_MAX)
|
92
|
+
def mileage(legacy_min = NOT_GIVEN, legacy_max = NOT_GIVEN, min: MILEAGE_MIN, max: MILEAGE_MAX)
|
93
|
+
warn_for_deprecated_arguments do |keywords|
|
94
|
+
keywords << :min if legacy_min != NOT_GIVEN
|
95
|
+
keywords << :max if legacy_max != NOT_GIVEN
|
96
|
+
end
|
97
|
+
|
89
98
|
rand_in_range(min, max)
|
90
99
|
end
|
91
100
|
|
92
101
|
alias kilometrage mileage
|
93
102
|
|
94
|
-
def license_plate(state_abreviation: '')
|
103
|
+
def license_plate(legacy_state_abreviation = NOT_GIVEN, state_abreviation: '')
|
104
|
+
warn_for_deprecated_arguments do |keywords|
|
105
|
+
keywords << :state_abreviation if legacy_state_abreviation != NOT_GIVEN
|
106
|
+
end
|
107
|
+
|
95
108
|
return regexify(bothify(fetch('vehicle.license_plate'))) if state_abreviation.empty?
|
96
109
|
|
97
110
|
key = 'vehicle.license_plate_by_state.' + state_abreviation
|
@@ -15,11 +15,20 @@ module Faker
|
|
15
15
|
fetch('world_cup.stadiums')
|
16
16
|
end
|
17
17
|
|
18
|
-
def group(group: 'group_A')
|
18
|
+
def group(legacy_group = NOT_GIVEN, group: 'group_A')
|
19
|
+
warn_for_deprecated_arguments do |keywords|
|
20
|
+
keywords << :group if legacy_group != NOT_GIVEN
|
21
|
+
end
|
22
|
+
|
19
23
|
fetch("world_cup.groups.#{group}")
|
20
24
|
end
|
21
25
|
|
22
|
-
def roster(country: 'Egypt', type: 'coach')
|
26
|
+
def roster(legacy_country = NOT_GIVEN, legacy_type = NOT_GIVEN, country: 'Egypt', type: 'coach')
|
27
|
+
warn_for_deprecated_arguments do |keywords|
|
28
|
+
keywords << :country if legacy_country != NOT_GIVEN
|
29
|
+
keywords << :type if legacy_type != NOT_GIVEN
|
30
|
+
end
|
31
|
+
|
23
32
|
fetch("world_cup.rosters.#{country}.#{type}")
|
24
33
|
end
|
25
34
|
end
|
data/lib/faker/games/dota.rb
CHANGED
@@ -4,23 +4,74 @@ module Faker
|
|
4
4
|
class Games
|
5
5
|
class Dota < Base
|
6
6
|
class << self
|
7
|
+
##
|
8
|
+
# Produces the name of a hero from Dota.
|
9
|
+
#
|
10
|
+
# @return [String]
|
11
|
+
#
|
12
|
+
# @example
|
13
|
+
# Faker::Games::Dota.hero #=> "Abaddon"
|
14
|
+
#
|
15
|
+
# @faker.version 1.9.0
|
7
16
|
def hero
|
8
17
|
fetch('games.dota.hero')
|
9
18
|
end
|
10
19
|
|
20
|
+
##
|
21
|
+
# Produces the name of an item from Dota.
|
22
|
+
#
|
23
|
+
# @return [String]
|
24
|
+
#
|
25
|
+
# @example
|
26
|
+
# Faker::Games::Dota.item #=> "Armlet of Mordiggian"
|
27
|
+
#
|
28
|
+
# @faker.version 1.9.0
|
11
29
|
def item
|
12
30
|
fetch('games.dota.item')
|
13
31
|
end
|
14
32
|
|
33
|
+
##
|
34
|
+
# Produces the name of a professional Dota team.
|
35
|
+
#
|
36
|
+
# @return [String]
|
37
|
+
#
|
38
|
+
# @example
|
39
|
+
# Faker::Games::Dota.team #=> "Evil Geniuses"
|
40
|
+
#
|
41
|
+
# @faker.version 1.9.0
|
15
42
|
def team
|
16
43
|
fetch('games.dota.team')
|
17
44
|
end
|
18
45
|
|
46
|
+
##
|
47
|
+
# Produces the name of a professional Dota player.
|
48
|
+
#
|
49
|
+
# @return [String]
|
50
|
+
#
|
51
|
+
# @example
|
52
|
+
# Faker::Games::Dota.player #=> "Dendi"
|
53
|
+
#
|
54
|
+
# @faker.version 1.9.0
|
19
55
|
def player
|
20
56
|
fetch('games.dota.player')
|
21
57
|
end
|
22
58
|
|
23
|
-
|
59
|
+
##
|
60
|
+
# Produces the name of a hero from Dota.
|
61
|
+
#
|
62
|
+
# @param hero [String] The name of a Dota hero.
|
63
|
+
# @return [String]
|
64
|
+
#
|
65
|
+
# @example
|
66
|
+
# Faker::Games::Dota.quote #=> "You have called death upon yourself."
|
67
|
+
# Faker::Games::Dota.quote(hero: 'alchemist') #=> "Better living through alchemy!"
|
68
|
+
#
|
69
|
+
# @faker.version 1.9.0
|
70
|
+
def quote(legacy_hero = NOT_GIVEN, hero: 'abaddon')
|
71
|
+
warn_for_deprecated_arguments do |keywords|
|
72
|
+
keywords << :hero if legacy_hero != NOT_GIVEN
|
73
|
+
end
|
74
|
+
|
24
75
|
fetch("games.dota.#{hero}.quote")
|
25
76
|
end
|
26
77
|
end
|
@@ -4,34 +4,106 @@ module Faker
|
|
4
4
|
class Games
|
5
5
|
class ElderScrolls < Base
|
6
6
|
class << self
|
7
|
+
##
|
8
|
+
# Produces the name of a race from the Elder Scrolls universe.
|
9
|
+
#
|
10
|
+
# @return [String]
|
11
|
+
#
|
12
|
+
# @example
|
13
|
+
# Faker::Games::ElderScrolls.race #=> "Argonian"
|
14
|
+
#
|
15
|
+
# @faker.version 1.9.2
|
7
16
|
def race
|
8
17
|
fetch('games.elder_scrolls.race')
|
9
18
|
end
|
10
19
|
|
20
|
+
##
|
21
|
+
# Produces the name of a city from the Elder Scrolls universe.
|
22
|
+
#
|
23
|
+
# @return [String]
|
24
|
+
#
|
25
|
+
# @example
|
26
|
+
# Faker::Games::ElderScrolls.city #=> "Whiterun"
|
27
|
+
#
|
28
|
+
# @faker.version 1.9.2
|
11
29
|
def city
|
12
30
|
fetch('games.elder_scrolls.city')
|
13
31
|
end
|
14
32
|
|
33
|
+
##
|
34
|
+
# Produces the name of a creature from the Elder Scrolls universe.
|
35
|
+
#
|
36
|
+
# @return [String]
|
37
|
+
#
|
38
|
+
# @example
|
39
|
+
# Faker::Games::ElderScrolls.creature #=> "Frost Troll"
|
40
|
+
#
|
41
|
+
# @faker.version 1.9.2
|
15
42
|
def creature
|
16
43
|
fetch('games.elder_scrolls.creature')
|
17
44
|
end
|
18
45
|
|
46
|
+
##
|
47
|
+
# Produces the name of a region from the Elder Scrolls universe.
|
48
|
+
#
|
49
|
+
# @return [String]
|
50
|
+
#
|
51
|
+
# @example
|
52
|
+
# Faker::Games::ElderScrolls.region #=> "Cyrodiil"
|
53
|
+
#
|
54
|
+
# @faker.version 1.9.2
|
19
55
|
def region
|
20
56
|
fetch('games.elder_scrolls.region')
|
21
57
|
end
|
22
58
|
|
59
|
+
##
|
60
|
+
# Produces the name of a dragon from the Elder Scrolls universe.
|
61
|
+
#
|
62
|
+
# @return [String]
|
63
|
+
#
|
64
|
+
# @example
|
65
|
+
# Faker::Games::ElderScrolls.dragon #=> "Blood Dragon"
|
66
|
+
#
|
67
|
+
# @faker.version 1.9.2
|
23
68
|
def dragon
|
24
69
|
fetch('games.elder_scrolls.dragon')
|
25
70
|
end
|
26
71
|
|
72
|
+
##
|
73
|
+
# Produces a randomly generated name from the Elder Scrolls universe.
|
74
|
+
#
|
75
|
+
# @return [String]
|
76
|
+
#
|
77
|
+
# @example
|
78
|
+
# Faker::Games::ElderScrolls.name #=> "Balgruuf The Old"
|
79
|
+
#
|
80
|
+
# @faker.version 1.9.2
|
27
81
|
def name
|
28
82
|
"#{fetch('games.elder_scrolls.first_name')} #{fetch('games.elder_scrolls.last_name')}"
|
29
83
|
end
|
30
84
|
|
85
|
+
##
|
86
|
+
# Produces a first name from the Elder Scrolls universe.
|
87
|
+
#
|
88
|
+
# @return [String]
|
89
|
+
#
|
90
|
+
# @example
|
91
|
+
# Faker::Games::ElderScrolls.first_name #=> "Balgruuf"
|
92
|
+
#
|
93
|
+
# @faker.version 1.9.2
|
31
94
|
def first_name
|
32
95
|
fetch('games.elder_scrolls.first_name')
|
33
96
|
end
|
34
97
|
|
98
|
+
##
|
99
|
+
# Produces a last name from the Elder Scrolls universe.
|
100
|
+
#
|
101
|
+
# @return [String]
|
102
|
+
#
|
103
|
+
# @example
|
104
|
+
# Faker::Games::ElderScrolls.last_name #=> "The Old"
|
105
|
+
#
|
106
|
+
# @faker.version 1.9.2
|
35
107
|
def last_name
|
36
108
|
fetch('games.elder_scrolls.last_name')
|
37
109
|
end
|
data/lib/faker/games/fallout.rb
CHANGED
@@ -4,18 +4,55 @@ module Faker
|
|
4
4
|
class Games
|
5
5
|
class Fallout < Base
|
6
6
|
class << self
|
7
|
+
##
|
8
|
+
# Produces the name of a character from the Fallout games.
|
9
|
+
#
|
10
|
+
# @return [String]
|
11
|
+
#
|
12
|
+
# @example
|
13
|
+
# Faker::Games::Fallout.character #=> "Liberty Prime"
|
14
|
+
#
|
15
|
+
# @faker.version 1.9.2
|
7
16
|
def character
|
8
17
|
fetch('games.fallout.characters')
|
9
18
|
end
|
10
19
|
|
20
|
+
##
|
21
|
+
# Produces the name of a faction from the Fallout games.
|
22
|
+
#
|
23
|
+
# @return [String]
|
24
|
+
#
|
25
|
+
# @example
|
26
|
+
# Faker::Games::Fallout.faction #=> "Brotherhood of Steel"
|
27
|
+
#
|
28
|
+
# @faker.version 1.9.2
|
11
29
|
def faction
|
12
30
|
fetch('games.fallout.factions')
|
13
31
|
end
|
14
32
|
|
33
|
+
##
|
34
|
+
# Produces the name of a location from the Fallout games.
|
35
|
+
#
|
36
|
+
# @return [String]
|
37
|
+
#
|
38
|
+
# @example
|
39
|
+
# Faker::Games::Fallout.location #=> "New Vegas"
|
40
|
+
#
|
41
|
+
# @faker.version 1.9.2
|
15
42
|
def location
|
16
43
|
fetch('games.fallout.locations')
|
17
44
|
end
|
18
45
|
|
46
|
+
##
|
47
|
+
# Produces a quote from the Fallout games.
|
48
|
+
#
|
49
|
+
# @return [String]
|
50
|
+
#
|
51
|
+
# @example
|
52
|
+
# Faker::Games::Fallout.quote
|
53
|
+
# #=> "Democracy is non-negotiable"
|
54
|
+
#
|
55
|
+
# @faker.version 1.9.2
|
19
56
|
def quote
|
20
57
|
fetch('games.fallout.quotes')
|
21
58
|
end
|