faker 2.11.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +160 -0
- data/README.md +11 -2
- data/lib/faker.rb +16 -10
- data/lib/faker/default/address.rb +31 -1
- data/lib/faker/default/bank.rb +79 -0
- data/lib/faker/default/blood.rb +48 -0
- data/lib/faker/default/business.rb +1 -1
- data/lib/faker/default/chile_rut.rb +44 -1
- data/lib/faker/default/commerce.rb +73 -10
- data/lib/faker/default/company.rb +40 -3
- 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/date.rb +16 -12
- data/lib/faker/default/driving_licence.rb +42 -0
- data/lib/faker/default/file.rb +49 -0
- data/lib/faker/default/finance.rb +24 -0
- data/lib/faker/default/gender.rb +1 -1
- data/lib/faker/default/hipster.rb +94 -0
- data/lib/faker/default/id_number.rb +86 -0
- data/lib/faker/default/internet.rb +35 -7
- data/lib/faker/default/internet_http.rb +48 -0
- data/lib/faker/default/invoice.rb +32 -5
- data/lib/faker/default/json.rb +55 -0
- data/lib/faker/default/lorem_flickr.rb +65 -0
- data/lib/faker/default/lorem_pixel.rb +22 -0
- data/lib/faker/default/markdown.rb +89 -0
- data/lib/faker/default/measurement.rb +90 -0
- data/lib/faker/default/name.rb +98 -0
- data/lib/faker/default/nhs.rb +19 -0
- data/lib/faker/default/number.rb +5 -7
- data/lib/faker/default/omniauth.rb +58 -5
- 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/default/world_cup.rb +4 -4
- data/lib/faker/games/control.rb +113 -0
- data/lib/faker/games/dnd.rb +61 -0
- data/lib/faker/games/heroes_of_the_storm.rb +16 -5
- data/lib/faker/games/minecraft.rb +48 -0
- data/lib/faker/games/warhammer_fantasy.rb +74 -0
- data/lib/faker/movies/departed.rb +49 -0
- data/lib/faker/movies/movie.rb +13 -0
- data/lib/faker/music/pearl_jam.rb +50 -0
- data/lib/faker/music/phish.rb +27 -1
- data/lib/faker/music/prince.rb +64 -0
- data/lib/faker/music/rush.rb +37 -0
- data/lib/faker/music/show.rb +49 -0
- data/lib/faker/quotes/quote.rb +54 -1
- data/lib/faker/quotes/shakespeare.rb +36 -0
- data/lib/faker/tv_shows/aqua_teen_hunger_force.rb +13 -0
- data/lib/faker/tv_shows/big_bang_theory.rb +37 -0
- data/lib/faker/tv_shows/dr_who.rb +1 -1
- data/lib/faker/tv_shows/futurama.rb +65 -0
- data/lib/faker/tv_shows/simpsons.rb +14 -0
- data/lib/faker/tv_shows/suits.rb +37 -0
- data/lib/faker/version.rb +1 -1
- data/lib/helpers/base58.rb +1 -1
- data/lib/helpers/char.rb +22 -27
- 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-US.yml +29 -3
- data/lib/locales/en/address.yml +2 -0
- data/lib/locales/en/aqua_teen_hunger_force.yml +33 -1
- data/lib/locales/en/bank.yml +1 -1
- data/lib/locales/en/big_bang_theory.yml +38 -0
- data/lib/locales/en/blood.yml +13 -0
- 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/futurama.yml +344 -0
- data/lib/locales/en/heroes_of_the_storm.yml +2 -2
- data/lib/locales/en/house.yml +1 -1
- data/lib/locales/en/minecraft.yml +390 -0
- data/lib/locales/en/movie.yml +192 -1
- data/lib/locales/en/name.yml +3 -2
- 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/prince.yml +227 -0
- data/lib/locales/en/rush.yml +32 -0
- data/lib/locales/en/show.yml +597 -0
- data/lib/locales/en/simpsons.yml +668 -0
- data/lib/locales/en/star_wars.yml +568 -220
- data/lib/locales/en/suits.yml +45 -0
- data/lib/locales/en/warhammer_fantasy.yml +582 -0
- data/lib/locales/fr-CA.yml +2 -0
- data/lib/locales/ko.yml +82 -0
- data/lib/locales/pt-BR.yml +1 -0
- metadata +46 -17
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 419bb77c9f0a8bc8f7c1b7ea5d93ba7d407bf7c437598eb91413f062f67494ce
|
|
4
|
+
data.tar.gz: 6566078b00ceb18763960551f913a341393858c2458cec01fcb4b0f0163d2e4b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 694b65a586f50b801f47a456954dd6f2fba39a82b9a643153bb140f9bd3467b7e3080c49a63f0a8562db10c6442bc7c5c578928ddde129054cb070d2a81658e3
|
|
7
|
+
data.tar.gz: eb6812f2f21c5a1930ad987ad8023efeb9168a6f6ec909fcd86d3deeb5e8720d82f457be58fc08f907d502571656ee6768bc21cbb6395a5366c2410d65e358cf
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,165 @@
|
|
|
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
|
+
|
|
3
163
|
## [v2.11.0](https://github.com/faker-ruby/faker/tree/v2.11.0) (2020-03-24)
|
|
4
164
|
|
|
5
165
|
## Bug/Fixes
|
data/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|

|
|
3
3
|
|
|
4
4
|
# Faker
|
|
5
|
-
[](https://github.com/faker-ruby/faker/actions?query=workflow%3ATests)
|
|
6
6
|
[](https://badge.fury.io/rb/faker)
|
|
7
7
|
[](https://inch-ci.org/github/faker-ruby/faker)
|
|
8
8
|
[](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,7 +275,9 @@ 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
|
|
@@ -286,6 +293,7 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
|
|
|
286
293
|
|
|
287
294
|
### Tv Shows
|
|
288
295
|
- [Faker::TvShows::AquaTeenHungerForce](doc/tv_shows/aqua_teen_hunger_force.md)
|
|
296
|
+
- [Faker::TvShows::BigBangTheory](doc/tv_shows/big_bang_theory.md)
|
|
289
297
|
- [Faker::TvShows::BojackHorseman](doc/tv_shows/bojack_horseman.md)
|
|
290
298
|
- [Faker::TvShows::BreakingBad](doc/tv_shows/breaking_bad.md)
|
|
291
299
|
- [Faker::TvShows::Buffy](doc/tv_shows/buffy.md)
|
|
@@ -309,6 +317,7 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
|
|
|
309
317
|
- [Faker::TvShows::StarTrek](doc/tv_shows/star_trek.md)
|
|
310
318
|
- [Faker::TvShows::Stargate](doc/tv_shows/stargate.md)
|
|
311
319
|
- [Faker::TvShows::StrangerThings](doc/tv_shows/stranger_things.md)
|
|
320
|
+
- [Faker::TvShows::Suits](doc/tv_shows/suits.md)
|
|
312
321
|
- [Faker::TvShows::TheExpanse](doc/tv_shows/the_expanse.md)
|
|
313
322
|
- [Faker::TvShows::TheFreshPrinceOfBelAir](doc/tv_shows/the_fresh_prince_of_bel_air.md)
|
|
314
323
|
- [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?
|
|
@@ -24,7 +21,8 @@ module Faker
|
|
|
24
21
|
attr_writer :random
|
|
25
22
|
|
|
26
23
|
def locale
|
|
27
|
-
|
|
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
|
|
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)
|
|
@@ -225,8 +223,16 @@ module Faker
|
|
|
225
223
|
@unique ||= UniqueGenerator.new(self, max_retries)
|
|
226
224
|
end
|
|
227
225
|
|
|
228
|
-
def sample(list)
|
|
229
|
-
list.respond_to?(:sample)
|
|
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
|
|
230
236
|
end
|
|
231
237
|
|
|
232
238
|
def shuffle(list)
|
|
@@ -307,4 +313,4 @@ module Faker
|
|
|
307
313
|
end
|
|
308
314
|
|
|
309
315
|
# require faker objects
|
|
310
|
-
Dir.glob(File.join(
|
|
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
|
-
#
|
|
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
|
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,6 +28,17 @@ 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
43
|
# Each country has its own format for bank accounts
|
|
22
44
|
# Many of them use letters in certain parts of the account
|
|
@@ -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 2.13.0
|
|
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)
|