faker 1.8.4 → 1.8.5

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 (126) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +62 -3
  3. data/README.md +19 -6
  4. data/lib/faker/aqua_teen_hunger_force.rb +9 -0
  5. data/lib/faker/back_to_the_future.rb +17 -0
  6. data/lib/faker/bank.rb +16 -10
  7. data/lib/faker/breaking_bad.rb +16 -0
  8. data/lib/faker/company.rb +21 -0
  9. data/lib/faker/dog.rb +39 -0
  10. data/lib/faker/dumb_and_dumber.rb +17 -0
  11. data/lib/faker/dune.rb +54 -0
  12. data/lib/faker/esport.rb +5 -5
  13. data/lib/faker/fallout.rb +21 -0
  14. data/lib/faker/finance.rb +1 -1
  15. data/lib/faker/kpop.rb +29 -0
  16. data/lib/faker/lebowski.rb +17 -0
  17. data/lib/faker/markdown.rb +1 -0
  18. data/lib/faker/name.rb +8 -4
  19. data/lib/faker/one_piece.rb +29 -0
  20. data/lib/faker/programming_language.rb +13 -0
  21. data/lib/faker/rupaul.rb +4 -0
  22. data/lib/faker/science.rb +15 -0
  23. data/lib/faker/shakespeare.rb +4 -47
  24. data/lib/faker/silicon_valley.rb +33 -0
  25. data/lib/faker/star_wars.rb +26 -27
  26. data/lib/faker/stargate.rb +17 -0
  27. data/lib/faker/the_thick_of_it.rb +17 -0
  28. data/lib/faker/university.rb +2 -6
  29. data/lib/faker/v_for_vendetta.rb +17 -0
  30. data/lib/faker/vehicle.rb +2 -0
  31. data/lib/faker/version.rb +1 -1
  32. data/lib/faker/zelda.rb +4 -0
  33. data/lib/helpers/char.rb +21 -0
  34. data/lib/locales/de.yml +2 -2
  35. data/lib/locales/en-MS.yml +2 -0
  36. data/lib/locales/en.yml +0 -777
  37. data/lib/locales/en/ancient.yml +7 -0
  38. data/lib/locales/en/app.yml +8 -0
  39. data/lib/locales/en/aqua_teen_hunger_force.yml +4 -0
  40. data/lib/locales/en/artist.yml +4 -0
  41. data/lib/locales/en/back_to_the_future.yml +120 -0
  42. data/lib/locales/en/bank.yml +87 -0
  43. data/lib/locales/en/beer.yml +8 -0
  44. data/lib/locales/en/book.yml +7 -0
  45. data/lib/locales/en/breaking_bad.yml +28 -0
  46. data/lib/locales/en/business.yml +5 -0
  47. data/lib/locales/en/cat.yml +6 -0
  48. data/lib/locales/en/chuck_norris.yml +82 -0
  49. data/lib/locales/en/code.yml +4 -0
  50. data/lib/locales/en/coffee.yml +31 -0
  51. data/lib/locales/en/color.yml +4 -0
  52. data/lib/locales/en/commerce.yml +11 -0
  53. data/lib/locales/en/company.yml +20 -0
  54. data/lib/locales/en/compass.yml +34 -0
  55. data/lib/locales/en/demographic.yml +8 -0
  56. data/lib/locales/en/dessert.yml +6 -0
  57. data/lib/locales/en/dog.yml +11 -0
  58. data/lib/locales/en/dr_who.yml +25 -7
  59. data/lib/locales/en/dragon_ball.yml +4 -0
  60. data/lib/locales/en/dumb_and_dumber.yml +59 -0
  61. data/lib/locales/en/dune.yml +159 -0
  62. data/lib/locales/en/educator.yml +10 -0
  63. data/lib/locales/en/elder_scrolls.yml +7 -0
  64. data/lib/locales/en/esport.yml +8 -0
  65. data/lib/locales/en/fallout.yml +136 -0
  66. data/lib/locales/en/file.yml +5 -0
  67. data/lib/locales/en/finance.yml +50 -0
  68. data/lib/locales/en/food.yml +9 -0
  69. data/lib/locales/en/friends.yml +6 -0
  70. data/lib/locales/en/funny_name.yml +4 -0
  71. data/lib/locales/en/game_of_thrones.yml +8 -0
  72. data/lib/locales/en/hacker.yml +8 -0
  73. data/lib/locales/en/harry_potter.yml +8 -0
  74. data/lib/locales/en/hey_arnold.yml +24 -0
  75. data/lib/locales/en/hipster.yml +4 -0
  76. data/lib/locales/en/hitchhikers_guide_to_the_galaxy.yml +45 -0
  77. data/lib/locales/en/hobbit.yml +19 -0
  78. data/lib/locales/en/how_i_met_your_mother.yml +28 -0
  79. data/lib/locales/en/id_number.yml +5 -0
  80. data/lib/locales/en/job.yml +13 -0
  81. data/lib/locales/en/kpop.yml +83 -0
  82. data/lib/locales/en/league_of_legends.yml +9 -0
  83. data/lib/locales/en/lebowski.yml +43 -0
  84. data/lib/locales/en/lord_of_the_rings.yml +5 -0
  85. data/lib/locales/en/lorem.yml +5 -0
  86. data/lib/locales/en/markdown.yml +5 -0
  87. data/lib/locales/en/matz.yml +28 -0
  88. data/lib/locales/en/measurement.yml +11 -0
  89. data/lib/locales/en/music.yml +4 -0
  90. data/lib/locales/en/name.yml +25 -0
  91. data/lib/locales/en/one_piece.yml +9 -0
  92. data/lib/locales/en/overwatch.yml +35 -0
  93. data/lib/locales/en/phone_number.yml +6 -0
  94. data/lib/locales/en/pokemon.yml +7 -0
  95. data/lib/locales/en/programming_language.yml +5 -0
  96. data/lib/locales/en/robin.yml +4 -0
  97. data/lib/locales/en/rock_band.yml +4 -0
  98. data/lib/locales/en/rupaul.yml +95 -0
  99. data/lib/locales/en/science.yml +5 -0
  100. data/lib/locales/en/seinfeld.yml +5 -0
  101. data/lib/locales/en/shakespeare.yml +56 -0
  102. data/lib/locales/en/silicon_valley.yml +52 -0
  103. data/lib/locales/en/simpsons.yml +26 -0
  104. data/lib/locales/en/slack_emoji.yml +20 -0
  105. data/lib/locales/en/space.yml +16 -0
  106. data/lib/locales/en/star_trek.yml +7 -0
  107. data/lib/locales/en/star_wars.yml +246 -0
  108. data/lib/locales/en/stargate.yml +22 -0
  109. data/lib/locales/en/superhero.yml +12 -0
  110. data/lib/locales/en/team.yml +8 -0
  111. data/lib/locales/en/the_thick_of_it.yml +6 -0
  112. data/lib/locales/en/twin_peaks.yml +6 -0
  113. data/lib/locales/en/umphreys_mcgee.yml +4 -0
  114. data/lib/locales/en/university.yml +10 -0
  115. data/lib/locales/en/v_for_vendetta.yml +163 -0
  116. data/lib/locales/en/vehicle.yml +52 -0
  117. data/lib/locales/en/venture_bros.yml +7 -0
  118. data/lib/locales/en/yoda.yml +4 -0
  119. data/lib/locales/en/zelda.yml +7 -0
  120. data/lib/locales/fr.yml +1 -0
  121. data/lib/locales/ja.yml +1 -0
  122. data/lib/locales/ko.yml +2 -1
  123. data/lib/locales/nl.yml +1 -1
  124. data/lib/locales/pt-BR.yml +30 -3
  125. data/lib/locales/ru.yml +9 -3
  126. metadata +103 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 37d492bdd4beb8d41cc2eb228b4c51df95f23f39
4
- data.tar.gz: cf4a935e19d111a6a0e72a9f8da7d736e3e238be
3
+ metadata.gz: 2f69c0a347650680db1a112cec7a4bb3f3ee0539
4
+ data.tar.gz: 61cf772ea733d076a70dae6ab11be1d2889bb6b5
5
5
  SHA512:
6
- metadata.gz: 4aaef3c97647c28e291db859aa7db397b20a2151a2b841fdc858c1d83153052b9728c77819077069c91b6b40e04c3bccb1f61ac929c11e7cb097e19f06c14e8e
7
- data.tar.gz: 4dced932e98063ed7c7032f4f08370da41f323c140e3f69e13767dd92769a29834ce84e9e90116a3b72825f137363d4e7ac7a983f179b583c47e12e51566f940
6
+ metadata.gz: e8d080833b0d241eafe69f9b8a023006f1588ead012d51bf5252b5935efe2e638d7d6cc2898d82b54b19a344ad268daf8d153f68b2a1ff4330abdc245550e3e5
7
+ data.tar.gz: 15e0fc3b13bd60c96b15089b0def77887b201d53f0e1687f7518ea6b212c2553de559c4591db2104157f350cf05663cf768e47fc6534aff8add15c2643f25c33
@@ -1,6 +1,65 @@
1
1
  # Change Log
2
2
 
3
- ## [v1.8.4](https://github.com/stympy/faker/tree/v1.8.4) (2017-07-12)
3
+ ## [v1.8.5](https://github.com/stympy/faker/tree/v1.8.5) (2017-12-06)
4
+ [Full Changelog](https://github.com/stympy/faker/compare/v1.8.4...v1.8.5)
5
+
6
+ **Closed issues:**
7
+
8
+ - The latest version does not contain Faker::ProgarmmingLanguage, but the documentation said it does. [\#1083](https://github.com/stympy/faker/issues/1083)
9
+ - undefined method `initials' for Faker::Name:Class [\#1076](https://github.com/stympy/faker/issues/1076)
10
+ - Undefined method `dish' for Faker::Food:Class [\#1038](https://github.com/stympy/faker/issues/1038)
11
+ - Need Silicon Valley [\#1026](https://github.com/stympy/faker/issues/1026)
12
+ - Would it be possible to tie quotes to characters? [\#1011](https://github.com/stympy/faker/issues/1011)
13
+ - Generated phone numbers dont seem to be valid. [\#1010](https://github.com/stympy/faker/issues/1010)
14
+ - Faker::RickAndMorty not supported in 1.7.3 [\#988](https://github.com/stympy/faker/issues/988)
15
+ - Weird crash with Faker 1.8.3 [\#982](https://github.com/stympy/faker/issues/982)
16
+ - Faker::PhoneNumber.cell\_phone not enforcing locale [\#499](https://github.com/stympy/faker/issues/499)
17
+ - https url scheme [\#459](https://github.com/stympy/faker/issues/459)
18
+ - New feature: Google video and image searching [\#306](https://github.com/stympy/faker/issues/306)
19
+ - The array extension method :sample throw an argument error when the array is empty [\#94](https://github.com/stympy/faker/issues/94)
20
+ - phone\_number can generate invalid US numbers [\#24](https://github.com/stympy/faker/issues/24)
21
+
22
+ **Merged pull requests:**
23
+
24
+ - Fixes a few typos in names and deletes a duplicate [\#1084](https://github.com/stympy/faker/pull/1084) ([katelovescode](https://github.com/katelovescode))
25
+ - Fix Faker::Dog and add tests [\#1082](https://github.com/stympy/faker/pull/1082) ([wtanna](https://github.com/wtanna))
26
+ - Remove broken example from README [\#1081](https://github.com/stympy/faker/pull/1081) ([dentarg](https://github.com/dentarg))
27
+ - Remove problematic char from German street roots [\#1080](https://github.com/stympy/faker/pull/1080) ([Kjir](https://github.com/Kjir))
28
+ - Add Faker::VForVendetta [\#1073](https://github.com/stympy/faker/pull/1073) ([backpackerhh](https://github.com/backpackerhh))
29
+ - Fixes typos, removes a duplicate [\#1072](https://github.com/stympy/faker/pull/1072) ([katelovescode](https://github.com/katelovescode))
30
+ - "Flint\s\sof the mountains" ==\> "Flint\sof the mountains" [\#1071](https://github.com/stympy/faker/pull/1071) ([seanwedig](https://github.com/seanwedig))
31
+ - add ru\_chars to Char [\#1070](https://github.com/stympy/faker/pull/1070) ([startaper](https://github.com/startaper))
32
+ - Updated documentation to match correct methods [\#1069](https://github.com/stympy/faker/pull/1069) ([LasseSviland](https://github.com/LasseSviland))
33
+ - Add the @flexible\_key value to the Vehicle Class [\#1067](https://github.com/stympy/faker/pull/1067) ([agustin](https://github.com/agustin))
34
+ - kpop [\#1066](https://github.com/stympy/faker/pull/1066) ([j0shuachen](https://github.com/j0shuachen))
35
+ - Change git URL to use https instead git protocol [\#1065](https://github.com/stympy/faker/pull/1065) ([buncismamen](https://github.com/buncismamen))
36
+ - Add more quotes to the silicon valley yml file to provide more variety [\#1060](https://github.com/stympy/faker/pull/1060) ([danielwheeler1987](https://github.com/danielwheeler1987))
37
+ - change korean postcode format [\#1058](https://github.com/stympy/faker/pull/1058) ([sunghyuk](https://github.com/sunghyuk))
38
+ - Breaking bad [\#1056](https://github.com/stympy/faker/pull/1056) ([danilobarion1986](https://github.com/danilobarion1986))
39
+ - Star wars quotes [\#1054](https://github.com/stympy/faker/pull/1054) ([russellschmidt](https://github.com/russellschmidt))
40
+ - Dune and Potential Solution to Issue 1011 [\#1051](https://github.com/stympy/faker/pull/1051) ([russellschmidt](https://github.com/russellschmidt))
41
+ - add Malaysia's commercials and islamics bank [\#1045](https://github.com/stympy/faker/pull/1045) ([sanik90](https://github.com/sanik90))
42
+ - organize and add star wars data [\#1043](https://github.com/stympy/faker/pull/1043) ([tjchecketts](https://github.com/tjchecketts))
43
+ - Fix usage document [\#1040](https://github.com/stympy/faker/pull/1040) ([sashiyama](https://github.com/sashiyama))
44
+ - introduce Aqua Teen Hunger Force characters [\#1037](https://github.com/stympy/faker/pull/1037) ([ethagnawl](https://github.com/ethagnawl))
45
+ - added 1 hero, 2 locations and 2 quotes [\#1016](https://github.com/stympy/faker/pull/1016) ([murog](https://github.com/murog))
46
+ - Fix usage document. [\#1013](https://github.com/stympy/faker/pull/1013) ([n0h0](https://github.com/n0h0))
47
+ - Add dumb and dumber class [\#1008](https://github.com/stympy/faker/pull/1008) ([cnharris10](https://github.com/cnharris10))
48
+ - Update Russian resources [\#1002](https://github.com/stympy/faker/pull/1002) ([edubenetskiy](https://github.com/edubenetskiy))
49
+ - Add more Seinfeld characters [\#1001](https://github.com/stympy/faker/pull/1001) ([gregeinfrank](https://github.com/gregeinfrank))
50
+ - Adds Faker::OnePiece [\#998](https://github.com/stympy/faker/pull/998) ([Leohige](https://github.com/Leohige))
51
+ - Stargate [\#997](https://github.com/stympy/faker/pull/997) ([katymccloskey](https://github.com/katymccloskey))
52
+ - Tells users how to handle uninitialized constant error [\#995](https://github.com/stympy/faker/pull/995) ([jwpincus](https://github.com/jwpincus))
53
+ - Renamed word\_of\_warcraft to world\_of\_warcraft [\#994](https://github.com/stympy/faker/pull/994) ([Ranhiru](https://github.com/Ranhiru))
54
+ - Add default\_country for Japan and Korea [\#990](https://github.com/stympy/faker/pull/990) ([Mangoov](https://github.com/Mangoov))
55
+ - Fix typo in de.yml [\#986](https://github.com/stympy/faker/pull/986) ([IngoAlbers](https://github.com/IngoAlbers))
56
+ - Add pt-BR translate [\#985](https://github.com/stympy/faker/pull/985) ([marcosvpcortes](https://github.com/marcosvpcortes))
57
+ - Fix for NL postal code [\#984](https://github.com/stympy/faker/pull/984) ([petrosg](https://github.com/petrosg))
58
+ - French traduction for Faker::Pokemon [\#983](https://github.com/stympy/faker/pull/983) ([Dakurei](https://github.com/Dakurei))
59
+ - Added material to the Commerce docs. [\#903](https://github.com/stympy/faker/pull/903) ([mrstebo](https://github.com/mrstebo))
60
+ - Added Spanish Organization Number [\#897](https://github.com/stympy/faker/pull/897) ([cmunozgar](https://github.com/cmunozgar))
61
+
62
+ ## [v1.8.4](https://github.com/stympy/faker/tree/v1.8.4) (2017-07-13)
4
63
  [Full Changelog](https://github.com/stympy/faker/compare/v1.8.3...v1.8.4)
5
64
 
6
65
  **Merged pull requests:**
@@ -165,7 +224,7 @@
165
224
  - Fixed russian locale [\#813](https://github.com/stympy/faker/pull/813) ([fobo66](https://github.com/fobo66))
166
225
  - Allow unique values to be cleared [\#810](https://github.com/stympy/faker/pull/810) ([dslh](https://github.com/dslh))
167
226
  - Friends info [\#808](https://github.com/stympy/faker/pull/808) ([ktrant84](https://github.com/ktrant84))
168
- - Update superhero.md [\#805](https://github.com/stympy/faker/pull/805) ([VitaliyFry](https://github.com/VitaliyFry))
227
+ - Update superhero.md [\#805](https://github.com/stympy/faker/pull/805) ([vitaliy-fry](https://github.com/vitaliy-fry))
169
228
  - adds Zelda [\#800](https://github.com/stympy/faker/pull/800) ([audy](https://github.com/audy))
170
229
  - Remove the word 'fap' [\#798](https://github.com/stympy/faker/pull/798) ([probablycorey](https://github.com/probablycorey))
171
230
  - en.yml: fix typo in demographic race [\#797](https://github.com/stympy/faker/pull/797) ([PascalSchumacher](https://github.com/PascalSchumacher))
@@ -252,7 +311,7 @@
252
311
  - Added nb-NO locale unit tests [\#758](https://github.com/stympy/faker/pull/758) ([Newman101](https://github.com/Newman101))
253
312
  - Added Japanese unit tests [\#757](https://github.com/stympy/faker/pull/757) ([Newman101](https://github.com/Newman101))
254
313
  - Update educator.rb [\#755](https://github.com/stympy/faker/pull/755) ([huyderman](https://github.com/huyderman))
255
- - Some Turkish Translations \#1 [\#754](https://github.com/stympy/faker/pull/754) ([MrWilhelm](https://github.com/MrWilhelm))
314
+ - Some Turkish Translations \#1 [\#754](https://github.com/stympy/faker/pull/754) ([BatuhanW](https://github.com/BatuhanW))
256
315
  - Add some german translations ... [\#753](https://github.com/stympy/faker/pull/753) ([Kjarrigan](https://github.com/Kjarrigan))
257
316
  - Add method for ensuring unique values [\#752](https://github.com/stympy/faker/pull/752) ([jonmast](https://github.com/jonmast))
258
317
  - Delete unneeded line for Faker::Internet.password [\#751](https://github.com/stympy/faker/pull/751) ([bakunyo](https://github.com/bakunyo))
data/README.md CHANGED
@@ -26,7 +26,9 @@ Contents
26
26
  - [Faker::Address](doc/address.md)
27
27
  - [Faker::Ancient](doc/ancient.md)
28
28
  - [Faker::App](doc/app.md)
29
+ - [Faker::AquaTeenHungerForce](doc/aqua_teen_hunger_force.md)
29
30
  - [Faker::Avatar](doc/avatar.md)
31
+ - [Faker::BackToTheFuture](doc/back_to_the_future.md)
30
32
  - [Faker::Bank](doc/bank.md)
31
33
  - [Faker::Beer](doc/beer.md)
32
34
  - [Faker::Bitcoin](doc/bitcoin.md)
@@ -46,10 +48,13 @@ Contents
46
48
  - [Faker::Date](doc/date.md)
47
49
  - [Faker::Demographic](doc/demographic.md)
48
50
  - [Faker::Dessert](doc/dessert.md)
51
+ - [Faker::Dog](doc/dog.md)
49
52
  - [Faker::DragonBall](doc/dragon_ball.md)
50
53
  - [Faker::DrWho](doc/dr_who.md)
54
+ - [Faker::Dune](doc/dune.md)
51
55
  - [Faker::Educator](doc/educator.md)
52
56
  - [Faker::ElderScrolls](doc/elder_scrolls.md)
57
+ - [Faker::Fallout](doc/fallout.md)
53
58
  - [Faker::FamilyGuy](doc/family_guy.md)
54
59
  - [Faker::File](doc/file.md)
55
60
  - [Faker::Fillmurray](doc/fillmurray.md)
@@ -65,6 +70,7 @@ Contents
65
70
  - [Faker::HitchhikersGuideToTheGalaxy](doc/hitchhikers_guide_to_the_galaxy.md)
66
71
  - [Faker::Internet](doc/internet.md)
67
72
  - [Faker::Job](doc/job.md)
73
+ - [Faker::Kpop](doc/kpop.md)
68
74
  - [Faker::LeagueOfLegends](doc/league_of_legends.md)
69
75
  - [Faker::LordOfTheRings](doc/lord_of_the_rings.md)
70
76
  - [Faker::LoremPixel](doc/lorem_pixel.md)
@@ -79,15 +85,19 @@ Contents
79
85
  - [Faker::Name](doc/name.md)
80
86
  - [Faker::Number](doc/number.md)
81
87
  - [Faker::Omniauth](doc/omniauth.md)
88
+ - [Faker::OnePiece](doc/one_piece.md)
82
89
  - [Faker::Overwatch](doc/overwatch.md)
83
90
  - [Faker::PhoneNumber](doc/phone_number.md)
84
91
  - [Faker::Placeholdit](doc/placeholdit.md)
85
92
  - [Faker::Pokemon](doc/pokemon.md)
93
+ - [Faker::ProgrammingLanguage](doc/programming_language.md)
86
94
  - [Faker::RickAndMorty](doc/rick_and_morty.md)
87
95
  - [Faker::Robin](doc/robin.md)
88
96
  - [Faker::RockBand](doc/rock_band.md)
89
97
  - [Faker::RuPaul](doc/rupaul.md)
98
+ - [Faker::Science](doc/science.md)
90
99
  - [Faker::Seinfeld](doc/seinfeld.md)
100
+ - [Faker::SiliconValley](doc/silicon_valley.md)
91
101
  - [Faker::Simpsons](doc/simpsons.md)
92
102
  - [Faker::SlackEmoji](doc/slack_emoji.md)
93
103
  - [Faker::Space](doc/space.md)
@@ -96,6 +106,7 @@ Contents
96
106
  - [Faker::Superhero](doc/superhero.md)
97
107
  - [Faker::Team](doc/team.md)
98
108
  - [Faker::TheFreshPrinceOfBelAir](doc/the_fresh_prince_of_bel_air.md)
109
+ - [Faker::TheThickOfIt](doc/the_thick_of_it.md)
99
110
  - [Faker::Time](doc/time.md)
100
111
  - [Faker::TwinPeaks](doc/twin_peaks.md)
101
112
  - [Faker::Twitter](doc/twitter.md)
@@ -103,6 +114,7 @@ Contents
103
114
  - [Faker::University](doc/university.md)
104
115
  - [Faker::Vehicle](doc/vehicle.md)
105
116
  - [Faker::VentureBros](doc/venture_bros.md)
117
+ - [Faker::VForVendetta](doc/v_for_vendetta.md)
106
118
  - [Faker::Witcher](doc/witcher.md)
107
119
  - [Faker::WorldOfWarcraft](doc/world_of_warcraft.md)
108
120
  - [Faker::Zelda](doc/zelda.md)
@@ -116,10 +128,17 @@ Contents
116
128
  ```bash
117
129
  gem install faker
118
130
  ```
131
+ 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:
132
+
133
+ ```ruby
134
+ gem 'faker', :git => 'https://github.com/stympy/faker.git', :branch => 'master'
135
+ ```
119
136
 
120
137
  ## Usage
121
138
 
122
139
  ```ruby
140
+ require 'faker'
141
+
123
142
  Faker::Name.name #=> "Christophe Bartell"
124
143
 
125
144
  Faker::Internet.email #=> "kirsten.greenholt@corkeryfisher.info"
@@ -140,12 +159,6 @@ that have been returned, for example between tests.
140
159
  Faker::Name.unique.clear # Clears used values for Faker::Name
141
160
  Faker::UniqueGenerator.clear # Clears used values for all generators
142
161
  ```
143
- It is also possible to add a random number to the end of faker data to increase the
144
- likelihood of unique data being generated. For example:
145
-
146
- ```ruby
147
- Faker::Name.unique + ((1..1000).to_a).sample
148
- ```
149
162
 
150
163
  ### Deterministic Random
151
164
 
@@ -0,0 +1,9 @@
1
+ module Faker
2
+ class AquaTeenHungerForce < Base
3
+ class << self
4
+ def character
5
+ fetch('aqua_teen_hunger_force.character')
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,17 @@
1
+ module Faker
2
+ class BackToTheFuture < Base
3
+ class << self
4
+ def character
5
+ fetch('back_to_the_future.characters')
6
+ end
7
+
8
+ def date
9
+ fetch('back_to_the_future.dates')
10
+ end
11
+
12
+ def quote
13
+ fetch('back_to_the_future.quotes')
14
+ end
15
+ end
16
+ end
17
+ end
@@ -11,21 +11,27 @@ module Faker
11
11
  fetch('bank.swift_bic')
12
12
  end
13
13
 
14
- def iban(bank_country_code="GB")
15
- details = iban_details.find { |country| country["bank_country_code"] == bank_country_code.upcase }
16
- raise ArgumentError, "Could not find iban details for #{bank_country_code}" unless details
17
- bcc = details["bank_country_code"] + 2.times.map{ rand(10) }.join
18
- ilc = (0...details["iban_letter_code"].to_i).map{ (65 + rand(26)).chr }.join
19
- ib = details["iban_digits"].to_i.times.map{ rand(10) }.join
20
- bcc + ilc + ib
14
+ def iban(country_code = "GB")
15
+ [
16
+ country_code.upcase,
17
+ Array.new(2) { rand(10) },
18
+ iban_range(country_code, :letter_code) { (65 + rand(26)).chr },
19
+ iban_range(country_code, :digits) { rand(10) }
20
+ ].join
21
21
  end
22
22
 
23
23
  private
24
24
 
25
- def iban_details
26
- fetch_all('bank.iban_details')
25
+ def iban_range(country_code, number_type)
26
+ array_length = iban_length(country_code, number_type)
27
+ Array.new(array_length) { yield }
28
+ end
29
+
30
+ def iban_length(country_code, number_type)
31
+ fetch("bank.iban_details.#{country_code.downcase}.#{number_type}").to_i
32
+ rescue I18n::MissingTranslationData
33
+ raise ArgumentError, "Could not find iban details for #{country_code}"
27
34
  end
28
35
  end
29
36
  end
30
37
  end
31
-
@@ -0,0 +1,16 @@
1
+ # encoding: utf-8
2
+ # frozen_string_literal: true
3
+
4
+ module Faker
5
+ class BreakingBad < Base
6
+
7
+ def self.character
8
+ fetch('breaking_bad.character')
9
+ end
10
+
11
+ def self.episode
12
+ fetch('breaking_bad.episode')
13
+ end
14
+
15
+ end
16
+ end
@@ -43,6 +43,15 @@ module Faker
43
43
  "https://pigment.github.io/fake-logos/logos/medium/color/#{rand_num}.png"
44
44
  end
45
45
 
46
+ # Get a random Spanish organization number. See more here https://es.wikipedia.org/wiki/Número_de_identificación_fiscal
47
+ def spanish_organisation_number
48
+ # Valid leading character: A, B, C, D, E, F, G, H, J, N, P, Q, R, S, U, V, W
49
+ # 7 digit numbers
50
+ letters = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'N', 'P', 'Q', 'R', 'S', 'U', 'V', 'W']
51
+ base = [sample(letters), ('%07d' % rand(10 ** 7))].join
52
+ base
53
+ end
54
+
46
55
  # Get a random Swedish organization number. See more here https://sv.wikipedia.org/wiki/Organisationsnummer
47
56
  def swedish_organisation_number
48
57
  # Valid leading digit: 1, 2, 3, 5, 6, 7, 8, 9
@@ -52,6 +61,18 @@ module Faker
52
61
  base + luhn_algorithm(base).to_s
53
62
  end
54
63
 
64
+ # Get a random French SIREN number. See more here https://fr.wikipedia.org/wiki/Syst%C3%A8me_d%27identification_du_r%C3%A9pertoire_des_entreprises
65
+ def french_siren_number
66
+ base = (1..8).map { rand(10) }.join
67
+ base + luhn_algorithm(base).to_s
68
+ end
69
+
70
+ def french_siret_number
71
+ location = rand(100).to_s.rjust(4, '0')
72
+ org_no = french_siren_number + location
73
+ org_no + luhn_algorithm(org_no).to_s
74
+ end
75
+
55
76
  # Get a random Norwegian organization number. Info: https://www.brreg.no/om-oss/samfunnsoppdraget-vart/registera-vare/einingsregisteret/organisasjonsnummeret/
56
77
  def norwegian_organisation_number
57
78
  # Valid leading digit: 8, 9
@@ -0,0 +1,39 @@
1
+ module Faker
2
+ class Dog < Base
3
+ flexible :dog
4
+
5
+ class << self
6
+ def name
7
+ fetch('dog.name')
8
+ end
9
+
10
+ def breed
11
+ fetch('dog.breed')
12
+ end
13
+
14
+ def sound
15
+ fetch('dog.sound')
16
+ end
17
+
18
+ def meme_phrase
19
+ fetch('dog.meme_phrase')
20
+ end
21
+
22
+ def age
23
+ fetch('dog.age')
24
+ end
25
+
26
+ def gender
27
+ fetch('dog.gender')
28
+ end
29
+
30
+ def coat_length
31
+ fetch('dog.coat_length')
32
+ end
33
+
34
+ def size
35
+ fetch('dog.size')
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,17 @@
1
+ module Faker
2
+ class DumbAndDumber < Base
3
+ class << self
4
+ def actor
5
+ fetch('dumb_and_dumber.actors')
6
+ end
7
+
8
+ def character
9
+ fetch('dumb_and_dumber.characters')
10
+ end
11
+
12
+ def quote
13
+ fetch('dumb_and_dumber.quotes')
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,54 @@
1
+ module Faker
2
+ class Dune < Base
3
+ class << self
4
+ # QUOTED_CHARACTERS = fetch("dune.quotes")
5
+ # SAYING_SOURCES = %w(translate("faker.dune.sources"))
6
+
7
+ def character
8
+ fetch('dune.characters')
9
+ end
10
+
11
+ def title
12
+ fetch('dune.titles')
13
+ end
14
+
15
+ def planet
16
+ fetch('dune.planets')
17
+ end
18
+
19
+ def quote(character = nil)
20
+ quoted_characters = translate('faker.dune.quotes').keys
21
+
22
+ if character.nil?
23
+ character = sample(quoted_characters).to_s
24
+ else
25
+ character.to_s.downcase!
26
+
27
+ unless quoted_characters.include?(character.to_sym)
28
+ raise ArgumentError,
29
+ "Characters quoted can be left blank or #{quoted_characters.join(', ')}"
30
+ end
31
+ end
32
+
33
+ return fetch('dune.quotes.' + character)
34
+ end
35
+
36
+ def saying(source = nil)
37
+ sourced_sayings = translate('faker.dune.sayings').keys
38
+
39
+ if source.nil?
40
+ source = sample(sourced_sayings).to_s
41
+ else
42
+ source.to_s.downcase!
43
+
44
+ unless sourced_sayings.include?(source.to_sym)
45
+ raise ArgumentError,
46
+ "Sources quoted in sayings can be left blank or #{sourced_sayings.join(', ')}"
47
+ end
48
+ end
49
+
50
+ return fetch('dune.sayings.' + source)
51
+ end
52
+ end
53
+ end
54
+ end
@@ -2,23 +2,23 @@ module Faker
2
2
  class Esport < Base
3
3
  class << self
4
4
  def player
5
- fetch('esports.players')
5
+ fetch('esport.players')
6
6
  end
7
7
 
8
8
  def team
9
- fetch('esports.teams')
9
+ fetch('esport.teams')
10
10
  end
11
11
 
12
12
  def league
13
- fetch('esports.leagues')
13
+ fetch('esport.leagues')
14
14
  end
15
15
 
16
16
  def event
17
- fetch('esports.events')
17
+ fetch('esport.events')
18
18
  end
19
19
 
20
20
  def game
21
- fetch('esports.games')
21
+ fetch('esport.games')
22
22
  end
23
23
  end
24
24
  end