faker 1.9.6 → 2.7.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 +386 -6
- data/README.md +12 -5
- 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 +221 -18
- data/lib/faker/creature/animal.rb +10 -1
- data/lib/faker/creature/cat.rb +28 -1
- data/lib/faker/creature/dog.rb +73 -1
- data/lib/faker/creature/horse.rb +19 -1
- data/lib/faker/default/address.rb +25 -5
- data/lib/faker/default/alphanumeric.rb +58 -9
- data/lib/faker/default/app.rb +55 -1
- data/lib/faker/default/appliance.rb +18 -0
- data/lib/faker/default/artist.rb +9 -0
- data/lib/faker/default/avatar.rb +43 -1
- data/lib/faker/default/bank.rb +10 -2
- data/lib/faker/default/boolean.rb +16 -1
- data/lib/faker/default/cannabis.rb +4 -0
- data/lib/faker/default/chile_rut.rb +13 -3
- data/lib/faker/default/chuck_norris.rb +1 -1
- data/lib/faker/default/code.rb +18 -5
- data/lib/faker/default/commerce.rb +18 -4
- data/lib/faker/default/company.rb +11 -3
- data/lib/faker/default/crypto_coin.rb +21 -4
- data/lib/faker/default/date.rb +122 -9
- data/lib/faker/default/demographic.rb +5 -1
- data/lib/faker/default/dessert.rb +27 -0
- data/lib/faker/default/device.rb +56 -2
- data/lib/faker/default/driving_licence.rb +13 -7
- data/lib/faker/default/educator.rb +0 -3
- data/lib/faker/default/electrical_components.rb +27 -0
- data/lib/faker/default/file.rb +20 -3
- data/lib/faker/default/fillmurray.rb +10 -2
- 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 +55 -16
- data/lib/faker/default/house.rb +18 -0
- data/lib/faker/default/id_number.rb +85 -11
- data/lib/faker/default/industry_segments.rb +36 -0
- data/lib/faker/default/internet.rb +107 -22
- data/lib/faker/default/invoice.rb +16 -3
- data/lib/faker/default/json.rb +19 -2
- data/lib/faker/default/lorem.rb +91 -20
- data/lib/faker/default/lorem_flickr.rb +38 -5
- data/lib/faker/default/lorem_pixel.rb +10 -1
- data/lib/faker/default/markdown.rb +12 -7
- 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 +6 -4
- data/lib/faker/default/nation.rb +48 -5
- data/lib/faker/default/nato_phonetic_alphabet.rb +9 -0
- data/lib/faker/default/nhs.rb +11 -7
- data/lib/faker/default/number.rb +202 -30
- data/lib/faker/default/omniauth.rb +98 -15
- 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/restaurant.rb +54 -2
- data/lib/faker/default/science.rb +27 -0
- data/lib/faker/default/source.rb +59 -3
- data/lib/faker/default/south_africa.rb +1 -1
- data/lib/faker/default/space.rb +2 -2
- 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 +133 -8
- data/lib/faker/default/twitter.rb +62 -48
- data/lib/faker/default/types.rb +29 -7
- data/lib/faker/default/vehicle.rb +19 -6
- data/lib/faker/default/world_cup.rb +61 -2
- data/lib/faker/games/dota.rb +53 -2
- data/lib/faker/games/elder_scrolls.rb +73 -1
- data/lib/faker/games/fallout.rb +38 -1
- data/lib/faker/games/game.rb +27 -0
- data/lib/faker/games/half_life.rb +28 -1
- data/lib/faker/games/heroes.rb +28 -1
- data/lib/faker/games/heroes_of_the_storm.rb +37 -1
- data/lib/faker/games/league_of_legends.rb +55 -1
- data/lib/faker/games/myst.rb +46 -1
- data/lib/faker/games/overwatch.rb +28 -1
- data/lib/faker/games/pokemon.rb +28 -1
- data/lib/faker/games/sonic_the_hedgehog.rb +28 -1
- data/lib/faker/games/super_smash_bros.rb +19 -1
- data/lib/faker/games/witcher.rb +55 -1
- data/lib/faker/games/world_of_warcraft.rb +19 -1
- data/lib/faker/games/zelda.rb +38 -2
- data/lib/faker/japanese_media/dragon_ball.rb +10 -1
- data/lib/faker/japanese_media/one_piece.rb +55 -1
- data/lib/faker/japanese_media/sword_art_online.rb +37 -1
- data/lib/faker/movies/back_to_the_future.rb +29 -1
- data/lib/faker/movies/ghostbusters.rb +29 -1
- data/lib/faker/movies/harry_potter.rb +55 -1
- data/lib/faker/movies/hitchhikers_guide_to_the_galaxy.rb +70 -1
- data/lib/faker/movies/hobbit.rb +38 -1
- data/lib/faker/movies/lebowski.rb +28 -1
- data/lib/faker/movies/lord_of_the_rings.rb +29 -1
- data/lib/faker/movies/movie.rb +9 -0
- data/lib/faker/movies/princess_bride.rb +20 -1
- data/lib/faker/movies/star_wars.rb +101 -5
- data/lib/faker/movies/v_for_vendetta.rb +30 -1
- 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/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 +10 -1
- data/lib/faker/tv_shows/bojack_horseman.rb +29 -1
- data/lib/faker/tv_shows/breaking_bad.rb +19 -1
- data/lib/faker/tv_shows/buffy.rb +46 -1
- data/lib/faker/tv_shows/community.rb +20 -1
- data/lib/faker/tv_shows/dr_who.rb +79 -3
- data/lib/faker/tv_shows/dumb_and_dumber.rb +29 -1
- data/lib/faker/tv_shows/family_guy.rb +29 -1
- data/lib/faker/tv_shows/friends.rb +28 -1
- data/lib/faker/tv_shows/game_of_thrones.rb +47 -1
- data/lib/faker/tv_shows/hey_arnold.rb +28 -1
- data/lib/faker/tv_shows/how_i_met_your_mother.rb +38 -1
- data/lib/faker/tv_shows/michael_scott.rb +14 -1
- data/lib/faker/tv_shows/new_girl.rb +20 -1
- data/lib/faker/tv_shows/parks_and_rec.rb +19 -1
- data/lib/faker/tv_shows/rick_and_morty.rb +29 -1
- data/lib/faker/tv_shows/ru_paul.rb +19 -1
- data/lib/faker/tv_shows/seinfeld.rb +29 -1
- data/lib/faker/tv_shows/silicon_valley.rb +76 -1
- data/lib/faker/tv_shows/simpsons.rb +29 -1
- data/lib/faker/tv_shows/south_park.rb +20 -1
- data/lib/faker/tv_shows/star_trek.rb +37 -1
- data/lib/faker/tv_shows/stargate.rb +29 -1
- data/lib/faker/tv_shows/stranger_things.rb +20 -1
- data/lib/faker/tv_shows/the_expanse.rb +37 -1
- data/lib/faker/tv_shows/the_fresh_prince_of_bel_air.rb +29 -1
- data/lib/faker/tv_shows/the_it_crowd.rb +38 -1
- data/lib/faker/tv_shows/the_thick_of_it.rb +29 -1
- data/lib/faker/tv_shows/twin_peaks.rb +29 -1
- data/lib/faker/tv_shows/venture_bros.rb +39 -1
- data/lib/faker/version.rb +1 -1
- data/lib/locales/en-CA.yml +2 -1
- data/lib/locales/en-IND.yml +1 -1
- data/lib/locales/en-TH.yml +360 -0
- data/lib/locales/en.yml +4 -1
- data/lib/locales/en/address.yml +1 -4
- data/lib/locales/en/animal.yml +2 -2
- data/lib/locales/en/cannabis.yml +1 -0
- data/lib/locales/en/color.yml +1 -1
- data/lib/locales/en/dr_who.yml +1 -1
- data/lib/locales/en/science.yml +1 -1
- data/lib/locales/en/space.yml +1 -1
- data/lib/locales/en/super_smash_bros.yml +5 -0
- data/lib/locales/fr-CA.yml +1 -1
- data/lib/locales/ja.yml +12 -9
- data/lib/locales/th.yml +380 -0
- data/lib/locales/vi.yml +1 -1
- metadata +44 -27
- data/lib/faker/default/creature.rb +0 -6
- data/lib/faker/default/games.rb +0 -6
- data/lib/faker/default/japanese_media.rb +0 -6
- data/lib/faker/default/movies.rb +0 -6
- data/lib/faker/default/tv_shows.rb +0 -6
- data/lib/faker/deprecate/unreleased/football.rb +0 -35
- data/lib/faker/deprecate/unreleased/movies/grateful_dead.rb +0 -22
@@ -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(
|
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}")
|
@@ -35,7 +39,7 @@ module Faker
|
|
35
39
|
def make_and_model
|
36
40
|
m = make
|
37
41
|
|
38
|
-
"#{m} #{model(m)}"
|
42
|
+
"#{m} #{model(make_of_model: m)}"
|
39
43
|
end
|
40
44
|
|
41
45
|
def style
|
@@ -82,16 +86,25 @@ module Faker
|
|
82
86
|
alias door_count doors
|
83
87
|
|
84
88
|
def year
|
85
|
-
Faker::Time.backward(rand_in_range(365, 5475), :all, '%Y').to_i
|
89
|
+
Faker::Time.backward(days: rand_in_range(365, 5475), period: :all, format: '%Y').to_i
|
86
90
|
end
|
87
91
|
|
88
|
-
def mileage(
|
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(
|
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
|
@@ -3,23 +3,82 @@
|
|
3
3
|
module Faker
|
4
4
|
class WorldCup < Base
|
5
5
|
class << self
|
6
|
+
##
|
7
|
+
# Produces a national team name.
|
8
|
+
#
|
9
|
+
# @return [String]
|
10
|
+
#
|
11
|
+
# @example
|
12
|
+
# Faker::WorldCup.team #=> "Iran"
|
13
|
+
#
|
14
|
+
# @faker.version 1.9.0
|
6
15
|
def team
|
7
16
|
fetch('world_cup.teams')
|
8
17
|
end
|
9
18
|
|
19
|
+
##
|
20
|
+
# Produces a city name hosting the World Cup match.
|
21
|
+
#
|
22
|
+
# @return [String]
|
23
|
+
#
|
24
|
+
# @example
|
25
|
+
# Faker::WorldCup.city #=> "Moscow"
|
26
|
+
#
|
27
|
+
# @faker.version next
|
10
28
|
def city
|
11
29
|
fetch('world_cup.cities')
|
12
30
|
end
|
13
31
|
|
32
|
+
##
|
33
|
+
# Produces the name of a stadium that has hosted a World Cup match.
|
34
|
+
#
|
35
|
+
# @return [String]
|
36
|
+
#
|
37
|
+
# @example
|
38
|
+
# Faker::WorldCup.stadium #=> "Rostov Arena"
|
39
|
+
#
|
40
|
+
# @faker.version next
|
14
41
|
def stadium
|
15
42
|
fetch('world_cup.stadiums')
|
16
43
|
end
|
17
44
|
|
18
|
-
|
45
|
+
##
|
46
|
+
# Produces a random national team name from a group. See below examples
|
47
|
+
#
|
48
|
+
# @return [String]
|
49
|
+
#
|
50
|
+
# @example
|
51
|
+
# Faker::WorldCup.group(group: 'group_B') #=> "Spain"
|
52
|
+
# @example
|
53
|
+
# Faker::WorldCup.group #=> "Russia"
|
54
|
+
#
|
55
|
+
# @faker.version next
|
56
|
+
def group(legacy_group = NOT_GIVEN, group: 'group_A')
|
57
|
+
warn_for_deprecated_arguments do |keywords|
|
58
|
+
keywords << :group if legacy_group != NOT_GIVEN
|
59
|
+
end
|
60
|
+
|
19
61
|
fetch("world_cup.groups.#{group}")
|
20
62
|
end
|
21
63
|
|
22
|
-
|
64
|
+
##
|
65
|
+
# Produces a random name from national team roster. See below examples.
|
66
|
+
#
|
67
|
+
# @return [String]
|
68
|
+
#
|
69
|
+
# @example
|
70
|
+
# Faker::WorldCup.roster #=> "Hector Cuper"
|
71
|
+
#
|
72
|
+
# @example
|
73
|
+
# Faker::WorldCup.roster(country: 'Spain', type: 'forwards') #=> "Diego Costa"
|
74
|
+
#
|
75
|
+
# @faker.version next
|
76
|
+
def roster(legacy_country = NOT_GIVEN, legacy_type = NOT_GIVEN, country: 'Egypt', type: 'coach')
|
77
|
+
warn_for_deprecated_arguments do |keywords|
|
78
|
+
keywords << :country if legacy_country != NOT_GIVEN
|
79
|
+
keywords << :type if legacy_type != NOT_GIVEN
|
80
|
+
end
|
81
|
+
|
23
82
|
fetch("world_cup.rosters.#{country}.#{type}")
|
24
83
|
end
|
25
84
|
end
|
data/lib/faker/games/dota.rb
CHANGED
@@ -1,26 +1,77 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
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
|
@@ -1,37 +1,109 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
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
@@ -1,21 +1,58 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
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
|
data/lib/faker/games/game.rb
CHANGED
@@ -5,14 +5,41 @@ module Faker
|
|
5
5
|
flexible :game
|
6
6
|
|
7
7
|
class << self
|
8
|
+
##
|
9
|
+
# Produces the name of a video game.
|
10
|
+
#
|
11
|
+
# @return [String]
|
12
|
+
#
|
13
|
+
# @example
|
14
|
+
# Faker::Game.title #=> "Half-Life 2"
|
15
|
+
#
|
16
|
+
# @faker.version 1.9.4
|
8
17
|
def title
|
9
18
|
fetch('game.title')
|
10
19
|
end
|
11
20
|
|
21
|
+
##
|
22
|
+
# Produces the name of a video game genre.
|
23
|
+
#
|
24
|
+
# @return [String]
|
25
|
+
#
|
26
|
+
# @example
|
27
|
+
# Faker::Game.genre #=> "Real-time strategy"
|
28
|
+
#
|
29
|
+
# @faker.version 1.9.4
|
12
30
|
def genre
|
13
31
|
fetch('game.genre')
|
14
32
|
end
|
15
33
|
|
34
|
+
##
|
35
|
+
# Produces the name of a video game console or platform.
|
36
|
+
#
|
37
|
+
# @return [String]
|
38
|
+
#
|
39
|
+
# @example
|
40
|
+
# Faker::Game.platform #=> "Nintendo Switch"
|
41
|
+
#
|
42
|
+
# @faker.version 1.9.4
|
16
43
|
def platform
|
17
44
|
fetch('game.platform')
|
18
45
|
end
|
@@ -1,17 +1,44 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Faker
|
4
|
-
|
4
|
+
class Games
|
5
5
|
class HalfLife < Base
|
6
6
|
class << self
|
7
|
+
##
|
8
|
+
# Produces the name of a character from the Half-Life games.
|
9
|
+
#
|
10
|
+
# @return [String]
|
11
|
+
#
|
12
|
+
# @example
|
13
|
+
# Faker::Games::HalfLife.character #=> "Gordon Freeman"
|
14
|
+
#
|
15
|
+
# @faker.version 1.9.2
|
7
16
|
def character
|
8
17
|
fetch('games.half_life.character')
|
9
18
|
end
|
10
19
|
|
20
|
+
##
|
21
|
+
# Produces the name of an enemy from the Half-Life games.
|
22
|
+
#
|
23
|
+
# @return [String]
|
24
|
+
#
|
25
|
+
# @example
|
26
|
+
# Faker::Games::HalfLife.enemy #=> "Headcrab"
|
27
|
+
#
|
28
|
+
# @faker.version 1.9.2
|
11
29
|
def enemy
|
12
30
|
fetch('games.half_life.enemy')
|
13
31
|
end
|
14
32
|
|
33
|
+
##
|
34
|
+
# Produces the name of a location from the Half-Life games.
|
35
|
+
#
|
36
|
+
# @return [String]
|
37
|
+
#
|
38
|
+
# @example
|
39
|
+
# Faker::Games::HalfLife.location #=> "Black Mesa Research Facility"
|
40
|
+
#
|
41
|
+
# @faker.version 1.9.2
|
15
42
|
def location
|
16
43
|
fetch('games.half_life.location')
|
17
44
|
end
|