faker 2.11.0 → 2.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +89 -0
  3. data/README.md +8 -2
  4. data/lib/faker.rb +14 -9
  5. data/lib/faker/default/address.rb +1 -1
  6. data/lib/faker/default/bank.rb +79 -0
  7. data/lib/faker/default/blood.rb +48 -0
  8. data/lib/faker/default/business.rb +1 -1
  9. data/lib/faker/default/commerce.rb +73 -10
  10. data/lib/faker/default/company.rb +39 -0
  11. data/lib/faker/default/compass.rb +135 -0
  12. data/lib/faker/default/computer.rb +63 -0
  13. data/lib/faker/default/construction.rb +54 -0
  14. data/lib/faker/default/cosmere.rb +90 -0
  15. data/lib/faker/default/crypto_coin.rb +45 -0
  16. data/lib/faker/default/driving_licence.rb +42 -0
  17. data/lib/faker/default/file.rb +49 -0
  18. data/lib/faker/default/finance.rb +24 -0
  19. data/lib/faker/default/hipster.rb +94 -0
  20. data/lib/faker/default/invoice.rb +32 -5
  21. data/lib/faker/default/json.rb +55 -0
  22. data/lib/faker/default/measurement.rb +90 -0
  23. data/lib/faker/default/name.rb +83 -0
  24. data/lib/faker/default/phone_number.rb +88 -5
  25. data/lib/faker/default/placeholdit.rb +21 -0
  26. data/lib/faker/default/slack_emoji.rb +81 -0
  27. data/lib/faker/default/south_africa.rb +90 -0
  28. data/lib/faker/default/string.rb +19 -3
  29. data/lib/faker/default/stripe.rb +61 -0
  30. data/lib/faker/default/twitter.rb +35 -0
  31. data/lib/faker/default/types.rb +80 -0
  32. data/lib/faker/default/university.rb +45 -0
  33. data/lib/faker/default/vehicle.rb +184 -4
  34. data/lib/faker/default/verb.rb +45 -0
  35. data/lib/faker/games/control.rb +113 -0
  36. data/lib/faker/games/dnd.rb +61 -0
  37. data/lib/faker/games/warhammer_fantasy.rb +74 -0
  38. data/lib/faker/movies/departed.rb +49 -0
  39. data/lib/faker/music/pearl_jam.rb +50 -0
  40. data/lib/faker/music/phish.rb +27 -1
  41. data/lib/faker/music/show.rb +49 -0
  42. data/lib/faker/quotes/quote.rb +54 -1
  43. data/lib/faker/quotes/shakespeare.rb +36 -0
  44. data/lib/faker/tv_shows/suits.rb +37 -0
  45. data/lib/faker/version.rb +1 -1
  46. data/lib/helpers/char.rb +2 -1
  47. data/lib/locales/de-CH.yml +1693 -0
  48. data/lib/locales/en-AU.yml +44 -10
  49. data/lib/locales/en-CA.yml +2 -0
  50. data/lib/locales/en-US.yml +29 -3
  51. data/lib/locales/en/address.yml +2 -0
  52. data/lib/locales/en/blood.yml +13 -0
  53. data/lib/locales/en/computer.yml +36 -0
  54. data/lib/locales/en/control.yml +247 -0
  55. data/lib/locales/en/departed.yml +50 -0
  56. data/lib/locales/en/dnd.yml +54 -0
  57. data/lib/locales/en/heroes_of_the_storm.yml +1 -1
  58. data/lib/locales/en/house.yml +1 -1
  59. data/lib/locales/en/one_piece.yml +2 -2
  60. data/lib/locales/en/pearl_jam.yml +213 -0
  61. data/lib/locales/en/phish.yml +392 -1
  62. data/lib/locales/en/show.yml +597 -0
  63. data/lib/locales/en/star_wars.yml +568 -221
  64. data/lib/locales/en/suits.yml +45 -0
  65. data/lib/locales/en/warhammer_fantasy.yml +582 -0
  66. data/lib/locales/fr-CA.yml +2 -0
  67. data/lib/locales/ko.yml +82 -0
  68. data/lib/locales/pt-BR.yml +1 -0
  69. metadata +29 -11
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Faker
4
+ class Games
5
+ class DnD < Base
6
+ class << self
7
+ ##
8
+ # Produces the name of a race from Dungeons and Dragons (PHB).
9
+ #
10
+ # @return [String]
11
+ #
12
+ # @example
13
+ # Faker::Games::DnD.race #=> "Dwarf"
14
+ #
15
+ # @faker.version next
16
+ def species
17
+ fetch('dnd.species')
18
+ end
19
+
20
+ ##
21
+ # Produces the name of a class from Dungeons and Dragons (PHB).
22
+ #
23
+ # @return [String]
24
+ #
25
+ # @example
26
+ # Faker::Games::DnD.klass #=> "Warlock"
27
+ #
28
+ # @faker.version next
29
+ def klass
30
+ fetch('dnd.klasses')
31
+ end
32
+
33
+ ##
34
+ # Produces the name of a background from Dungeons and Dragons (PHB).
35
+ #
36
+ # @return [String]
37
+ #
38
+ # @example
39
+ # Faker::Games::DnD.background #=> "Urchin"
40
+ #
41
+ # @faker.version next
42
+ def background
43
+ fetch('dnd.backgrounds')
44
+ end
45
+
46
+ ##
47
+ # Produces the name of an alignment from Dungeons and Dragons.
48
+ #
49
+ # @return [String]
50
+ #
51
+ # @example
52
+ # Faker::Games::DnD.alignment #=> "Lawful Neutral"
53
+ #
54
+ # @faker.version next
55
+ def alignment
56
+ fetch('dnd.alignments')
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,74 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Faker
4
+ class Games
5
+ class WarhammerFantasy < Base
6
+ class << self
7
+ ##
8
+ # Produces the name of a hero from the Warhammer Fantasy setting.
9
+ #
10
+ # @return [String]
11
+ #
12
+ # @example
13
+ # Faker::Games::WarhammerFantasy.hero #=> "Sigmar Heldenhammer"
14
+ #
15
+ # @faker.version next
16
+ def hero
17
+ fetch('games.warhammer_fantasy.heros')
18
+ end
19
+
20
+ ##
21
+ # Produces a quote from the Warhammer Fantasy setting.
22
+ #
23
+ # @return [String]
24
+ #
25
+ # @example
26
+ # Faker::Games::WarhammerFantasy.quote #=> "The softest part of a castle is the belly of the man inside."
27
+ #
28
+ # @faker.version next
29
+ def quote
30
+ fetch('games.warhammer_fantasy.quotes')
31
+ end
32
+
33
+ ##
34
+ # Produces a location from the Warhammer Fantasy setting.
35
+ #
36
+ # @return [String]
37
+ #
38
+ # @example
39
+ # Faker::Games::WarhammerFantasy.location #=> "Lustria"
40
+ #
41
+ # @faker.version next
42
+ def location
43
+ fetch('games.warhammer_fantasy.locations')
44
+ end
45
+
46
+ ##
47
+ # Produces a faction from the Warhammer Fantasy setting.
48
+ #
49
+ # @return [String]
50
+ #
51
+ # @example
52
+ # Faker::Games::WarhammerFantasy.faction #=> "Bretonnia"
53
+ #
54
+ # @faker.version next
55
+ def faction
56
+ fetch('games.warhammer_fantasy.factions')
57
+ end
58
+
59
+ ##
60
+ # Produces a creature from the Warhammer Fantasy setting.
61
+ #
62
+ # @return [String]
63
+ #
64
+ # @example
65
+ # Faker::Games::WarhammerFantasy.creature #=> "Hydra"
66
+ #
67
+ # @faker.version next
68
+ def creature
69
+ fetch('games.warhammer_fantasy.creatures')
70
+ end
71
+ end
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Faker
4
+ class Movies
5
+ class Departed < Base
6
+ class << self
7
+ ##
8
+ # Produces an actor from The Departed.
9
+ #
10
+ # @return [String]
11
+ #
12
+ # @example
13
+ # Faker::Movies::Departed.actor #=> "Matt Damon"
14
+ #
15
+ # @faker.version next
16
+ def actor
17
+ fetch('departed.actors')
18
+ end
19
+
20
+ ##
21
+ # Produces a character from The Departed.
22
+ #
23
+ # @return [String]
24
+ #
25
+ # @example
26
+ # Faker::Movies::Departed.character #=> "Frank Costello"
27
+ #
28
+ # @faker.version next
29
+ def character
30
+ fetch('departed.characters')
31
+ end
32
+
33
+ ##
34
+ # Produces a quote from The Departed.
35
+ #
36
+ # @return [String]
37
+ #
38
+ # @example
39
+ # Faker::Movies::Departed.quote
40
+ # #=> "I'm the guy who does his job. You must be the other guy"
41
+ #
42
+ # @faker.version next
43
+ def quote
44
+ fetch('departed.quotes')
45
+ end
46
+ end
47
+ end
48
+ end
49
+ 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
@@ -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
@@ -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