faker 2.9.0 → 2.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +231 -0
  3. data/README.md +12 -3
  4. data/lib/faker.rb +21 -14
  5. data/lib/faker/default/address.rb +13 -0
  6. data/lib/faker/default/bank.rb +80 -1
  7. data/lib/faker/default/blood.rb +48 -0
  8. data/lib/faker/default/business.rb +1 -1
  9. data/lib/faker/default/cannabis.rb +80 -0
  10. data/lib/faker/default/commerce.rb +73 -10
  11. data/lib/faker/default/company.rb +275 -4
  12. data/lib/faker/default/compass.rb +135 -0
  13. data/lib/faker/default/computer.rb +63 -0
  14. data/lib/faker/default/construction.rb +54 -0
  15. data/lib/faker/default/cosmere.rb +90 -0
  16. data/lib/faker/default/crypto_coin.rb +45 -0
  17. data/lib/faker/default/dc_comics.rb +45 -0
  18. data/lib/faker/default/driving_licence.rb +42 -0
  19. data/lib/faker/default/file.rb +51 -2
  20. data/lib/faker/default/finance.rb +24 -0
  21. data/lib/faker/default/funny_name.rb +45 -0
  22. data/lib/faker/default/hipster.rb +94 -0
  23. data/lib/faker/default/internet.rb +29 -0
  24. data/lib/faker/default/invoice.rb +32 -5
  25. data/lib/faker/default/json.rb +55 -0
  26. data/lib/faker/default/lorem.rb +1 -1
  27. data/lib/faker/default/measurement.rb +90 -0
  28. data/lib/faker/default/name.rb +83 -0
  29. data/lib/faker/default/omniauth.rb +47 -47
  30. data/lib/faker/default/phone_number.rb +88 -5
  31. data/lib/faker/default/placeholdit.rb +21 -0
  32. data/lib/faker/default/slack_emoji.rb +81 -0
  33. data/lib/faker/default/south_africa.rb +90 -0
  34. data/lib/faker/default/string.rb +19 -3
  35. data/lib/faker/default/stripe.rb +61 -0
  36. data/lib/faker/default/twitter.rb +35 -0
  37. data/lib/faker/default/types.rb +80 -0
  38. data/lib/faker/default/university.rb +45 -0
  39. data/lib/faker/default/vehicle.rb +184 -4
  40. data/lib/faker/default/verb.rb +45 -0
  41. data/lib/faker/games/control.rb +113 -0
  42. data/lib/faker/games/dnd.rb +61 -0
  43. data/lib/faker/games/warhammer_fantasy.rb +74 -0
  44. data/lib/faker/movies/departed.rb +49 -0
  45. data/lib/faker/music/music.rb +90 -4
  46. data/lib/faker/music/opera.rb +36 -0
  47. data/lib/faker/music/pearl_jam.rb +50 -0
  48. data/lib/faker/music/phish.rb +27 -1
  49. data/lib/faker/music/show.rb +49 -0
  50. data/lib/faker/quotes/chiquito.rb +80 -0
  51. data/lib/faker/quotes/quote.rb +54 -1
  52. data/lib/faker/quotes/rajnikanth.rb +26 -0
  53. data/lib/faker/quotes/shakespeare.rb +36 -0
  54. data/lib/faker/tv_shows/suits.rb +37 -0
  55. data/lib/faker/version.rb +1 -1
  56. data/lib/helpers/char.rb +2 -1
  57. data/lib/helpers/unique_generator.rb +4 -0
  58. data/lib/locales/bg.yml +2 -2
  59. data/lib/locales/ca.yml +0 -8
  60. data/lib/locales/da-DK.yml +3 -3
  61. data/lib/locales/de-CH.yml +1693 -0
  62. data/lib/locales/en-AU.yml +44 -10
  63. data/lib/locales/en-CA.yml +2 -0
  64. data/lib/locales/en-GB.yml +1 -1
  65. data/lib/locales/en-NEP.yml +1 -1
  66. data/lib/locales/en-NZ.yml +132 -8
  67. data/lib/locales/en-US.yml +29 -3
  68. data/lib/locales/en-ZA.yml +1 -1
  69. data/lib/locales/en/address.yml +6 -0
  70. data/lib/locales/en/blood.yml +13 -0
  71. data/lib/locales/en/chiquito.yml +64 -0
  72. data/lib/locales/en/color.yml +1 -1
  73. data/lib/locales/en/computer.yml +36 -0
  74. data/lib/locales/en/control.yml +247 -0
  75. data/lib/locales/en/departed.yml +50 -0
  76. data/lib/locales/en/dnd.yml +54 -0
  77. data/lib/locales/en/heroes_of_the_storm.yml +1 -1
  78. data/lib/locales/en/house.yml +1 -1
  79. data/lib/locales/en/name.yml +1 -1
  80. data/lib/locales/en/one_piece.yml +2 -2
  81. data/lib/locales/en/pearl_jam.yml +213 -0
  82. data/lib/locales/en/phish.yml +392 -1
  83. data/lib/locales/en/phone_number.yml +1 -1
  84. data/lib/locales/en/rajnikanth.yml +77 -0
  85. data/lib/locales/en/shakespeare.yml +3 -3
  86. data/lib/locales/en/show.yml +597 -0
  87. data/lib/locales/en/star_wars.yml +568 -221
  88. data/lib/locales/en/stripe.yml +3 -3
  89. data/lib/locales/en/suits.yml +45 -0
  90. data/lib/locales/en/warhammer_fantasy.yml +582 -0
  91. data/lib/locales/es-MX.yml +3 -0
  92. data/lib/locales/fr-CA.yml +7 -4
  93. data/lib/locales/fr-CH.yml +1 -1
  94. data/lib/locales/fr.yml +5 -4
  95. data/lib/locales/hy.yml +1 -6
  96. data/lib/locales/id.yml +2 -1
  97. data/lib/locales/ja.yml +1 -1
  98. data/lib/locales/ko.yml +82 -0
  99. data/lib/locales/pt-BR.yml +1 -0
  100. data/lib/locales/pt.yml +2 -2
  101. data/lib/locales/uk.yml +5 -5
  102. data/lib/locales/zh-CN.yml +1 -1
  103. data/lib/locales/zh-TW.yml +1 -1
  104. metadata +37 -16
@@ -5,18 +5,54 @@ module Faker
5
5
  class Music
6
6
  class Opera < Base
7
7
  class << self
8
+ ##
9
+ # Produces the title of an opera by Giuseppe Verdi.
10
+ #
11
+ # @return [String]
12
+ #
13
+ # @example
14
+ # Faker::Music::Opera.verdi #=> "Il Trovatore"
15
+ #
16
+ # @faker.version 1.9.4
8
17
  def verdi
9
18
  fetch('opera.italian.by_giuseppe_verdi')
10
19
  end
11
20
 
21
+ ##
22
+ # Produces the title of an opera by Gioacchino Rossini.
23
+ #
24
+ # @return [String]
25
+ #
26
+ # @example
27
+ # Faker::Music::Opera.rossini #=> "Il Barbiere di Siviglia"
28
+ #
29
+ # @faker.version 1.9.4
12
30
  def rossini
13
31
  fetch('opera.italian.by_gioacchino_rossini')
14
32
  end
15
33
 
34
+ ##
35
+ # Produces the title of an opera by Gaetano Donizetti.
36
+ #
37
+ # @return [String]
38
+ #
39
+ # @example
40
+ # Faker::Music::Opera.donizetti #=> "Lucia di Lammermoor"
41
+ #
42
+ # @faker.version 1.9.4
16
43
  def donizetti
17
44
  fetch('opera.italian.by_gaetano_donizetti')
18
45
  end
19
46
 
47
+ ##
48
+ # Produces the title of an opera by Vincenzo Bellini.
49
+ #
50
+ # @return [String]
51
+ #
52
+ # @example
53
+ # Faker::Music::Opera.bellini #=> "Norma"
54
+ #
55
+ # @faker.version 1.9.4
20
56
  def bellini
21
57
  fetch('opera.italian.by_vincenzo_bellini')
22
58
  end
@@ -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 next
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 next
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 next
44
+ def song
45
+ fetch('pearl_jam.songs')
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
@@ -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 next
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 next
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.song')
43
+ fetch('phish.songs')
18
44
  end
19
45
  end
20
46
  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 next
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 next
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 next
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
@@ -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
- # from: http://morecoolquotes.com/famous-yoda-quotes/
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
@@ -4,18 +4,54 @@ module Faker
4
4
  class Quotes
5
5
  class Shakespeare < Base
6
6
  class << self
7
+ ##
8
+ # Produces a Shakespeare quote from Hamlet.
9
+ #
10
+ # @return [String]
11
+ #
12
+ # @example
13
+ # Faker::Quotes::Shakespeare.hamlet_quote # => "To be, or not to be: that is the question."
14
+ #
15
+ # @faker.version 1.9.2
7
16
  def hamlet_quote
8
17
  sample(hamlet)
9
18
  end
10
19
 
20
+ ##
21
+ # Produces a Shakespeare quote from As You Like It.
22
+ #
23
+ # @return [String]
24
+ #
25
+ # @example
26
+ # Faker::Quotes::Shakespeare.as_you_like_it_quote # => "Can one desire too much of a good thing?."
27
+ #
28
+ # @faker.version 1.9.2
11
29
  def as_you_like_it_quote
12
30
  sample(as_you_like_it)
13
31
  end
14
32
 
33
+ ##
34
+ # Produces a Shakespeare quote from King Richard III.
35
+ #
36
+ # @return [String]
37
+ #
38
+ # @example
39
+ # Faker::Quotes::Shakespeare.king_richard_iii_quote # => "Now is the winter of our discontent."
40
+ #
41
+ # @faker.version 1.9.2
15
42
  def king_richard_iii_quote
16
43
  sample(king_richard_iii)
17
44
  end
18
45
 
46
+ ##
47
+ # Produces a Shakespeare quote from Romeo And Juliet.
48
+ #
49
+ # @return [String]
50
+ #
51
+ # @example
52
+ # Faker::Quotes::Shakespeare.romeo_and_juliet_quote # => "O Romeo, Romeo! wherefore art thou Romeo?."
53
+ #
54
+ # @faker.version 1.9.2
19
55
  def romeo_and_juliet_quote
20
56
  sample(romeo_and_juliet)
21
57
  end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Faker
4
+ class TvShows
5
+ class Suits < Base
6
+ flexible :suits
7
+
8
+ class << self
9
+ ##
10
+ # Produces a character from Suits.
11
+ #
12
+ # @return [String]
13
+ #
14
+ # @example
15
+ # Faker::TvShows::Suits.character #=> "Harvey Specter"
16
+ #
17
+ # @faker.version next
18
+ def character
19
+ fetch('suits.characters')
20
+ end
21
+
22
+ ##
23
+ # Produces a quote from Suits.
24
+ #
25
+ # @return [String]
26
+ #
27
+ # @example
28
+ # Faker::TvShows::Suits.quote #=> "Don't play the odds, play the man."
29
+ #
30
+ # @faker.version next
31
+ def quote
32
+ fetch('suits.quotes')
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end