faker 2.9.0 → 2.12.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 +231 -0
- data/README.md +12 -3
- data/lib/faker.rb +21 -14
- data/lib/faker/default/address.rb +13 -0
- data/lib/faker/default/bank.rb +80 -1
- 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/commerce.rb +73 -10
- data/lib/faker/default/company.rb +275 -4
- 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/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/hipster.rb +94 -0
- data/lib/faker/default/internet.rb +29 -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/measurement.rb +90 -0
- data/lib/faker/default/name.rb +83 -0
- data/lib/faker/default/omniauth.rb +47 -47
- 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/games/control.rb +113 -0
- data/lib/faker/games/dnd.rb +61 -0
- data/lib/faker/games/warhammer_fantasy.rb +74 -0
- data/lib/faker/movies/departed.rb +49 -0
- data/lib/faker/music/music.rb +90 -4
- data/lib/faker/music/opera.rb +36 -0
- data/lib/faker/music/pearl_jam.rb +50 -0
- data/lib/faker/music/phish.rb +27 -1
- 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/suits.rb +37 -0
- data/lib/faker/version.rb +1 -1
- data/lib/helpers/char.rb +2 -1
- 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 +132 -8
- data/lib/locales/en-US.yml +29 -3
- data/lib/locales/en-ZA.yml +1 -1
- data/lib/locales/en/address.yml +6 -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/heroes_of_the_storm.yml +1 -1
- data/lib/locales/en/house.yml +1 -1
- data/lib/locales/en/name.yml +1 -1
- 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/phone_number.yml +1 -1
- data/lib/locales/en/rajnikanth.yml +77 -0
- data/lib/locales/en/shakespeare.yml +3 -3
- data/lib/locales/en/show.yml +597 -0
- data/lib/locales/en/star_wars.yml +568 -221
- 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 +37 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e07357f193be20c639621339c209b48ee1a99bb64528e2f3d2c4b61afed8b8b
|
4
|
+
data.tar.gz: 39d54382315e2fd6abe4b8275b5bee60c832ef2b045ae16bba46e82233ab7697
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16d0fdaf172d74ffa7c1cd1ae88e55801313f779e1d2be385941ec7dfa9b2922dacd104406eaa5f060545bbd3b33c840fa9f72f90637e3dc045d70706ab57a61
|
7
|
+
data.tar.gz: 5589900168ed8cb068fc6682751f1bc8edf6cbe6d8afc191aaf8668af05ee08edfeebb02e446748a18104623fe09f4205206dbc1b2600c732f3a7abc1d46d556
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,236 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## [v2.12.0](https://github.com/faker-ruby/faker/tree/v2.12.0) (2020-05-31)
|
4
|
+
|
5
|
+
This version:
|
6
|
+
- adds several YARD docs
|
7
|
+
- fixes some locale issues
|
8
|
+
- fixes a few bugs in Faker generators
|
9
|
+
- improves code quality
|
10
|
+
- adds a few generators for Movies, Music and TV Shows
|
11
|
+
- updates local dependencies
|
12
|
+
|
13
|
+
## Bug/Fixes
|
14
|
+
|
15
|
+
- [PR #2019](https://github.com/faker-ruby/faker/pull/2019) Update 'prepare' regexp to allow hyphen [@jbergenson](https://github.com/jbergenson)
|
16
|
+
- [PR #2012](https://github.com/faker-ruby/faker/pull/2012) Add else condition to prevent false positive [@jbergenson](https://github.com/jbergenson)
|
17
|
+
- [PR #1985](https://github.com/faker-ruby/faker/pull/1985) Fix an error for `Faker::Computer.os` [@koic](https://github.com/koic)
|
18
|
+
- [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)
|
19
|
+
|
20
|
+
## Chores
|
21
|
+
|
22
|
+
- [PR #1988](https://github.com/faker-ruby/faker/pull/1988) Removing meaningless begin and end [@amatsuda](https://github.com/amatsuda)
|
23
|
+
- [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)
|
24
|
+
|
25
|
+
## Documentation
|
26
|
+
|
27
|
+
- [PR #2022](https://github.com/faker-ruby/faker/pull/2022) Add YARD docs to `Faker::Invoice` [@danielTiringer](https://github.com/danielTiringer)
|
28
|
+
- [PR #2021](https://github.com/faker-ruby/faker/pull/2021) Add YARD docs to `Faker::Hipster` [@danielTiringer](https://github.com/danielTiringer)
|
29
|
+
- [PR #2020](https://github.com/faker-ruby/faker/pull/2020) Add YARD docs to `Faker::Measurement` [@danielTiringer](https://github.com/danielTiringer)
|
30
|
+
- [PR #2017](https://github.com/faker-ruby/faker/pull/2017) Fix docs for `Faker::Games::Control.altered_world_event` [@Zeragamba](https://github.com/Zeragamba)
|
31
|
+
- [PR #2016](https://github.com/faker-ruby/faker/pull/2016) Fix yard documentation issues [@danielTiringer](https://github.com/danielTiringer)
|
32
|
+
- [PR #2015](https://github.com/faker-ruby/faker/pull/2015) Add YARD docs to `Faker::Quotes` [@danielTiringer](https://github.com/danielTiringer)
|
33
|
+
- [PR #2011](https://github.com/faker-ruby/faker/pull/2011) Update `star_wars.yml` [@garrettmichaelgeorge](https://github.com/garrettmichaelgeorge)
|
34
|
+
- [PR #2010](https://github.com/faker-ruby/faker/pull/2010) Add missing links in README.md [@Naokimi](https://github.com/Naokimi)
|
35
|
+
- [PR #2009](https://github.com/faker-ruby/faker/pull/2009) Add YARD docs to `Faker::Placeholdit` [@danielTiringer](https://github.com/danielTiringer)
|
36
|
+
- [PR #2008](https://github.com/faker-ruby/faker/pull/2008) Add YARD docs to `Faker::Verb` [@danielTiringer](https://github.com/danielTiringer)
|
37
|
+
- [PR #2007](https://github.com/faker-ruby/faker/pull/2007) Add YARD docs to `Faker::Phone_Number` [@danielTiringer](https://github.com/danielTiringer)
|
38
|
+
- [PR #2004](https://github.com/faker-ruby/faker/pull/2004) Add YARD docs to `Faker::String` [@danielTiringer](https://github.com/danielTiringer)
|
39
|
+
- [PR #2001](https://github.com/faker-ruby/faker/pull/2001) Add YARD docs to `Faker::South_Africa` [@danielTiringer](https://github.com/danielTiringer)
|
40
|
+
- [PR #2000](https://github.com/faker-ruby/faker/pull/2000) Add YARD docs to `Faker::JSON` [@danielTiringer](https://github.com/danielTiringer)
|
41
|
+
- [PR #1999](https://github.com/faker-ruby/faker/pull/1999) Add YARD docs to `Faker::Types` [@danielTiringer](https://github.com/danielTiringer)
|
42
|
+
- [PR #1998](https://github.com/faker-ruby/faker/pull/1998) Add YARD docs to `Faker::Finance` [@danielTiringer](https://github.com/danielTiringer)
|
43
|
+
- [PR #1997](https://github.com/faker-ruby/faker/pull/1997) Add YARD docs to `Faker::Driving_Licence` [@danielTiringer](https://github.com/danielTiringer)
|
44
|
+
- [PR #1996](https://github.com/faker-ruby/faker/pull/1996) Add YARD docs to `Crypto Coin` [@danielTiringer](https://github.com/danielTiringer)
|
45
|
+
- [PR #1995](https://github.com/faker-ruby/faker/pull/1995) Add YARD docs to `Faker::Commerce` [@danielTiringer](https://github.com/danielTiringer)
|
46
|
+
- [PR #1993](https://github.com/faker-ruby/faker/pull/1993) Add YARD docs to `Faker::Vehicle` [@danielTiringer](https://github.com/danielTiringer)
|
47
|
+
- [PR #1990](https://github.com/faker-ruby/faker/pull/1990) Add YARD docs to `Faker::File` [@danielTiringer](https://github.com/danielTiringer)
|
48
|
+
- [PR #1989](https://github.com/faker-ruby/faker/pull/1989) Add YARD docs to `Faker::Bank` [@danielTiringer](https://github.com/danielTiringer)
|
49
|
+
- [PR #1984](https://github.com/faker-ruby/faker/pull/1984) Minor documentation fix for `Faker::University` [@Zeragamba](https://github.com/Zeragamba)
|
50
|
+
- [PR #1983](https://github.com/faker-ruby/faker/pull/1983) Add YARD docs to `Faker::Twitter` [@danielTiringer](https://github.com/danielTiringer)
|
51
|
+
- [PR #1982](https://github.com/faker-ruby/faker/pull/1982) Add YARD docs to `Faker::Cosmere` [@danielTiringer](https://github.com/danielTiringer)
|
52
|
+
- [PR #1981](https://github.com/faker-ruby/faker/pull/1981) Add YARD docs to `Faker::Stripe` [@danielTiringer](https://github.com/danielTiringer)
|
53
|
+
- [PR #1980](https://github.com/faker-ruby/faker/pull/1980) Add YARD docs to `Faker::Construction` [@danielTiringer](https://github.com/danielTiringer)
|
54
|
+
- [PR #1976](https://github.com/faker-ruby/faker/pull/1976) Add YARD docs to `Faker::Name` [@danielTiringer](https://github.com/danielTiringer)
|
55
|
+
- [PR #1975](https://github.com/faker-ruby/faker/pull/1975) Add YARD docs to `Faker::Compass` [@danielTiringer](https://github.com/danielTiringer)
|
56
|
+
- [PR #1959](https://github.com/faker-ruby/faker/pull/1959) Add YARD docs to `Faker::University` [@danielTiringer](https://github.com/danielTiringer)
|
57
|
+
- [PR #1956](https://github.com/faker-ruby/faker/pull/1956) Add YARD docs to `Faker::SlackEmoji` [@rutger-t](https://github.com/rutger-t)
|
58
|
+
- [PR #1943](https://github.com/faker-ruby/faker/pull/1943) Update documentation for unique.exclude [@mtancoigne](https://github.com/mtancoigne)
|
59
|
+
- [PR #1925](https://github.com/faker-ruby/faker/pull/1925) AdD `Faker::Game::WarhammerFantasy` [@sotek222](https://github.com/sotek222)
|
60
|
+
|
61
|
+
## Feature Request
|
62
|
+
|
63
|
+
- [PR #2025](https://github.com/faker-ruby/faker/pull/2025) Add `Faker::TvShows::Suits` [@ash-elangovan](https://github.com/ash-elangovan)
|
64
|
+
- [PR #2024](https://github.com/faker-ruby/faker/pull/2024) Added Phish Albums and Musicians [@zfine416](https://github.com/zfine416)
|
65
|
+
- [PR #2013](https://github.com/faker-ruby/faker/pull/2013) Add `Faker::Games::Control` [@Zeragamba](https://github.com/Zeragamba)
|
66
|
+
- [PR #1994](https://github.com/faker-ruby/faker/pull/1994) Enable Ruby testing github workflow [@Zeragamba](https://github.com/Zeragamba)
|
67
|
+
- [PR #1966](https://github.com/faker-ruby/faker/pull/1966) Add `Faker::Games:DnD` [@Naokimi](https://github.com/Naokimi)
|
68
|
+
- [PR #1962](https://github.com/faker-ruby/faker/pull/1962) Adding Pearl Jam to the Music module [@briri](https://github.com/briri)
|
69
|
+
- [PR #1960](https://github.com/faker-ruby/faker/pull/1960) Added `Faker::Blood` [@suraj32](https://github.com/suraj32)
|
70
|
+
- [PR #1931](https://github.com/faker-ruby/faker/pull/1931) Add `Faker::Movies::Departed` Class [@jaebradley](https://github.com/jaebradley)
|
71
|
+
- [PR #1696](https://github.com/faker-ruby/faker/pull/1696) Add Bibles class with King James subclass [@jbergenson](https://github.com/jbergenson)
|
72
|
+
- [PR #1485](https://github.com/faker-ruby/faker/pull/1485) Plays and musicals [@armandofox](https://github.com/armandofox)
|
73
|
+
|
74
|
+
## Update locales
|
75
|
+
|
76
|
+
- [PR #2014](https://github.com/faker-ruby/faker/pull/2014) Make locale self-contained [@psibi](https://github.com/psibi)
|
77
|
+
- [PR #1986](https://github.com/faker-ruby/faker/pull/1986) Added quotations to Shirahoshi [@iavivai](https://github.com/iavivai)
|
78
|
+
- [PR #1973](https://github.com/faker-ruby/faker/pull/1973) Fix mis-quotations [@kayhide](https://github.com/kayhide)
|
79
|
+
- [PR #1967](https://github.com/faker-ruby/faker/pull/1967) ko locale updates [@jae57](https://github.com/jae57)
|
80
|
+
- [PR #1964](https://github.com/faker-ruby/faker/pull/1964) en-AU locale updates [@mattman](https://github.com/mattman)
|
81
|
+
- [PR #1948](https://github.com/faker-ruby/faker/pull/1948) Add `Faker::Computer` [@cmcramer](https://github.com/cmcramer)
|
82
|
+
|
83
|
+
## Update local dependencies
|
84
|
+
|
85
|
+
- Update minitest requirement from = 5.14.0 to = 5.14.1 (#1987)
|
86
|
+
- Update rubocop requirement from = 0.80.1 to = 0.81.0 (#1955)
|
87
|
+
- Update pry requirement from = 0.13.0 to = 0.13.1 (#1963)
|
88
|
+
- Update yard requirement from = 0.9.24 to = 0.9.25 (#1970)
|
89
|
+
|
90
|
+
------------------------------------------------------------------------------
|
91
|
+
|
92
|
+
## [v2.11.0](https://github.com/faker-ruby/faker/tree/v2.11.0) (2020-03-24)
|
93
|
+
|
94
|
+
## Bug/Fixes
|
95
|
+
|
96
|
+
- [PR #1938](https://github.com/faker-ruby/faker/pull/1938) Fix omniauth consistency [@DouglasLutz](https://github.com/DouglasLutz)
|
97
|
+
|
98
|
+
## Documentation
|
99
|
+
|
100
|
+
- [PR #1949](https://github.com/faker-ruby/faker/pull/1949) Add YARD doc for Faker::Cannabis [@mashuDuek](https://github.com/mashuDuek)
|
101
|
+
- [PR #1944](https://github.com/faker-ruby/faker/pull/1944) Add YARD docs for Faker::FunnyName [@curriecode](https://github.com/curriecode)
|
102
|
+
- [PR #1935](https://github.com/faker-ruby/faker/pull/1935) Add YARD docs for the unique method [@connorshea](https://github.com/connorshea)
|
103
|
+
|
104
|
+
## Feature Request
|
105
|
+
|
106
|
+
- [PR #1946](https://github.com/faker-ruby/faker/pull/1946) Add Faker::Rajnikanth [@wolwire](https://github.com/wolwire)
|
107
|
+
- [PR #1940](https://github.com/faker-ruby/faker/pull/1940) Add Faker::Quotes::Chiquito [@jantequera](https://github.com/jantequera)
|
108
|
+
- [PR #1883](https://github.com/faker-ruby/faker/pull/1883) add Internet#base64 [@cyrilchampier](https://github.com/cyrilchampier)
|
109
|
+
|
110
|
+
## Update locales
|
111
|
+
|
112
|
+
- [PR #1945](https://github.com/faker-ruby/faker/pull/1945) Remove female first name 'Miss' [@ags](https://github.com/ags)
|
113
|
+
- [PR #1929](https://github.com/faker-ruby/faker/pull/1929) Fixed mobile prefixes for en-GB locale [@SamHart91](https://github.com/SamHart91)
|
114
|
+
|
115
|
+
## Update local dependencies
|
116
|
+
|
117
|
+
- Update pry requirement from = 0.12.2 to = 0.13.0 (#1951)
|
118
|
+
- Update rubocop requirement from = 0.80.0 to = 0.80.1 (#1941)
|
119
|
+
- Update rubocop requirement from = 0.79.0 to = 0.80.0 (#1937)
|
120
|
+
|
121
|
+
------------------------------------------------------------------------------
|
122
|
+
|
123
|
+
## [v2.10.2](https://github.com/faker-ruby/faker/tree/v2.10.2) (2020-02-15)
|
124
|
+
|
125
|
+
This version:
|
126
|
+
- adds a few YARD docs
|
127
|
+
- fixes locales
|
128
|
+
- updates local dependencies
|
129
|
+
|
130
|
+
## Chores
|
131
|
+
|
132
|
+
- [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)
|
133
|
+
|
134
|
+
## Documentation
|
135
|
+
|
136
|
+
- [PR #1913](https://github.com/faker-ruby/faker/pull/1913) Add YARD docs for Faker::DcComics [@ash-elangovan](https://github.com/ash-elangovan)
|
137
|
+
|
138
|
+
## Update locales
|
139
|
+
|
140
|
+
- [PR #1934](https://github.com/faker-ruby/faker/pull/1934) Add street_address for en-nz locale [@psibi](https://github.com/psibi)
|
141
|
+
- [PR #1933](https://github.com/faker-ruby/faker/pull/1933) Make id locale consistent. [@psibi](https://github.com/psibi)
|
142
|
+
- [PR #1930](https://github.com/faker-ruby/faker/pull/1930) Remove spaces before apostrophes [@jrmhaig](https://github.com/jrmhaig)
|
143
|
+
- [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)
|
144
|
+
- [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)
|
145
|
+
- [PR #1921](https://github.com/faker-ruby/faker/pull/1921) uk locale fix: Make empty fields consistent [@psibi](https://github.com/psibi)
|
146
|
+
- [PR #1920](https://github.com/faker-ruby/faker/pull/1920) pt locale fix: Make city fields consistent with other [@psibi](https://github.com/psibi)
|
147
|
+
- [PR #1918](https://github.com/faker-ruby/faker/pull/1918) Make Japanese Lorem sentences look more natural [@rastamhadi](https://github.com/rastamhadi)
|
148
|
+
- [PR #1915](https://github.com/faker-ruby/faker/pull/1915) Add yard docs for Faker::Company [@kos31de](https://github.com/kos31de)
|
149
|
+
- [PR #1914](https://github.com/faker-ruby/faker/pull/1914) Data source fix for ha locale [@psibi](https://github.com/psibi)
|
150
|
+
- [PR #1911](https://github.com/faker-ruby/faker/pull/1911) Removed duplicate value [@ash-elangovan](https://github.com/ash-elangovan)
|
151
|
+
- [PR #1908](https://github.com/faker-ruby/faker/pull/1908) Add more colors [@tomcol](https://github.com/tomcol)
|
152
|
+
- [PR #1903](https://github.com/faker-ruby/faker/pull/1903) fr locale: pokemon's root key should be games [@connorshea](https://github.com/connorshea)
|
153
|
+
- [PR #1902](https://github.com/faker-ruby/faker/pull/1902) Remove empty string in phone_number formats [@psibi](https://github.com/psibi)
|
154
|
+
- [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)
|
155
|
+
- [PR #1900](https://github.com/faker-ruby/faker/pull/1900) Use postcode for en-ZA [@psibi](https://github.com/psibi)
|
156
|
+
- [PR #1899](https://github.com/faker-ruby/faker/pull/1899) Locale root name should be en-NEP [@psibi](https://github.com/psibi)
|
157
|
+
- [PR #1812](https://github.com/faker-ruby/faker/pull/1812) Add vat number rule for es-MX [@arandilopez](https://github.com/arandilopez)
|
158
|
+
|
159
|
+
## Update local dependencies
|
160
|
+
|
161
|
+
- Update test-unit requirement from = 3.3.4 to = 3.3.5 (#1896)
|
162
|
+
|
163
|
+
------------------------------------------------------------------------------
|
164
|
+
|
165
|
+
## [v2.10.1](https://github.com/faker-ruby/faker/tree/v2.10.1) (2020-01-13)
|
166
|
+
|
167
|
+
This version:
|
168
|
+
- fixes locales
|
169
|
+
- updates local dependencies
|
170
|
+
- fixes warnings
|
171
|
+
|
172
|
+
## Bug/Fixes
|
173
|
+
|
174
|
+
- [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)
|
175
|
+
|
176
|
+
## Update Locales
|
177
|
+
|
178
|
+
- [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)
|
179
|
+
- [PR #1879](https://github.com/faker-ruby/faker/pull/1879) Field changes in da-DK locale [@psibi](https://github.com/psibi)
|
180
|
+
- [PR #1878](https://github.com/faker-ruby/faker/pull/1878) Fix name related files in ca locale [@psibi](https://github.com/psibi)
|
181
|
+
- [PR #1877](https://github.com/faker-ruby/faker/pull/1877) Fix the path names for bg.yml [@psibi](https://github.com/psibi)
|
182
|
+
|
183
|
+
## Update local dependencies
|
184
|
+
|
185
|
+
- Allow all versions of i18n from 1.6 up to 2 (#1894) [@orien](https://github.com/orien)
|
186
|
+
- Update minitest requirement from = 5.13.0 to = 5.14.0 (#1904)
|
187
|
+
- Bump i18n from 1.8.1 to 1.8.2 (#1905)
|
188
|
+
- Bump i18n from 1.8.0 to 1.8.1 (#1895)
|
189
|
+
- Update i18n requirement from >= 1.6, < 1.8 to >= 1.6, < 1.9 (#1893)
|
190
|
+
- Update yard requirement from = 0.9.23 to = 0.9.24 (#1892)
|
191
|
+
- Update rubocop requirement from = 0.78.0 to = 0.79.0 (#1890)
|
192
|
+
- Update yard requirement from = 0.9.22 to = 0.9.23 (#1889)
|
193
|
+
- Update yard requirement from = 0.9.20 to = 0.9.22 (#1882)
|
194
|
+
|
195
|
+
------------------------------------------------------------------------------
|
196
|
+
|
197
|
+
## [v2.10.0](https://github.com/faker-ruby/faker/tree/v2.10.0) (2019-12-28)
|
198
|
+
|
199
|
+
This version:
|
200
|
+
- adds `Faker::Address.mail_box`
|
201
|
+
- adds YARD docs
|
202
|
+
- fix Ruby 2.7 warnings
|
203
|
+
- adds other minor changes
|
204
|
+
|
205
|
+
## Bug/Fixes
|
206
|
+
|
207
|
+
- [PR #1876](https://github.com/faker-ruby/faker/pull/1876) Fix Ruby 2.7 deprecation warnings for the translate method. [@connorshea](https://github.com/connorshea)
|
208
|
+
- [PR #1867](https://github.com/faker-ruby/faker/pull/1867) Fix tests failing on Ruby 2.7 [@connorshea](https://github.com/connorshea)
|
209
|
+
|
210
|
+
## Chores
|
211
|
+
|
212
|
+
- [PR #1866](https://github.com/faker-ruby/faker/pull/1866) Upgrade the Gemfile.lock to Bundler 2. [@connorshea](https://github.com/connorshea)
|
213
|
+
|
214
|
+
## Documentation
|
215
|
+
|
216
|
+
- [PR #1873](https://github.com/faker-ruby/faker/pull/1873) Add YARD docs for `Faker::Music{,::Opera}` [@jas14](https://github.com/jas14)
|
217
|
+
- [PR #1862](https://github.com/faker-ruby/faker/pull/1862) Update phone number documentation [@aVigorousDev](https://github.com/aVigorousDev)
|
218
|
+
|
219
|
+
## Feature Request
|
220
|
+
|
221
|
+
- [PR #1875](https://github.com/faker-ruby/faker/pull/1875) Add Ruby 2.7 to the CI test matrix. [@connorshea](https://github.com/connorshea)
|
222
|
+
- [PR #1568](https://github.com/faker-ruby/faker/pull/1568) Add `Faker::Address.mail_box` and some NZ locale updates [@mermop](https://github.com/mermop)
|
223
|
+
|
224
|
+
## Refactoring
|
225
|
+
|
226
|
+
- [PR #1874](https://github.com/faker-ruby/faker/pull/1874) Extract constants in `Faker::Music` [@jas14](https://github.com/jas14)
|
227
|
+
|
228
|
+
## Update local dependencies
|
229
|
+
|
230
|
+
Update rubocop requirement from = 0.77.0 to = 0.78.0 (#1869)
|
231
|
+
|
232
|
+
------------------------------------------------------------------------------
|
233
|
+
|
3
234
|
## [v2.9.0](https://github.com/faker-ruby/faker/tree/v2.9.0) (2019-12-16)
|
4
235
|
|
5
236
|
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
|
-
[![
|
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)
|
@@ -43,7 +43,7 @@ development.
|
|
43
43
|
|
44
44
|
### NOTE
|
45
45
|
* While Faker generates data at random, returned values are not guaranteed to be unique by default.
|
46
|
-
You must
|
46
|
+
You must explicitly specify when you require unique values, see [details](#ensuring-unique-values).
|
47
47
|
Values also can be deterministic if you use the deterministic feature, see [details](#deterministic-random)
|
48
48
|
* This is the `master` branch of Faker and may contain changes that are not yet released.
|
49
49
|
Please refer the README of your version for the available methods.
|
@@ -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)
|
@@ -275,8 +280,11 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
|
|
275
280
|
|
276
281
|
### Quotes
|
277
282
|
- [Faker::Quote](doc/quotes/quote.md)
|
283
|
+
- [Faker::Quotes::Chiquito](doc/quotes/chiquito.md)
|
284
|
+
- [Faker::Quotes::Rajnikanth](doc/quotes/rajnikanth.md)
|
278
285
|
- [Faker::Quotes::Shakespeare](doc/quotes/shakespeare.md)
|
279
286
|
|
287
|
+
|
280
288
|
### Sports
|
281
289
|
- [Faker::Sports::Basketball](doc/sports/basketball.md)
|
282
290
|
- [Faker::Sports::Football](doc/sports/football.md)
|
@@ -306,6 +314,7 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
|
|
306
314
|
- [Faker::TvShows::StarTrek](doc/tv_shows/star_trek.md)
|
307
315
|
- [Faker::TvShows::Stargate](doc/tv_shows/stargate.md)
|
308
316
|
- [Faker::TvShows::StrangerThings](doc/tv_shows/stranger_things.md)
|
317
|
+
- [Faker::TvShows::Suits](doc/tv_shows/suits.md)
|
309
318
|
- [Faker::TvShows::TheExpanse](doc/tv_shows/the_expanse.md)
|
310
319
|
- [Faker::TvShows::TheFreshPrinceOfBelAir](doc/tv_shows/the_fresh_prince_of_bel_air.md)
|
311
320
|
- [Faker::TvShows::TheITCrowd](doc/tv_shows/the_it_crowd.md)
|
data/lib/faker.rb
CHANGED
@@ -2,14 +2,11 @@
|
|
2
2
|
|
3
3
|
mydir = __dir__
|
4
4
|
|
5
|
-
|
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(
|
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?
|
@@ -132,7 +129,7 @@ module Faker
|
|
132
129
|
# In either case the information will be retained for reconstruction of the string.
|
133
130
|
text = prefix
|
134
131
|
|
135
|
-
# If the class has the method, call it, otherwise fetch the
|
132
|
+
# If the class has the method, call it, otherwise fetch the translation
|
136
133
|
# (e.g., faker.phone_number.area_code)
|
137
134
|
text += if cls.respond_to?(meth)
|
138
135
|
cls.send(meth)
|
@@ -151,20 +148,18 @@ module Faker
|
|
151
148
|
|
152
149
|
# Call I18n.translate with our configured locale if no
|
153
150
|
# locale is specified
|
154
|
-
def translate(*args)
|
155
|
-
opts = args.last.is_a?(Hash) ? args.pop : {}
|
151
|
+
def translate(*args, **opts)
|
156
152
|
opts[:locale] ||= Faker::Config.locale
|
157
153
|
opts[:raise] = true
|
158
|
-
I18n.translate(*args
|
154
|
+
I18n.translate(*args, **opts)
|
159
155
|
rescue I18n::MissingTranslationData
|
160
|
-
opts = args.last.is_a?(Hash) ? args.pop : {}
|
161
156
|
opts[:locale] = :en
|
162
157
|
|
163
158
|
# Super-simple fallback -- fallback to en if the
|
164
159
|
# translation was missing. If the translation isn't
|
165
160
|
# in en either, then it will raise again.
|
166
161
|
disable_enforce_available_locales do
|
167
|
-
I18n.translate(*args
|
162
|
+
I18n.translate(*args, **opts)
|
168
163
|
end
|
169
164
|
end
|
170
165
|
|
@@ -219,12 +214,24 @@ module Faker
|
|
219
214
|
end
|
220
215
|
end
|
221
216
|
|
217
|
+
# Return unique values from the generator every time.
|
218
|
+
#
|
219
|
+
# @param max_retries [Integer] The max number of retries that should be done before giving up.
|
220
|
+
# @return [self]
|
222
221
|
def unique(max_retries = 10_000)
|
223
222
|
@unique ||= UniqueGenerator.new(self, max_retries)
|
224
223
|
end
|
225
224
|
|
226
|
-
def sample(list)
|
227
|
-
list.respond_to?(:sample)
|
225
|
+
def sample(list, num = nil)
|
226
|
+
if list.respond_to?(:sample)
|
227
|
+
if num
|
228
|
+
list.sample(num, random: Faker::Config.random)
|
229
|
+
else
|
230
|
+
list.sample(random: Faker::Config.random)
|
231
|
+
end
|
232
|
+
else
|
233
|
+
list
|
234
|
+
end
|
228
235
|
end
|
229
236
|
|
230
237
|
def shuffle(list)
|
@@ -305,4 +312,4 @@ module Faker
|
|
305
312
|
end
|
306
313
|
|
307
314
|
# require faker objects
|
308
|
-
Dir.glob(File.join(
|
315
|
+
Dir.glob(File.join(mydir, 'faker', '/**/*.rb')).sort.each { |file| require file }
|
@@ -96,6 +96,19 @@ module Faker
|
|
96
96
|
parse('address.community')
|
97
97
|
end
|
98
98
|
|
99
|
+
##
|
100
|
+
#
|
101
|
+
# Produces a mail box number.
|
102
|
+
# @return [String]
|
103
|
+
#
|
104
|
+
# @example
|
105
|
+
# Faker::Address.mail_box #=> "PO Box 123"
|
106
|
+
#
|
107
|
+
# @faker.version 2.9.1
|
108
|
+
def mail_box
|
109
|
+
bothify(fetch('address.mail_box'))
|
110
|
+
end
|
111
|
+
|
99
112
|
##
|
100
113
|
# Produces a Zip Code.
|
101
114
|
#
|
data/lib/faker/default/bank.rb
CHANGED
@@ -5,6 +5,17 @@ module Faker
|
|
5
5
|
flexible :bank
|
6
6
|
|
7
7
|
class << self
|
8
|
+
##
|
9
|
+
# Produces a bank account number.
|
10
|
+
#
|
11
|
+
# @param digits [Integer] Number of digits that the generated account number should have.
|
12
|
+
# @return [String]
|
13
|
+
#
|
14
|
+
# @example
|
15
|
+
# Faker::Bank.account_number #=> 6738582379
|
16
|
+
# Faker::Bank.account_number(digits: 13) #=> 673858237902
|
17
|
+
#
|
18
|
+
# @faker.version 1.9.1
|
8
19
|
def account_number(legacy_digits = NOT_GIVEN, digits: 10)
|
9
20
|
warn_for_deprecated_arguments do |keywords|
|
10
21
|
keywords << :digits if legacy_digits != NOT_GIVEN
|
@@ -17,8 +28,19 @@ module Faker
|
|
17
28
|
output[0...digits]
|
18
29
|
end
|
19
30
|
|
31
|
+
##
|
32
|
+
# Produces a bank iban number.
|
33
|
+
#
|
34
|
+
# @param country_code [String] Specifies what country prefix is used to generate the iban code.
|
35
|
+
# @return [String]
|
36
|
+
#
|
37
|
+
# @example
|
38
|
+
# Faker::Bank.iban #=> "GB76DZJM33188515981979"
|
39
|
+
# Faker::Bank.iban(country_code: "be") #=> "BE6375388567752043"
|
40
|
+
#
|
41
|
+
# @faker.version 1.7.0
|
20
42
|
def iban(legacy_country_code = NOT_GIVEN, country_code: 'GB')
|
21
|
-
# Each country has
|
43
|
+
# Each country has its own format for bank accounts
|
22
44
|
# Many of them use letters in certain parts of the account
|
23
45
|
# Using regex patterns we can create virtually any type of bank account
|
24
46
|
warn_for_deprecated_arguments do |keywords|
|
@@ -38,22 +60,72 @@ module Faker
|
|
38
60
|
country_code.upcase + iban_checksum(country_code, account) + account
|
39
61
|
end
|
40
62
|
|
63
|
+
##
|
64
|
+
# Produces a bank name.
|
65
|
+
#
|
66
|
+
# @return [String]
|
67
|
+
#
|
68
|
+
# @example
|
69
|
+
# Faker::Bank.name #=> "ABN AMRO CORPORATE FINANCE LIMITED"
|
70
|
+
#
|
71
|
+
# @faker.version 1.7.0
|
41
72
|
def name
|
42
73
|
fetch('bank.name')
|
43
74
|
end
|
44
75
|
|
76
|
+
##
|
77
|
+
# Produces a routing number.
|
78
|
+
#
|
79
|
+
# @return [String]
|
80
|
+
#
|
81
|
+
# @example
|
82
|
+
# Faker::Bank.routing_number #=> "729343831"
|
83
|
+
#
|
84
|
+
# @faker.version 1.9.1
|
45
85
|
def routing_number
|
46
86
|
valid_routing_number
|
47
87
|
end
|
48
88
|
|
89
|
+
##
|
90
|
+
# Produces a valid routing number.
|
91
|
+
#
|
92
|
+
# @return [String]
|
93
|
+
#
|
94
|
+
# @example
|
95
|
+
# Faker::Bank.routing_number #=> "729343831"
|
96
|
+
#
|
97
|
+
# @faker.version 1.9.1
|
49
98
|
def routing_number_with_format
|
50
99
|
compile_fraction(valid_routing_number)
|
51
100
|
end
|
52
101
|
|
102
|
+
##
|
103
|
+
# Produces a swift / bic number.
|
104
|
+
#
|
105
|
+
# @return [String]
|
106
|
+
#
|
107
|
+
# @example
|
108
|
+
# Faker::Bank.swift_bic #=> "AAFMGB21"
|
109
|
+
#
|
110
|
+
# @faker.version 1.7.0
|
53
111
|
def swift_bic
|
54
112
|
fetch('bank.swift_bic')
|
55
113
|
end
|
56
114
|
|
115
|
+
##
|
116
|
+
# Produces an Australian BSB (Bank-State-Branch) number
|
117
|
+
#
|
118
|
+
# @return [String]
|
119
|
+
#
|
120
|
+
# @example
|
121
|
+
# Faker::Bank.bsb_number
|
122
|
+
# #=> "036616"
|
123
|
+
#
|
124
|
+
# @faker.version next
|
125
|
+
def bsb_number
|
126
|
+
compile_bsb_number
|
127
|
+
end
|
128
|
+
|
57
129
|
private
|
58
130
|
|
59
131
|
def checksum(num_string)
|
@@ -72,6 +144,13 @@ module Faker
|
|
72
144
|
routing_num
|
73
145
|
end
|
74
146
|
|
147
|
+
def compile_bsb_number
|
148
|
+
digit_one_two = %w[01 03 06 08 11 12 73 76 78 30]
|
149
|
+
state = (2..7).to_a.map(&:to_s).sample
|
150
|
+
bsb_num = digit_one_two.sample + state + rand_numstring + rand_numstring + rand_numstring
|
151
|
+
bsb_num
|
152
|
+
end
|
153
|
+
|
75
154
|
# Calculates the mandatory checksum in 3rd and 4th characters in IBAN format
|
76
155
|
# source: https://en.wikipedia.org/wiki/International_Bank_Account_Number#Validating_the_IBAN
|
77
156
|
def iban_checksum(country_code, account)
|