faker 2.18.0 → 2.21.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 +109 -0
- data/README.md +16 -3
- data/lib/faker/books/the_kingkiller_chronicle.rb +61 -0
- data/lib/faker/default/commerce.rb +28 -0
- data/lib/faker/default/company.rb +5 -7
- data/lib/faker/default/emotion.rb +33 -0
- data/lib/faker/default/finance.rb +13 -0
- data/lib/faker/default/food.rb +13 -0
- data/lib/faker/default/hobby.rb +22 -0
- data/lib/faker/default/internet.rb +40 -16
- data/lib/faker/default/lorem.rb +0 -4
- data/lib/faker/default/markdown.rb +2 -2
- data/lib/faker/default/nation.rb +0 -3
- data/lib/faker/default/omniauth.rb +45 -1
- data/lib/faker/default/placeholdit.rb +9 -9
- data/lib/faker/default/religion.rb +6 -0
- data/lib/faker/default/science.rb +82 -0
- data/lib/faker/default/string.rb +0 -3
- data/lib/faker/default/time.rb +0 -2
- data/lib/faker/games/dota.rb +13 -0
- data/lib/faker/japanese_media/fullmetal_alchemist_brotherhood.rb +48 -0
- data/lib/faker/japanese_media/kamen_rider.rb +102 -0
- data/lib/faker/locations/australia.rb +47 -0
- data/lib/faker/movies/tron.rb +161 -0
- data/lib/faker/music/hiphop.rb +3 -3
- data/lib/faker/religion/bible.rb +50 -0
- data/lib/faker/tv_shows/brooklyn_nine_nine.rb +38 -0
- data/lib/faker/tv_shows/michael_scott.rb +0 -3
- data/lib/faker/tv_shows/supernatural.rb +48 -0
- data/lib/faker/tv_shows/the_office.rb +37 -0
- data/lib/faker/version.rb +2 -2
- data/lib/locales/ar.yml +5 -1
- data/lib/locales/de-AT.yml +2 -2
- data/lib/locales/de.yml +7 -3
- data/lib/locales/en/address.yml +2 -3
- data/lib/locales/en/animal.yml +1 -1
- data/lib/locales/en/australia.yml +108 -0
- data/lib/locales/en/bible.yml +90 -0
- data/lib/locales/en/brooklyn_nine_nine.yml +35 -0
- data/lib/locales/en/cat.yml +1 -1
- data/lib/locales/en/coffee.yml +1 -1
- data/lib/locales/en/commerce.yml +17 -0
- data/lib/locales/en/community.yml +17 -17
- data/lib/locales/en/dota.yml +7 -0
- data/lib/locales/en/emotion.yml +480 -0
- data/lib/locales/en/finance.yml +21 -0
- data/lib/locales/en/fma_brotherhood.yml +78 -0
- data/lib/locales/en/food.yml +1054 -10
- data/lib/locales/en/game.yml +11 -0
- data/lib/locales/en/hobby.yml +171 -0
- data/lib/locales/en/horse.yml +2 -2
- data/lib/locales/en/internet.yml +108 -3
- data/lib/locales/en/kamen_rider.yml +452 -0
- data/lib/locales/en/kpop.yml +7 -7
- data/lib/locales/en/mountain.yml +14 -1
- data/lib/locales/en/movie.yml +2 -1
- data/lib/locales/en/music.yml +142 -142
- data/lib/locales/en/naruto.yml +2 -3
- data/lib/locales/en/science.yml +126 -0
- data/lib/locales/en/stranger_thing.yml +1 -1
- data/lib/locales/en/super_smash_bros.yml +5 -2
- data/lib/locales/en/supernatural.yml +141 -0
- data/lib/locales/en/the_kingkiller_chronicle.yml +56 -0
- data/lib/locales/en/the_office.yml +86 -0
- data/lib/locales/en/touhou.yml +1 -1
- data/lib/locales/en/tron.yml +227 -0
- data/lib/locales/en-US.yml +1 -1
- data/lib/locales/es-AR.yml +1 -4
- data/lib/locales/fr/adjective.yml +266 -0
- data/lib/locales/fr/animal.yml +5 -0
- data/lib/locales/fr/appliance.yml +4 -0
- data/lib/locales/fr/pokemon.yml +0 -2
- data/lib/locales/ja/address.yml +120523 -1
- data/lib/locales/ja/animal.yml +5 -0
- data/lib/locales/ja/cat.yml +5 -0
- data/lib/locales/ja/color.yml +1 -1
- data/lib/locales/ja/{creature.yml → dog.yml} +0 -4
- data/lib/locales/ja/emotion.yml +51 -0
- data/lib/locales/ja/lorem.yml +2 -2
- data/lib/locales/ja/naruto.yml +230 -0
- data/lib/locales/ja/overwatch.yml +5 -0
- data/lib/locales/ja/{games.yml → pokemon.yml} +0 -11
- data/lib/locales/ja/relationship.yml +10 -0
- data/lib/locales/ja/studio_ghibli.yml +112 -0
- data/lib/locales/ja/super_mario.yml +9 -0
- data/lib/locales/ja/super_smash_bros.yml +8 -0
- data/lib/locales/ja/zelda.yml +5 -0
- data/lib/locales/lt.yml +35 -0
- data/lib/locales/lv.yml +1 -1
- data/lib/locales/mi-NZ.yml +281 -0
- data/lib/locales/pt-BR.yml +7 -2
- metadata +60 -22
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 44c0018f4c53ccebc8bd19d572f1122827a3c1092efc4c8a4410de2cd042962f
|
|
4
|
+
data.tar.gz: 440a347753b2a2ba35abf664d489b24471ddfb32007c76afea9c51edcda99bc6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 920e561f15f9a91269f2167d350fc7a2ba46444c3311a240f733c7ef2de0146d6052791862a29c36a847ee8370e2830f1b486e0aa015c2c5cb84aed826bf04fd
|
|
7
|
+
data.tar.gz: f2c505fd2e0aaa29bc654ae0ec27c2129acba47390aa5cbfb1fbedc24225d1c07ebbf2d4aecc540c77dfea72ab067663583e89b5a58a49287be89d4d3f7c2f29
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,114 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## [v2.21.0](https://github.com/faker-ruby/faker/tree/v2.21.0) (2022-05-12)
|
|
4
|
+
|
|
5
|
+
## Bug/Fixes
|
|
6
|
+
|
|
7
|
+
- [PR #2443](https://github.com/faker-ruby/faker/pull/2443) Fixed error for random in markdown [@sudeeptarlekar](https://github.com/sudeeptarlekar)
|
|
8
|
+
|
|
9
|
+
## Feature Request
|
|
10
|
+
|
|
11
|
+
- [PR #2252](https://github.com/faker-ruby/faker/pull/2252) Add Faker::Movies::Tron [@craineum](https://github.com/craineum)
|
|
12
|
+
|
|
13
|
+
## Update locales
|
|
14
|
+
- [PR #2485](https://github.com/faker-ruby/faker/pull/2485) Add japanese translations for emotion [@kenboo0426](https://github.com/kenboo0426)
|
|
15
|
+
- [PR #2479](https://github.com/faker-ruby/faker/pull/2479) Add japanese translations for naruto [@johnmanjiro13](https://github.com/johnmanjiro13)
|
|
16
|
+
- [PR #2478](https://github.com/faker-ruby/faker/pull/2478) Add Japanese translation for relationships [@shouichi](https://github.com/shouichi)
|
|
17
|
+
- [PR #2469](https://github.com/faker-ruby/faker/pull/2467) Fix blank row in game.yml [@KingYoSun](https://github.com/KingYoSun)
|
|
18
|
+
- [PR #2467](https://github.com/faker-ruby/faker/pull/2467) French traduction of adjectives [@Beygs](https://github.com/Beygs)
|
|
19
|
+
|
|
20
|
+
## Update local dependencies
|
|
21
|
+
|
|
22
|
+
- Update rubocop to `1.26.0`
|
|
23
|
+
- Update timecop to `0.95.0`
|
|
24
|
+
|
|
25
|
+
------------------------------------------------------------------------------
|
|
26
|
+
|
|
27
|
+
## [v2.20.0](https://github.com/faker-ruby/faker/tree/v2.20.0) (2022-03-05)
|
|
28
|
+
|
|
29
|
+
## Documentation
|
|
30
|
+
|
|
31
|
+
- [PR #2421](https://github.com/faker-ruby/faker/pull/2421) Add general documentation for Faker::Camera [@aleksandrilyin](https://github.com/aleksandrilyin)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## Feature Request
|
|
35
|
+
|
|
36
|
+
- [PR #2457](https://github.com/faker-ruby/faker/pull/2457) add Command & Conquer games [@Awilum](https://github.com/Awilum)
|
|
37
|
+
- [PR #2456](https://github.com/faker-ruby/faker/pull/2456) fix heading for faker hobby doc [@Awilum](https://github.com/Awilum)
|
|
38
|
+
- [PR #2411](https://github.com/faker-ruby/faker/pull/2411) Add mock data for Auth0 OAuth [@Norio4](https://github.com/Norio4)
|
|
39
|
+
- [PR #2396](https://github.com/faker-ruby/faker/pull/2396) Add Brooklyn Nine Nine into tv shows category [@fralps](https://github.com/fralps)
|
|
40
|
+
- [PR #2395](https://github.com/faker-ruby/faker/pull/2395) Add The Kingkiller Chronicle [@fblupi](https://github.com/fblupi)
|
|
41
|
+
- [PR #2392](https://github.com/faker-ruby/faker/pull/2392) Update LV locale - cell phone numbers should be 8 symbols [@tmikoss](https://github.com/tmikoss)
|
|
42
|
+
- [PR #2383](https://github.com/faker-ruby/faker/pull/2383) Add Faker::JapaneseMedia::KamenRider#transformation_device [@boardfish](https://github.com/boardfish)
|
|
43
|
+
- [PR #2382](https://github.com/faker-ruby/faker/pull/2382) Add collectible devices [@boardfish](https://github.com/boardfish)
|
|
44
|
+
- [PR #2378](https://github.com/faker-ruby/faker/pull/2378) Re-add the Faker::Internet.base64 method [@ashishra0](https://github.com/ashishra0)
|
|
45
|
+
- [PR #2374](https://github.com/faker-ruby/faker/pull/2374) Add Faker::JapaneseMedia::KamenRider [@boardfish](https://github.com/boardfish)
|
|
46
|
+
- [PR #1656](https://github.com/faker-ruby/faker/pull/1656) Add bible entries [@enowbi](https://github.com/enowbi)
|
|
47
|
+
|
|
48
|
+
## Update locales
|
|
49
|
+
|
|
50
|
+
- [PR #2462](https://github.com/faker-ruby/faker/pull/2462) Add Sora and Hollow Bastion to SuperSmashBros yml files [@gazayas](https://github.com/gazayas)
|
|
51
|
+
- [PR #2458](https://github.com/faker-ruby/faker/pull/2458) Fix typo on Tom Jobim's name [@andrerferrer](https://github.com/andrerferrer)
|
|
52
|
+
- [PR #2452](https://github.com/faker-ruby/faker/pull/2452) updated Timor-Leste in en/addresses.yml [@masukomi](https://github.com/masukomi)
|
|
53
|
+
- [PR #2450](https://github.com/faker-ruby/faker/pull/2450) dividing male and female Arabic names [@Alfulayt](https://github.com/Alfulayt)
|
|
54
|
+
- [PR #2381](https://github.com/faker-ruby/faker/pull/2381) Remove duplicates and clean up Faker::JapaneseMedia::KamenRider [@boardfish](https://github.com/boardfish)
|
|
55
|
+
- [PR #2405](https://github.com/faker-ruby/faker/pull/2405) Add countries in Japanese [@lawriecate](https://github.com/lawriecate)
|
|
56
|
+
- [PR #2403](https://github.com/faker-ruby/faker/pull/2403) add Faker::Animal in pt-BR [@thiago-henrique-leite](https://github.com/thiago-henrique-leite)
|
|
57
|
+
- [PR #2377](https://github.com/faker-ruby/faker/pull/2377) Fix non striped coffe blender [@ngouy](https://github.com/ngouy)
|
|
58
|
+
|
|
59
|
+
## Update local dependencies
|
|
60
|
+
|
|
61
|
+
- Update rubocop to `1.25.0`
|
|
62
|
+
- Update rake to `13.0.6`
|
|
63
|
+
- Update test-unit to `3.5.3`
|
|
64
|
+
- Update yard to `0.9.27`
|
|
65
|
+
|
|
66
|
+
------------------------------------------------------------------------------
|
|
67
|
+
|
|
68
|
+
## [v2.19.0](https://github.com/faker-ruby/faker/tree/v2.19.0) (2021-08-22)
|
|
69
|
+
|
|
70
|
+
## Bug/Fixes
|
|
71
|
+
|
|
72
|
+
- [PR #2356](https://github.com/faker-ruby/faker/pull/2356) fix broken link for placeholdit [@lilisako](https://github.com/lilisako)
|
|
73
|
+
- [PR #2351](https://github.com/faker-ruby/faker/pull/2351) Fix spanish organisation number [@laulujan](https://github.com/laulujan)
|
|
74
|
+
|
|
75
|
+
## Feature Request
|
|
76
|
+
|
|
77
|
+
- [PR #2371](https://github.com/faker-ruby/faker/pull/2371) Add supernatural TV show [@vin1cius](https://github.com/vin1cius)
|
|
78
|
+
- [PR #2369](https://github.com/faker-ruby/faker/pull/2369) Added more Science examples - science branches, modifiers and tools [@itay-grudev](https://github.com/itay-grudev)
|
|
79
|
+
- [PR #2361](https://github.com/faker-ruby/faker/pull/2361) Add ethnic category to the food generator [@wolwire](https://github.com/wolwire)
|
|
80
|
+
- [PR #2359](https://github.com/faker-ruby/faker/pull/2359) add stock_market to finance Faker::Finance [@lilisako](https://github.com/lilisako)
|
|
81
|
+
- [PR #2341](https://github.com/faker-ruby/faker/pull/2341) add Hobby to default [@rohanphillips](https://github.com/rohanphillips)
|
|
82
|
+
- [PR #2324](https://github.com/faker-ruby/faker/pull/2324) Add Faker::Emotion.word [@jayqui](https://github.com/jayqui)
|
|
83
|
+
- [PR #2320](https://github.com/faker-ruby/faker/pull/2320) Add Faker::TvShows::TheOffice [@sandylcruz](https://github.com/sandylcruz)
|
|
84
|
+
- [PR #2245](https://github.com/faker-ruby/faker/pull/2245) Add Faker::Australia class [@astley92](https://github.com/astley92)
|
|
85
|
+
- [PR #1731](https://github.com/faker-ruby/faker/pull/1731) add brand, vendor support to commerce [@ashishra0](https://github.com/ashishra0)
|
|
86
|
+
|
|
87
|
+
## Update locales
|
|
88
|
+
|
|
89
|
+
- [PR #2343](https://github.com/faker-ruby/faker/pull/2343) Minor typo fixes to Community quotes [@sunny](https://github.com/sunny)
|
|
90
|
+
- [PR #2340](https://github.com/faker-ruby/faker/pull/2340) Add JapaneseMedia StudioGhibli for locals/ja.yml [@ryogift](https://github.com/ryogift)
|
|
91
|
+
- [PR #2339](https://github.com/faker-ruby/faker/pull/2339) Various locale specific and other fixes for faker [@psibi](https://github.com/psibi)
|
|
92
|
+
- [PR #2338](https://github.com/faker-ruby/faker/pull/2338) Add Kazuya to Faker::Games::SuperSmashBros [@boardfish](https://github.com/boardfish)
|
|
93
|
+
- [PR #2333](https://github.com/faker-ruby/faker/pull/2333) add FR translation for animals [@cprodhomme](https://github.com/cprodhomme)
|
|
94
|
+
- [PR #2329](https://github.com/faker-ruby/faker/pull/2329) Fix Faker::Color.color_name for Japanese [@yujideveloper](https://github.com/yujideveloper)
|
|
95
|
+
- [PR #2327](https://github.com/faker-ruby/faker/pull/2327) Remove trailing spaces from translations [@michebble](https://github.com/michebble)
|
|
96
|
+
- [PR #2326](https://github.com/faker-ruby/faker/pull/2326) Faker::Address.postcode (locale=ja) should contains hyphen [@gongo](https://github.com/gongo)
|
|
97
|
+
|
|
98
|
+
## Update local dependencies
|
|
99
|
+
|
|
100
|
+
- Update rubocop requirement from = 1.18.3 to = 1.18.4 (#2362)
|
|
101
|
+
- Update rake requirement from = 13.0.3 to = 13.0.6 (#2357)
|
|
102
|
+
- Update rubocop requirement from = 1.18.1 to = 1.18.3 (#2353)
|
|
103
|
+
- Update rubocop requirement from = 1.17.0 to = 1.18.1 (#2346)
|
|
104
|
+
- Update rubocop requirement from = 1.16.0 to = 1.17.0 (#2337)
|
|
105
|
+
- Update test-unit requirement from = 3.4.2 to = 3.4.4 (#2334)
|
|
106
|
+
- Update rubocop requirement from = 1.15.0 to = 1.16.0 (#2332)
|
|
107
|
+
- Update test-unit requirement from = 3.4.1 to = 3.4.2 (#2331)
|
|
108
|
+
- Update rubocop requirement from = 1.14.0 to = 1.15.0 (#2325)
|
|
109
|
+
|
|
110
|
+
------------------------------------------------------------------------------
|
|
111
|
+
|
|
3
112
|
## [v2.18.0](https://github.com/faker-ruby/faker/tree/v2.18.0) (2021-05-15)
|
|
4
113
|
|
|
5
114
|
## Bug/Fixes
|
data/README.md
CHANGED
|
@@ -136,6 +136,7 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
|
|
|
136
136
|
- [Faker::Boolean](doc/default/boolean.md)
|
|
137
137
|
- [Faker::BossaNova](doc/default/bossa_nova.md)
|
|
138
138
|
- [Faker::Business](doc/default/business.md)
|
|
139
|
+
- [Faker::Camera](doc/default/camera.md)
|
|
139
140
|
- [Faker::Cannabis](doc/default/cannabis.md)
|
|
140
141
|
- [Faker::ChileRut](doc/default/chile_rut.md)
|
|
141
142
|
- [Faker::ChuckNorris](doc/default/chuck_norris.md)
|
|
@@ -161,6 +162,7 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
|
|
|
161
162
|
- [Faker::Drone](doc/drone/drone.md)
|
|
162
163
|
- [Faker::Educator](doc/default/educator.md)
|
|
163
164
|
- [Faker::ElectricalComponents](doc/default/electrical_components.md)
|
|
165
|
+
- [Faker::Emotion](doc/default/emotion.md)
|
|
164
166
|
- [Faker::Esport](doc/default/esport.md)
|
|
165
167
|
- [Faker::File](doc/default/file.md)
|
|
166
168
|
- [Faker::Fillmurray](doc/default/fillmurray.md)
|
|
@@ -171,6 +173,7 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
|
|
|
171
173
|
- [Faker::GreekPhilosophers](doc/default/greek_philosophers.md)
|
|
172
174
|
- [Faker::Hacker](doc/default/hacker.md)
|
|
173
175
|
- [Faker::Hipster](doc/default/hipster.md)
|
|
176
|
+
- [Faker::Hobby](doc/default/hobby.md)
|
|
174
177
|
- [Faker::House](doc/default/house.md)
|
|
175
178
|
- [Faker::IDNumber](doc/default/id_number.md)
|
|
176
179
|
- [Faker::IndustrySegments](doc/default/industry_segments.md)
|
|
@@ -228,6 +231,7 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
|
|
|
228
231
|
- [Faker::Books::CultureSeries](doc/books/culture_series.md)
|
|
229
232
|
- [Faker::Books::Dune](doc/books/dune.md)
|
|
230
233
|
- [Faker::Books::Lovecraft](doc/books/lovecraft.md)
|
|
234
|
+
- [Faker::Books::TheKingkillerChronicle](doc/books/the_kingkiller_chronicle.md)
|
|
231
235
|
|
|
232
236
|
### Fantasy
|
|
233
237
|
- [Faker::Fantasy::Tolkien](doc/fantasy/tolkien.md)
|
|
@@ -272,6 +276,7 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
|
|
|
272
276
|
- [Faker::JapaneseMedia::Naruto](doc/japanese_media/naruto.md)
|
|
273
277
|
- [Faker::JapaneseMedia::Doraemon](doc/japanese_media/doraemon.md)
|
|
274
278
|
- [Faker::JapaneseMedia::Conan](doc/japanese_media/conan.md)
|
|
279
|
+
- [Faker::JapaneseMedia::FmaBrotherhood](doc/japanese_media/fullmetal_alchemist_brotherhood.md)
|
|
275
280
|
|
|
276
281
|
### Movies
|
|
277
282
|
- [Faker::Movie](doc/movies/movie.md)
|
|
@@ -286,6 +291,7 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
|
|
|
286
291
|
- [Faker::Movies::LordOfTheRings](doc/movies/lord_of_the_rings.md)
|
|
287
292
|
- [Faker::Movies::PrincessBride](doc/movies/princess_bride.md)
|
|
288
293
|
- [Faker::Movies::StarWars](doc/movies/star_wars.md)
|
|
294
|
+
- [Faker::Movies::TRON](doc/movies/tron.md)
|
|
289
295
|
- [Faker::Movies::VForVendetta](doc/movies/v_for_vendetta.md)
|
|
290
296
|
|
|
291
297
|
### Music
|
|
@@ -316,6 +322,7 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
|
|
|
316
322
|
- [Faker::TvShows::BigBangTheory](doc/tv_shows/big_bang_theory.md)
|
|
317
323
|
- [Faker::TvShows::BojackHorseman](doc/tv_shows/bojack_horseman.md)
|
|
318
324
|
- [Faker::TvShows::BreakingBad](doc/tv_shows/breaking_bad.md)
|
|
325
|
+
- [Faker::TvShows::BrooklynNineNine](doc/tv_shows/brooklyn_nine_nine.md)
|
|
319
326
|
- [Faker::TvShows::Buffy](doc/tv_shows/buffy.md)
|
|
320
327
|
- [Faker::TvShows::Community](doc/tv_shows/community.md)
|
|
321
328
|
- [Faker::TvShows::DrWho](doc/tv_shows/dr_who.md)
|
|
@@ -339,6 +346,7 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
|
|
|
339
346
|
- [Faker::TvShows::Stargate](doc/tv_shows/stargate.md)
|
|
340
347
|
- [Faker::TvShows::StrangerThings](doc/tv_shows/stranger_things.md)
|
|
341
348
|
- [Faker::TvShows::Suits](doc/tv_shows/suits.md)
|
|
349
|
+
- [Faker::TvShows::Supernatural](doc/tv_shows/supernatural.md)
|
|
342
350
|
- [Faker::TvShows::TheExpanse](doc/tv_shows/the_expanse.md)
|
|
343
351
|
- [Faker::TvShows::TheFreshPrinceOfBelAir](doc/tv_shows/the_fresh_prince_of_bel_air.md)
|
|
344
352
|
- [Faker::TvShows::TheITCrowd](doc/tv_shows/the_it_crowd.md)
|
|
@@ -351,9 +359,14 @@ Since you may want to make addresses and other types of data look different
|
|
|
351
359
|
depending on where in the world you are (US postal codes vs. UK postal codes,
|
|
352
360
|
for example), Faker uses the I18n gem to store strings (like state names) and
|
|
353
361
|
formats (US postal codes are NNNNN while UK postal codes are AAN NAA),
|
|
354
|
-
allowing you to get different formats by switching locales.
|
|
355
|
-
|
|
356
|
-
|
|
362
|
+
allowing you to get different formats by switching locales.
|
|
363
|
+
Just set the locale you want as shown below, and Faker will take care of the rest.
|
|
364
|
+
|
|
365
|
+
```ruby
|
|
366
|
+
Faker::Config.locale = 'es'
|
|
367
|
+
# or
|
|
368
|
+
Faker::Config.locale = :es
|
|
369
|
+
```
|
|
357
370
|
|
|
358
371
|
If your locale doesn't already exist, create it in the `lib/locales` directory
|
|
359
372
|
and you can then override or add elements to suit your needs. See more about how to
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Faker
|
|
4
|
+
class Books
|
|
5
|
+
class TheKingkillerChronicle < Base
|
|
6
|
+
class << self
|
|
7
|
+
##
|
|
8
|
+
# Produces the name of a The Kingkiller Chronicle book.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
#
|
|
12
|
+
# @example
|
|
13
|
+
# Faker::Books::TheKingkillerChronicle.book #=> "The Name of the Wind"
|
|
14
|
+
#
|
|
15
|
+
# @faker.version next
|
|
16
|
+
def book
|
|
17
|
+
fetch('books.the_kingkiller_chronicle.books')
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
##
|
|
21
|
+
# Produces the name of a The Kingkiller Chronicle character.
|
|
22
|
+
#
|
|
23
|
+
# @return [String]
|
|
24
|
+
#
|
|
25
|
+
# @example
|
|
26
|
+
# Faker::Books::TheKingkillerChronicle.character #=> "Kvothe"
|
|
27
|
+
#
|
|
28
|
+
# @faker.version next
|
|
29
|
+
def character
|
|
30
|
+
fetch('books.the_kingkiller_chronicle.characters')
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
##
|
|
34
|
+
# Produces the name of a The Kingkiller Chronicle creature.
|
|
35
|
+
#
|
|
36
|
+
# @return [String]
|
|
37
|
+
#
|
|
38
|
+
# @example
|
|
39
|
+
# Faker::Books::TheKingkillerChronicle.creature #=> "Scrael"
|
|
40
|
+
#
|
|
41
|
+
# @faker.version next
|
|
42
|
+
def creature
|
|
43
|
+
fetch('books.the_kingkiller_chronicle.creatures')
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
##
|
|
47
|
+
# Produces the name of a The Kingkiller Chronicle location.
|
|
48
|
+
#
|
|
49
|
+
# @return [String]
|
|
50
|
+
#
|
|
51
|
+
# @example
|
|
52
|
+
# Faker::Books::TheKingkillerChronicle.location #=> "Tarbean"
|
|
53
|
+
#
|
|
54
|
+
# @faker.version next
|
|
55
|
+
def location
|
|
56
|
+
fetch('books.the_kingkiller_chronicle.locations')
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
@@ -126,6 +126,34 @@ module Faker
|
|
|
126
126
|
price
|
|
127
127
|
end
|
|
128
128
|
|
|
129
|
+
##
|
|
130
|
+
# Produces a randomized string of a brand name
|
|
131
|
+
# @example
|
|
132
|
+
# Faker::Commerce.brand #=> 'Apple'
|
|
133
|
+
#
|
|
134
|
+
# @return [string]
|
|
135
|
+
#
|
|
136
|
+
# @faker.version next
|
|
137
|
+
#
|
|
138
|
+
##
|
|
139
|
+
def brand
|
|
140
|
+
fetch('commerce.brand')
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
##
|
|
144
|
+
# Produces a randomized string of a vendor name
|
|
145
|
+
# @example
|
|
146
|
+
# Faker::Commerce.vendor #=> 'Dollar General'
|
|
147
|
+
#
|
|
148
|
+
# @return [string]
|
|
149
|
+
#
|
|
150
|
+
# @faker.version next
|
|
151
|
+
#
|
|
152
|
+
##
|
|
153
|
+
def vendor
|
|
154
|
+
fetch('commerce.vendor')
|
|
155
|
+
end
|
|
156
|
+
|
|
129
157
|
private
|
|
130
158
|
|
|
131
159
|
def categories(num)
|
|
@@ -334,7 +334,7 @@ module Faker
|
|
|
334
334
|
#
|
|
335
335
|
# @faker.version 1.9.2
|
|
336
336
|
def south_african_pty_ltd_registration_number
|
|
337
|
-
regexify(
|
|
337
|
+
regexify(%r{\d{4}/\d{4,10}/07})
|
|
338
338
|
end
|
|
339
339
|
|
|
340
340
|
##
|
|
@@ -347,7 +347,7 @@ module Faker
|
|
|
347
347
|
#
|
|
348
348
|
# @faker.version 1.9.2
|
|
349
349
|
def south_african_close_corporation_registration_number
|
|
350
|
-
regexify(
|
|
350
|
+
regexify(%r{(CK\d{2}|\d{4})/\d{4,10}/23})
|
|
351
351
|
end
|
|
352
352
|
|
|
353
353
|
##
|
|
@@ -360,7 +360,7 @@ module Faker
|
|
|
360
360
|
#
|
|
361
361
|
# @faker.version 1.9.2
|
|
362
362
|
def south_african_listed_company_registration_number
|
|
363
|
-
regexify(
|
|
363
|
+
regexify(%r{\d{4}/\d{4,10}/06})
|
|
364
364
|
end
|
|
365
365
|
|
|
366
366
|
##
|
|
@@ -373,7 +373,7 @@ module Faker
|
|
|
373
373
|
#
|
|
374
374
|
# @faker.version 1.9.2
|
|
375
375
|
def south_african_trust_registration_number
|
|
376
|
-
regexify(
|
|
376
|
+
regexify(%r{IT\d{2,4}/\d{2,10}})
|
|
377
377
|
end
|
|
378
378
|
|
|
379
379
|
##
|
|
@@ -511,7 +511,6 @@ module Faker
|
|
|
511
511
|
sum
|
|
512
512
|
end
|
|
513
513
|
|
|
514
|
-
# rubocop:disable Style/AsciiComments
|
|
515
514
|
#
|
|
516
515
|
# For more on Russian tax number algorithm here:
|
|
517
516
|
# https://ru.wikipedia.org/wiki/Идентификационный_номер_налогоплательщика#Вычисление_контрольных_цифр
|
|
@@ -526,7 +525,6 @@ module Faker
|
|
|
526
525
|
# Faker::Comnpany.russian_tax_number
|
|
527
526
|
# Faker::Comnpany.russian_tax_number(region: 'AZ')
|
|
528
527
|
# Faker::Comnpany.russian_tax_number(region: 'AZ', type: false)
|
|
529
|
-
# rubocop:enable Style/AsciiComments
|
|
530
528
|
def inn_number(region, type)
|
|
531
529
|
n10 = [2, 4, 10, 3, 5, 9, 4, 6, 8]
|
|
532
530
|
n11 = [7, 2, 4, 10, 3, 5, 9, 4, 6, 8]
|
|
@@ -553,7 +551,7 @@ module Faker
|
|
|
553
551
|
end
|
|
554
552
|
|
|
555
553
|
def spanish_cif_control_digit(organization_type, code)
|
|
556
|
-
letters = %w[J A B C D E F G H]
|
|
554
|
+
letters = %w[J A B C D E F G H I]
|
|
557
555
|
|
|
558
556
|
control = code.split('').each_with_index.inject(0) do |sum, (value, index)|
|
|
559
557
|
if (index + 1).even?
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Faker
|
|
4
|
+
class Emotion < Base
|
|
5
|
+
class << self
|
|
6
|
+
##
|
|
7
|
+
# Produces an emotion noun.
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
#
|
|
11
|
+
# @example
|
|
12
|
+
# Faker::Emotion.noun #=> "amazement"
|
|
13
|
+
#
|
|
14
|
+
# @faker.version next
|
|
15
|
+
def noun
|
|
16
|
+
fetch('emotion.noun')
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
##
|
|
20
|
+
# Produces an emotion adjective.
|
|
21
|
+
#
|
|
22
|
+
# @return [String]
|
|
23
|
+
#
|
|
24
|
+
# @example
|
|
25
|
+
# Faker::Emotion.adjective # => "nonplussed"
|
|
26
|
+
#
|
|
27
|
+
# @faker.version next
|
|
28
|
+
def adjective
|
|
29
|
+
fetch('emotion.adjective')
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -84,6 +84,19 @@ module Faker
|
|
|
84
84
|
rescue I18n::MissingTranslationData
|
|
85
85
|
raise ArgumentError, "Could not find market named #{market}"
|
|
86
86
|
end
|
|
87
|
+
|
|
88
|
+
##
|
|
89
|
+
# Returns a randomly-selected stock market.
|
|
90
|
+
#
|
|
91
|
+
# @return [String]
|
|
92
|
+
#
|
|
93
|
+
# @example
|
|
94
|
+
# Faker::Finance.stock_market #=> 'NASDAQ'
|
|
95
|
+
#
|
|
96
|
+
# @faker.version next
|
|
97
|
+
def stock_market
|
|
98
|
+
fetch('finance.stock_market')
|
|
99
|
+
end
|
|
87
100
|
end
|
|
88
101
|
end
|
|
89
102
|
end
|
data/lib/faker/default/food.rb
CHANGED
|
@@ -108,6 +108,19 @@ module Faker
|
|
|
108
108
|
def metric_measurement
|
|
109
109
|
fetch('food.metric_measurements')
|
|
110
110
|
end
|
|
111
|
+
|
|
112
|
+
##
|
|
113
|
+
# Retrieves ethnic category
|
|
114
|
+
#
|
|
115
|
+
# @return [String]
|
|
116
|
+
#
|
|
117
|
+
# @example
|
|
118
|
+
# Faker::Food.ethnic_category #=> "Indian cuisine"
|
|
119
|
+
#
|
|
120
|
+
# @faker.version next
|
|
121
|
+
def ethnic_category
|
|
122
|
+
fetch('food.ethnic_category')
|
|
123
|
+
end
|
|
111
124
|
end
|
|
112
125
|
end
|
|
113
126
|
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Faker
|
|
4
|
+
class Hobby < Base
|
|
5
|
+
flexible :hobby
|
|
6
|
+
|
|
7
|
+
class << self
|
|
8
|
+
##
|
|
9
|
+
# Retrieves a typical hobby activity.
|
|
10
|
+
#
|
|
11
|
+
# @return [String]
|
|
12
|
+
#
|
|
13
|
+
# @example
|
|
14
|
+
# Faker::Hobby.activity #=> "Cooking"
|
|
15
|
+
#
|
|
16
|
+
# @faker.version next
|
|
17
|
+
def activity
|
|
18
|
+
fetch('hobby.activity')
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
module Faker
|
|
4
4
|
class Internet < Base
|
|
5
|
+
# Private, Host, and Link-Local network address blocks as defined in https://en.wikipedia.org/wiki/IPv4#Special-use_addresses
|
|
6
|
+
PRIVATE_IPV4_ADDRESS_RANGES = [
|
|
7
|
+
[10..10, 0..255, 0..255, 1..255], # 10.0.0.0/8 - Used for local communications within a private network
|
|
8
|
+
[100..100, 64..127, 0..255, 1..255], # 100.64.0.0/10 - Shared address space for communications between an ISP and its subscribers
|
|
9
|
+
[127..127, 0..255, 0..255, 1..255], # 127.0.0.0/8 - Used for loopback addresses to the local host
|
|
10
|
+
[169..169, 254..254, 0..255, 1..255], # 169.254.0.0/16 - Used for link-local addresses between two hosts on a single link when
|
|
11
|
+
[172..172, 16..31, 0..255, 1..255], # 172.16.0.0/12 - Used for local communications within a private network
|
|
12
|
+
[192..192, 0..0, 0..0, 1..255], # 192.0.0.0/24 - IETF Protocol Assignments
|
|
13
|
+
[192..192, 168..168, 0..255, 1..255], # 192.168.0.0/16 - Used for local communications within a private network
|
|
14
|
+
[198..198, 18..19, 0..255, 1..255] # 198.18.0.0/15 - Used for benchmark testing of inter-network communications between subnets
|
|
15
|
+
].each(&:freeze).freeze
|
|
16
|
+
|
|
5
17
|
class << self
|
|
6
18
|
##
|
|
7
19
|
# Returns the email address
|
|
@@ -34,7 +46,7 @@ module Faker
|
|
|
34
46
|
end
|
|
35
47
|
|
|
36
48
|
##
|
|
37
|
-
# Returns the email address with
|
|
49
|
+
# Returns the email address with domain either gmail.com, yahoo.com or hotmail.com
|
|
38
50
|
#
|
|
39
51
|
# @return [String]
|
|
40
52
|
#
|
|
@@ -80,10 +92,10 @@ module Faker
|
|
|
80
92
|
#
|
|
81
93
|
# @return [String]
|
|
82
94
|
#
|
|
83
|
-
# @param specifier [Integer, Range] When int value passed it returns the username longer than specifier. Max value can be 10^6
|
|
84
|
-
# @param
|
|
95
|
+
# @param specifier [Integer, Range, String] When int value passed it returns the username longer than specifier. Max value can be 10^6
|
|
96
|
+
# @param separators [Array]
|
|
85
97
|
#
|
|
86
|
-
# @
|
|
98
|
+
# @example
|
|
87
99
|
# Faker::Internet.username(specifier: 10) #=> "lulu.goodwin"
|
|
88
100
|
# Faker::Internet.username(specifier: 5..10) #=> "morris"
|
|
89
101
|
# Faker::Internet.username(specifier: 5..10) #=> "berryberry"
|
|
@@ -227,8 +239,6 @@ module Faker
|
|
|
227
239
|
end
|
|
228
240
|
end
|
|
229
241
|
|
|
230
|
-
# rubocop:disable Style/AsciiComments
|
|
231
|
-
|
|
232
242
|
##
|
|
233
243
|
# Fixes ä, ö, ü, ß characters in string passed with ae, oe, ue, ss resp.
|
|
234
244
|
#
|
|
@@ -247,7 +257,6 @@ module Faker
|
|
|
247
257
|
|
|
248
258
|
Char.fix_umlauts(string)
|
|
249
259
|
end
|
|
250
|
-
# rubocop:enable Style/AsciiComments
|
|
251
260
|
|
|
252
261
|
##
|
|
253
262
|
# Returns the domain word for internet
|
|
@@ -264,7 +273,7 @@ module Faker
|
|
|
264
273
|
#
|
|
265
274
|
# @return [String]
|
|
266
275
|
#
|
|
267
|
-
# @
|
|
276
|
+
# @example
|
|
268
277
|
# Faker::Internet.domain_suffix #=> "com"
|
|
269
278
|
# Faker::Internet.domain_suffix #=> "biz"
|
|
270
279
|
def domain_suffix
|
|
@@ -311,12 +320,7 @@ module Faker
|
|
|
311
320
|
# @example
|
|
312
321
|
# Faker::Internet.private_ip_v4_address #=> "127.120.80.42"
|
|
313
322
|
def private_ip_v4_address
|
|
314
|
-
|
|
315
|
-
loop do
|
|
316
|
-
addr = ip_v4_address
|
|
317
|
-
break if private_net_checker[addr]
|
|
318
|
-
end
|
|
319
|
-
addr
|
|
323
|
+
sample(PRIVATE_IPV4_ADDRESS_RANGES).map { |range| rand(range) }.join('.')
|
|
320
324
|
end
|
|
321
325
|
|
|
322
326
|
##
|
|
@@ -387,7 +391,7 @@ module Faker
|
|
|
387
391
|
end
|
|
388
392
|
|
|
389
393
|
##
|
|
390
|
-
# Returns lambda function to check address passed is
|
|
394
|
+
# Returns lambda function to check address passed is reserved or not
|
|
391
395
|
#
|
|
392
396
|
# @return [Lambda]
|
|
393
397
|
#
|
|
@@ -479,7 +483,9 @@ module Faker
|
|
|
479
483
|
end
|
|
480
484
|
|
|
481
485
|
glue ||= sample(%w[- _])
|
|
482
|
-
|
|
486
|
+
return words.delete(',.').gsub(' ', glue).downcase unless words.nil?
|
|
487
|
+
|
|
488
|
+
sample(translate('faker.internet.slug'), 2).join(glue)
|
|
483
489
|
end
|
|
484
490
|
|
|
485
491
|
##
|
|
@@ -559,6 +565,24 @@ module Faker
|
|
|
559
565
|
s
|
|
560
566
|
end
|
|
561
567
|
|
|
568
|
+
##
|
|
569
|
+
# Produces a randomized hash of internet user details
|
|
570
|
+
# @example
|
|
571
|
+
# Faker::Internet.user #=> { username: 'alexie', email: 'alexie@example.net' }
|
|
572
|
+
#
|
|
573
|
+
# @example
|
|
574
|
+
# Faker::Internet.user('username', 'email', 'password') #=> { username: 'alexie', email: 'alexie@example.net', password: 'DtEf9P8wS31iMyC' }
|
|
575
|
+
#
|
|
576
|
+
# @return [hash]
|
|
577
|
+
#
|
|
578
|
+
# @faker.version next
|
|
579
|
+
def user(*args)
|
|
580
|
+
user_hash = {}
|
|
581
|
+
args = %w[username email] if args.empty?
|
|
582
|
+
args.each { |arg| user_hash[:"#{arg}"] = send(arg) }
|
|
583
|
+
user_hash
|
|
584
|
+
end
|
|
585
|
+
|
|
562
586
|
alias user_name username
|
|
563
587
|
|
|
564
588
|
private
|
data/lib/faker/default/lorem.rb
CHANGED
|
@@ -82,8 +82,6 @@ module Faker
|
|
|
82
82
|
Alphanumeric.alphanumeric(number: number, min_alpha: min_alpha, min_numeric: min_numeric)
|
|
83
83
|
end
|
|
84
84
|
|
|
85
|
-
# rubocop:disable Style/AsciiComments
|
|
86
|
-
|
|
87
85
|
##
|
|
88
86
|
# Generates the emoji
|
|
89
87
|
#
|
|
@@ -97,8 +95,6 @@ module Faker
|
|
|
97
95
|
def multibyte
|
|
98
96
|
sample(translate('faker.lorem.multibyte')).pack('C*').force_encoding('utf-8')
|
|
99
97
|
end
|
|
100
|
-
# rubocop:enable Style/AsciiComments
|
|
101
|
-
|
|
102
98
|
# rubocop:disable Metrics/ParameterLists
|
|
103
99
|
|
|
104
100
|
##
|
|
@@ -133,7 +133,7 @@ module Faker
|
|
|
133
133
|
def random(*args)
|
|
134
134
|
method_list = available_methods
|
|
135
135
|
args&.each { |ex| method_list.delete_if { |meth| meth == ex.to_sym } }
|
|
136
|
-
send(method_list[rand(0..method_list.length - 1)])
|
|
136
|
+
send(method_list[Faker::Config.random.rand(0..method_list.length - 1)])
|
|
137
137
|
end
|
|
138
138
|
|
|
139
139
|
##
|
|
@@ -168,7 +168,7 @@ module Faker
|
|
|
168
168
|
private
|
|
169
169
|
|
|
170
170
|
def available_methods
|
|
171
|
-
Markdown.public_methods(false) - Base.methods
|
|
171
|
+
(Markdown.public_methods(false) - Base.methods).sort
|
|
172
172
|
end
|
|
173
173
|
end
|
|
174
174
|
end
|
data/lib/faker/default/nation.rb
CHANGED
|
@@ -17,8 +17,6 @@ module Faker
|
|
|
17
17
|
fetch('nation.nationality')
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
# rubocop:disable Style/AsciiComments
|
|
21
|
-
|
|
22
20
|
##
|
|
23
21
|
# Produces a random national flag emoji.
|
|
24
22
|
#
|
|
@@ -31,7 +29,6 @@ module Faker
|
|
|
31
29
|
def flag
|
|
32
30
|
sample(translate('faker.nation.flag')).pack('C*').force_encoding('utf-8')
|
|
33
31
|
end
|
|
34
|
-
# rubocop:enable Style/AsciiComments
|
|
35
32
|
|
|
36
33
|
##
|
|
37
34
|
# Produces a random national language.
|