faker 2.10.0 → 2.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +265 -0
  3. data/README.md +14 -2
  4. data/lib/faker.rb +20 -10
  5. data/lib/faker/default/address.rb +31 -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/cannabis.rb +80 -0
  10. data/lib/faker/default/chile_rut.rb +44 -1
  11. data/lib/faker/default/commerce.rb +73 -10
  12. data/lib/faker/default/company.rb +276 -7
  13. data/lib/faker/default/compass.rb +135 -0
  14. data/lib/faker/default/computer.rb +63 -0
  15. data/lib/faker/default/construction.rb +54 -0
  16. data/lib/faker/default/cosmere.rb +90 -0
  17. data/lib/faker/default/crypto_coin.rb +45 -0
  18. data/lib/faker/default/date.rb +16 -12
  19. data/lib/faker/default/dc_comics.rb +45 -0
  20. data/lib/faker/default/driving_licence.rb +42 -0
  21. data/lib/faker/default/file.rb +51 -2
  22. data/lib/faker/default/finance.rb +24 -0
  23. data/lib/faker/default/funny_name.rb +45 -0
  24. data/lib/faker/default/gender.rb +1 -1
  25. data/lib/faker/default/hipster.rb +94 -0
  26. data/lib/faker/default/id_number.rb +86 -0
  27. data/lib/faker/default/internet.rb +64 -7
  28. data/lib/faker/default/internet_http.rb +48 -0
  29. data/lib/faker/default/invoice.rb +32 -5
  30. data/lib/faker/default/json.rb +55 -0
  31. data/lib/faker/default/lorem.rb +1 -1
  32. data/lib/faker/default/lorem_flickr.rb +65 -0
  33. data/lib/faker/default/lorem_pixel.rb +22 -0
  34. data/lib/faker/default/markdown.rb +89 -0
  35. data/lib/faker/default/measurement.rb +90 -0
  36. data/lib/faker/default/name.rb +98 -0
  37. data/lib/faker/default/nhs.rb +19 -0
  38. data/lib/faker/default/number.rb +5 -7
  39. data/lib/faker/default/omniauth.rb +105 -52
  40. data/lib/faker/default/phone_number.rb +88 -5
  41. data/lib/faker/default/placeholdit.rb +21 -0
  42. data/lib/faker/default/slack_emoji.rb +81 -0
  43. data/lib/faker/default/south_africa.rb +90 -0
  44. data/lib/faker/default/string.rb +19 -3
  45. data/lib/faker/default/stripe.rb +61 -0
  46. data/lib/faker/default/twitter.rb +35 -0
  47. data/lib/faker/default/types.rb +80 -0
  48. data/lib/faker/default/university.rb +45 -0
  49. data/lib/faker/default/vehicle.rb +184 -4
  50. data/lib/faker/default/verb.rb +45 -0
  51. data/lib/faker/default/world_cup.rb +4 -4
  52. data/lib/faker/games/control.rb +113 -0
  53. data/lib/faker/games/dnd.rb +61 -0
  54. data/lib/faker/games/heroes_of_the_storm.rb +16 -5
  55. data/lib/faker/games/minecraft.rb +48 -0
  56. data/lib/faker/games/warhammer_fantasy.rb +74 -0
  57. data/lib/faker/movies/departed.rb +49 -0
  58. data/lib/faker/movies/movie.rb +13 -0
  59. data/lib/faker/music/pearl_jam.rb +50 -0
  60. data/lib/faker/music/phish.rb +27 -1
  61. data/lib/faker/music/prince.rb +64 -0
  62. data/lib/faker/music/rush.rb +37 -0
  63. data/lib/faker/music/show.rb +49 -0
  64. data/lib/faker/quotes/chiquito.rb +80 -0
  65. data/lib/faker/quotes/quote.rb +54 -1
  66. data/lib/faker/quotes/rajnikanth.rb +26 -0
  67. data/lib/faker/quotes/shakespeare.rb +36 -0
  68. data/lib/faker/tv_shows/aqua_teen_hunger_force.rb +13 -0
  69. data/lib/faker/tv_shows/big_bang_theory.rb +37 -0
  70. data/lib/faker/tv_shows/dr_who.rb +1 -1
  71. data/lib/faker/tv_shows/futurama.rb +65 -0
  72. data/lib/faker/tv_shows/simpsons.rb +14 -0
  73. data/lib/faker/tv_shows/suits.rb +37 -0
  74. data/lib/faker/version.rb +1 -1
  75. data/lib/helpers/base58.rb +1 -1
  76. data/lib/helpers/char.rb +22 -27
  77. data/lib/helpers/unique_generator.rb +4 -0
  78. data/lib/locales/bg.yml +2 -2
  79. data/lib/locales/ca.yml +0 -8
  80. data/lib/locales/da-DK.yml +3 -3
  81. data/lib/locales/de-CH.yml +1693 -0
  82. data/lib/locales/en-AU.yml +44 -10
  83. data/lib/locales/en-CA.yml +2 -0
  84. data/lib/locales/en-GB.yml +1 -1
  85. data/lib/locales/en-NEP.yml +1 -1
  86. data/lib/locales/en-NZ.yml +2 -0
  87. data/lib/locales/en-US.yml +29 -3
  88. data/lib/locales/en-ZA.yml +1 -1
  89. data/lib/locales/en/address.yml +2 -0
  90. data/lib/locales/en/aqua_teen_hunger_force.yml +33 -1
  91. data/lib/locales/en/bank.yml +1 -1
  92. data/lib/locales/en/big_bang_theory.yml +38 -0
  93. data/lib/locales/en/blood.yml +13 -0
  94. data/lib/locales/en/chiquito.yml +64 -0
  95. data/lib/locales/en/color.yml +1 -1
  96. data/lib/locales/en/computer.yml +36 -0
  97. data/lib/locales/en/control.yml +247 -0
  98. data/lib/locales/en/departed.yml +50 -0
  99. data/lib/locales/en/dnd.yml +54 -0
  100. data/lib/locales/en/futurama.yml +344 -0
  101. data/lib/locales/en/heroes_of_the_storm.yml +2 -2
  102. data/lib/locales/en/house.yml +1 -1
  103. data/lib/locales/en/minecraft.yml +390 -0
  104. data/lib/locales/en/movie.yml +192 -1
  105. data/lib/locales/en/name.yml +4 -3
  106. data/lib/locales/en/one_piece.yml +2 -2
  107. data/lib/locales/en/pearl_jam.yml +213 -0
  108. data/lib/locales/en/phish.yml +392 -1
  109. data/lib/locales/en/prince.yml +227 -0
  110. data/lib/locales/en/rajnikanth.yml +77 -0
  111. data/lib/locales/en/rush.yml +32 -0
  112. data/lib/locales/en/shakespeare.yml +3 -3
  113. data/lib/locales/en/show.yml +597 -0
  114. data/lib/locales/en/simpsons.yml +668 -0
  115. data/lib/locales/en/star_wars.yml +568 -220
  116. data/lib/locales/en/stripe.yml +3 -3
  117. data/lib/locales/en/suits.yml +45 -0
  118. data/lib/locales/en/warhammer_fantasy.yml +582 -0
  119. data/lib/locales/es-MX.yml +3 -0
  120. data/lib/locales/fr-CA.yml +7 -4
  121. data/lib/locales/fr-CH.yml +1 -1
  122. data/lib/locales/fr.yml +5 -4
  123. data/lib/locales/hy.yml +1 -6
  124. data/lib/locales/id.yml +2 -1
  125. data/lib/locales/ja.yml +1 -1
  126. data/lib/locales/ko.yml +82 -0
  127. data/lib/locales/pt-BR.yml +1 -0
  128. data/lib/locales/pt.yml +2 -2
  129. data/lib/locales/uk.yml +5 -5
  130. data/lib/locales/zh-CN.yml +1 -1
  131. data/lib/locales/zh-TW.yml +1 -1
  132. metadata +52 -19
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0938b415563e0dddd3814eaa0dfde9e98cff8bd68f4f683f6cde36793281b21a'
4
- data.tar.gz: 999cac38b416f7d83fce2111813c22d3204d03b646726743f9015a8f3925a8c3
3
+ metadata.gz: 419bb77c9f0a8bc8f7c1b7ea5d93ba7d407bf7c437598eb91413f062f67494ce
4
+ data.tar.gz: 6566078b00ceb18763960551f913a341393858c2458cec01fcb4b0f0163d2e4b
5
5
  SHA512:
6
- metadata.gz: 4a77efa6a9b01ded0a75bbb8a9c8fa63ab3b467dd7dbabb801ca93d038fe6345cb4a820379e1db45c9d31747416b1421bc9aa30febb2768955b94f8661986191
7
- data.tar.gz: d57ef2469c699083baefd0d5761ea2c6b4798924e6d7053ee582aecdd0054d692fbcb5c7980a4eb2c3e784b6d61735c0fe188d93d192f6402c149cfc30a80d3e
6
+ metadata.gz: 694b65a586f50b801f47a456954dd6f2fba39a82b9a643153bb140f9bd3467b7e3080c49a63f0a8562db10c6442bc7c5c578928ddde129054cb070d2a81658e3
7
+ data.tar.gz: eb6812f2f21c5a1930ad987ad8023efeb9168a6f6ec909fcd86d3deeb5e8720d82f457be58fc08f907d502571656ee6768bc21cbb6395a5366c2410d65e358cf
@@ -1,5 +1,270 @@
1
1
  # Change Log
2
2
 
3
+ ## [v2.13.0](https://github.com/faker-ruby/faker/tree/v2.13.0) (2020-06-24)
4
+
5
+ This version:
6
+ - adds YARD docs for several interface methods
7
+ - fixes bugs
8
+ - adds improvements to the code base
9
+ - updates dependencies
10
+
11
+ ## Bug/Fixes
12
+
13
+ - [PR #2050](https://github.com/faker-ruby/faker/pull/2050) Fix random error in music tests [@martinjaimem](https://github.com/martinjaimem)
14
+ - [PR #2037](https://github.com/faker-ruby/faker/pull/2037) Bug Fix: BIC Collission (Issue 1907) [@Newman101](https://github.com/Newman101)
15
+ - [PR #2026](https://github.com/faker-ruby/faker/pull/2026) Sanitize email when name has special characters [@Zeragamba](https://github.com/Zeragamba)
16
+ - [PR #1785](https://github.com/faker-ruby/faker/pull/1785) Adds a fix for when :en is not one of the available locales [@jaimerodas](https://github.com/jaimerodas)
17
+
18
+ ## Chores
19
+
20
+ - [PR #2041](https://github.com/faker-ruby/faker/pull/2041) Reduce Lines in char.rb [@Newman101](https://github.com/Newman101)
21
+ - [PR #2039](https://github.com/faker-ruby/faker/pull/2039) restore Kylo Ren quotes [@Zeragamba](https://github.com/Zeragamba)
22
+ - [PR #2038](https://github.com/faker-ruby/faker/pull/2038) Drop EOL Rubies from CI tests [@Zeragamba](https://github.com/Zeragamba)
23
+ - [PR #2033](https://github.com/faker-ruby/faker/pull/2033) Use `Faker::Base::ULetters` constant instead [@vbrazo](https://github.com/vbrazo)
24
+ - [PR #2028](https://github.com/faker-ruby/faker/pull/2028) Reorganize some tests [@connorshea](https://github.com/connorshea)
25
+ - [PR #1853](https://github.com/faker-ruby/faker/pull/1853) Exclude string.rb from consideration by YARD. [@connorshea](https://github.com/connorshea)
26
+
27
+ ## Deprecation
28
+
29
+ - [PR #2031](https://github.com/faker-ruby/faker/pull/2031) Deprecate `HeroesOfTheStorm.class` [@koic](https://github.com/koic)
30
+
31
+ ## Documentation
32
+
33
+ - [PR #2065](https://github.com/faker-ruby/faker/pull/2065) Add missing documentation to `Faker::Computer` [@danielTiringer](https://github.com/danielTiringer)
34
+ - [PR #2064](https://github.com/faker-ruby/faker/pull/2064) Add minecraft generators [@Ri1a](https://github.com/Ri1a)
35
+ - [PR #2061](https://github.com/faker-ruby/faker/pull/2061) Update docs for `Faker::Date` with separate examples [@danielTiringer](https://github.com/danielTiringer)
36
+ - [PR #2057](https://github.com/faker-ruby/faker/pull/2057) Add missing quotes to `Faker::Internet` [@Zeragamba](https://github.com/Zeragamba)
37
+ - [PR #2055](https://github.com/faker-ruby/faker/pull/2055) Add YARD docs to `Faker::NHS` [@danielTiringer](https://github.com/danielTiringer)
38
+ - [PR #2054](https://github.com/faker-ruby/faker/pull/2054) Add YARD docs to `Faker::Chile_Rut` [@danielTiringer](https://github.com/danielTiringer)
39
+ - [PR #2053](https://github.com/faker-ruby/faker/pull/2053) Add YARD docs to `Faker::Lorem_Flickr` [@danielTiringer](https://github.com/danielTiringer)
40
+ - [PR #2052](https://github.com/faker-ruby/faker/pull/2052) Add YARD docs to `Faker::Lorem_Pixel` [@danielTiringer](https://github.com/danielTiringer)
41
+ - [PR #2051](https://github.com/faker-ruby/faker/pull/2051) Add YARD docs to `Faker::Omniauth` [@danielTiringer](https://github.com/danielTiringer)
42
+ - [PR #2036](https://github.com/faker-ruby/faker/pull/2036) Add YARD docs to `Faker::Markdown` [@danielTiringer](https://github.com/danielTiringer)
43
+ - [PR #2035](https://github.com/faker-ruby/faker/pull/2035) Add YARD docs to `Faker::ID_Number` [@danielTiringer](https://github.com/danielTiringer)
44
+ - [PR #2030](https://github.com/faker-ruby/faker/pull/2030) Add general documentation for `Faker::Blood` [@jbergenson](https://github.com/jbergenson)
45
+ - [PR #2029](https://github.com/faker-ruby/faker/pull/2029) Allow passing a string to specific `Faker::Date` methods. [@connorshea](https://github.com/connorshea)
46
+
47
+ ## Feature Request
48
+
49
+ - [PR #2040](https://github.com/faker-ruby/faker/pull/2040) Split lint and test Github actions [@Zeragamba](https://github.com/Zeragamba)
50
+ - [PR #2032](https://github.com/faker-ruby/faker/pull/2032) Add `gender-neutral` first names to `Faker::Name` [@cmunozgar](https://github.com/cmunozgar)
51
+ - [PR #1965](https://github.com/faker-ruby/faker/pull/1965) Add new `full_address_as_hash` method which return the required address [@AmrAdelKhalil](https://github.com/AmrAdelKhalil)
52
+ - [PR #1952](https://github.com/faker-ruby/faker/pull/1952) Add `Faker::Movie.title` [@gizipp](https://github.com/gizipp)
53
+ - [PR #1932](https://github.com/faker-ruby/faker/pull/1932) Added AHTF Wisdom [@brotherjack](https://github.com/brotherjack)
54
+ - [PR #1912](https://github.com/faker-ruby/faker/pull/1912) Add `Faker::Music::Rush` [@willianveiga](https://github.com/willianveiga)
55
+ - [PR #1865](https://github.com/faker-ruby/faker/pull/1865) Add Big Bang Theory [@pathaknv](https://github.com/pathaknv)
56
+ - [PR #1858](https://github.com/faker-ruby/faker/pull/1858) Add `Faker::TvShows::Futurama` [@JoeNyland](https://github.com/JoeNyland)
57
+ - [PR #1821](https://github.com/faker-ruby/faker/pull/1821) Add HTTP status codes generator [@willianveiga](https://github.com/willianveiga)
58
+ - [PR #1804](https://github.com/faker-ruby/faker/pull/1804) Add `Faker::TvShows::Simpsons.episode_title` [@martinbjeldbak](https://github.com/martinbjeldbak)
59
+ - [PR #1670](https://github.com/faker-ruby/faker/pull/1670) Adds `Faker::Music::Prince` [@jessecalton](https://github.com/jessecalton)
60
+
61
+ ## Update locales
62
+
63
+ - [PR #1792](https://github.com/faker-ruby/faker/pull/1792) Add more prefixes and suffixes to Name [@mathisto](https://github.com/mathisto)
64
+
65
+ ## Update local dependencies
66
+
67
+ - Update rubocop requirement from = 0.81.0 to = 0.85.1
68
+ - Update rubocop requirement from = 0.85.1 to = 0.86.0 (#2066)
69
+ - Update test-unit requirement from = 3.3.5 to = 3.3.6 (#2046)
70
+ - Bump i18n from 1.8.2 to 1.8.3 (#2034)
71
+
72
+ ------------------------------------------------------------------------------
73
+
74
+ ## [v2.12.0](https://github.com/faker-ruby/faker/tree/v2.12.0) (2020-05-31)
75
+
76
+ This version:
77
+ - adds several YARD docs
78
+ - fixes some locale issues
79
+ - fixes a few bugs in Faker generators
80
+ - improves code quality
81
+ - adds a few generators for Movies, Music and TV Shows
82
+ - updates local dependencies
83
+
84
+ ## Bug/Fixes
85
+
86
+ - [PR #2019](https://github.com/faker-ruby/faker/pull/2019) Update 'prepare' regexp to allow hyphen [@jbergenson](https://github.com/jbergenson)
87
+ - [PR #2012](https://github.com/faker-ruby/faker/pull/2012) Add else condition to prevent false positive [@jbergenson](https://github.com/jbergenson)
88
+ - [PR #1985](https://github.com/faker-ruby/faker/pull/1985) Fix an error for `Faker::Computer.os` [@koic](https://github.com/koic)
89
+ - [PR #1971](https://github.com/faker-ruby/faker/pull/1971) Fixing the CI failure by fixing the infinite loop in Commerce [@amatsuda](https://github.com/amatsuda)
90
+
91
+ ## Chores
92
+
93
+ - [PR #1988](https://github.com/faker-ruby/faker/pull/1988) Removing meaningless begin and end [@amatsuda](https://github.com/amatsuda)
94
+ - [PR #1979](https://github.com/faker-ruby/faker/pull/1979) Reuse the `lvar` instead of calling `File.dirname(__FILE__)` again and again [@amatsuda](https://github.com/amatsuda)
95
+
96
+ ## Documentation
97
+
98
+ - [PR #2022](https://github.com/faker-ruby/faker/pull/2022) Add YARD docs to `Faker::Invoice` [@danielTiringer](https://github.com/danielTiringer)
99
+ - [PR #2021](https://github.com/faker-ruby/faker/pull/2021) Add YARD docs to `Faker::Hipster` [@danielTiringer](https://github.com/danielTiringer)
100
+ - [PR #2020](https://github.com/faker-ruby/faker/pull/2020) Add YARD docs to `Faker::Measurement` [@danielTiringer](https://github.com/danielTiringer)
101
+ - [PR #2017](https://github.com/faker-ruby/faker/pull/2017) Fix docs for `Faker::Games::Control.altered_world_event` [@Zeragamba](https://github.com/Zeragamba)
102
+ - [PR #2016](https://github.com/faker-ruby/faker/pull/2016) Fix yard documentation issues [@danielTiringer](https://github.com/danielTiringer)
103
+ - [PR #2015](https://github.com/faker-ruby/faker/pull/2015) Add YARD docs to `Faker::Quotes` [@danielTiringer](https://github.com/danielTiringer)
104
+ - [PR #2011](https://github.com/faker-ruby/faker/pull/2011) Update `star_wars.yml` [@garrettmichaelgeorge](https://github.com/garrettmichaelgeorge)
105
+ - [PR #2010](https://github.com/faker-ruby/faker/pull/2010) Add missing links in README.md [@Naokimi](https://github.com/Naokimi)
106
+ - [PR #2009](https://github.com/faker-ruby/faker/pull/2009) Add YARD docs to `Faker::Placeholdit` [@danielTiringer](https://github.com/danielTiringer)
107
+ - [PR #2008](https://github.com/faker-ruby/faker/pull/2008) Add YARD docs to `Faker::Verb` [@danielTiringer](https://github.com/danielTiringer)
108
+ - [PR #2007](https://github.com/faker-ruby/faker/pull/2007) Add YARD docs to `Faker::Phone_Number` [@danielTiringer](https://github.com/danielTiringer)
109
+ - [PR #2004](https://github.com/faker-ruby/faker/pull/2004) Add YARD docs to `Faker::String` [@danielTiringer](https://github.com/danielTiringer)
110
+ - [PR #2001](https://github.com/faker-ruby/faker/pull/2001) Add YARD docs to `Faker::South_Africa` [@danielTiringer](https://github.com/danielTiringer)
111
+ - [PR #2000](https://github.com/faker-ruby/faker/pull/2000) Add YARD docs to `Faker::JSON` [@danielTiringer](https://github.com/danielTiringer)
112
+ - [PR #1999](https://github.com/faker-ruby/faker/pull/1999) Add YARD docs to `Faker::Types` [@danielTiringer](https://github.com/danielTiringer)
113
+ - [PR #1998](https://github.com/faker-ruby/faker/pull/1998) Add YARD docs to `Faker::Finance` [@danielTiringer](https://github.com/danielTiringer)
114
+ - [PR #1997](https://github.com/faker-ruby/faker/pull/1997) Add YARD docs to `Faker::Driving_Licence` [@danielTiringer](https://github.com/danielTiringer)
115
+ - [PR #1996](https://github.com/faker-ruby/faker/pull/1996) Add YARD docs to `Crypto Coin` [@danielTiringer](https://github.com/danielTiringer)
116
+ - [PR #1995](https://github.com/faker-ruby/faker/pull/1995) Add YARD docs to `Faker::Commerce` [@danielTiringer](https://github.com/danielTiringer)
117
+ - [PR #1993](https://github.com/faker-ruby/faker/pull/1993) Add YARD docs to `Faker::Vehicle` [@danielTiringer](https://github.com/danielTiringer)
118
+ - [PR #1990](https://github.com/faker-ruby/faker/pull/1990) Add YARD docs to `Faker::File` [@danielTiringer](https://github.com/danielTiringer)
119
+ - [PR #1989](https://github.com/faker-ruby/faker/pull/1989) Add YARD docs to `Faker::Bank` [@danielTiringer](https://github.com/danielTiringer)
120
+ - [PR #1984](https://github.com/faker-ruby/faker/pull/1984) Minor documentation fix for `Faker::University` [@Zeragamba](https://github.com/Zeragamba)
121
+ - [PR #1983](https://github.com/faker-ruby/faker/pull/1983) Add YARD docs to `Faker::Twitter` [@danielTiringer](https://github.com/danielTiringer)
122
+ - [PR #1982](https://github.com/faker-ruby/faker/pull/1982) Add YARD docs to `Faker::Cosmere` [@danielTiringer](https://github.com/danielTiringer)
123
+ - [PR #1981](https://github.com/faker-ruby/faker/pull/1981) Add YARD docs to `Faker::Stripe` [@danielTiringer](https://github.com/danielTiringer)
124
+ - [PR #1980](https://github.com/faker-ruby/faker/pull/1980) Add YARD docs to `Faker::Construction` [@danielTiringer](https://github.com/danielTiringer)
125
+ - [PR #1976](https://github.com/faker-ruby/faker/pull/1976) Add YARD docs to `Faker::Name` [@danielTiringer](https://github.com/danielTiringer)
126
+ - [PR #1975](https://github.com/faker-ruby/faker/pull/1975) Add YARD docs to `Faker::Compass` [@danielTiringer](https://github.com/danielTiringer)
127
+ - [PR #1959](https://github.com/faker-ruby/faker/pull/1959) Add YARD docs to `Faker::University` [@danielTiringer](https://github.com/danielTiringer)
128
+ - [PR #1956](https://github.com/faker-ruby/faker/pull/1956) Add YARD docs to `Faker::SlackEmoji` [@rutger-t](https://github.com/rutger-t)
129
+ - [PR #1943](https://github.com/faker-ruby/faker/pull/1943) Update documentation for unique.exclude [@mtancoigne](https://github.com/mtancoigne)
130
+ - [PR #1925](https://github.com/faker-ruby/faker/pull/1925) AdD `Faker::Game::WarhammerFantasy` [@sotek222](https://github.com/sotek222)
131
+
132
+ ## Feature Request
133
+
134
+ - [PR #2025](https://github.com/faker-ruby/faker/pull/2025) Add `Faker::TvShows::Suits` [@ash-elangovan](https://github.com/ash-elangovan)
135
+ - [PR #2024](https://github.com/faker-ruby/faker/pull/2024) Added Phish Albums and Musicians [@zfine416](https://github.com/zfine416)
136
+ - [PR #2013](https://github.com/faker-ruby/faker/pull/2013) Add `Faker::Games::Control` [@Zeragamba](https://github.com/Zeragamba)
137
+ - [PR #1994](https://github.com/faker-ruby/faker/pull/1994) Enable Ruby testing github workflow [@Zeragamba](https://github.com/Zeragamba)
138
+ - [PR #1966](https://github.com/faker-ruby/faker/pull/1966) Add `Faker::Games:DnD` [@Naokimi](https://github.com/Naokimi)
139
+ - [PR #1962](https://github.com/faker-ruby/faker/pull/1962) Adding Pearl Jam to the Music module [@briri](https://github.com/briri)
140
+ - [PR #1960](https://github.com/faker-ruby/faker/pull/1960) Added `Faker::Blood` [@suraj32](https://github.com/suraj32)
141
+ - [PR #1931](https://github.com/faker-ruby/faker/pull/1931) Add `Faker::Movies::Departed` Class [@jaebradley](https://github.com/jaebradley)
142
+ - [PR #1696](https://github.com/faker-ruby/faker/pull/1696) Add Bibles class with King James subclass [@jbergenson](https://github.com/jbergenson)
143
+ - [PR #1485](https://github.com/faker-ruby/faker/pull/1485) Plays and musicals [@armandofox](https://github.com/armandofox)
144
+
145
+ ## Update locales
146
+
147
+ - [PR #2014](https://github.com/faker-ruby/faker/pull/2014) Make locale self-contained [@psibi](https://github.com/psibi)
148
+ - [PR #1986](https://github.com/faker-ruby/faker/pull/1986) Added quotations to Shirahoshi [@iavivai](https://github.com/iavivai)
149
+ - [PR #1973](https://github.com/faker-ruby/faker/pull/1973) Fix mis-quotations [@kayhide](https://github.com/kayhide)
150
+ - [PR #1967](https://github.com/faker-ruby/faker/pull/1967) ko locale updates [@jae57](https://github.com/jae57)
151
+ - [PR #1964](https://github.com/faker-ruby/faker/pull/1964) en-AU locale updates [@mattman](https://github.com/mattman)
152
+ - [PR #1948](https://github.com/faker-ruby/faker/pull/1948) Add `Faker::Computer` [@cmcramer](https://github.com/cmcramer)
153
+
154
+ ## Update local dependencies
155
+
156
+ - Update minitest requirement from = 5.14.0 to = 5.14.1 (#1987)
157
+ - Update rubocop requirement from = 0.80.1 to = 0.81.0 (#1955)
158
+ - Update pry requirement from = 0.13.0 to = 0.13.1 (#1963)
159
+ - Update yard requirement from = 0.9.24 to = 0.9.25 (#1970)
160
+
161
+ ------------------------------------------------------------------------------
162
+
163
+ ## [v2.11.0](https://github.com/faker-ruby/faker/tree/v2.11.0) (2020-03-24)
164
+
165
+ ## Bug/Fixes
166
+
167
+ - [PR #1938](https://github.com/faker-ruby/faker/pull/1938) Fix omniauth consistency [@DouglasLutz](https://github.com/DouglasLutz)
168
+
169
+ ## Documentation
170
+
171
+ - [PR #1949](https://github.com/faker-ruby/faker/pull/1949) Add YARD doc for Faker::Cannabis [@mashuDuek](https://github.com/mashuDuek)
172
+ - [PR #1944](https://github.com/faker-ruby/faker/pull/1944) Add YARD docs for Faker::FunnyName [@curriecode](https://github.com/curriecode)
173
+ - [PR #1935](https://github.com/faker-ruby/faker/pull/1935) Add YARD docs for the unique method [@connorshea](https://github.com/connorshea)
174
+
175
+ ## Feature Request
176
+
177
+ - [PR #1946](https://github.com/faker-ruby/faker/pull/1946) Add Faker::Rajnikanth [@wolwire](https://github.com/wolwire)
178
+ - [PR #1940](https://github.com/faker-ruby/faker/pull/1940) Add Faker::Quotes::Chiquito [@jantequera](https://github.com/jantequera)
179
+ - [PR #1883](https://github.com/faker-ruby/faker/pull/1883) add Internet#base64 [@cyrilchampier](https://github.com/cyrilchampier)
180
+
181
+ ## Update locales
182
+
183
+ - [PR #1945](https://github.com/faker-ruby/faker/pull/1945) Remove female first name 'Miss' [@ags](https://github.com/ags)
184
+ - [PR #1929](https://github.com/faker-ruby/faker/pull/1929) Fixed mobile prefixes for en-GB locale [@SamHart91](https://github.com/SamHart91)
185
+
186
+ ## Update local dependencies
187
+
188
+ - Update pry requirement from = 0.12.2 to = 0.13.0 (#1951)
189
+ - Update rubocop requirement from = 0.80.0 to = 0.80.1 (#1941)
190
+ - Update rubocop requirement from = 0.79.0 to = 0.80.0 (#1937)
191
+
192
+ ------------------------------------------------------------------------------
193
+
194
+ ## [v2.10.2](https://github.com/faker-ruby/faker/tree/v2.10.2) (2020-02-15)
195
+
196
+ This version:
197
+ - adds a few YARD docs
198
+ - fixes locales
199
+ - updates local dependencies
200
+
201
+ ## Chores
202
+
203
+ - [PR #1924](https://github.com/faker-ruby/faker/pull/1924) Use ruby's `File::Separator` rather than '/' as a default for direct [@swiknaba](https://github.com/swiknaba)
204
+
205
+ ## Documentation
206
+
207
+ - [PR #1913](https://github.com/faker-ruby/faker/pull/1913) Add YARD docs for Faker::DcComics [@ash-elangovan](https://github.com/ash-elangovan)
208
+
209
+ ## Update locales
210
+
211
+ - [PR #1934](https://github.com/faker-ruby/faker/pull/1934) Add street_address for en-nz locale [@psibi](https://github.com/psibi)
212
+ - [PR #1933](https://github.com/faker-ruby/faker/pull/1933) Make id locale consistent. [@psibi](https://github.com/psibi)
213
+ - [PR #1930](https://github.com/faker-ruby/faker/pull/1930) Remove spaces before apostrophes [@jrmhaig](https://github.com/jrmhaig)
214
+ - [PR #1927](https://github.com/faker-ruby/faker/pull/1927) zh-TW locale fix: Avoid double de-reference for name_with_middle [@psibi](https://github.com/psibi)
215
+ - [PR #1922](https://github.com/faker-ruby/faker/pull/1922) zh-CN locale fix: Directly refer to the expected values [@psibi](https://github.com/psibi)
216
+ - [PR #1921](https://github.com/faker-ruby/faker/pull/1921) uk locale fix: Make empty fields consistent [@psibi](https://github.com/psibi)
217
+ - [PR #1920](https://github.com/faker-ruby/faker/pull/1920) pt locale fix: Make city fields consistent with other [@psibi](https://github.com/psibi)
218
+ - [PR #1918](https://github.com/faker-ruby/faker/pull/1918) Make Japanese Lorem sentences look more natural [@rastamhadi](https://github.com/rastamhadi)
219
+ - [PR #1915](https://github.com/faker-ruby/faker/pull/1915) Add yard docs for Faker::Company [@kos31de](https://github.com/kos31de)
220
+ - [PR #1914](https://github.com/faker-ruby/faker/pull/1914) Data source fix for ha locale [@psibi](https://github.com/psibi)
221
+ - [PR #1911](https://github.com/faker-ruby/faker/pull/1911) Removed duplicate value [@ash-elangovan](https://github.com/ash-elangovan)
222
+ - [PR #1908](https://github.com/faker-ruby/faker/pull/1908) Add more colors [@tomcol](https://github.com/tomcol)
223
+ - [PR #1903](https://github.com/faker-ruby/faker/pull/1903) fr locale: pokemon's root key should be games [@connorshea](https://github.com/connorshea)
224
+ - [PR #1902](https://github.com/faker-ruby/faker/pull/1902) Remove empty string in phone_number formats [@psibi](https://github.com/psibi)
225
+ - [PR #1901](https://github.com/faker-ruby/faker/pull/1901) fr-CA locale fix: pokemon's root key should be games [@psibi](https://github.com/psibi)
226
+ - [PR #1900](https://github.com/faker-ruby/faker/pull/1900) Use postcode for en-ZA [@psibi](https://github.com/psibi)
227
+ - [PR #1899](https://github.com/faker-ruby/faker/pull/1899) Locale root name should be en-NEP [@psibi](https://github.com/psibi)
228
+ - [PR #1812](https://github.com/faker-ruby/faker/pull/1812) Add vat number rule for es-MX [@arandilopez](https://github.com/arandilopez)
229
+
230
+ ## Update local dependencies
231
+
232
+ - Update test-unit requirement from = 3.3.4 to = 3.3.5 (#1896)
233
+
234
+ ------------------------------------------------------------------------------
235
+
236
+ ## [v2.10.1](https://github.com/faker-ruby/faker/tree/v2.10.1) (2020-01-13)
237
+
238
+ This version:
239
+ - fixes locales
240
+ - updates local dependencies
241
+ - fixes warnings
242
+
243
+ ## Bug/Fixes
244
+
245
+ - [PR #1868](https://github.com/faker-ruby/faker/pull/1868) Fix a deprecation warning in unique_generator.rb related to the kwarg [@connorshea](https://github.com/connorshea)
246
+
247
+ ## Update Locales
248
+
249
+ - [PR #1800](https://github.com/faker-ruby/faker/pull/1800) Update diners_club and jcb test cards since they were updated in String [@santib](https://github.com/santib)
250
+ - [PR #1879](https://github.com/faker-ruby/faker/pull/1879) Field changes in da-DK locale [@psibi](https://github.com/psibi)
251
+ - [PR #1878](https://github.com/faker-ruby/faker/pull/1878) Fix name related files in ca locale [@psibi](https://github.com/psibi)
252
+ - [PR #1877](https://github.com/faker-ruby/faker/pull/1877) Fix the path names for bg.yml [@psibi](https://github.com/psibi)
253
+
254
+ ## Update local dependencies
255
+
256
+ - Allow all versions of i18n from 1.6 up to 2 (#1894) [@orien](https://github.com/orien)
257
+ - Update minitest requirement from = 5.13.0 to = 5.14.0 (#1904)
258
+ - Bump i18n from 1.8.1 to 1.8.2 (#1905)
259
+ - Bump i18n from 1.8.0 to 1.8.1 (#1895)
260
+ - Update i18n requirement from >= 1.6, < 1.8 to >= 1.6, < 1.9 (#1893)
261
+ - Update yard requirement from = 0.9.23 to = 0.9.24 (#1892)
262
+ - Update rubocop requirement from = 0.78.0 to = 0.79.0 (#1890)
263
+ - Update yard requirement from = 0.9.22 to = 0.9.23 (#1889)
264
+ - Update yard requirement from = 0.9.20 to = 0.9.22 (#1882)
265
+
266
+ ------------------------------------------------------------------------------
267
+
3
268
  ## [v2.10.0](https://github.com/faker-ruby/faker/tree/v2.10.0) (2019-12-28)
4
269
 
5
270
  This version:
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
  ![logotype a happy-07](https://user-images.githubusercontent.com/36028424/40263395-4318481e-5b44-11e8-92e5-3dcc1ce169b3.png)
3
3
 
4
4
  # Faker
5
- [![Build Status](https://travis-ci.org/faker-ruby/faker.svg?branch=master)](https://travis-ci.org/faker-ruby/faker)
5
+ [![Tests](https://github.com/faker-ruby/faker/workflows/Tests/badge.svg)](https://github.com/faker-ruby/faker/actions?query=workflow%3ATests)
6
6
  [![Gem Version](https://badge.fury.io/rb/faker.svg)](https://badge.fury.io/rb/faker)
7
7
  [![Inline docs](https://inch-ci.org/github/faker-ruby/faker.svg?branch=master)](https://inch-ci.org/github/faker-ruby/faker)
8
8
  [![Test Coverage](https://api.codeclimate.com/v1/badges/ef54c7f9df86e965d64b/test_coverage)](https://codeclimate.com/github/stympy/faker/test_coverage)
@@ -95,7 +95,7 @@ manually set values).
95
95
  # Faker::<generator>.unique.exclude(method, arguments, list)
96
96
 
97
97
  # Add 'azerty' and 'wxcvbn' to the string generator with 6 char length
98
- Faker::Lorem.unique.exclude :string, [6], %w[azerty wxcvbn]
98
+ Faker::Lorem.unique.exclude :string, [number: 6], %w[azerty wxcvbn]
99
99
  ```
100
100
 
101
101
  ### Deterministic Random
@@ -131,6 +131,7 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
131
131
  - [Faker::Avatar](doc/default/avatar.md)
132
132
  - [Faker::Bank](doc/default/bank.md)
133
133
  - [Faker::Beer](doc/default/beer.md)
134
+ - [Faker::Blood](doc/default/blood.md)
134
135
  - [Faker::Boolean](doc/default/boolean.md)
135
136
  - [Faker::BossaNova](doc/default/bossa_nova.md)
136
137
  - [Faker::Business](doc/default/business.md)
@@ -144,6 +145,7 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
144
145
  - [Faker::Commerce](doc/default/commerce.md)
145
146
  - [Faker::Company](doc/default/company.md)
146
147
  - [Faker::Compass](doc/default/compass.md)
148
+ - [Faker::Computer](doc/default/computer.md)
147
149
  - [Faker::Construction](doc/default/construction.md)
148
150
  - [Faker::Cosmere](doc/default/cosmere.md)
149
151
  - [Faker::Crypto](doc/default/crypto.md)
@@ -231,6 +233,7 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
231
233
 
232
234
  ### Games
233
235
  - [Faker::Game](doc/games/game.md)
236
+ - [Faker::Games::DnD](doc/games/dnd.md)
234
237
  - [Faker::Games::Dota](doc/games/dota.md)
235
238
  - [Faker::Games::ElderScrolls](doc/games/elder_scrolls.md)
236
239
  - [Faker::Games::Fallout](doc/games/fallout.md)
@@ -243,6 +246,7 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
243
246
  - [Faker::Games::Pokemon](doc/games/pokemon.md)
244
247
  - [Faker::Games::SonicTheHedgehog](doc/games/sonic_the_hedgehog.md)
245
248
  - [Faker::Games::SuperSmashBros](doc/games/super_smash_bros.md)
249
+ - [Faker::Games::WarhammerFantasy](doc/games/warhammer_fantasy.md)
246
250
  - [Faker::Games::Witcher](doc/games/witcher.md)
247
251
  - [Faker::Games::WorldOfWarcraft](doc/games/world_of_warcraft.md)
248
252
  - [Faker::Games::Zelda](doc/games/zelda.md)
@@ -255,6 +259,7 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
255
259
  ### Movies
256
260
  - [Faker::Movie](doc/movies/movie.md)
257
261
  - [Faker::Movies::BackToTheFuture](doc/movies/back_to_the_future.md)
262
+ - [Faker::Movies::Departed](doc/movies/departed.md)
258
263
  - [Faker::Movies::Ghostbusters](doc/movies/ghostbusters.md)
259
264
  - [Faker::Movies::HarryPotter](doc/movies/harry_potter.md)
260
265
  - [Faker::Movies::HitchhikersGuideToTheGalaxy](doc/movies/hitchhikers_guide_to_the_galaxy.md)
@@ -270,19 +275,25 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
270
275
  - [Faker::Music::GratefulDead](doc/music/grateful_dead.md)
271
276
  - [Faker::Music::Opera](doc/music/opera.md)
272
277
  - [Faker::Music::Phish](doc/music/phish.md)
278
+ - [Faker::Music::Prince](doc/music/prince.md)
273
279
  - [Faker::Music::RockBand](doc/music/rock_band.md)
280
+ - [Faker::Music::Rush](doc/music/rush.md)
274
281
  - [Faker::Music::UmphreysMcgee](doc/music/umphreys_mcgee.md)
275
282
 
276
283
  ### Quotes
277
284
  - [Faker::Quote](doc/quotes/quote.md)
285
+ - [Faker::Quotes::Chiquito](doc/quotes/chiquito.md)
286
+ - [Faker::Quotes::Rajnikanth](doc/quotes/rajnikanth.md)
278
287
  - [Faker::Quotes::Shakespeare](doc/quotes/shakespeare.md)
279
288
 
289
+
280
290
  ### Sports
281
291
  - [Faker::Sports::Basketball](doc/sports/basketball.md)
282
292
  - [Faker::Sports::Football](doc/sports/football.md)
283
293
 
284
294
  ### Tv Shows
285
295
  - [Faker::TvShows::AquaTeenHungerForce](doc/tv_shows/aqua_teen_hunger_force.md)
296
+ - [Faker::TvShows::BigBangTheory](doc/tv_shows/big_bang_theory.md)
286
297
  - [Faker::TvShows::BojackHorseman](doc/tv_shows/bojack_horseman.md)
287
298
  - [Faker::TvShows::BreakingBad](doc/tv_shows/breaking_bad.md)
288
299
  - [Faker::TvShows::Buffy](doc/tv_shows/buffy.md)
@@ -306,6 +317,7 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
306
317
  - [Faker::TvShows::StarTrek](doc/tv_shows/star_trek.md)
307
318
  - [Faker::TvShows::Stargate](doc/tv_shows/stargate.md)
308
319
  - [Faker::TvShows::StrangerThings](doc/tv_shows/stranger_things.md)
320
+ - [Faker::TvShows::Suits](doc/tv_shows/suits.md)
309
321
  - [Faker::TvShows::TheExpanse](doc/tv_shows/the_expanse.md)
310
322
  - [Faker::TvShows::TheFreshPrinceOfBelAir](doc/tv_shows/the_fresh_prince_of_bel_air.md)
311
323
  - [Faker::TvShows::TheITCrowd](doc/tv_shows/the_it_crowd.md)
@@ -2,14 +2,11 @@
2
2
 
3
3
  mydir = __dir__
4
4
 
5
- begin
6
- require 'psych'
7
- end
8
-
5
+ require 'psych'
9
6
  require 'i18n'
10
7
  require 'set' # Fixes a bug in i18n 0.6.11
11
8
 
12
- Dir.glob(File.join(File.dirname(__FILE__), 'helpers', '*.rb')).sort.each { |file| require file }
9
+ Dir.glob(File.join(mydir, 'helpers', '*.rb')).sort.each { |file| require file }
13
10
 
14
11
  I18n.load_path += Dir[File.join(mydir, 'locales', '**/*.yml')]
15
12
  I18n.reload! if I18n.backend.initialized?
@@ -24,7 +21,8 @@ module Faker
24
21
  attr_writer :random
25
22
 
26
23
  def locale
27
- @locale || I18n.locale
24
+ # Because I18n.locale defaults to :en, if we don't have :en in our available_locales, errors will happen
25
+ @locale || (I18n.available_locales.include?(I18n.locale) ? I18n.locale : I18n.available_locales.first)
28
26
  end
29
27
 
30
28
  def own_locale
@@ -132,7 +130,7 @@ module Faker
132
130
  # In either case the information will be retained for reconstruction of the string.
133
131
  text = prefix
134
132
 
135
- # If the class has the method, call it, otherwise fetch the transation
133
+ # If the class has the method, call it, otherwise fetch the translation
136
134
  # (e.g., faker.phone_number.area_code)
137
135
  text += if cls.respond_to?(meth)
138
136
  cls.send(meth)
@@ -217,12 +215,24 @@ module Faker
217
215
  end
218
216
  end
219
217
 
218
+ # Return unique values from the generator every time.
219
+ #
220
+ # @param max_retries [Integer] The max number of retries that should be done before giving up.
221
+ # @return [self]
220
222
  def unique(max_retries = 10_000)
221
223
  @unique ||= UniqueGenerator.new(self, max_retries)
222
224
  end
223
225
 
224
- def sample(list)
225
- list.respond_to?(:sample) ? list.sample(random: Faker::Config.random) : list
226
+ def sample(list, num = nil)
227
+ if list.respond_to?(:sample)
228
+ if num
229
+ list.sample(num, random: Faker::Config.random)
230
+ else
231
+ list.sample(random: Faker::Config.random)
232
+ end
233
+ else
234
+ list
235
+ end
226
236
  end
227
237
 
228
238
  def shuffle(list)
@@ -303,4 +313,4 @@ module Faker
303
313
  end
304
314
 
305
315
  # require faker objects
306
- Dir.glob(File.join(File.dirname(__FILE__), 'faker', '/**/*.rb')).sort.each { |file| require file }
316
+ Dir.glob(File.join(mydir, 'faker', '/**/*.rb')).sort.each { |file| require file }
@@ -102,7 +102,7 @@ module Faker
102
102
  # @return [String]
103
103
  #
104
104
  # @example
105
- # Faker::Address.mail_box #=> "PO Box 123"
105
+ # Faker::Address.mail_box #=> "PO Box 123"
106
106
  #
107
107
  # @faker.version 2.9.1
108
108
  def mail_box
@@ -333,6 +333,36 @@ module Faker
333
333
  def full_address
334
334
  parse('address.full_address')
335
335
  end
336
+
337
+ ##
338
+ # Produces Address hash of required fields
339
+ #
340
+ # @return [Hash]
341
+ #
342
+ # @example
343
+ # Faker::Address.full_address_as_hash(:longitude,
344
+ # :latitude,
345
+ # :country_name_to_code,
346
+ # country_name_to_code: {name: 'united_states'})
347
+ # #=> {:longitude=>-101.74428917174603, :latitude=>-37.40056749089944, :country_name_to_code=>"US"}
348
+ #
349
+ # Faker::Address.full_address_as_hash(:full_address)
350
+ # #=> {:full_address=>"87635 Rice Street, Lake Brentonton, OR 61896-5968"}
351
+ #
352
+ # Faker::Address.full_address_as_hash(:city, :time_zone)
353
+ # #=> {:city=>"East Faustina", :time_zone=>"America/Mexico_City"}
354
+ #
355
+ # Faker::Address.full_address_as_hash(:street_address, street_address: {include_secondary: true})
356
+ # #=> {:street_address=>"29423 Kenneth Causeway Suite 563"}
357
+ #
358
+ # @faker.version 2.13.0
359
+ def full_address_as_hash(*attrs, **attrs_params)
360
+ attrs.map!(&:to_sym)
361
+ attrs_params.transform_keys!(&:to_sym)
362
+ attrs.map do |attr|
363
+ { "#{attr}": attrs_params[attr] ? send(attr, **attrs_params[attr]) : send(attr) }
364
+ end.reduce({}, :merge)
365
+ end
336
366
  end
337
367
  end
338
368
  end