faker 2.3.0 → 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 +27 -2
- data/README.md +2 -1
- data/lib/faker/blockchain/aeternity.rb +70 -0
- data/lib/faker/default/appliance.rb +18 -0
- data/lib/faker/default/dessert.rb +27 -0
- data/lib/faker/default/device.rb +54 -0
- data/lib/faker/default/electrical_components.rb +27 -0
- data/lib/faker/default/greek_philosophers.rb +18 -0
- data/lib/faker/default/industry_segments.rb +36 -0
- data/lib/faker/default/marketing.rb +9 -0
- data/lib/faker/default/military.rb +45 -0
- data/lib/faker/default/nato_phonetic_alphabet.rb +9 -0
- data/lib/faker/default/science.rb +27 -0
- data/lib/faker/default/subscription.rb +45 -0
- data/lib/faker/default/superhero.rb +45 -0
- data/lib/faker/games/dota.rb +47 -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/pokemon.rb +27 -0
- data/lib/faker/games/sonic_the_hedgehog.rb +27 -0
- data/lib/faker/games/witcher.rb +54 -0
- data/lib/faker/games/world_of_warcraft.rb +18 -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/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/version.rb +1 -1
- data/lib/locales/en/science.yml +1 -1
- data/lib/locales/ja.yml +7 -8
- metadata +6 -5
@@ -3,6 +3,15 @@
|
|
3
3
|
module Faker
|
4
4
|
class NatoPhoneticAlphabet < Base
|
5
5
|
class << self
|
6
|
+
##
|
7
|
+
# Produces a code word from the NATO phonetic alphabet.
|
8
|
+
#
|
9
|
+
# @return [String]
|
10
|
+
#
|
11
|
+
# @example
|
12
|
+
# Faker::NatoPhoneticAlphabet.code_word #=> "Hotel"
|
13
|
+
#
|
14
|
+
# @faker.version 1.9.0
|
6
15
|
def code_word
|
7
16
|
fetch('nato_phonetic_alphabet.code_word')
|
8
17
|
end
|
@@ -3,14 +3,41 @@
|
|
3
3
|
module Faker
|
4
4
|
class Science < Base
|
5
5
|
class << self
|
6
|
+
##
|
7
|
+
# Produces the name of a element.
|
8
|
+
#
|
9
|
+
# @return [String]
|
10
|
+
#
|
11
|
+
# @example
|
12
|
+
# Faker::Science.element #=> "Carbon"
|
13
|
+
#
|
14
|
+
# @faker.version 1.8.5
|
6
15
|
def element
|
7
16
|
fetch('science.element')
|
8
17
|
end
|
9
18
|
|
19
|
+
##
|
20
|
+
# Produces the symbol of an element.
|
21
|
+
#
|
22
|
+
# @return [String]
|
23
|
+
#
|
24
|
+
# @example
|
25
|
+
# Faker::Science.element_symbol #=> "Pb"
|
26
|
+
#
|
27
|
+
# @faker.version 1.9.0
|
10
28
|
def element_symbol
|
11
29
|
fetch('science.element_symbol')
|
12
30
|
end
|
13
31
|
|
32
|
+
##
|
33
|
+
# Produces the name of a scientist.
|
34
|
+
#
|
35
|
+
# @return [String]
|
36
|
+
#
|
37
|
+
# @example
|
38
|
+
# Faker::Science.scientist #=> "Isaac Newton"
|
39
|
+
#
|
40
|
+
# @faker.version 1.8.5
|
14
41
|
def scientist
|
15
42
|
fetch('science.scientist')
|
16
43
|
end
|
@@ -2,22 +2,67 @@
|
|
2
2
|
|
3
3
|
module Faker
|
4
4
|
class Subscription < Base
|
5
|
+
##
|
6
|
+
# Produces the name of a subscription plan.
|
7
|
+
#
|
8
|
+
# @return [String]
|
9
|
+
#
|
10
|
+
# @example
|
11
|
+
# Faker::Subscription.plan #=> "Platinum"
|
12
|
+
#
|
13
|
+
# @faker.version 1.9.2
|
5
14
|
def self.plan
|
6
15
|
fetch('subscription.plans')
|
7
16
|
end
|
8
17
|
|
18
|
+
##
|
19
|
+
# Produces a subscription status.
|
20
|
+
#
|
21
|
+
# @return [String]
|
22
|
+
#
|
23
|
+
# @example
|
24
|
+
# Faker::Subscription.status #=> "Active"
|
25
|
+
#
|
26
|
+
# @faker.version 1.9.2
|
9
27
|
def self.status
|
10
28
|
fetch('subscription.statuses')
|
11
29
|
end
|
12
30
|
|
31
|
+
##
|
32
|
+
# Produces the name of a payment method.
|
33
|
+
#
|
34
|
+
# @return [String]
|
35
|
+
#
|
36
|
+
# @example
|
37
|
+
# Faker::Subscription.payment_method #=> "PayPal"
|
38
|
+
#
|
39
|
+
# @faker.version 1.9.2
|
13
40
|
def self.payment_method
|
14
41
|
fetch('subscription.payment_methods')
|
15
42
|
end
|
16
43
|
|
44
|
+
##
|
45
|
+
# Produces the name of a subscription term.
|
46
|
+
#
|
47
|
+
# @return [String]
|
48
|
+
#
|
49
|
+
# @example
|
50
|
+
# Faker::Subscription.subscription_term #=> "Annual"
|
51
|
+
#
|
52
|
+
# @faker.version 1.9.2
|
17
53
|
def self.subscription_term
|
18
54
|
fetch('subscription.subscription_terms')
|
19
55
|
end
|
20
56
|
|
57
|
+
##
|
58
|
+
# Produces the name of a payment term.
|
59
|
+
#
|
60
|
+
# @return [String]
|
61
|
+
#
|
62
|
+
# @example
|
63
|
+
# Faker::Subscription.payment_term #=> "Monthly"
|
64
|
+
#
|
65
|
+
# @faker.version 1.9.2
|
21
66
|
def self.payment_term
|
22
67
|
fetch('subscription.payment_terms')
|
23
68
|
end
|
@@ -3,22 +3,67 @@
|
|
3
3
|
module Faker
|
4
4
|
class Superhero < Base
|
5
5
|
class << self
|
6
|
+
##
|
7
|
+
# Produces a superpower.
|
8
|
+
#
|
9
|
+
# @return [String]
|
10
|
+
#
|
11
|
+
# @example
|
12
|
+
# Faker::Superhero.power #=> "Photokinesis"
|
13
|
+
#
|
14
|
+
# @faker.version 1.6.2
|
6
15
|
def power
|
7
16
|
fetch('superhero.power')
|
8
17
|
end
|
9
18
|
|
19
|
+
##
|
20
|
+
# Produces a superhero name prefix.
|
21
|
+
#
|
22
|
+
# @return [String]
|
23
|
+
#
|
24
|
+
# @example
|
25
|
+
# Faker::Superhero.prefix #=> "the Fated"
|
26
|
+
#
|
27
|
+
# @faker.version 1.6.2
|
10
28
|
def prefix
|
11
29
|
fetch('superhero.prefix')
|
12
30
|
end
|
13
31
|
|
32
|
+
##
|
33
|
+
# Produces a superhero name suffix.
|
34
|
+
#
|
35
|
+
# @return [String]
|
36
|
+
#
|
37
|
+
# @example
|
38
|
+
# Faker::Superhero.suffix #=> "Captain"
|
39
|
+
#
|
40
|
+
# @faker.version 1.6.2
|
14
41
|
def suffix
|
15
42
|
fetch('superhero.suffix')
|
16
43
|
end
|
17
44
|
|
45
|
+
##
|
46
|
+
# Produces a superhero descriptor.
|
47
|
+
#
|
48
|
+
# @return [String]
|
49
|
+
#
|
50
|
+
# @example
|
51
|
+
# Faker::Superhero.descriptor #=> "Bizarro"
|
52
|
+
#
|
53
|
+
# @faker.version 1.6.2
|
18
54
|
def descriptor
|
19
55
|
fetch('superhero.descriptor')
|
20
56
|
end
|
21
57
|
|
58
|
+
##
|
59
|
+
# Produces a random superhero name.
|
60
|
+
#
|
61
|
+
# @return [String]
|
62
|
+
#
|
63
|
+
# @example
|
64
|
+
# Faker::Superhero.name #=> "Magnificent Shatterstar"
|
65
|
+
#
|
66
|
+
# @faker.version 1.6.2
|
22
67
|
def name
|
23
68
|
parse('superhero.name')
|
24
69
|
end
|
data/lib/faker/games/dota.rb
CHANGED
@@ -4,22 +4,69 @@ 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
|
|
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
|
23
70
|
def quote(legacy_hero = NOT_GIVEN, hero: 'abaddon')
|
24
71
|
warn_for_deprecated_arguments do |keywords|
|
25
72
|
keywords << :hero if legacy_hero != NOT_GIVEN
|
data/lib/faker/games/heroes.rb
CHANGED
@@ -4,14 +4,41 @@ module Faker
|
|
4
4
|
class Games
|
5
5
|
class Heroes < Base
|
6
6
|
class << self
|
7
|
+
##
|
8
|
+
# Produces the name of a hero from Heroes 3.
|
9
|
+
#
|
10
|
+
# @return [String]
|
11
|
+
#
|
12
|
+
# @example
|
13
|
+
# Faker::Games::Heroes.name #=> "Christian"
|
14
|
+
#
|
15
|
+
# @faker.version 1.9.2
|
7
16
|
def name
|
8
17
|
fetch('heroes.names')
|
9
18
|
end
|
10
19
|
|
20
|
+
##
|
21
|
+
# Produces the name of a specialty from Heroes 3.
|
22
|
+
#
|
23
|
+
# @return [String]
|
24
|
+
#
|
25
|
+
# @example
|
26
|
+
# Faker::Games::Heroes.specialty #=> "Ballista"
|
27
|
+
#
|
28
|
+
# @faker.version 1.9.2
|
11
29
|
def specialty
|
12
30
|
fetch('heroes.specialties')
|
13
31
|
end
|
14
32
|
|
33
|
+
##
|
34
|
+
# Produces the name of a class from Heroes 3.
|
35
|
+
#
|
36
|
+
# @return [String]
|
37
|
+
#
|
38
|
+
# @example
|
39
|
+
# Faker::Games::Heroes.klass #=> "Knight"
|
40
|
+
#
|
41
|
+
# @faker.version 1.9.2
|
15
42
|
def klass
|
16
43
|
fetch('heroes.klasses')
|
17
44
|
end
|
@@ -4,18 +4,54 @@ module Faker
|
|
4
4
|
class Games
|
5
5
|
class HeroesOfTheStorm < Base
|
6
6
|
class << self
|
7
|
+
##
|
8
|
+
# Produces a battleground from Heroes of the Storm.
|
9
|
+
#
|
10
|
+
# @return [String]
|
11
|
+
#
|
12
|
+
# @example
|
13
|
+
# Faker::Games::HeroesOfTheStorm.battleground #=> "Towers of Doom"
|
14
|
+
#
|
15
|
+
# @faker.version 1.9.2
|
7
16
|
def battleground
|
8
17
|
fetch('heroes_of_the_storm.battlegrounds')
|
9
18
|
end
|
10
19
|
|
20
|
+
##
|
21
|
+
# Produces a class from Heroes of the Storm.
|
22
|
+
#
|
23
|
+
# @return [String]
|
24
|
+
#
|
25
|
+
# @example
|
26
|
+
# Faker::Games::HeroesOfTheStorm.class #=> "Support"
|
27
|
+
#
|
28
|
+
# @faker.version 1.9.2
|
11
29
|
def class
|
12
30
|
fetch('heroes_of_the_storm.classes')
|
13
31
|
end
|
14
32
|
|
33
|
+
##
|
34
|
+
# Produces a hero from Heroes of the Storm.
|
35
|
+
#
|
36
|
+
# @return [String]
|
37
|
+
#
|
38
|
+
# @example
|
39
|
+
# Faker::Games::HeroesOfTheStorm.hero #=> "Illidan"
|
40
|
+
#
|
41
|
+
# @faker.version 1.9.2
|
15
42
|
def hero
|
16
43
|
fetch('heroes_of_the_storm.heroes')
|
17
44
|
end
|
18
45
|
|
46
|
+
##
|
47
|
+
# Produces a quote from Heroes of the Storm.
|
48
|
+
#
|
49
|
+
# @return [String]
|
50
|
+
#
|
51
|
+
# @example
|
52
|
+
# Faker::Games::HeroesOfTheStorm.quote #=> "MEAT!!!"
|
53
|
+
#
|
54
|
+
# @faker.version 1.9.2
|
19
55
|
def quote
|
20
56
|
fetch('heroes_of_the_storm.quotes')
|
21
57
|
end
|
@@ -4,26 +4,80 @@ module Faker
|
|
4
4
|
class Games
|
5
5
|
class LeagueOfLegends < Base
|
6
6
|
class << self
|
7
|
+
##
|
8
|
+
# Produces the name of a champion from League of Legends.
|
9
|
+
#
|
10
|
+
# @return [String]
|
11
|
+
#
|
12
|
+
# @example
|
13
|
+
# Faker::Games::LeagueOfLegends.champion #=> "Jarvan IV"
|
14
|
+
#
|
15
|
+
# @faker.version 1.8.0
|
7
16
|
def champion
|
8
17
|
fetch('games.league_of_legends.champion')
|
9
18
|
end
|
10
19
|
|
20
|
+
##
|
21
|
+
# Produces a location from League of Legends.
|
22
|
+
#
|
23
|
+
# @return [String]
|
24
|
+
#
|
25
|
+
# @example
|
26
|
+
# Faker::Games::LeagueOfLegends.location #=> "Demacia"
|
27
|
+
#
|
28
|
+
# @faker.version 1.8.0
|
11
29
|
def location
|
12
30
|
fetch('games.league_of_legends.location')
|
13
31
|
end
|
14
32
|
|
33
|
+
##
|
34
|
+
# Produces a quote from League of Legends.
|
35
|
+
#
|
36
|
+
# @return [String]
|
37
|
+
#
|
38
|
+
# @example
|
39
|
+
# Faker::Games::LeagueOfLegends.quote #=> "Purge the unjust."
|
40
|
+
#
|
41
|
+
# @faker.version 1.8.0
|
15
42
|
def quote
|
16
43
|
fetch('games.league_of_legends.quote')
|
17
44
|
end
|
18
45
|
|
46
|
+
##
|
47
|
+
# Produces a summoner spell from League of Legends.
|
48
|
+
#
|
49
|
+
# @return [String]
|
50
|
+
#
|
51
|
+
# @example
|
52
|
+
# Faker::Games::LeagueOfLegends.summoner_spell #=> "Flash"
|
53
|
+
#
|
54
|
+
# @faker.version 1.8.0
|
19
55
|
def summoner_spell
|
20
56
|
fetch('games.league_of_legends.summoner_spell')
|
21
57
|
end
|
22
58
|
|
59
|
+
##
|
60
|
+
# Produces a mastery from League of Legends.
|
61
|
+
#
|
62
|
+
# @return [String]
|
63
|
+
#
|
64
|
+
# @example
|
65
|
+
# Faker::Games::LeagueOfLegends.masteries #=> "Double Edged Sword"
|
66
|
+
#
|
67
|
+
# @faker.version 1.8.0
|
23
68
|
def masteries
|
24
69
|
fetch('games.league_of_legends.masteries')
|
25
70
|
end
|
26
71
|
|
72
|
+
##
|
73
|
+
# Produces a rank from League of Legends.
|
74
|
+
#
|
75
|
+
# @return [String]
|
76
|
+
#
|
77
|
+
# @example
|
78
|
+
# Faker::Games::LeagueOfLegends.rank #=> "Bronze V"
|
79
|
+
#
|
80
|
+
# @faker.version 1.8.0
|
27
81
|
def rank
|
28
82
|
fetch('games.league_of_legends.rank')
|
29
83
|
end
|
data/lib/faker/games/myst.rb
CHANGED
@@ -4,22 +4,67 @@ module Faker
|
|
4
4
|
class Games
|
5
5
|
class Myst < Base
|
6
6
|
class << self
|
7
|
+
##
|
8
|
+
# Produces the name of a game from the Myst series.
|
9
|
+
#
|
10
|
+
# @return [String]
|
11
|
+
#
|
12
|
+
# @example
|
13
|
+
# Faker::Games::Myst.game #=> "Myst III: Exile"
|
14
|
+
#
|
15
|
+
# @faker.version 1.9.0
|
7
16
|
def game
|
8
17
|
fetch('games.myst.games')
|
9
18
|
end
|
10
19
|
|
20
|
+
##
|
21
|
+
# Produces the name of a creature from Myst.
|
22
|
+
#
|
23
|
+
# @return [String]
|
24
|
+
#
|
25
|
+
# @example
|
26
|
+
# Faker::Games::Myst.creature #=> "squee"
|
27
|
+
#
|
28
|
+
# @faker.version 1.9.0
|
11
29
|
def creature
|
12
30
|
fetch('games.myst.creatures')
|
13
31
|
end
|
14
32
|
|
33
|
+
##
|
34
|
+
# Produces the name of an age from Myst.
|
35
|
+
#
|
36
|
+
# @return [String]
|
37
|
+
#
|
38
|
+
# @example
|
39
|
+
# Faker::Games::Myst.age #=> "Relto"
|
40
|
+
#
|
41
|
+
# @faker.version 1.9.0
|
15
42
|
def age
|
16
43
|
fetch('games.myst.ages')
|
17
44
|
end
|
18
45
|
|
46
|
+
##
|
47
|
+
# Produces the name of a chracter from Myst.
|
48
|
+
#
|
49
|
+
# @return [String]
|
50
|
+
#
|
51
|
+
# @example
|
52
|
+
# Faker::Games::Myst.character #=> "Gehn"
|
53
|
+
#
|
54
|
+
# @faker.version 1.9.0
|
19
55
|
def character
|
20
56
|
fetch('games.myst.characters')
|
21
57
|
end
|
22
58
|
|
59
|
+
##
|
60
|
+
# Produces a quote from Myst.
|
61
|
+
#
|
62
|
+
# @return [String]
|
63
|
+
#
|
64
|
+
# @example
|
65
|
+
# Faker::Games::Myst.quote #=> "I realized, the moment I fell into the fissure, that the Book would not be destroyed as I had planned."
|
66
|
+
#
|
67
|
+
# @faker.version 1.9.0
|
23
68
|
def quote
|
24
69
|
fetch('games.myst.quotes')
|
25
70
|
end
|