faker 2.14.0 → 2.15.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +89 -0
  3. data/README.md +9 -0
  4. data/lib/faker.rb +11 -12
  5. data/lib/faker/blockchain/aeternity.rb +4 -4
  6. data/lib/faker/books/dune.rb +15 -2
  7. data/lib/faker/books/lovecraft.rb +8 -4
  8. data/lib/faker/default/address.rb +4 -4
  9. data/lib/faker/default/bank.rb +3 -5
  10. data/lib/faker/default/barcode.rb +11 -11
  11. data/lib/faker/default/beer.rb +3 -3
  12. data/lib/faker/default/camera.rb +46 -0
  13. data/lib/faker/default/chile_rut.rb +3 -2
  14. data/lib/faker/default/code.rb +2 -2
  15. data/lib/faker/default/commerce.rb +1 -1
  16. data/lib/faker/default/company.rb +40 -10
  17. data/lib/faker/default/driving_licence.rb +1 -1
  18. data/lib/faker/default/drone.rb +25 -25
  19. data/lib/faker/default/faker_adjective.rb +35 -0
  20. data/lib/faker/default/finance.rb +21 -0
  21. data/lib/faker/default/food.rb +1 -1
  22. data/lib/faker/default/hipster.rb +8 -5
  23. data/lib/faker/default/id_number.rb +2 -2
  24. data/lib/faker/default/internet.rb +5 -4
  25. data/lib/faker/default/invoice.rb +1 -1
  26. data/lib/faker/default/json.rb +4 -4
  27. data/lib/faker/default/lorem.rb +2 -2
  28. data/lib/faker/default/measurement.rb +3 -2
  29. data/lib/faker/default/military.rb +26 -0
  30. data/lib/faker/default/mountain.rb +33 -0
  31. data/lib/faker/default/number.rb +1 -1
  32. data/lib/faker/default/omniauth.rb +2 -0
  33. data/lib/faker/default/relationship.rb +1 -1
  34. data/lib/faker/default/space.rb +1 -1
  35. data/lib/faker/default/stripe.rb +3 -3
  36. data/lib/faker/default/vehicle.rb +1 -1
  37. data/lib/faker/fantasy/tolkien.rb +67 -0
  38. data/lib/faker/games/clash_of_clans.rb +48 -0
  39. data/lib/faker/games/control.rb +1 -1
  40. data/lib/faker/games/dnd.rb +6 -6
  41. data/lib/faker/games/elder_scrolls.rb +26 -0
  42. data/lib/faker/games/heroes.rb +13 -0
  43. data/lib/faker/games/minecraft.rb +65 -0
  44. data/lib/faker/games/street_fighter.rb +4 -4
  45. data/lib/faker/games/super_mario.rb +48 -0
  46. data/lib/faker/games/world_of_warcraft.rb +26 -1
  47. data/lib/faker/japanese_media/conan.rb +48 -0
  48. data/lib/faker/japanese_media/doraemon.rb +48 -0
  49. data/lib/faker/japanese_media/dragon_ball.rb +26 -0
  50. data/lib/faker/japanese_media/naruto.rb +61 -0
  51. data/lib/faker/japanese_media/studio_ghibli.rb +48 -0
  52. data/lib/faker/movies/hobbit.rb +4 -4
  53. data/lib/faker/movies/how_to_train_your_dragon.rb +48 -0
  54. data/lib/faker/movies/lord_of_the_rings.rb +3 -3
  55. data/lib/faker/movies/room.rb +63 -0
  56. data/lib/faker/movies/star_wars.rb +2 -2
  57. data/lib/faker/music/hiphop.rb +48 -0
  58. data/lib/faker/music/opera.rb +237 -1
  59. data/lib/faker/quotes/quote.rb +26 -0
  60. data/lib/faker/sports/volleyball.rb +74 -0
  61. data/lib/faker/tv_shows/buffy.rb +17 -4
  62. data/lib/faker/tv_shows/final_space.rb +51 -0
  63. data/lib/faker/tv_shows/the_fresh_prince_of_bel_air.rb +17 -4
  64. data/lib/faker/version.rb +1 -1
  65. data/lib/helpers/unique_generator.rb +3 -0
  66. data/lib/locales/en/adjective.yml +179 -0
  67. data/lib/locales/en/buffy.yml +1 -1
  68. data/lib/locales/en/camera.yml +611 -0
  69. data/lib/locales/en/clash_of_clan.yml +101 -0
  70. data/lib/locales/en/company.yml +2 -2
  71. data/lib/locales/en/conan.yml +171 -0
  72. data/lib/locales/en/demographic.yml +218 -5
  73. data/lib/locales/en/doraemon.yml +286 -0
  74. data/lib/locales/en/dota.yml +531 -63
  75. data/lib/locales/en/dragon_ball.yml +243 -1
  76. data/lib/locales/en/driving_license.yml +3 -0
  77. data/lib/locales/en/dune.yml +401 -131
  78. data/lib/locales/en/elder_scrolls.yml +583 -9
  79. data/lib/locales/en/fallout.yml +311 -133
  80. data/lib/locales/en/final_space.yml +37 -0
  81. data/lib/locales/en/finance.yml +53 -0
  82. data/lib/locales/en/fresh_prince_of_bel_air.yml +1 -1
  83. data/lib/locales/en/half_life.yml +84 -3
  84. data/lib/locales/en/heroes.yml +408 -3
  85. data/lib/locales/en/heroes_of_the_storm.yml +131 -4
  86. data/lib/locales/en/how_to_train_your_dragon.yml +174 -0
  87. data/lib/locales/en/jack_handey.yml +54 -0
  88. data/lib/locales/en/league_of_legends.yml +285 -6
  89. data/lib/locales/en/military.yml +179 -5
  90. data/lib/locales/en/minecraft.yml +273 -0
  91. data/lib/locales/en/mountain.yml +158 -0
  92. data/lib/locales/en/music.yml +451 -29
  93. data/lib/locales/en/myst.yml +87 -31
  94. data/lib/locales/en/naruto.yml +231 -0
  95. data/lib/locales/en/opera.yml +168 -0
  96. data/lib/locales/en/overwatch.yml +2650 -2622
  97. data/lib/locales/en/pokemon.yml +417 -4
  98. data/lib/locales/en/quote.yml +692 -163
  99. data/lib/locales/en/room.yml +68 -0
  100. data/lib/locales/en/source.yml +30 -0
  101. data/lib/locales/en/star_trek.yml +1 -1
  102. data/lib/locales/en/street_fighter.yml +4 -4
  103. data/lib/locales/en/studio_ghibli.yml +107 -0
  104. data/lib/locales/en/super_mario.yml +58 -0
  105. data/lib/locales/en/super_smash_bros.yml +16 -4
  106. data/lib/locales/en/tolkien.yml +2453 -0
  107. data/lib/locales/en/volleyball.yml +501 -0
  108. data/lib/locales/en/witcher.yml +389 -7
  109. data/lib/locales/en/world_of_warcraft.yml +122 -4
  110. data/lib/locales/en/zelda.yml +962 -4
  111. data/lib/locales/es.yml +56 -0
  112. data/lib/locales/id.yml +1 -0
  113. data/lib/locales/ja.yml +5 -1
  114. data/lib/locales/pt-BR.yml +1 -1
  115. data/lib/locales/uk.yml +2 -0
  116. metadata +38 -10
  117. data/lib/locales/en/hobbit.yml +0 -19
  118. data/lib/locales/en/lord_of_the_rings.yml +0 -6
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Faker
4
+ class JapaneseMedia
5
+ class StudioGhibli < Base
6
+ class << self
7
+ ##
8
+ # Produces a character from the Studio Ghibli.
9
+ #
10
+ # @return [String]
11
+ #
12
+ # @example
13
+ # Faker::JapaneseMedia::StudioGhibli.character #=> "Chihiro"
14
+ #
15
+ # @faker.version next
16
+ def character
17
+ fetch('studio_ghibli.characters')
18
+ end
19
+
20
+ ##
21
+ # Produces a quote from Studio Ghibli's movies.
22
+ #
23
+ # @return [String]
24
+ #
25
+ # @example
26
+ # Faker::JapaneseMedia::StudioGhibli.quote #=> "One thing you can always count on is that hearts change."
27
+ #
28
+ # @faker.version next
29
+ def quote
30
+ fetch('studio_ghibli.quotes')
31
+ end
32
+
33
+ ##
34
+ # Produces a movie from Studio Ghibli.
35
+ #
36
+ # @return [String]
37
+ #
38
+ # @example
39
+ # Faker::JapaneseMedia::StudioGhibli.movie #=> "Kiki's Delivery Service"
40
+ #
41
+ # @faker.version next
42
+ def movie
43
+ fetch('studio_ghibli.movies')
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -14,7 +14,7 @@ module Faker
14
14
  #
15
15
  # @faker.version 1.8.0
16
16
  def character
17
- fetch('hobbit.character')
17
+ fetch('tolkien.hobbit.character')
18
18
  end
19
19
 
20
20
  ##
@@ -27,7 +27,7 @@ module Faker
27
27
  #
28
28
  # @faker.version 1.8.0
29
29
  def thorins_company
30
- fetch('hobbit.thorins_company')
30
+ fetch('tolkien.hobbit.thorins_company')
31
31
  end
32
32
 
33
33
  ##
@@ -41,7 +41,7 @@ module Faker
41
41
  #
42
42
  # @faker.version 1.8.0
43
43
  def quote
44
- fetch('hobbit.quote')
44
+ fetch('tolkien.hobbit.quote')
45
45
  end
46
46
 
47
47
  ##
@@ -54,7 +54,7 @@ module Faker
54
54
  #
55
55
  # @faker.version 1.8.0
56
56
  def location
57
- fetch('hobbit.location')
57
+ fetch('tolkien.hobbit.location')
58
58
  end
59
59
  end
60
60
  end
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Faker
4
+ class Movies
5
+ class HowToTrainYourDragon < Base
6
+ class << self
7
+ ##
8
+ # Produces a character from How To Train Your Dragon.
9
+ #
10
+ # @return [String]
11
+ #
12
+ # @example
13
+ # Faker::Movies::HowToTrainYourDragon.character #=> "Hiccup"
14
+ #
15
+ # @faker.version next
16
+ def character
17
+ fetch('how_to_train_your_dragon.characters')
18
+ end
19
+
20
+ ##
21
+ # Produces a location from How To Train Your Dragon.
22
+ #
23
+ # @return [String]
24
+ #
25
+ # @example
26
+ # Faker::Movies::HowToTrainYourDragon.location #=> "Berk"
27
+ #
28
+ # @faker.version next
29
+ def location
30
+ fetch('how_to_train_your_dragon.locations')
31
+ end
32
+
33
+ ##
34
+ # Produces a dragon from How To Train Your Dragon.
35
+ #
36
+ # @return [String]
37
+ #
38
+ # @example
39
+ # Faker::Movies::HowToTrainYourDragon.dragons #=> "Toothless"
40
+ #
41
+ # @faker.version next
42
+ def dragon
43
+ fetch('how_to_train_your_dragon.dragons')
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -14,7 +14,7 @@ module Faker
14
14
  #
15
15
  # @faker.version 1.7.0
16
16
  def character
17
- fetch('lord_of_the_rings.characters')
17
+ fetch('tolkien.lord_of_the_rings.characters')
18
18
  end
19
19
 
20
20
  ##
@@ -27,7 +27,7 @@ module Faker
27
27
  #
28
28
  # @faker.version 1.7.0
29
29
  def location
30
- fetch('lord_of_the_rings.locations')
30
+ fetch('tolkien.lord_of_the_rings.locations')
31
31
  end
32
32
 
33
33
  ##
@@ -41,7 +41,7 @@ module Faker
41
41
  #
42
42
  # @faker.version 1.9.0
43
43
  def quote
44
- fetch('lord_of_the_rings.quotes')
44
+ fetch('tolkien.lord_of_the_rings.quotes')
45
45
  end
46
46
  end
47
47
  end
@@ -0,0 +1,63 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Faker
4
+ class Movies
5
+ class TheRoom < Base
6
+ class << self
7
+ ##
8
+ # Produces an actor from The Room (2003).
9
+ #
10
+ # @return [String]
11
+ #
12
+ # @example
13
+ # Faker::Movies::Room.actor #=> "Tommy Wiseau"
14
+ #
15
+ # @faker.version next
16
+ def actor
17
+ fetch('room.actors')
18
+ end
19
+
20
+ ##
21
+ # Produces a character from The Room (2003).
22
+ #
23
+ # @return [String]
24
+ #
25
+ # @example
26
+ # Faker::Movies::Room.character #=> "Johnny"
27
+ #
28
+ # @faker.version next
29
+ def character
30
+ fetch('room.characters')
31
+ end
32
+
33
+ ##
34
+ # Produces a location from The Room (2003).
35
+ #
36
+ # @return [String]
37
+ #
38
+ # @example
39
+ # Faker::Movies::Room.location #=> "Johnny's Apartment"
40
+ #
41
+ # @faker.version next
42
+ def location
43
+ fetch('room.locations')
44
+ end
45
+
46
+ ##
47
+ ##
48
+ # Produces a quote from The Room (2003).
49
+ #
50
+ # @return [String]
51
+ #
52
+ # @example
53
+ # Faker::Movies::Room.quote
54
+ # #=> "You're lying, I never hit you. You are tearing me apart, Lisa!"
55
+ #
56
+ # @faker.version next
57
+ def quote
58
+ fetch('room.quotes')
59
+ end
60
+ end
61
+ end
62
+ end
63
+ end
@@ -119,7 +119,7 @@ module Faker
119
119
  def wookiee_sentence
120
120
  sentence = sample(wookiee_words).capitalize
121
121
 
122
- rand(0..10).times { sentence += ' ' + sample(wookiee_words) }
122
+ rand(0..10).times { sentence += " #{sample(wookiee_words)}" }
123
123
 
124
124
  sentence + sample(['.', '?', '!'])
125
125
  end
@@ -158,7 +158,7 @@ module Faker
158
158
  raise ArgumentError, "Character for quotes can be left blank or #{quoted_characters.keys.join(', ')}" unless quoted_characters.key?(character.to_sym)
159
159
  end
160
160
 
161
- fetch('star_wars.quotes.' + character)
161
+ fetch("star_wars.quotes.#{character}")
162
162
  end
163
163
 
164
164
  def call_numbers
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Faker
4
+ class Music
5
+ class Hiphop < Base
6
+ class << self
7
+ ##
8
+ # Produces the name of a Hip Hop Artist
9
+ #
10
+ # @return [String]
11
+ #
12
+ # @example
13
+ # Faker::Music::Hiphop.artist #=> "Lil Wayne"
14
+ #
15
+ # @faker.version next
16
+ def artist
17
+ fetch('hiphop.artist')
18
+ end
19
+
20
+ ##
21
+ # Produces the name of a Hip Hop Group
22
+ #
23
+ # @return [String]
24
+ #
25
+ # @example
26
+ # Faker::Music::Hiphop.groups #=> "OVO"
27
+ #
28
+ # @faker.version next
29
+ def groups
30
+ fetch('hiphop.groups')
31
+ end
32
+
33
+ ##
34
+ # Produces the name of a Hip Hop Subgenre
35
+ #
36
+ # @return [String]
37
+ #
38
+ # @example
39
+ # Faker::Music::Hiphop.subgeneres #=> "Alternative"
40
+ #
41
+ # @faker.version next
42
+ def subgenres
43
+ fetch('hiphop.subgenres')
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Faker
4
- # A generator of titles of operas by Verdi, Rossini, Donizetti and Bellini
4
+ # A generator of titles of operas by various composers
5
5
  class Music
6
6
  class Opera < Base
7
7
  class << self
@@ -56,6 +56,242 @@ module Faker
56
56
  def bellini
57
57
  fetch('opera.italian.by_vincenzo_bellini')
58
58
  end
59
+
60
+ ##
61
+ # Produces the title of an opera by Wolfgang Amadeus Mozart.
62
+ #
63
+ # @return [String]
64
+ #
65
+ # @example
66
+ # Faker::Music::Opera.mozart #=> "Die Zauberfloete"
67
+ #
68
+ # @faker.version next
69
+ def mozart
70
+ fetch('opera.italian.by_wolfgang_amadeus_mozart') +
71
+ fetch('opera.german.by_wolfgang_amadeus_mozart')
72
+ end
73
+
74
+ ##
75
+ # Produces the title of an Italian opera by Wolfgang Amadeus Mozart.
76
+ #
77
+ # @return [String]
78
+ #
79
+ # @example
80
+ # Faker::Music::Opera.mozart_it #=> "Cosi fan tutte"
81
+ #
82
+ # @faker.version next
83
+ def mozart_italian
84
+ fetch('opera.italian.by_wolfgang_amadeus_mozart')
85
+ end
86
+
87
+ ##
88
+ # Produces the title of a German opera by Wolfgang Amadeus Mozart.
89
+ #
90
+ # @return [String]
91
+ #
92
+ # @example
93
+ # Faker::Music::Opera.mozart_ger #=> "Die Zauberfloete"
94
+ #
95
+ # @faker.version next
96
+ def mozart_german
97
+ fetch('opera.german.by_wolfgang_amadeus_mozart')
98
+ end
99
+
100
+ ##
101
+ # Produces the title of an opera by Christoph Willibald Gluck.
102
+ #
103
+ # @return [String]
104
+ #
105
+ # @example
106
+ # Faker::Music::Opera.gluck #=> "Orfeo ed Euridice"
107
+ #
108
+ # @faker.version next
109
+ def gluck
110
+ fetch('opera.italian.by_christoph_willibald_gluck') +
111
+ fetch('opera.french.by_christoph_willibald_gluck')
112
+ end
113
+
114
+ ##
115
+ # Produces the title of an Italian opera by Christoph Willibald Gluck.
116
+ #
117
+ # @return [String]
118
+ #
119
+ # @example
120
+ # Faker::Music::Opera.gluck_it #=> "Orfeo ed Euridice"
121
+ #
122
+ # @faker.version next
123
+ def gluck_italian
124
+ fetch('opera.italian.by_christoph_willibald_gluck')
125
+ end
126
+
127
+ ##
128
+ # Produces the title of a French opera by Christoph Willibald Gluck.
129
+ #
130
+ # @return [String]
131
+ #
132
+ # @example
133
+ # Faker::Music::Opera.gluck_fr #=> "Orphee et Euridice"
134
+ #
135
+ # @faker.version next
136
+ def gluck_french
137
+ fetch('opera.french.by_christoph_willibald_gluck')
138
+ end
139
+
140
+ ##
141
+ # Produces the title of an opera by Ludwig van Beethoven.
142
+ #
143
+ # @return [String]
144
+ #
145
+ # @example
146
+ # Faker::Music::Opera.beethoven #=> "Fidelio"
147
+ #
148
+ # @faker.version next
149
+ def beethoven
150
+ fetch('opera.german.by_ludwig_van_beethoven')
151
+ end
152
+
153
+ ##
154
+ # Produces the title of an opera by Carl Maria von Weber.
155
+ #
156
+ # @return [String]
157
+ #
158
+ # @example
159
+ # Faker::Music::Opera.weber #=> "Der Freischuetz"
160
+ #
161
+ # @faker.version next
162
+ def weber
163
+ fetch('opera.german.by_carl_maria_von_weber')
164
+ end
165
+
166
+ ##
167
+ # Produces the title of an opera by Richard Strauss.
168
+ #
169
+ # @return [String]
170
+ #
171
+ # @example
172
+ # Faker::Music::Opera.strauss #=> "Elektra"
173
+ #
174
+ # @faker.version next
175
+ def strauss
176
+ fetch('opera.german.by_richard_strauss')
177
+ end
178
+
179
+ ##
180
+ # Produces the title of an opera by Richard Wagner.
181
+ #
182
+ # @return [String]
183
+ #
184
+ # @example
185
+ # Faker::Music::Opera.wagner #=> "Tristan und Isolde"
186
+ #
187
+ # @faker.version next
188
+ def wagner
189
+ fetch('opera.german.by_richard_wagner')
190
+ end
191
+
192
+ ##
193
+ # Produces the title of an opera by Robert Schumann.
194
+ #
195
+ # @return [String]
196
+ #
197
+ # @example
198
+ # Faker::Music::Opera.schumann #=> "Genoveva"
199
+ #
200
+ # @faker.version next
201
+ def schumann
202
+ fetch('opera.german.by_robert_schumann')
203
+ end
204
+
205
+ ##
206
+ # Produces the title of an opera by Franz Schubert.
207
+ #
208
+ # @return [String]
209
+ #
210
+ # @example
211
+ # Faker::Music::Opera.schubert #=> "Alfonso und Estrella"
212
+ #
213
+ # @faker.version next
214
+ def schubert
215
+ fetch('opera.german.by_franz_schubert')
216
+ end
217
+
218
+ ##
219
+ # Produces the title of an opera by Alban Berg.
220
+ #
221
+ # @return [String]
222
+ #
223
+ # @example
224
+ # Faker::Music::Opera.berg #=> "Wozzeck"
225
+ #
226
+ # @faker.version next
227
+ def berg
228
+ fetch('opera.german.by_alban_berg')
229
+ end
230
+
231
+ ##
232
+ # Produces the title of an opera by Maurice Ravel.
233
+ #
234
+ # @return [String]
235
+ #
236
+ # @example
237
+ # Faker::Music::Opera.ravel #=> "L'enfant et les sortileges"
238
+ #
239
+ # @faker.version next
240
+ def ravel
241
+ fetch('opera.french.by_maurice_ravel')
242
+ end
243
+
244
+ ##
245
+ # Produces the title of an opera by Hector Berlioz.
246
+ #
247
+ # @return [String]
248
+ #
249
+ # @example
250
+ # Faker::Music::Opera.berlioz #=> "Les Troyens"
251
+ #
252
+ # @faker.version next
253
+ def berlioz
254
+ fetch('opera.french.by_hector_berlioz')
255
+ end
256
+
257
+ ##
258
+ # Produces the title of an opera by Georges Bizet.
259
+ #
260
+ # @return [String]
261
+ #
262
+ # @example
263
+ # Faker::Music::Opera.bizet #=> "Carmen"
264
+ #
265
+ # @faker.version next
266
+ def bizet
267
+ fetch('opera.french.by_georges_bizet')
268
+ end
269
+
270
+ ##
271
+ # Produces the title of an opera by Charles Gounod.
272
+ #
273
+ # @return [String]
274
+ #
275
+ # @example
276
+ # Faker::Music::Opera.gounod #=> "Faust"
277
+ #
278
+ # @faker.version next
279
+ def gounod
280
+ fetch('opera.french.by_charles_gounod')
281
+ end
282
+
283
+ ##
284
+ # Produces the title of an opera by Camille Saint-Saens.
285
+ #
286
+ # @return [String]
287
+ #
288
+ # @example
289
+ # Faker::Music::Opera.saint_saens #=> "Samson and Delilah"
290
+ #
291
+ # @faker.version next
292
+ def saint_saens
293
+ fetch('opera.french.by_camille_saint_saens')
294
+ end
59
295
  end
60
296
  end
61
297
  end