faker 2.10.0 → 2.13.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 +265 -0
- data/README.md +14 -2
- data/lib/faker.rb +20 -10
- data/lib/faker/default/address.rb +31 -1
- data/lib/faker/default/bank.rb +79 -0
- data/lib/faker/default/blood.rb +48 -0
- data/lib/faker/default/business.rb +1 -1
- data/lib/faker/default/cannabis.rb +80 -0
- data/lib/faker/default/chile_rut.rb +44 -1
- data/lib/faker/default/commerce.rb +73 -10
- data/lib/faker/default/company.rb +276 -7
- data/lib/faker/default/compass.rb +135 -0
- data/lib/faker/default/computer.rb +63 -0
- data/lib/faker/default/construction.rb +54 -0
- data/lib/faker/default/cosmere.rb +90 -0
- data/lib/faker/default/crypto_coin.rb +45 -0
- data/lib/faker/default/date.rb +16 -12
- data/lib/faker/default/dc_comics.rb +45 -0
- data/lib/faker/default/driving_licence.rb +42 -0
- data/lib/faker/default/file.rb +51 -2
- data/lib/faker/default/finance.rb +24 -0
- data/lib/faker/default/funny_name.rb +45 -0
- data/lib/faker/default/gender.rb +1 -1
- data/lib/faker/default/hipster.rb +94 -0
- data/lib/faker/default/id_number.rb +86 -0
- data/lib/faker/default/internet.rb +64 -7
- data/lib/faker/default/internet_http.rb +48 -0
- data/lib/faker/default/invoice.rb +32 -5
- data/lib/faker/default/json.rb +55 -0
- data/lib/faker/default/lorem.rb +1 -1
- data/lib/faker/default/lorem_flickr.rb +65 -0
- data/lib/faker/default/lorem_pixel.rb +22 -0
- data/lib/faker/default/markdown.rb +89 -0
- data/lib/faker/default/measurement.rb +90 -0
- data/lib/faker/default/name.rb +98 -0
- data/lib/faker/default/nhs.rb +19 -0
- data/lib/faker/default/number.rb +5 -7
- data/lib/faker/default/omniauth.rb +105 -52
- data/lib/faker/default/phone_number.rb +88 -5
- data/lib/faker/default/placeholdit.rb +21 -0
- data/lib/faker/default/slack_emoji.rb +81 -0
- data/lib/faker/default/south_africa.rb +90 -0
- data/lib/faker/default/string.rb +19 -3
- data/lib/faker/default/stripe.rb +61 -0
- data/lib/faker/default/twitter.rb +35 -0
- data/lib/faker/default/types.rb +80 -0
- data/lib/faker/default/university.rb +45 -0
- data/lib/faker/default/vehicle.rb +184 -4
- data/lib/faker/default/verb.rb +45 -0
- data/lib/faker/default/world_cup.rb +4 -4
- data/lib/faker/games/control.rb +113 -0
- data/lib/faker/games/dnd.rb +61 -0
- data/lib/faker/games/heroes_of_the_storm.rb +16 -5
- data/lib/faker/games/minecraft.rb +48 -0
- data/lib/faker/games/warhammer_fantasy.rb +74 -0
- data/lib/faker/movies/departed.rb +49 -0
- data/lib/faker/movies/movie.rb +13 -0
- data/lib/faker/music/pearl_jam.rb +50 -0
- data/lib/faker/music/phish.rb +27 -1
- data/lib/faker/music/prince.rb +64 -0
- data/lib/faker/music/rush.rb +37 -0
- data/lib/faker/music/show.rb +49 -0
- data/lib/faker/quotes/chiquito.rb +80 -0
- data/lib/faker/quotes/quote.rb +54 -1
- data/lib/faker/quotes/rajnikanth.rb +26 -0
- data/lib/faker/quotes/shakespeare.rb +36 -0
- data/lib/faker/tv_shows/aqua_teen_hunger_force.rb +13 -0
- data/lib/faker/tv_shows/big_bang_theory.rb +37 -0
- data/lib/faker/tv_shows/dr_who.rb +1 -1
- data/lib/faker/tv_shows/futurama.rb +65 -0
- data/lib/faker/tv_shows/simpsons.rb +14 -0
- data/lib/faker/tv_shows/suits.rb +37 -0
- data/lib/faker/version.rb +1 -1
- data/lib/helpers/base58.rb +1 -1
- data/lib/helpers/char.rb +22 -27
- data/lib/helpers/unique_generator.rb +4 -0
- data/lib/locales/bg.yml +2 -2
- data/lib/locales/ca.yml +0 -8
- data/lib/locales/da-DK.yml +3 -3
- data/lib/locales/de-CH.yml +1693 -0
- data/lib/locales/en-AU.yml +44 -10
- data/lib/locales/en-CA.yml +2 -0
- data/lib/locales/en-GB.yml +1 -1
- data/lib/locales/en-NEP.yml +1 -1
- data/lib/locales/en-NZ.yml +2 -0
- data/lib/locales/en-US.yml +29 -3
- data/lib/locales/en-ZA.yml +1 -1
- data/lib/locales/en/address.yml +2 -0
- data/lib/locales/en/aqua_teen_hunger_force.yml +33 -1
- data/lib/locales/en/bank.yml +1 -1
- data/lib/locales/en/big_bang_theory.yml +38 -0
- data/lib/locales/en/blood.yml +13 -0
- data/lib/locales/en/chiquito.yml +64 -0
- data/lib/locales/en/color.yml +1 -1
- data/lib/locales/en/computer.yml +36 -0
- data/lib/locales/en/control.yml +247 -0
- data/lib/locales/en/departed.yml +50 -0
- data/lib/locales/en/dnd.yml +54 -0
- data/lib/locales/en/futurama.yml +344 -0
- data/lib/locales/en/heroes_of_the_storm.yml +2 -2
- data/lib/locales/en/house.yml +1 -1
- data/lib/locales/en/minecraft.yml +390 -0
- data/lib/locales/en/movie.yml +192 -1
- data/lib/locales/en/name.yml +4 -3
- data/lib/locales/en/one_piece.yml +2 -2
- data/lib/locales/en/pearl_jam.yml +213 -0
- data/lib/locales/en/phish.yml +392 -1
- data/lib/locales/en/prince.yml +227 -0
- data/lib/locales/en/rajnikanth.yml +77 -0
- data/lib/locales/en/rush.yml +32 -0
- data/lib/locales/en/shakespeare.yml +3 -3
- data/lib/locales/en/show.yml +597 -0
- data/lib/locales/en/simpsons.yml +668 -0
- data/lib/locales/en/star_wars.yml +568 -220
- data/lib/locales/en/stripe.yml +3 -3
- data/lib/locales/en/suits.yml +45 -0
- data/lib/locales/en/warhammer_fantasy.yml +582 -0
- data/lib/locales/es-MX.yml +3 -0
- data/lib/locales/fr-CA.yml +7 -4
- data/lib/locales/fr-CH.yml +1 -1
- data/lib/locales/fr.yml +5 -4
- data/lib/locales/hy.yml +1 -6
- data/lib/locales/id.yml +2 -1
- data/lib/locales/ja.yml +1 -1
- data/lib/locales/ko.yml +82 -0
- data/lib/locales/pt-BR.yml +1 -0
- data/lib/locales/pt.yml +2 -2
- data/lib/locales/uk.yml +5 -5
- data/lib/locales/zh-CN.yml +1 -1
- data/lib/locales/zh-TW.yml +1 -1
- metadata +52 -19
data/lib/faker/movies/movie.rb
CHANGED
@@ -3,6 +3,19 @@
|
|
3
3
|
module Faker
|
4
4
|
class Movie < Base
|
5
5
|
class << self
|
6
|
+
##
|
7
|
+
# Produces a title from a movie.
|
8
|
+
#
|
9
|
+
# @return [String]
|
10
|
+
#
|
11
|
+
# @example
|
12
|
+
# Faker::Movie.title #=> "The Lord of the Rings: The Two Towers"
|
13
|
+
#
|
14
|
+
# @faker.version 2.13.0
|
15
|
+
def title
|
16
|
+
fetch('movie.title')
|
17
|
+
end
|
18
|
+
|
6
19
|
##
|
7
20
|
# Produces a quote from a movie.
|
8
21
|
#
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'music'
|
4
|
+
|
5
|
+
module Faker
|
6
|
+
class Music
|
7
|
+
class PearlJam < Base
|
8
|
+
class << self
|
9
|
+
##
|
10
|
+
# Produces the name of a member of Pearl Jam (current and former)
|
11
|
+
#
|
12
|
+
# @return [String]
|
13
|
+
#
|
14
|
+
# @example
|
15
|
+
# Faker::Music::PearlJam.musician #=> "Eddie Vedder"
|
16
|
+
#
|
17
|
+
# @faker.version 2.13.0
|
18
|
+
def musician
|
19
|
+
fetch('pearl_jam.musicians')
|
20
|
+
end
|
21
|
+
|
22
|
+
##
|
23
|
+
# Produces the name of an album by Pearl Jam.
|
24
|
+
#
|
25
|
+
# @return [String]
|
26
|
+
#
|
27
|
+
# @example
|
28
|
+
# Faker::Music::PearlJam.album #=> "Ten"
|
29
|
+
#
|
30
|
+
# @faker.version 2.13.0
|
31
|
+
def album
|
32
|
+
fetch('pearl_jam.albums')
|
33
|
+
end
|
34
|
+
|
35
|
+
##
|
36
|
+
# Produces the name of a song by Pearl Jam.
|
37
|
+
#
|
38
|
+
# @return [String]
|
39
|
+
#
|
40
|
+
# @example
|
41
|
+
# Faker::Music::PearlJam.song #=> "Even Flow"
|
42
|
+
#
|
43
|
+
# @faker.version 2.13.0
|
44
|
+
def song
|
45
|
+
fetch('pearl_jam.songs')
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
data/lib/faker/music/phish.rb
CHANGED
@@ -4,6 +4,32 @@ module Faker
|
|
4
4
|
class Music
|
5
5
|
class Phish < Base
|
6
6
|
class << self
|
7
|
+
##
|
8
|
+
# Produces the name of a album by Phish.
|
9
|
+
#
|
10
|
+
# @return [String]
|
11
|
+
#
|
12
|
+
# @example
|
13
|
+
# Faker::Music::Phish.album #=> "Fuego"
|
14
|
+
#
|
15
|
+
# @faker.version 2.13.0
|
16
|
+
def album
|
17
|
+
fetch('phish.albums')
|
18
|
+
end
|
19
|
+
|
20
|
+
##
|
21
|
+
# Produces the name of a musician in Phish.
|
22
|
+
#
|
23
|
+
# @return [String]
|
24
|
+
#
|
25
|
+
# @example
|
26
|
+
# Faker::Music::Phish.musician #=> "Trey Anastasio"
|
27
|
+
#
|
28
|
+
# @faker.version 2.13.0
|
29
|
+
def musician
|
30
|
+
fetch('phish.musicians')
|
31
|
+
end
|
32
|
+
|
7
33
|
##
|
8
34
|
# Produces the name of a song by Phish.
|
9
35
|
#
|
@@ -14,7 +40,7 @@ module Faker
|
|
14
40
|
#
|
15
41
|
# @faker.version 1.9.2
|
16
42
|
def song
|
17
|
-
fetch('phish.
|
43
|
+
fetch('phish.songs')
|
18
44
|
end
|
19
45
|
end
|
20
46
|
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Faker
|
4
|
+
class Music
|
5
|
+
class Prince < Base
|
6
|
+
class << self
|
7
|
+
##
|
8
|
+
# Produces a random Prince song.
|
9
|
+
#
|
10
|
+
# @return [String]
|
11
|
+
#
|
12
|
+
# @example
|
13
|
+
# Faker::Music::Prince.song #=> "Raspberry Beret"
|
14
|
+
# Faker::Music::Prince.song #=> "Starfish And Coffee"
|
15
|
+
#
|
16
|
+
# @faker.version 2.13.0
|
17
|
+
def song
|
18
|
+
fetch('prince.song')
|
19
|
+
end
|
20
|
+
|
21
|
+
##
|
22
|
+
# Produces a random Prince song lyric.
|
23
|
+
#
|
24
|
+
# @return [String]
|
25
|
+
#
|
26
|
+
# @example
|
27
|
+
# Faker::Music::Prince.lyric #=> "Dearly beloved, we are gathered here today to get through this thing called life."
|
28
|
+
# Faker::Music::Prince.lyric #=> "You were so hard to find, the beautiful ones, they hurt you every time."
|
29
|
+
#
|
30
|
+
# @faker.version 2.13.0
|
31
|
+
def lyric
|
32
|
+
fetch('prince.lyric')
|
33
|
+
end
|
34
|
+
|
35
|
+
##
|
36
|
+
# Produces a random Prince album.
|
37
|
+
#
|
38
|
+
# @return [String]
|
39
|
+
#
|
40
|
+
# @example
|
41
|
+
# Faker::Music::Prince.album #=> "The Gold Experience"
|
42
|
+
# Faker::Music::Prince.album #=> "Purple Rain"
|
43
|
+
#
|
44
|
+
# @faker.version 2.13.0
|
45
|
+
def album
|
46
|
+
fetch('prince.album')
|
47
|
+
end
|
48
|
+
|
49
|
+
##
|
50
|
+
# Produces a random Prince-associated band.
|
51
|
+
#
|
52
|
+
# @return [String]
|
53
|
+
#
|
54
|
+
# @example
|
55
|
+
# Faker::Music::Prince.band #=> "The New Power Generation"
|
56
|
+
#
|
57
|
+
# @faker.version 2.13.0
|
58
|
+
def band
|
59
|
+
fetch('prince.band')
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'music'
|
4
|
+
|
5
|
+
module Faker
|
6
|
+
class Music
|
7
|
+
class Rush < Base
|
8
|
+
class << self
|
9
|
+
##
|
10
|
+
# Produces the name of a member of Rush
|
11
|
+
#
|
12
|
+
# @return [String]
|
13
|
+
#
|
14
|
+
# @example
|
15
|
+
# Faker::Music::Rush.player #=> "Geddy Lee"
|
16
|
+
#
|
17
|
+
# @faker.version 2.13.0
|
18
|
+
def player
|
19
|
+
fetch('rush.players')
|
20
|
+
end
|
21
|
+
|
22
|
+
##
|
23
|
+
# Produces the name of an album by Rush
|
24
|
+
#
|
25
|
+
# @return [String]
|
26
|
+
#
|
27
|
+
# @example
|
28
|
+
# Faker::Music::Rush.album #=> "Hold Your Fire"
|
29
|
+
#
|
30
|
+
# @faker.version 2.13.0
|
31
|
+
def album
|
32
|
+
fetch('rush.albums')
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Faker
|
4
|
+
class Show < Base
|
5
|
+
class << self
|
6
|
+
##
|
7
|
+
# Produces the name of a musical for an older audience
|
8
|
+
#
|
9
|
+
# @return [String]
|
10
|
+
#
|
11
|
+
# @example
|
12
|
+
# Faker::Alphanumeric.alpha
|
13
|
+
# #=> "West Side Story"
|
14
|
+
#
|
15
|
+
# @faker.version 2.13.0
|
16
|
+
def adult_musical
|
17
|
+
fetch('show.adult_musical')
|
18
|
+
end
|
19
|
+
|
20
|
+
##
|
21
|
+
# Produces the name of a musical for a younger audience
|
22
|
+
#
|
23
|
+
# @return [String]
|
24
|
+
#
|
25
|
+
# @example
|
26
|
+
# Faker::Alphanumeric.alpha
|
27
|
+
# #=> "Into the Woods JR."
|
28
|
+
#
|
29
|
+
# @faker.version 2.13.0
|
30
|
+
def kids_musical
|
31
|
+
fetch('show.kids_musical')
|
32
|
+
end
|
33
|
+
|
34
|
+
##
|
35
|
+
# Produces the name of a play
|
36
|
+
#
|
37
|
+
# @return [String]
|
38
|
+
#
|
39
|
+
# @example
|
40
|
+
# Faker::Alphanumeric.alpha
|
41
|
+
# #=> "Death of a Salesman"
|
42
|
+
#
|
43
|
+
# @faker.version 2.13.0
|
44
|
+
def play
|
45
|
+
fetch('show.play')
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Faker
|
4
|
+
class Quotes
|
5
|
+
class Chiquito < Base
|
6
|
+
class << self
|
7
|
+
##
|
8
|
+
# Produces an Expression from Chiquito
|
9
|
+
#
|
10
|
+
# @return [String]
|
11
|
+
#
|
12
|
+
# @example
|
13
|
+
# Faker::Quotes::Chiquito.expression # => "Ereh un torpedo!"
|
14
|
+
#
|
15
|
+
# @faker.version 2.11.0
|
16
|
+
def expression
|
17
|
+
sample(expressions)
|
18
|
+
end
|
19
|
+
|
20
|
+
##
|
21
|
+
# Produces a concept from Chiquito
|
22
|
+
#
|
23
|
+
# @return [String]
|
24
|
+
#
|
25
|
+
# @example
|
26
|
+
# Faker::Quotes::Chiquito.term # => "Fistro"
|
27
|
+
#
|
28
|
+
# @faker.version 2.11.0
|
29
|
+
def term
|
30
|
+
sample(terms)
|
31
|
+
end
|
32
|
+
|
33
|
+
##
|
34
|
+
# Produces a joke from Chiquito
|
35
|
+
#
|
36
|
+
# @return [String]
|
37
|
+
#
|
38
|
+
# @example
|
39
|
+
# Faker::Quotes::Chiquito.joke # => "- Papar papar llevame al circo!
|
40
|
+
# - Noorl! El que quiera verte que venga a la casa"
|
41
|
+
#
|
42
|
+
# @faker.version 2.11.0
|
43
|
+
def joke
|
44
|
+
sample(jokes)
|
45
|
+
end
|
46
|
+
|
47
|
+
##
|
48
|
+
# Produces a sentence from Chiquito
|
49
|
+
#
|
50
|
+
# @return [String]
|
51
|
+
#
|
52
|
+
# @example
|
53
|
+
# Faker::Quotes::Chiquito.sentence # => "Te llamo trigo por no llamarte Rodrigo"
|
54
|
+
#
|
55
|
+
# @faker.version 2.11.0
|
56
|
+
def sentence
|
57
|
+
sample(sentences)
|
58
|
+
end
|
59
|
+
|
60
|
+
private
|
61
|
+
|
62
|
+
def expressions
|
63
|
+
fetch('chiquito.expressions')
|
64
|
+
end
|
65
|
+
|
66
|
+
def terms
|
67
|
+
fetch('chiquito.terms')
|
68
|
+
end
|
69
|
+
|
70
|
+
def jokes
|
71
|
+
fetch('chiquito.jokes')
|
72
|
+
end
|
73
|
+
|
74
|
+
def sentences
|
75
|
+
fetch('chiquito.sentences')
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
data/lib/faker/quotes/quote.rb
CHANGED
@@ -3,27 +3,80 @@
|
|
3
3
|
module Faker
|
4
4
|
class Quote < Base
|
5
5
|
class << self
|
6
|
+
##
|
7
|
+
# Produces a famous last words quote.
|
8
|
+
#
|
9
|
+
# @return [String]
|
10
|
+
#
|
11
|
+
# @example
|
12
|
+
# Faker::Quote.famous_last_words #=> "My vocabulary did this to me. Your love will let you go on..."
|
13
|
+
#
|
14
|
+
# @faker.version 1.9.0
|
6
15
|
def famous_last_words
|
7
16
|
fetch('quote.famous_last_words')
|
8
17
|
end
|
9
18
|
|
19
|
+
##
|
20
|
+
# Produces a quote from Matz.
|
21
|
+
#
|
22
|
+
# @return [String]
|
23
|
+
#
|
24
|
+
# @example
|
25
|
+
# Faker::Quote.matz #=> "You want to enjoy life, don't you? If you get your job done quickly and your job is fun, that's good isn't it? That's the purpose of life, partly. Your life is better."
|
26
|
+
#
|
27
|
+
# @faker.version 1.9.0
|
10
28
|
def matz
|
11
29
|
fetch('quote.matz')
|
12
30
|
end
|
13
31
|
|
32
|
+
##
|
33
|
+
# Produces a quote about the most interesting man in the world.
|
34
|
+
#
|
35
|
+
# @return [String]
|
36
|
+
#
|
37
|
+
# @example
|
38
|
+
# Faker::Quote.most_interesting_man_in_the_world #=> "He can speak Russian... in French"
|
39
|
+
#
|
40
|
+
# @faker.version 1.9.0
|
14
41
|
def most_interesting_man_in_the_world
|
15
42
|
fetch('quote.most_interesting_man_in_the_world')
|
16
43
|
end
|
17
44
|
|
45
|
+
##
|
46
|
+
# Produces a Robin quote.
|
47
|
+
#
|
48
|
+
# @return [String]
|
49
|
+
#
|
50
|
+
# @example
|
51
|
+
# Faker::Quote.robin #=> "Holy Razors Edge"
|
52
|
+
#
|
53
|
+
# @faker.version 1.9.0
|
18
54
|
def robin
|
19
55
|
fetch('quote.robin')
|
20
56
|
end
|
21
57
|
|
58
|
+
##
|
59
|
+
# Produces a singular siegler quote.
|
60
|
+
#
|
61
|
+
# @return [String]
|
62
|
+
#
|
63
|
+
# @example
|
64
|
+
# Faker::Quote.singular_siegler #=> "Texas!"
|
65
|
+
#
|
66
|
+
# @faker.version 1.9.0
|
22
67
|
def singular_siegler
|
23
68
|
fetch('quote.singular_siegler')
|
24
69
|
end
|
25
70
|
|
26
|
-
|
71
|
+
##
|
72
|
+
# Produces a quote from Yoda.
|
73
|
+
#
|
74
|
+
# @return [String]
|
75
|
+
#
|
76
|
+
# @example
|
77
|
+
# Faker::Quote.yoda #=> "Use your feelings, Obi-Wan, and find him you will."
|
78
|
+
#
|
79
|
+
# @faker.version 1.9.0
|
27
80
|
def yoda
|
28
81
|
fetch('quote.yoda')
|
29
82
|
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Faker
|
4
|
+
class Quotes
|
5
|
+
class Rajnikanth < Base
|
6
|
+
flexible :rajnikanth
|
7
|
+
|
8
|
+
class << self
|
9
|
+
# Produces a Rajnikanth.
|
10
|
+
# Original list of jokes:
|
11
|
+
# http://www.rajinikanthjokes.com/
|
12
|
+
#
|
13
|
+
# @return [String]
|
14
|
+
#
|
15
|
+
# @example
|
16
|
+
# Faker::Rajnikanth.joke
|
17
|
+
# #=> "Rajinikanth is so fast that he always comes yesterday."
|
18
|
+
#
|
19
|
+
# @faker.version 2.11.0
|
20
|
+
def joke
|
21
|
+
fetch('rajnikanth.joke')
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|