faker 1.9.3 → 1.9.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +94 -1
  3. data/README.md +21 -10
  4. data/bin/faker +5 -0
  5. data/lib/faker/blockchain/tezos.rb +10 -5
  6. data/lib/faker/creature/horse.rb +19 -0
  7. data/lib/faker/default/coffee.rb +2 -0
  8. data/lib/faker/default/company.rb +4 -0
  9. data/lib/faker/default/file.rb +10 -1
  10. data/lib/faker/default/internet.rb +14 -2
  11. data/lib/faker/default/json.rb +4 -4
  12. data/lib/faker/default/number.rb +5 -0
  13. data/lib/faker/deprecate/unreleased/football.rb +35 -0
  14. data/lib/faker/deprecate/unreleased/movies/grateful_dead.rb +22 -0
  15. data/lib/faker/games/game.rb +21 -0
  16. data/lib/faker/{movies → music}/grateful_dead.rb +3 -1
  17. data/lib/faker/music/opera.rb +26 -0
  18. data/lib/faker/sports/basketball.rb +25 -0
  19. data/lib/faker/sports/football.rb +29 -0
  20. data/lib/faker/version.rb +1 -1
  21. data/lib/locales/en-AU.yml +1 -1
  22. data/lib/locales/en/animal.yml +2 -2
  23. data/lib/locales/en/basketball.yml +99 -0
  24. data/lib/locales/en/company.yml +1 -0
  25. data/lib/locales/en/crypto_coin.yml +22 -6
  26. data/lib/locales/en/dc_comics.yml +5 -5
  27. data/lib/locales/en/dota.yml +3 -1
  28. data/lib/locales/en/food.yml +1 -1
  29. data/lib/locales/en/game.yml +283 -0
  30. data/lib/locales/en/grateful_dead.yml +2 -1
  31. data/lib/locales/en/heroes_of_the_storm.yml +2 -2
  32. data/lib/locales/en/horse.yml +6 -0
  33. data/lib/locales/en/kpop.yml +1 -1
  34. data/lib/locales/en/league_of_legends.yml +2 -2
  35. data/lib/locales/en/music.yml +1 -1
  36. data/lib/locales/en/nation.yml +1 -1
  37. data/lib/locales/en/opera.yml +172 -0
  38. data/lib/locales/en/phish.yml +1 -1
  39. data/lib/locales/en/rupaul.yml +51 -21
  40. data/lib/locales/en/space.yml +1 -1
  41. data/lib/locales/en/stargate.yml +1 -2
  42. data/lib/locales/en/subscription.yml +1 -1
  43. data/lib/locales/en/super_smash_bros.yml +4 -0
  44. data/lib/locales/en/verbs.yml +2 -2
  45. data/lib/locales/fr-CA.yml +0 -5
  46. data/lib/locales/fr-CH.yml +0 -1
  47. data/lib/locales/fr.yml +1 -1
  48. data/lib/locales/hy.yml +47 -2
  49. data/lib/locales/ja.yml +16 -0
  50. data/lib/locales/pt-BR.yml +4 -1
  51. data/lib/locales/zh-CN.yml +3 -6
  52. data/lib/locales/zh-TW.yml +2 -2
  53. metadata +58 -98
  54. data/lib/faker/default/football.rb +0 -27
  55. data/lib/faker/deprecate/aqua_teen_hunger_force.rb +0 -15
  56. data/lib/faker/deprecate/back_to_the_future.rb +0 -25
  57. data/lib/faker/deprecate/bitcoin.rb +0 -20
  58. data/lib/faker/deprecate/bojack_horseman.rb +0 -25
  59. data/lib/faker/deprecate/breaking_bad.rb +0 -20
  60. data/lib/faker/deprecate/buffy.rb +0 -35
  61. data/lib/faker/deprecate/cat.rb +0 -25
  62. data/lib/faker/deprecate/community.rb +0 -20
  63. data/lib/faker/deprecate/dog.rb +0 -50
  64. data/lib/faker/deprecate/dota.rb +0 -35
  65. data/lib/faker/deprecate/dr_who.rb +0 -45
  66. data/lib/faker/deprecate/dragon_ball.rb +0 -15
  67. data/lib/faker/deprecate/dumb_and_dumber.rb +0 -25
  68. data/lib/faker/deprecate/dune.rb +0 -35
  69. data/lib/faker/deprecate/elder_scrolls.rb +0 -50
  70. data/lib/faker/deprecate/ethereum.rb +0 -15
  71. data/lib/faker/deprecate/fallout.rb +0 -30
  72. data/lib/faker/deprecate/family_guy.rb +0 -25
  73. data/lib/faker/deprecate/famous_last_words.rb +0 -15
  74. data/lib/faker/deprecate/friends.rb +0 -25
  75. data/lib/faker/deprecate/game_of_thrones.rb +0 -35
  76. data/lib/faker/deprecate/harry_potter.rb +0 -40
  77. data/lib/faker/deprecate/heroes_of_the_storm.rb +0 -30
  78. data/lib/faker/deprecate/hey_arnold.rb +0 -25
  79. data/lib/faker/deprecate/hitchhikers_guide_to_the_galaxy.rb +0 -44
  80. data/lib/faker/deprecate/hobbit.rb +0 -30
  81. data/lib/faker/deprecate/how_i_met_your_mother.rb +0 -30
  82. data/lib/faker/deprecate/league_of_legends.rb +0 -40
  83. data/lib/faker/deprecate/lebowski.rb +0 -25
  84. data/lib/faker/deprecate/lord_of_the_rings.rb +0 -25
  85. data/lib/faker/deprecate/lovecraft.rb +0 -65
  86. data/lib/faker/deprecate/matz.rb +0 -15
  87. data/lib/faker/deprecate/michael_scott.rb +0 -15
  88. data/lib/faker/deprecate/most_interesting_man_in_the_world.rb +0 -15
  89. data/lib/faker/deprecate/myst.rb +0 -35
  90. data/lib/faker/deprecate/new_girl.rb +0 -20
  91. data/lib/faker/deprecate/one_piece.rb +0 -40
  92. data/lib/faker/deprecate/overwatch.rb +0 -25
  93. data/lib/faker/deprecate/parks_and_rec.rb +0 -20
  94. data/lib/faker/deprecate/pokemon.rb +0 -25
  95. data/lib/faker/deprecate/princess_bride.rb +0 -20
  96. data/lib/faker/deprecate/rick_and_morty.rb +0 -25
  97. data/lib/faker/deprecate/robin.rb +0 -15
  98. data/lib/faker/deprecate/rock_band.rb +0 -15
  99. data/lib/faker/deprecate/ru_paul.rb +0 -20
  100. data/lib/faker/deprecate/seinfeld.rb +0 -25
  101. data/lib/faker/deprecate/shakespeare.rb +0 -50
  102. data/lib/faker/deprecate/silicon_valley.rb +0 -50
  103. data/lib/faker/deprecate/simpsons.rb +0 -25
  104. data/lib/faker/deprecate/singular_siegler.rb +0 -15
  105. data/lib/faker/deprecate/south_park.rb +0 -20
  106. data/lib/faker/deprecate/star_trek.rb +0 -30
  107. data/lib/faker/deprecate/star_wars.rb +0 -95
  108. data/lib/faker/deprecate/stargate.rb +0 -25
  109. data/lib/faker/deprecate/stranger_things.rb +0 -20
  110. data/lib/faker/deprecate/sword_art_online.rb +0 -30
  111. data/lib/faker/deprecate/tezos.rb +0 -33
  112. data/lib/faker/deprecate/the_fresh_prince_of_bel_air.rb +0 -25
  113. data/lib/faker/deprecate/the_it_crowd.rb +0 -30
  114. data/lib/faker/deprecate/the_thick_of_it.rb +0 -25
  115. data/lib/faker/deprecate/twin_peaks.rb +0 -25
  116. data/lib/faker/deprecate/umphreys_mcgee.rb +0 -15
  117. data/lib/faker/deprecate/v_for_vendetta.rb +0 -25
  118. data/lib/faker/deprecate/venture_bros.rb +0 -30
  119. data/lib/faker/deprecate/witcher.rb +0 -40
  120. data/lib/faker/deprecate/world_of_warcraft.rb +0 -20
  121. data/lib/faker/deprecate/yoda.rb +0 -16
  122. data/lib/faker/deprecate/zelda.rb +0 -30
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f03350f51046e632c66e829e6386c993efe587c10d977d2ff7a889b753b236b2
4
- data.tar.gz: 9c66012aa8accbc8d5202bc8d7af44e02627c48437004daa9414500b1e639977
3
+ metadata.gz: 182c6a436b64f259813bf79005eb3b0f5f2ce35d3c522b9fb2681ac68bdfe115
4
+ data.tar.gz: 96db38b14bf7a8afaf09ef6e0d232ad153e1bffcfeff85015b95b9b29cd7e1ea
5
5
  SHA512:
6
- metadata.gz: 7f0d97b3f14bbf9f37db1b0280e19a0d9cfc38af2fe40849280606f14ed5947ffaa01781d65979b3ab28f44e530721da18c5903722587031819bb009868c90ef
7
- data.tar.gz: c2c3639d373065fd3479a5e5e3e03e01aa2529b4c55cb81e3c8ab95d9add1bc056f4674f4c201938a1f2e711d3709163cd84c5f467bf837df29092435fc5a233
6
+ metadata.gz: c6c0ca2ab46c4775bc0ed36ad046a7598d322e5d452b14475725e2ef8a72a5aa1c5fb5d772b251dedf49a744e4245370c51a5d351618297bf5690b5b0626df8d
7
+ data.tar.gz: 63e374de8cc2ce4658b297978af85250a8767cde7dd365a1492ff2b381caf07faa90d95066a52346667b55eae95275c1003e14b3abecc32102115796fef791e8
@@ -3,19 +3,112 @@
3
3
  ## HEAD Unreleased
4
4
 
5
5
  ### Bug/Fixes
6
+ ### Chores
7
+ ### Deprecation
8
+ ### Documentation
9
+ ### Feature Request
10
+ ### Update/add locales
11
+
12
+ ------------------------------------------------------------------------------
13
+
14
+ ## [v1.9.6](https://github.com/stympy/faker/tree/v1.9.5) (2019-07-05)
15
+
16
+ Fix lib/faker/version.rb
17
+
18
+ ## [v1.9.5](https://github.com/stympy/faker/tree/v1.9.5) (2019-07-04)
19
+
20
+ ### Bug
21
+
22
+ - [PR #1644](https://github.com/stympy/faker/pull/1644) Revert fakerbot and move to own repository inside new organization [@vbrazo](https://github.com/vbrazo)
23
+
24
+ ### Deprecate
25
+
26
+ - [PR #1516](https://github.com/stympy/faker/pull/1516) Deprecate Faker::Number.decimal_part and Faker::Number.leading_zero_number [@vbrazo](https://github.com/vbrazo)
27
+
28
+ ### Documentation
29
+
30
+ - [PR #1640](https://github.com/stympy/faker/pull/1640) Add pull_request_template.md [@vbrazo](https://github.com/vbrazo)
31
+
32
+ ### Feature Request
33
+
34
+ - [PR #1361](https://github.com/stympy/faker/pull/1361) Add Faker::File.dir [@tylerhunt](https://github.com/tylerhunt)
35
+
36
+ ### Update Locales
37
+
38
+ - [PR #1643](https://github.com/stympy/faker/pull/1643) Add 558 Verb ing_forms from Verb base [@lightyrs](https://github.com/lightyrs)
39
+
40
+ ------------------------------------------------------------------------------
41
+
42
+ ## [v1.9.4](https://github.com/stympy/faker/tree/v1.9.4) (2019-06-19)
43
+
44
+ ### Bug/Fixes
45
+
46
+ - [PR #1605](https://github.com/stympy/faker/pull/1605) fix shallow_json for frozen_string_literal [@causztic](https://github.com/causztic)
47
+ - [PR #1597](https://github.com/stympy/faker/pull/1597) Fix broken test [@vbrazo](https://github.com/vbrazo)
48
+ - [PR #1578](https://github.com/stympy/faker/pull/1578) Namespaces should inherit Base [@vbrazo](https://github.com/vbrazo)
6
49
 
7
50
  ### Chores
8
51
 
52
+ - [PR #1626](https://github.com/stympy/faker/pull/1626) Update tty tree [@Zeragamba](https://github.com/Zeragamba)
53
+ - [PR #1559](https://github.com/stympy/faker/pull/1559) Fix name_with_middle field for en-AU [@psibi](https://github.com/psibi)
54
+ - [PR #1548](https://github.com/stympy/faker/pull/1548) Chore/improve pt-BR specs [@paulodiovani](https://github.com/paulodiovani)
55
+ - [PR #1542](https://github.com/stympy/faker/pull/1542) Fixed typos to the unreleased_README.md [@gkunwar](https://github.com/gkunwar)
56
+ - [PR #1541](https://github.com/stympy/faker/pull/1541) Add new categories to armenian [@hovikman](https://github.com/hovikman)
57
+
9
58
  ### Deprecation
10
59
 
60
+ - [PR #1549](https://github.com/stympy/faker/pull/1549) Faker::Movies::GratefulDead => Faker::Music::GratefulDead [@bcharna](https://github.com/bcharna)
61
+ - [PR #1538](https://github.com/stympy/faker/pull/1538) Add Sports namespace [@vbrazo](https://github.com/vbrazo)
62
+ - Deprecates `::Football`
63
+
11
64
  ### Documentation
12
65
 
66
+ - [PR #1636](https://github.com/stympy/faker/pull/1636) Fix default values for arguments in Lorem doc [@mikong](https://github.com/mikong)
67
+ - [PR #1617](https://github.com/stympy/faker/pull/1617) Fix Dota README [@TheSmartnik](https://github.com/TheSmartnik)
68
+ - [PR #1612](https://github.com/stympy/faker/pull/1612) Update returned example player [@ncallaway](https://github.com/ncallaway)
69
+ - [PR #1611](https://github.com/stympy/faker/pull/1611) Documentation error fix [@tomlockwood](https://github.com/tomlockwood)
70
+ - [PR #1575](https://github.com/stympy/faker/pull/1575) Add issues templates [@vbrazo](https://github.com/vbrazo)
71
+
13
72
  ### Feature Request
14
73
 
15
- ### Suggestion
74
+ - [PR #1631](https://github.com/stympy/faker/pull/1631) Faker::Tezos: add block faker [@akettal](https://github.com/akettal)
75
+ - [PR #1619](https://github.com/stympy/faker/pull/1619) Add Faker::Music::Opera [@Adsidera](https://github.com/Adsidera)
76
+ - [PR #1607](https://github.com/stympy/faker/pull/1607) Add Faker::Game with title, genre, and platform generators. [@connorshea](https://github.com/connorshea)
77
+ - [PR #1603](https://github.com/stympy/faker/pull/1603) Add Faker::Internet.uuid [@ianks](https://github.com/ianks)
78
+ - [PR #1560](https://github.com/stympy/faker/pull/1560) Add Faker::Creature::Horse [@wndxlori](https://github.com/wndxlori)
79
+ - [PR #1507](https://github.com/stympy/faker/pull/1507) Add CLI - Integrate fakerbot 🤖 [@akabiru](https://github.com/akabiru)
80
+ - [PR #1540](https://github.com/stympy/faker/pull/1540) Add sic_code to company #355 [@bruno-b-martins](https://github.com/bruno-b-martins)
81
+ - [PR #1537](https://github.com/stympy/faker/pull/1537) Adds the Faker::Sports::Basketball generator [@ecbrodie](https://github.com/ecbrodie)
82
+ - [PR #1520](https://github.com/stympy/faker/pull/1520) Allow subdomains for Internet.domain_name [@cianooooo](https://github.com/cianooooo)
16
83
 
17
84
  ### Update/add locales
18
85
 
86
+ - [PR #1629](https://github.com/stympy/faker/pull/1629) Fix sintax error on game.yml file [@ricardobsilva](https://github.com/ricardobsilva)
87
+ - [PR #1627](https://github.com/stympy/faker/pull/1627) add more data for Faker::Games [@BlazingRockStorm](https://github.com/BlazingRockStorm)
88
+ - [PR #1620](https://github.com/stympy/faker/pull/1620) Added Yuumi as a Champion [@eddorre](https://github.com/eddorre)
89
+ - [PR #1621](https://github.com/stympy/faker/pull/1621) Updated classes to match the changes that Blizzard rolled out late last year. Updated hero pool to add the latest two heroes added to the game. [@eddorre](https://github.com/eddorre)
90
+ - [PR #1602](https://github.com/stympy/faker/pull/1602) Remove white space, fix minor typos [@darylf](https://github.com/darylf)
91
+ - [PR #1595](https://github.com/stympy/faker/pull/1595) Fix accented French surnames [@Samy-Amar](https://github.com/Samy-Amar)
92
+ - [PR #1585](https://github.com/stympy/faker/pull/1585) Add Meepo to Dota heroes and quotes [@justinoue](https://github.com/justinoue)
93
+ - [PR #1594](https://github.com/stympy/faker/pull/1594) Changed Startrek to Stargate :) [@Defoncesko](https://github.com/Defoncesko)
94
+ - [PR #1591](https://github.com/stympy/faker/pull/1591) fix-chinese-city [@locez](https://github.com/locez)
95
+ - [PR #1592](https://github.com/stympy/faker/pull/1592) Add coffee country for Japanese [@schmurfy](https://github.com/schmurfy)
96
+ - [PR #1593](https://github.com/stympy/faker/pull/1593) removes duplicates in fr-CA and fr-CH [@schmurfy](https://github.com/schmurfy)
97
+ - [PR #1587](https://github.com/stympy/faker/pull/1587) Add ancient god for Japanese [@yizknn](https://github.com/yizknn)
98
+ - [PR #1582](https://github.com/stympy/faker/pull/1582) Add fighters and DLC to Faker::Games::SuperSmashBros [@boardfish](https://github.com/boardfish)
99
+ - [PR #1583](https://github.com/stympy/faker/pull/1583) updates to RuPaul [@notactuallypagemcconnell](https://github.com/notactuallypagemcconnell)
100
+ - [PR #1581](https://github.com/stympy/faker/pull/1581) add latest list of phish tunes from phish.net/song that are by the band and not covers [@notactuallypagemcconnell](https://github.com/notactuallypagemcconnell)
101
+ - [PR #1573](https://github.com/stympy/faker/pull/1573) Fix data of music albums [@sankichi92](https://github.com/sankichi92)
102
+ - [PR #1567](https://github.com/stympy/faker/pull/1567) Fix name_with_middle in Chinese locales [@rockymeza](https://github.com/rockymeza)
103
+ - [PR #1564](https://github.com/stympy/faker/pull/1564) Update League of legends content [@michebble](https://github.com/michebble)
104
+ - [PR #1558](https://github.com/stympy/faker/pull/1558) remove misspelling of Japanese [@michebble](https://github.com/michebble)
105
+ - [PR #1554](https://github.com/stympy/faker/pull/1554) Extend list of cryptocurrencies [@kamilbielawski](https://github.com/kamilbielawski)
106
+ - [PR #1552](https://github.com/stympy/faker/pull/1552) Fix subscription: Fix missing double quotes [@psibi](https://github.com/psibi)
107
+ - [PR #1551](https://github.com/stympy/faker/pull/1551) Yaml syntax for stargate.yml: Fix missing double quote [@psibi](https://github.com/psibi)
108
+ - [PR #1550](https://github.com/stympy/faker/pull/1550) Fix kpop - yaml syntax issue. Double quote is missing [@psibi](https://github.com/psibi)
109
+ - [PR #1545](https://github.com/stympy/faker/pull/1545) Remove trailing space from "kangaroo " & "gnu " translation in animals [@spikeheap](https://github.com/spikeheap)
110
+ - [PR #1543](https://github.com/stympy/faker/pull/1543) Add pt-BR genders [@fladson](https://github.com/fladson)
111
+
19
112
  ------------------------------------------------------------------------------
20
113
 
21
114
  ## [v1.9.3](https://github.com/stympy/faker/tree/v1.9.2) (2019-02-12)
data/README.md CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  ![logotype a happy-07](https://user-images.githubusercontent.com/36028424/40263395-4318481e-5b44-11e8-92e5-3dcc1ce169b3.png)
2
3
 
3
4
  # Faker
@@ -15,11 +16,13 @@ for the creation of this gem), having real-looking test data, and having your
15
16
  database populated with more than one or two records while you're doing
16
17
  development.
17
18
 
18
- - [Installing](#installing)
19
- - [Usage](#usage)
19
+ - [Faker](#faker)
20
+ - [NOTE](#note)
21
+ - [Installing](#installing)
22
+ - [Usage](#usage)
20
23
  - [Ensuring unique values](#ensuring-unique-values)
21
24
  - [Deterministic Random](#deterministic-random)
22
- - [Generators](#generators)
25
+ - [Generators](#generators)
23
26
  - [Default](#default)
24
27
  - [Blockchain](#blockchain)
25
28
  - [Books](#books)
@@ -29,11 +32,12 @@ development.
29
32
  - [Movies](#movies)
30
33
  - [Music](#music)
31
34
  - [Quotes](#quotes)
32
- - [TV Shows](#tv-shows)
33
- - [Customization](#customization)
34
- - [Contributing](#contributing)
35
- - [Contact](#contact)
36
- - [License](#license)
35
+ - [Sports](#sports)
36
+ - [Tv Shows](#tv-shows)
37
+ - [Customization](#customization)
38
+ - [Contributing](#contributing)
39
+ - [Contact](#contact)
40
+ - [License](#license)
37
41
 
38
42
  ### NOTE
39
43
  * While Faker generates data at random, returned values are not guaranteed to be unique by default.
@@ -47,7 +51,7 @@ development.
47
51
  ```bash
48
52
  gem install faker
49
53
  ```
50
- Note: if you are getting a `uninitialized constant Faker::[some_class]` error, your version of the gem is behind the one documented here. To make sure that your gem is the one documented here, change the line in your gemfile to:
54
+ Note: if you are getting a `uninitialized constant Faker::[some_class]` error, your version of the gem is behind the one documented here. To make sure that your gem is the one documented here, change the line in your Gemfile to:
51
55
 
52
56
  ```ruby
53
57
  gem 'faker', :git => 'https://github.com/stympy/faker.git', :branch => 'master'
@@ -218,8 +222,10 @@ gem 'faker', :git => 'https://github.com/stympy/faker.git', :branch => 'master'
218
222
  - [Faker::Creature::Animal](doc/creature/animal.md)
219
223
  - [Faker::Creature::Cat](doc/creature/cat.md)
220
224
  - [Faker::Creature::Dog](doc/creature/dog.md)
225
+ - [Faker::Creature::Horse](doc/creature/horse.md)
221
226
 
222
227
  ### Games
228
+ - [Faker::Game](doc/games/game.md)
223
229
  - [Faker::Games::Dota](doc/games/dota.md)
224
230
  - [Faker::Games::ElderScrolls](doc/games/elder_scrolls.md)
225
231
  - [Faker::Games::Fallout](doc/games/fallout.md)
@@ -245,7 +251,6 @@ gem 'faker', :git => 'https://github.com/stympy/faker.git', :branch => 'master'
245
251
  - [Faker::Movie](doc/movies/movie.md)
246
252
  - [Faker::Movies::BackToTheFuture](doc/movies/back_to_the_future.md)
247
253
  - [Faker::Movies::Ghostbusters](doc/movies/ghostbusters.md)
248
- - [Faker::Movies::GratefulDead](doc/movies/grateful_dead.md)
249
254
  - [Faker::Movies::HarryPotter](doc/movies/harry_potter.md)
250
255
  - [Faker::Movies::HitchhikersGuideToTheGalaxy](doc/movies/hitchhikers_guide_to_the_galaxy.md)
251
256
  - [Faker::Movies::Hobbit](doc/movies/hobbit.md)
@@ -257,6 +262,8 @@ gem 'faker', :git => 'https://github.com/stympy/faker.git', :branch => 'master'
257
262
 
258
263
  ### Music
259
264
  - [Faker::Music](doc/music/music.md)
265
+ - [Faker::Music::GratefulDead](doc/music/grateful_dead.md)
266
+ - [Faker::Music::Opera](doc/music/opera.md)
260
267
  - [Faker::Music::Phish](doc/music/phish.md)
261
268
  - [Faker::Music::RockBand](doc/music/rock_band.md)
262
269
  - [Faker::Music::UmphreysMcgee](doc/music/umphreys_mcgee.md)
@@ -265,6 +272,10 @@ gem 'faker', :git => 'https://github.com/stympy/faker.git', :branch => 'master'
265
272
  - [Faker::Quote](doc/quotes/quote.md)
266
273
  - [Faker::Quotes::Shakespeare](doc/quotes/shakespeare.md)
267
274
 
275
+ ### Sports
276
+ - [Faker::Sports::Basketball](doc/sports/basketball.md)
277
+ - [Faker::Sports::Football](doc/sports/football.md)
278
+
268
279
  ### Tv Shows
269
280
  - [Faker::TvShows::AquaTeenHungerForce](doc/tv_shows/aqua_teen_hunger_force.md)
270
281
  - [Faker::TvShows::BojackHorseman](doc/tv_shows/bojack_horseman.md)
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ lib_path = File.expand_path('../lib', __dir__)
5
+ $LOAD_PATH.unshift(lib_path) unless $LOAD_PATH.include?(lib_path)
@@ -8,12 +8,13 @@ module Faker
8
8
  class Tezos < Base
9
9
  class << self
10
10
  PREFIXES = {
11
- tz1: [6, 161, 159],
12
- KT1: [2, 90, 121],
13
- edpk: [13, 15, 37, 217],
11
+ tz1: [6, 161, 159],
12
+ KT1: [2, 90, 121],
13
+ edpk: [13, 15, 37, 217],
14
14
  edsk: [13, 15, 58, 7],
15
- edsig: [9, 245, 205, 134, 18],
16
- o: [5, 116]
15
+ edsig: [9, 245, 205, 134, 18],
16
+ B: [1, 52],
17
+ o: [5, 116]
17
18
  }.freeze
18
19
 
19
20
  def account
@@ -28,6 +29,10 @@ module Faker
28
29
  encode_tz(:o, 32)
29
30
  end
30
31
 
32
+ def block
33
+ encode_tz(:B, 32)
34
+ end
35
+
31
36
  def signature
32
37
  encode_tz(:edsig, 64)
33
38
  end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Faker
4
+ module Creature
5
+ class Horse < Base
6
+ flexible :horse
7
+
8
+ class << self
9
+ def name
10
+ fetch('creature.horse.name')
11
+ end
12
+
13
+ def breed
14
+ fetch('creature.horse.breed')
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -2,6 +2,8 @@
2
2
 
3
3
  module Faker
4
4
  class Coffee < Base
5
+ flexible :coffee
6
+
5
7
  class << self
6
8
  def blend_name
7
9
  parse('coffee.blend_name')
@@ -168,6 +168,10 @@ module Faker
168
168
  formatted ? format('%s.%s.%s/%s-%s', *number.scan(/(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})/).flatten) : number
169
169
  end
170
170
 
171
+ def sic_code
172
+ fetch('company.sic_code')
173
+ end
174
+
171
175
  private
172
176
 
173
177
  # Mod11 functionality from https://github.com/badmanski/mod11/blob/master/lib/mod11.rb
@@ -3,6 +3,15 @@
3
3
  module Faker
4
4
  class File < Base
5
5
  class << self
6
+ def dir(segment_count = 3, root = nil, directory_separator = '/')
7
+ Array
8
+ .new(segment_count) { Faker::Internet.slug }
9
+ .unshift(root)
10
+ .compact
11
+ .join(directory_separator)
12
+ .squeeze(directory_separator)
13
+ end
14
+
6
15
  def extension
7
16
  fetch('file.extension')
8
17
  end
@@ -12,7 +21,7 @@ module Faker
12
21
  end
13
22
 
14
23
  def file_name(dir = nil, name = nil, ext = nil, directory_separator = '/')
15
- dir ||= Faker::Internet.slug
24
+ dir ||= dir(1)
16
25
  name ||= Faker::Lorem.word.downcase
17
26
  ext ||= extension
18
27
 
@@ -79,8 +79,12 @@ module Faker
79
79
  temp
80
80
  end
81
81
 
82
- def domain_name
83
- with_locale(:en) { [Char.prepare(domain_word), domain_suffix].join('.') }
82
+ def domain_name(subdomain = false)
83
+ with_locale(:en) do
84
+ domain_elements = [Char.prepare(domain_word), domain_suffix]
85
+ domain_elements.unshift(Char.prepare(domain_word)) if subdomain
86
+ domain_elements.join('.')
87
+ end
84
88
  end
85
89
 
86
90
  def fix_umlauts(string = '')
@@ -188,6 +192,14 @@ module Faker
188
192
  sample(agents)
189
193
  end
190
194
 
195
+ def uuid
196
+ # borrowed from: https://github.com/ruby/ruby/blob/d48783bb0236db505fe1205d1d9822309de53a36/lib/securerandom.rb#L250
197
+ ary = Faker::Config.random.bytes(16).unpack('NnnnnN')
198
+ ary[2] = (ary[2] & 0x0fff) | 0x4000
199
+ ary[3] = (ary[3] & 0x3fff) | 0x8000
200
+ '%08x-%04x-%04x-%04x-%04x%08x' % ary # rubocop:disable Style/FormatString
201
+ end
202
+
191
203
  alias user_name username
192
204
  end
193
205
  end
@@ -4,16 +4,16 @@ module Faker
4
4
 
5
5
  class << self
6
6
  def shallow_json(width = 3, options = { key: 'Name.first_name', value: 'Name.first_name' })
7
- options[:key] = options[:key].prepend('Faker::')
8
- options[:value] = options[:value].prepend('Faker::')
7
+ options[:key] = 'Faker::' + options[:key]
8
+ options[:value] = 'Faker::' + options[:value]
9
9
 
10
10
  hash = build_shallow_hash(width, options)
11
11
  JSON.generate(hash)
12
12
  end
13
13
 
14
14
  def add_depth_to_json(json = shallow_json, width = 3, options = { key: 'Name.first_name', value: 'Name.first_name' })
15
- options[:key] = options[:key].prepend('Faker::')
16
- options[:value] = options[:value].prepend('Faker::')
15
+ options[:key] = 'Faker::' + options[:key]
16
+ options[:value] = 'Faker::' + options[:value]
17
17
 
18
18
  hash = JSON.parse(json)
19
19
  hash.each do |key, _|
@@ -3,6 +3,8 @@
3
3
  module Faker
4
4
  class Number < Base
5
5
  class << self
6
+ extend Gem::Deprecate
7
+
6
8
  def number(digits = 10)
7
9
  num = ''
8
10
 
@@ -92,6 +94,9 @@ module Faker
92
94
  number * -1
93
95
  end
94
96
  end
97
+
98
+ deprecate :decimal_part, nil, 2019, 06
99
+ deprecate :leading_zero_number, nil, 2019, 06
95
100
  end
96
101
  end
97
102
  end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Faker
4
+ class Football
5
+ class << self
6
+ extend Gem::Deprecate
7
+
8
+ def team
9
+ Faker::Sports::Football.team
10
+ end
11
+
12
+ def player
13
+ Faker::Sports::Football.player
14
+ end
15
+
16
+ def coach
17
+ Faker::Sports::Football.coach
18
+ end
19
+
20
+ def competition
21
+ Faker::Sports::Football.competition
22
+ end
23
+
24
+ def position
25
+ Faker::Sports::Football.position
26
+ end
27
+
28
+ deprecate :team, 'Faker::Sports::Football.team', 2019, 04
29
+ deprecate :player, 'Faker::Sports::Football.player', 2019, 04
30
+ deprecate :coach, 'Faker::Sports::Football.coach', 2019, 04
31
+ deprecate :competition, 'Faker::Sports::Football.competition', 2019, 04
32
+ deprecate :position, 'Faker::Sports::Football.position', 2019, 04
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Faker
4
+ module Movies
5
+ class GratefulDead < Base
6
+ class << self
7
+ extend Gem::Deprecate
8
+
9
+ def player
10
+ Faker::Music::GratefulDead.player
11
+ end
12
+
13
+ def song
14
+ Faker::Music::GratefulDead.song
15
+ end
16
+
17
+ deprecate :player, 'Faker::Music::GratefulDead.player', 2019, 04
18
+ deprecate :song, 'Faker::Music::GratefulDead.song', 2019, 04
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Faker
4
+ class Game < Base
5
+ flexible :game
6
+
7
+ class << self
8
+ def title
9
+ fetch('game.title')
10
+ end
11
+
12
+ def genre
13
+ fetch('game.genre')
14
+ end
15
+
16
+ def platform
17
+ fetch('game.platform')
18
+ end
19
+ end
20
+ end
21
+ end