faker 2.2.0 → 3.2.2
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 +1298 -24
- data/History.md +5 -5
- data/README.md +239 -104
- data/lib/faker/blockchain/aeternity.rb +70 -0
- data/lib/faker/blockchain/bitcoin.rb +28 -2
- data/lib/faker/blockchain/ethereum.rb +11 -1
- data/lib/faker/blockchain/tezos.rb +93 -9
- data/lib/faker/books/book.rb +36 -0
- data/lib/faker/books/culture_series.rb +49 -0
- data/lib/faker/books/dune.rb +73 -17
- data/lib/faker/books/lovecraft.rb +186 -57
- data/lib/faker/books/the_kingkiller_chronicle.rb +61 -0
- data/lib/faker/creature/animal.rb +9 -0
- data/lib/faker/creature/bird.rb +203 -0
- data/lib/faker/creature/cat.rb +27 -0
- data/lib/faker/creature/dog.rb +72 -0
- data/lib/faker/creature/horse.rb +18 -0
- data/lib/faker/default/address.rb +253 -33
- data/lib/faker/default/adjective.rb +35 -0
- data/lib/faker/default/alphanumeric.rb +27 -22
- data/lib/faker/default/ancient.rb +36 -0
- data/lib/faker/default/app.rb +46 -16
- data/lib/faker/default/appliance.rb +18 -0
- data/lib/faker/default/artist.rb +9 -0
- data/lib/faker/default/avatar.rb +32 -24
- data/lib/faker/default/bank.rb +118 -29
- data/lib/faker/default/barcode.rb +165 -0
- data/lib/faker/default/beer.rb +75 -3
- data/lib/faker/default/blood.rb +48 -0
- data/lib/faker/default/boolean.rb +13 -6
- data/lib/faker/default/bossa_nova.rb +18 -0
- data/lib/faker/default/business.rb +27 -0
- data/lib/faker/default/camera.rb +46 -0
- data/lib/faker/default/cannabis.rb +90 -0
- data/lib/faker/default/chile_rut.rb +62 -26
- data/lib/faker/default/chuck_norris.rb +13 -2
- data/lib/faker/default/code.rb +162 -58
- data/lib/faker/default/coffee.rb +45 -0
- data/lib/faker/default/coin.rb +18 -0
- data/lib/faker/default/color.rb +123 -5
- data/lib/faker/default/commerce.rb +105 -37
- data/lib/faker/default/company.rb +446 -34
- 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.rb +44 -4
- data/lib/faker/default/crypto_coin.rb +48 -18
- data/lib/faker/default/currency.rb +27 -0
- data/lib/faker/default/date.rb +149 -52
- data/lib/faker/default/dc_comics.rb +45 -0
- data/lib/faker/default/demographic.rb +58 -6
- data/lib/faker/default/dessert.rb +27 -0
- data/lib/faker/default/device.rb +54 -0
- data/lib/faker/default/driving_licence.rb +85 -28
- data/lib/faker/default/drone.rb +332 -0
- data/lib/faker/default/educator.rb +73 -6
- data/lib/faker/default/electrical_components.rb +27 -0
- data/lib/faker/default/emotion.rb +33 -0
- data/lib/faker/default/esport.rb +45 -0
- data/lib/faker/default/file.rb +53 -38
- data/lib/faker/default/finance.rb +75 -8
- data/lib/faker/default/food.rb +93 -3
- data/lib/faker/default/funny_name.rb +45 -0
- data/lib/faker/default/gender.rb +31 -0
- data/lib/faker/default/greek_philosophers.rb +18 -0
- data/lib/faker/default/hacker.rb +59 -1
- data/lib/faker/default/hipster.rb +106 -81
- data/lib/faker/default/hobby.rb +22 -0
- data/lib/faker/default/house.rb +18 -0
- data/lib/faker/default/html.rb +230 -0
- data/lib/faker/default/id_number.rb +276 -18
- data/lib/faker/default/industry_segments.rb +36 -0
- data/lib/faker/default/internet.rb +442 -147
- data/lib/faker/default/internet_http.rb +48 -0
- data/lib/faker/default/invoice.rb +37 -29
- data/lib/faker/default/job.rb +36 -0
- data/lib/faker/default/json.rb +61 -30
- data/lib/faker/default/kpop.rb +54 -0
- data/lib/faker/default/lorem.rb +184 -121
- data/lib/faker/default/lorem_flickr.rb +69 -68
- data/lib/faker/default/markdown.rb +97 -15
- data/lib/faker/default/marketing.rb +9 -0
- data/lib/faker/default/measurement.rb +101 -50
- data/lib/faker/default/military.rb +71 -0
- data/lib/faker/default/mountain.rb +33 -0
- data/lib/faker/default/name.rb +99 -6
- data/lib/faker/default/nation.rb +45 -5
- data/lib/faker/default/nato_phonetic_alphabet.rb +9 -0
- data/lib/faker/default/nhs.rb +21 -7
- data/lib/faker/default/number.rb +160 -91
- data/lib/faker/default/omniauth.rb +199 -137
- data/lib/faker/default/phone_number.rb +89 -11
- data/lib/faker/default/placeholdit.rb +23 -25
- data/lib/faker/default/programming_language.rb +18 -0
- data/lib/faker/default/relationship.rb +47 -7
- data/lib/faker/default/religion.rb +6 -0
- data/lib/faker/default/restaurant.rb +54 -2
- data/lib/faker/default/science.rb +135 -0
- data/lib/faker/default/slack_emoji.rb +81 -0
- data/lib/faker/default/source.rb +46 -22
- data/lib/faker/default/south_africa.rb +90 -0
- data/lib/faker/default/space.rb +128 -1
- data/lib/faker/default/string.rb +18 -9
- data/lib/faker/default/stripe.rb +68 -27
- data/lib/faker/default/subscription.rb +45 -0
- data/lib/faker/default/superhero.rb +45 -0
- data/lib/faker/default/tea.rb +41 -0
- data/lib/faker/default/team.rb +45 -0
- data/lib/faker/default/time.rb +84 -68
- data/lib/faker/default/twitter.rb +57 -47
- data/lib/faker/default/types.rb +90 -41
- data/lib/faker/default/university.rb +45 -0
- data/lib/faker/default/vehicle.rb +223 -60
- data/lib/faker/default/verb.rb +45 -0
- data/lib/faker/default/vulnerability_identifier.rb +23 -0
- data/lib/faker/default/world_cup.rb +52 -16
- data/lib/faker/fantasy/tolkien.rb +67 -0
- data/lib/faker/games/clash_of_clans.rb +48 -0
- data/lib/faker/games/control.rb +113 -0
- data/lib/faker/games/dnd.rb +178 -0
- data/lib/faker/games/dota.rb +61 -6
- data/lib/faker/games/elder_scrolls.rb +98 -0
- data/lib/faker/games/fallout.rb +37 -0
- data/lib/faker/games/final_fantasy_xiv.rb +73 -0
- data/lib/faker/games/game.rb +27 -0
- data/lib/faker/games/half_life.rb +27 -0
- data/lib/faker/games/heroes.rb +40 -0
- data/lib/faker/games/heroes_of_the_storm.rb +48 -1
- data/lib/faker/games/league_of_legends.rb +54 -0
- data/lib/faker/games/minecraft.rb +113 -0
- data/lib/faker/games/myst.rb +45 -0
- data/lib/faker/games/overwatch.rb +27 -0
- data/lib/faker/games/pokemon.rb +27 -0
- data/lib/faker/games/sonic_the_hedgehog.rb +27 -0
- data/lib/faker/games/street_fighter.rb +61 -0
- data/lib/faker/games/super_mario.rb +48 -0
- data/lib/faker/games/super_smash_bros.rb +18 -0
- data/lib/faker/games/tarkov.rb +205 -0
- data/lib/faker/games/touhou.rb +75 -0
- data/lib/faker/games/warhammer_fantasy.rb +74 -0
- data/lib/faker/games/witcher.rb +93 -0
- data/lib/faker/games/world_of_warcraft.rb +44 -1
- data/lib/faker/games/zelda.rb +37 -1
- data/lib/faker/japanese_media/conan.rb +48 -0
- data/lib/faker/japanese_media/cowboy_bebop.rb +61 -0
- data/lib/faker/japanese_media/doraemon.rb +48 -0
- data/lib/faker/japanese_media/dragon_ball.rb +35 -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/japanese_media/naruto.rb +61 -0
- data/lib/faker/japanese_media/one_piece.rb +55 -1
- data/lib/faker/japanese_media/studio_ghibli.rb +48 -0
- data/lib/faker/japanese_media/sword_art_online.rb +36 -0
- data/lib/faker/locations/australia.rb +47 -0
- data/lib/faker/movies/avatar.rb +49 -0
- data/lib/faker/movies/back_to_the_future.rb +28 -0
- data/lib/faker/movies/departed.rb +49 -0
- data/lib/faker/movies/ghostbusters.rb +28 -0
- data/lib/faker/movies/hackers.rb +48 -0
- data/lib/faker/movies/harry_potter.rb +54 -0
- data/lib/faker/movies/hitchhikers_guide_to_the_galaxy.rb +69 -0
- data/lib/faker/movies/hobbit.rb +41 -4
- data/lib/faker/movies/how_to_train_your_dragon.rb +48 -0
- data/lib/faker/movies/lebowski.rb +27 -0
- data/lib/faker/movies/lord_of_the_rings.rb +31 -3
- data/lib/faker/movies/movie.rb +22 -0
- data/lib/faker/movies/princess_bride.rb +19 -0
- data/lib/faker/movies/room.rb +63 -0
- data/lib/faker/movies/star_wars.rb +170 -11
- data/lib/faker/movies/tron.rb +161 -0
- data/lib/faker/movies/v_for_vendetta.rb +29 -0
- data/lib/faker/music/grateful_dead.rb +18 -0
- data/lib/faker/music/hiphop.rb +48 -0
- data/lib/faker/music/music.rb +102 -4
- data/lib/faker/music/opera.rb +273 -1
- data/lib/faker/music/pearl_jam.rb +50 -0
- data/lib/faker/music/phish.rb +36 -1
- data/lib/faker/music/prince.rb +64 -0
- data/lib/faker/music/rock_band.rb +21 -0
- data/lib/faker/music/rush.rb +37 -0
- data/lib/faker/music/show.rb +49 -0
- data/lib/faker/music/smashing_pumpkins.rb +64 -0
- data/lib/faker/music/umphreys_mcgee.rb +9 -0
- data/lib/faker/quotes/chiquito.rb +80 -0
- data/lib/faker/quotes/quote.rb +93 -1
- data/lib/faker/quotes/rajnikanth.rb +27 -0
- data/lib/faker/quotes/shakespeare.rb +70 -0
- data/lib/faker/religion/bible.rb +50 -0
- data/lib/faker/sports/basketball.rb +36 -0
- data/lib/faker/sports/chess.rb +90 -0
- data/lib/faker/sports/football.rb +45 -0
- data/lib/faker/sports/mountaineering.rb +22 -0
- data/lib/faker/sports/sport.rb +116 -0
- data/lib/faker/sports/volleyball.rb +74 -0
- data/lib/faker/travel/airport.rb +43 -0
- data/lib/faker/travel/train_station.rb +54 -0
- data/lib/faker/tv_shows/aqua_teen_hunger_force.rb +22 -0
- data/lib/faker/tv_shows/archer.rb +51 -0
- data/lib/faker/tv_shows/big_bang_theory.rb +37 -0
- data/lib/faker/tv_shows/bojack_horseman.rb +28 -0
- data/lib/faker/tv_shows/breaking_bad.rb +18 -0
- data/lib/faker/tv_shows/brooklyn_nine_nine.rb +38 -0
- data/lib/faker/tv_shows/buffy.rb +60 -2
- data/lib/faker/tv_shows/community.rb +19 -0
- data/lib/faker/tv_shows/dr_who.rb +78 -2
- data/lib/faker/tv_shows/dumb_and_dumber.rb +28 -0
- data/lib/faker/tv_shows/family_guy.rb +28 -0
- data/lib/faker/tv_shows/final_space.rb +51 -0
- data/lib/faker/tv_shows/friends.rb +27 -0
- data/lib/faker/tv_shows/futurama.rb +65 -0
- data/lib/faker/tv_shows/game_of_thrones.rb +46 -0
- data/lib/faker/tv_shows/hey_arnold.rb +27 -0
- data/lib/faker/tv_shows/how_i_met_your_mother.rb +37 -0
- data/lib/faker/tv_shows/michael_scott.rb +10 -0
- data/lib/faker/tv_shows/new_girl.rb +19 -0
- data/lib/faker/tv_shows/parks_and_rec.rb +18 -0
- data/lib/faker/tv_shows/rick_and_morty.rb +28 -0
- data/lib/faker/tv_shows/ru_paul.rb +18 -0
- data/lib/faker/tv_shows/seinfeld.rb +28 -0
- data/lib/faker/tv_shows/silicon_valley.rb +75 -0
- data/lib/faker/tv_shows/simpsons.rb +42 -0
- data/lib/faker/tv_shows/south_park.rb +34 -0
- data/lib/faker/tv_shows/spongebob.rb +50 -0
- data/lib/faker/tv_shows/star_trek.rb +36 -0
- data/lib/faker/tv_shows/stargate.rb +28 -0
- data/lib/faker/tv_shows/stranger_things.rb +19 -0
- data/lib/faker/tv_shows/suits.rb +37 -0
- data/lib/faker/tv_shows/supernatural.rb +48 -0
- data/lib/faker/tv_shows/the_expanse.rb +36 -0
- data/lib/faker/tv_shows/the_fresh_prince_of_bel_air.rb +43 -2
- data/lib/faker/tv_shows/the_it_crowd.rb +37 -0
- data/lib/faker/tv_shows/the_office.rb +37 -0
- data/lib/faker/tv_shows/the_thick_of_it.rb +28 -0
- data/lib/faker/tv_shows/twin_peaks.rb +28 -0
- data/lib/faker/tv_shows/venture_bros.rb +38 -0
- data/lib/faker/version.rb +2 -2
- data/lib/faker.rb +58 -58
- data/lib/helpers/base58.rb +1 -1
- data/lib/helpers/char.rb +22 -27
- data/lib/helpers/positional_generator.rb +480 -0
- data/lib/helpers/unique_generator.rb +17 -13
- data/lib/locales/README.md +18 -2
- data/lib/locales/ar.yml +6 -1
- data/lib/locales/bg.yml +3 -3
- data/lib/locales/ca.yml +0 -8
- data/lib/locales/da-DK.yml +6 -4
- data/lib/locales/de-AT.yml +7 -6
- data/lib/locales/de-CH.yml +6028 -9
- data/lib/locales/de.yml +12 -6
- data/lib/locales/en/address.yml +8 -3
- data/lib/locales/en/adjective.yml +179 -0
- data/lib/locales/en/airport.yml +381 -0
- data/lib/locales/en/animal.yml +1 -1
- data/lib/locales/en/aqua_teen_hunger_force.yml +33 -1
- data/lib/locales/en/archer.yml +75 -0
- data/lib/locales/en/australia.yml +107 -0
- data/lib/locales/en/avatar.yml +31 -0
- data/lib/locales/en/bank.yml +1 -1
- data/lib/locales/en/barcode.yml +24 -0
- data/lib/locales/en/bible.yml +90 -0
- data/lib/locales/en/big_bang_theory.yml +38 -0
- data/lib/locales/en/bird.yml +1281 -0
- data/lib/locales/en/blood.yml +13 -0
- data/lib/locales/en/book.yml +487 -3
- data/lib/locales/en/brooklyn_nine_nine.yml +35 -0
- data/lib/locales/en/buffy.yml +1 -1
- data/lib/locales/en/camera.yml +611 -0
- data/lib/locales/en/cat.yml +1 -1
- data/lib/locales/en/chess.yml +103 -0
- data/lib/locales/en/chiquito.yml +64 -0
- data/lib/locales/en/clash_of_clan.yml +101 -0
- data/lib/locales/en/coffee.yml +1 -1
- data/lib/locales/en/color.yml +1 -1
- data/lib/locales/en/commerce.yml +17 -0
- data/lib/locales/en/community.yml +17 -17
- data/lib/locales/en/company.yml +3 -2
- data/lib/locales/en/computer.yml +55 -0
- data/lib/locales/en/conan.yml +171 -0
- data/lib/locales/en/control.yml +247 -0
- data/lib/locales/en/cowboy_bebop.yml +163 -0
- data/lib/locales/en/demographic.yml +218 -5
- data/lib/locales/en/departed.yml +50 -0
- data/lib/locales/en/device.yml +112 -4
- data/lib/locales/en/dnd.yml +636 -0
- data/lib/locales/en/doraemon.yml +286 -0
- data/lib/locales/en/dota.yml +651 -63
- data/lib/locales/en/dr_who.yml +1 -1
- data/lib/locales/en/dragon_ball.yml +243 -1
- data/lib/locales/en/driving_license.yml +181 -0
- data/lib/locales/en/drone.yml +95 -0
- data/lib/locales/en/dune.yml +270 -131
- data/lib/locales/en/educator.yml +75 -6
- data/lib/locales/en/elder_scrolls.yml +583 -9
- data/lib/locales/en/emotion.yml +480 -0
- data/lib/locales/en/fallout.yml +311 -133
- data/lib/locales/en/file.yml +9 -1
- data/lib/locales/en/final_fantasy_xiv.yml +754 -0
- data/lib/locales/en/final_space.yml +37 -0
- data/lib/locales/en/finance.yml +77 -1
- data/lib/locales/en/fma_brotherhood.yml +78 -0
- data/lib/locales/en/food.yml +1066 -10
- data/lib/locales/en/football.yml +3 -3
- data/lib/locales/en/fresh_prince_of_bel_air.yml +1 -1
- data/lib/locales/en/futurama.yml +344 -0
- data/lib/locales/en/game.yml +11 -0
- data/lib/locales/en/gender.yml +1 -0
- data/lib/locales/en/hackers.yml +53 -0
- data/lib/locales/en/half_life.yml +84 -3
- data/lib/locales/en/heroes.yml +408 -3
- data/lib/locales/en/heroes_of_the_storm.yml +131 -4
- data/lib/locales/en/hobby.yml +171 -0
- data/lib/locales/en/horse.yml +2 -2
- data/lib/locales/en/house.yml +1 -1
- data/lib/locales/en/how_to_train_your_dragon.yml +174 -0
- data/lib/locales/en/internet.yml +140 -3
- data/lib/locales/en/jack_handey.yml +54 -0
- data/lib/locales/en/kamen_rider.yml +452 -0
- data/lib/locales/en/kpop.yml +7 -7
- data/lib/locales/en/league_of_legends.yml +285 -6
- data/lib/locales/en/lebowski.yml +1 -1
- data/lib/locales/en/lovecraft.yml +76 -6
- data/lib/locales/en/military.yml +179 -5
- data/lib/locales/en/minecraft.yml +663 -0
- data/lib/locales/en/mitch_hedberg.yml +46 -0
- data/lib/locales/en/mountain.yml +171 -0
- data/lib/locales/en/mountaineering.yml +14 -0
- data/lib/locales/en/movie.yml +194 -2
- data/lib/locales/en/music.yml +461 -29
- data/lib/locales/en/myst.yml +87 -31
- data/lib/locales/en/name.yml +6 -5
- data/lib/locales/en/naruto.yml +230 -0
- data/lib/locales/en/one_piece.yml +2 -2
- data/lib/locales/en/opera.yml +169 -1
- data/lib/locales/en/overwatch.yml +2648 -37
- data/lib/locales/en/pearl_jam.yml +213 -0
- data/lib/locales/en/phish.yml +392 -1
- data/lib/locales/en/phone_number.yml +1 -1
- data/lib/locales/en/pokemon.yml +417 -4
- data/lib/locales/en/prince.yml +227 -0
- data/lib/locales/en/quote.yml +692 -163
- data/lib/locales/en/rajnikanth.yml +77 -0
- data/lib/locales/en/rock_band.yml +1 -0
- data/lib/locales/en/room.yml +68 -0
- data/lib/locales/en/rush.yml +32 -0
- data/lib/locales/en/science.yml +481 -3
- data/lib/locales/en/shakespeare.yml +23 -26
- data/lib/locales/en/show.yml +597 -0
- data/lib/locales/en/simpsons.yml +668 -0
- data/lib/locales/en/smashing_pumpkins.yml +382 -0
- data/lib/locales/en/source.yml +35 -0
- data/lib/locales/en/south_park.yml +360 -2
- data/lib/locales/en/space.yml +1 -1
- data/lib/locales/en/spongebob.yml +489 -0
- data/lib/locales/en/sport.yml +130 -0
- data/lib/locales/en/star_trek.yml +1 -1
- data/lib/locales/en/star_wars.yml +568 -220
- data/lib/locales/en/stranger_thing.yml +1 -1
- data/lib/locales/en/street_fighter.yml +1524 -0
- data/lib/locales/en/stripe.yml +3 -3
- data/lib/locales/en/studio_ghibli.yml +107 -0
- data/lib/locales/en/suits.yml +45 -0
- data/lib/locales/en/super_mario.yml +58 -0
- data/lib/locales/en/super_smash_bros.yml +23 -5
- data/lib/locales/en/supernatural.yml +141 -0
- data/lib/locales/en/tarkov.yml +593 -0
- data/lib/locales/en/tea.yml +172 -0
- data/lib/locales/en/the_kingkiller_chronicle.yml +56 -0
- data/lib/locales/en/the_office.yml +86 -0
- data/lib/locales/en/tolkien.yml +2453 -0
- data/lib/locales/en/touhou.yml +839 -0
- data/lib/locales/en/train_station.yml +280 -0
- data/lib/locales/en/tron.yml +227 -0
- data/lib/locales/en/vehicle.yml +2809 -75
- data/lib/locales/en/volleyball.yml +501 -0
- data/lib/locales/en/warhammer_fantasy.yml +582 -0
- data/lib/locales/en/witcher.yml +426 -7
- data/lib/locales/en/world_of_warcraft.yml +122 -4
- data/lib/locales/en/zelda.yml +962 -4
- data/lib/locales/en-AU.yml +50 -10
- data/lib/locales/en-CA.yml +5 -1
- data/lib/locales/en-GB.yml +3 -2
- data/lib/locales/en-IND.yml +2 -1
- data/lib/locales/en-MS.yml +3 -1
- data/lib/locales/en-NEP.yml +5 -2
- data/lib/locales/en-NG.yml +1 -0
- data/lib/locales/en-NZ.yml +135 -8
- data/lib/locales/en-PAK.yml +3 -1
- data/lib/locales/en-SG.yml +3 -1
- data/lib/locales/en-TH.yml +360 -0
- data/lib/locales/en-UG.yml +1 -0
- data/lib/locales/en-US.yml +38 -12
- data/lib/locales/en-ZA.yml +2 -2
- data/lib/locales/en-au-ocker.yml +4 -1
- data/lib/locales/en.yml +0 -3
- data/lib/locales/es-AR.yml +4601 -0
- data/lib/locales/es-MX.yml +4 -1
- data/lib/locales/es.yml +58 -2
- data/lib/locales/fa.yml +2 -0
- data/lib/locales/fi-FI.yml +4 -2
- data/lib/locales/fr/address.yml +20 -0
- data/lib/locales/fr/adjective.yml +266 -0
- data/lib/locales/fr/ancient.yml +141 -0
- data/lib/locales/fr/animal.yml +5 -0
- data/lib/locales/fr/appliance.yml +4 -0
- data/lib/locales/fr/book.yml +7 -0
- data/lib/locales/fr/color.yml +4 -0
- data/lib/locales/fr/company.yml +17 -0
- data/lib/locales/fr/compass.yml +23 -0
- data/lib/locales/fr/demographic.yml +4 -0
- data/lib/locales/fr/gender.yml +6 -0
- data/lib/locales/fr/internet.yml +5 -0
- data/lib/locales/fr/lorem.yml +5 -0
- data/lib/locales/fr/measurement.yml +7 -0
- data/lib/locales/fr/name.yml +22 -0
- data/lib/locales/fr/phone_number.yml +7 -0
- data/lib/locales/fr/pokemon.yml +7 -0
- data/lib/locales/fr-CA.yml +28 -11
- data/lib/locales/fr-CH.yml +3 -3
- data/lib/locales/fr.yml +1 -112
- data/lib/locales/hy.yml +3 -7
- data/lib/locales/id.yml +5 -2
- data/lib/locales/it.yml +3 -1
- data/lib/locales/ja/README.md +13 -0
- data/lib/locales/ja/address.yml +120539 -0
- data/lib/locales/ja/adjective.yml +148 -0
- data/lib/locales/ja/ancient.yml +4 -0
- data/lib/locales/ja/animal.yml +5 -0
- data/lib/locales/ja/bank.yml +4 -0
- data/lib/locales/ja/book.yml +7 -0
- data/lib/locales/ja/cat.yml +5 -0
- data/lib/locales/ja/coffee.yml +4 -0
- data/lib/locales/ja/color.yml +4 -0
- data/lib/locales/ja/commerce.yml +11 -0
- data/lib/locales/ja/company.yml +8 -0
- data/lib/locales/ja/dog.yml +6 -0
- data/lib/locales/ja/emotion.yml +51 -0
- data/lib/locales/ja/food.yml +4 -0
- data/lib/locales/ja/gender.yml +4 -0
- data/lib/locales/ja/lorem.yml +9 -0
- data/lib/locales/ja/name.yml +13 -0
- data/lib/locales/ja/naruto.yml +230 -0
- data/lib/locales/ja/overwatch.yml +5 -0
- data/lib/locales/ja/phone_number.yml +7 -0
- data/lib/locales/ja/pokemon.yml +7 -0
- data/lib/locales/ja/relationship.yml +10 -0
- data/lib/locales/ja/restaurant.yml +11 -0
- data/lib/locales/ja/space.yml +5 -0
- data/lib/locales/ja/sport.yml +130 -0
- data/lib/locales/ja/studio_ghibli.yml +112 -0
- data/lib/locales/ja/subscription.yml +8 -0
- data/lib/locales/ja/super_mario.yml +9 -0
- data/lib/locales/ja/super_smash_bros.yml +8 -0
- data/lib/locales/ja/touhou.yml +466 -0
- data/lib/locales/ja/university.yml +9 -0
- data/lib/locales/ja/zelda.yml +5 -0
- data/lib/locales/ko.yml +95 -2
- data/lib/locales/lt.yml +34 -0
- data/lib/locales/lv.yml +1 -1
- data/lib/locales/mi-NZ.yml +283 -0
- data/lib/locales/nb-NO.yml +5 -2
- data/lib/locales/nl.yml +1 -0
- data/lib/locales/pl.yml +2 -2
- data/lib/locales/pt-BR.yml +33 -4
- data/lib/locales/pt.yml +6 -4
- data/lib/locales/ru.yml +43 -1
- data/lib/locales/sk.yml +5 -2
- data/lib/locales/sv.yml +1 -0
- data/lib/locales/th.yml +380 -0
- data/lib/locales/tr.yml +1 -0
- data/lib/locales/uk.yml +10 -5
- data/lib/locales/vi.yml +1 -0
- data/lib/locales/zh-CN/bank.yml +17 -0
- data/lib/locales/zh-CN.yml +2 -1
- data/lib/locales/zh-TW.yml +2 -1
- metadata +201 -109
- data/lib/faker/default/fillmurray.rb +0 -30
- data/lib/faker/default/lorem_pixel.rb +0 -63
- data/lib/locales/en/hobbit.yml +0 -19
- data/lib/locales/en/lord_of_the_rings.yml +0 -6
- data/lib/locales/ja.yml +0 -98
data/History.md
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
## v1.6.0 (2015-11-23)
|
|
34
34
|
* Lots of bug fixes -- most notably, a fix for email addresses and domains in non-en locales
|
|
35
35
|
* Updated locales: de, en-AU, en-NZ, en-SG, en-US, en-au-ocker, en, es, fr, he, it, ja, nb-NO, pl, pt-BR, sk, and zh-CN
|
|
36
|
-
* Updated classes: Address, Avatar, Book, Code, Commerce, Company, Hipster, IDNumber, Internet, Number, Placeholdit, Shakespeare, and Time
|
|
36
|
+
* Updated classes: Address, Avatar, Book, Code, Commerce, Company, Hipster, IDNumber, Internet, Number, Placeholdit, Shakespeare, and Time
|
|
37
37
|
|
|
38
38
|
## v1.5.0 (2015-08-17)
|
|
39
39
|
* Added logos
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
* 1 major change:
|
|
84
84
|
* Removed deprecated methods from Address: earth_country, us_state, us_state_abbr, uk_postcode, uk_county
|
|
85
85
|
* Many minor changes (please see github pull requests for credits)
|
|
86
|
-
* Added many localizations
|
|
86
|
+
* Added many localizations
|
|
87
87
|
* Added range and array support for Lorem
|
|
88
88
|
|
|
89
89
|
## v1.0.1 (2011-09-27)
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
* Added bork locale for bork-ified lorem [johnbentcope]
|
|
105
105
|
* Added IPv6 address generator [jc00ke]
|
|
106
106
|
* Removed deprecation warnings for Array#rand [chrismarshall]
|
|
107
|
-
* Added German translation and I18n
|
|
107
|
+
* Added German translation and I18n improvements [Matthias Kühnert]
|
|
108
108
|
* Added Dutch translation [moretea]
|
|
109
109
|
* Added Lat/Long generator [Andy Callaghan]
|
|
110
110
|
* Added buzzword-laden title generator [supercleanse]
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
* Added Canadian translation [igbanam]
|
|
118
118
|
* Added Norwegian translation [kytrinyx]
|
|
119
119
|
* Lots of translation-related cleanup [kytrinyx]
|
|
120
|
-
|
|
120
|
+
|
|
121
121
|
|
|
122
122
|
## v0.9.5 (2011-01-27)
|
|
123
123
|
* 1 minor bug fix:
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
* 3 major enhancements:
|
|
160
160
|
* Added Lorem to generate fake Latin
|
|
161
161
|
* Added secondary_address to Address, and made inclusion of
|
|
162
|
-
secondary address in street_address optional (false by
|
|
162
|
+
secondary address in street_address optional (false by
|
|
163
163
|
default).
|
|
164
164
|
* Added UK address methods [Caius Durling]
|
|
165
165
|
|
data/README.md
CHANGED
|
@@ -1,77 +1,116 @@
|
|
|
1
|
-
|
|
2
1
|

|
|
3
2
|
|
|
4
3
|
# Faker
|
|
5
|
-
[](https://github.com/faker-ruby/faker/actions?query=workflow%3ATests)
|
|
6
5
|
[](https://badge.fury.io/rb/faker)
|
|
7
|
-
[](https://inch-ci.org/github/faker-ruby/faker)
|
|
8
7
|
[](https://codeclimate.com/github/stympy/faker/test_coverage)
|
|
9
8
|
[](https://codeclimate.com/github/stympy/faker/maintainability)
|
|
10
9
|
|
|
11
|
-
|
|
10
|
+
Faker is a port of [Perl's Data::Faker library](https://metacpan.org/pod/Data::Faker).
|
|
11
|
+
It's a library for generating fake data such as names, addresses, and phone numbers.
|
|
12
|
+
|
|
13
|
+
Faker helps you generate realistic test data, and populate your
|
|
14
|
+
database with more than a couple of records while you're doing development.
|
|
15
|
+
|
|
16
|
+
It comes in very handy for taking screenshots (taking screenshots for a personal project)
|
|
17
|
+
and it was the original impetus for the creation of this gem).
|
|
18
|
+
|
|
19
|
+
## Quick links
|
|
20
|
+
|
|
21
|
+
- 📖 **[Read the documentation for the latest version][rubydocs].**
|
|
22
|
+
- 📢 **[See what's changed in recent versions][changelog].**
|
|
12
23
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
development.
|
|
24
|
+
[rubydocs]: https://www.rubydoc.info/gems/faker/
|
|
25
|
+
[changelog]: CHANGELOG.md
|
|
26
|
+
|
|
27
|
+
## Table of Contents
|
|
18
28
|
|
|
19
29
|
- [Faker](#faker)
|
|
20
|
-
|
|
21
|
-
- [
|
|
30
|
+
- [Quick links](#quick-links)
|
|
31
|
+
- [Table of Contents](#table-of-contents)
|
|
32
|
+
- [Notes](#notes)
|
|
33
|
+
- [Getting Started](#getting-started)
|
|
22
34
|
- [Usage](#usage)
|
|
23
|
-
|
|
35
|
+
- [A note about the Generators versions](#a-note-about-the-generators-versions)
|
|
24
36
|
- [Ensuring unique values](#ensuring-unique-values)
|
|
25
37
|
- [Deterministic Random](#deterministic-random)
|
|
38
|
+
- [Customization](#customization)
|
|
39
|
+
- [Minitest and Faker \>= 2.22](#minitest-and-faker--222)
|
|
26
40
|
- [Generators](#generators)
|
|
27
|
-
- [Default](#default)
|
|
28
|
-
- [Blockchain](#blockchain)
|
|
29
|
-
- [Books](#books)
|
|
30
|
-
- [Creature](#creature)
|
|
31
|
-
- [Games](#games)
|
|
32
|
-
- [Japanese Media](#japanese-media)
|
|
33
|
-
- [Movies](#movies)
|
|
34
|
-
- [Music](#music)
|
|
35
|
-
- [Quotes](#quotes)
|
|
36
|
-
- [Sports](#sports)
|
|
37
|
-
- [Tv Shows](#tv-shows)
|
|
38
|
-
- [Customization](#customization)
|
|
39
41
|
- [Contributing](#contributing)
|
|
40
|
-
- [
|
|
42
|
+
- [Versioning](#versioning)
|
|
41
43
|
- [License](#license)
|
|
42
44
|
|
|
43
|
-
###
|
|
45
|
+
### Notes
|
|
46
|
+
|
|
44
47
|
* While Faker generates data at random, returned values are not guaranteed to be unique by default.
|
|
45
|
-
|
|
46
|
-
Values also can be deterministic if you use the deterministic feature, see [
|
|
47
|
-
* This is the `
|
|
48
|
-
Please refer the README of your version for the available methods.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
##
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
```
|
|
55
|
-
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:
|
|
48
|
+
To explicitly specify when you require unique values, see [Ensuring Unique Values](#ensuring-unique-values).
|
|
49
|
+
Values also can be deterministic if you use the deterministic feature, see [Deterministic Random](#deterministic-random)
|
|
50
|
+
* This is the `main` branch of Faker and may contain changes that are not yet released.
|
|
51
|
+
Please refer to the README of your version for the available methods.
|
|
52
|
+
The list of all versions is [available here](https://github.com/stympy/faker/releases).
|
|
53
|
+
|
|
54
|
+
## Getting Started
|
|
55
|
+
|
|
56
|
+
Start by including `faker` in your Gemfile:
|
|
56
57
|
|
|
57
58
|
```ruby
|
|
58
|
-
gem 'faker'
|
|
59
|
+
gem 'faker'
|
|
59
60
|
```
|
|
60
61
|
|
|
62
|
+
Then run `bundle install`.
|
|
63
|
+
|
|
61
64
|
## Usage
|
|
65
|
+
|
|
66
|
+
Here are some examples of how to use Faker:
|
|
67
|
+
|
|
62
68
|
```ruby
|
|
63
69
|
require 'faker'
|
|
64
70
|
|
|
65
71
|
Faker::Name.name #=> "Christophe Bartell"
|
|
66
72
|
|
|
67
|
-
Faker::
|
|
73
|
+
Faker::Address.full_address #=> "5479 William Way, East Sonnyhaven, LA 63637"
|
|
74
|
+
|
|
75
|
+
Faker::Markdown.emphasis #=> "Quo qui aperiam. Amet corrupti distinctio. Sit quia *dolor.*"
|
|
76
|
+
|
|
77
|
+
Faker::TvShows::RuPaul.queen #=> "Violet Chachki"
|
|
78
|
+
|
|
79
|
+
Faker::Alphanumeric.alpha(number: 10) #=> "zlvubkrwga"
|
|
80
|
+
|
|
81
|
+
Faker::ProgrammingLanguage.name #=> "Ruby"
|
|
68
82
|
```
|
|
69
83
|
|
|
70
|
-
|
|
71
|
-
|
|
84
|
+
For a complete list of the generators, see [Generators](#generators).
|
|
85
|
+
|
|
86
|
+
#### A note about the Generators versions
|
|
87
|
+
|
|
88
|
+
If you get a `uninitialized constant Faker::[some_class]` error, your version of
|
|
89
|
+
the gem is behind main.
|
|
90
|
+
|
|
91
|
+
To make sure that your gem is the one
|
|
92
|
+
documented here, change the line in your Gemfile to:
|
|
93
|
+
|
|
94
|
+
```ruby
|
|
95
|
+
gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'main'
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
The generators have the `@faker.version` tag on top of their implementation.
|
|
99
|
+
From the tags, you can identify the version the generator was added:
|
|
100
|
+
|
|
101
|
+
```ruby
|
|
102
|
+
# Faker::TvShows::ParksAndRec.character
|
|
103
|
+
|
|
104
|
+
# @faker.version 1.9.0
|
|
105
|
+
def character
|
|
106
|
+
fetch('parks_and_rec.characters')
|
|
107
|
+
end
|
|
108
|
+
```
|
|
72
109
|
|
|
73
110
|
### Ensuring unique values
|
|
74
|
-
|
|
111
|
+
|
|
112
|
+
To ensure Faker generates unique values, prefix your method call with `unique`:
|
|
113
|
+
|
|
75
114
|
```ruby
|
|
76
115
|
Faker::Name.unique.name # This will return a unique name every time it is called
|
|
77
116
|
```
|
|
@@ -80,6 +119,7 @@ If too many unique values are requested from a generator that has a limited
|
|
|
80
119
|
number of potential values, a `Faker::UniqueGenerator::RetryLimitExceeded`
|
|
81
120
|
exception may be raised. It is possible to clear the record of unique values
|
|
82
121
|
that have been returned, for example between tests.
|
|
122
|
+
|
|
83
123
|
```ruby
|
|
84
124
|
Faker::Name.unique.clear # Clears used values for Faker::Name
|
|
85
125
|
Faker::UniqueGenerator.clear # Clears used values for all generators
|
|
@@ -94,11 +134,13 @@ manually set values).
|
|
|
94
134
|
# Faker::<generator>.unique.exclude(method, arguments, list)
|
|
95
135
|
|
|
96
136
|
# Add 'azerty' and 'wxcvbn' to the string generator with 6 char length
|
|
97
|
-
Faker::Lorem.unique.exclude :string, [6], %w[azerty wxcvbn]
|
|
137
|
+
Faker::Lorem.unique.exclude :string, [number: 6], %w[azerty wxcvbn]
|
|
98
138
|
```
|
|
99
139
|
|
|
100
140
|
### Deterministic Random
|
|
101
|
-
|
|
141
|
+
|
|
142
|
+
Faker supports seeding of its pseudo-random number generator (PRNG)
|
|
143
|
+
to provide deterministic output of repeated method calls.
|
|
102
144
|
|
|
103
145
|
```ruby
|
|
104
146
|
Faker::Config.random = Random.new(42)
|
|
@@ -113,14 +155,47 @@ Faker::Config.random.seed #=> 185180369676275068918401850258677722187
|
|
|
113
155
|
Faker::Company.bs #=> "cultivate viral synergies"
|
|
114
156
|
```
|
|
115
157
|
|
|
158
|
+
### Customization
|
|
159
|
+
|
|
160
|
+
You may want Faker to print information depending on your location in the world.
|
|
161
|
+
To assist you in this, Faker uses the `I18n` gem to store strings and formats to
|
|
162
|
+
represent the names and postal codes of the area of your choosing.
|
|
163
|
+
|
|
164
|
+
Just set the locale you want as shown below, and Faker will take care of the rest.
|
|
165
|
+
|
|
166
|
+
```ruby
|
|
167
|
+
Faker::Config.locale = 'es'
|
|
168
|
+
# or
|
|
169
|
+
Faker::Config.locale = :es
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
To override Faker's locales, and set it on threaded server environments
|
|
173
|
+
check out the [locales README](lib/locales/README.md).
|
|
174
|
+
|
|
175
|
+
### Minitest and Faker >= 2.22
|
|
176
|
+
|
|
177
|
+
To prevent Faker (version >= 2.22) from generating duplicate values when using Minitest,
|
|
178
|
+
you might need to add the following to the `test_helper.rb` or `rails_helper.rb` file:
|
|
179
|
+
|
|
180
|
+
```ruby
|
|
181
|
+
Faker::Config.random = Random.new
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
See [Issue #2534](https://github.com/faker-ruby/faker/issues/2534) for more details.
|
|
185
|
+
|
|
116
186
|
## Generators
|
|
187
|
+
|
|
188
|
+
This is the full list of generators available with this gem. If you need details about any of them, make sure to consult the documentation.
|
|
189
|
+
|
|
117
190
|
**NOTE: Some of the generators below aren't released yet. If you want to use them, change the line in your gemfile to:**
|
|
118
191
|
|
|
119
192
|
```ruby
|
|
120
|
-
gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => '
|
|
193
|
+
gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'main'
|
|
121
194
|
```
|
|
122
195
|
|
|
123
|
-
|
|
196
|
+
<details>
|
|
197
|
+
<summary>Default</summary>
|
|
198
|
+
|
|
124
199
|
- [Faker::Address](doc/default/address.md)
|
|
125
200
|
- [Faker::Alphanumeric](doc/default/alphanumeric.md)
|
|
126
201
|
- [Faker::Ancient](doc/default/ancient.md)
|
|
@@ -129,10 +204,13 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
|
|
|
129
204
|
- [Faker::Artist](doc/default/artist.md)
|
|
130
205
|
- [Faker::Avatar](doc/default/avatar.md)
|
|
131
206
|
- [Faker::Bank](doc/default/bank.md)
|
|
207
|
+
- [Faker::Barcode](doc/default/barcode.md)
|
|
132
208
|
- [Faker::Beer](doc/default/beer.md)
|
|
209
|
+
- [Faker::Blood](doc/default/blood.md)
|
|
133
210
|
- [Faker::Boolean](doc/default/boolean.md)
|
|
134
211
|
- [Faker::BossaNova](doc/default/bossa_nova.md)
|
|
135
212
|
- [Faker::Business](doc/default/business.md)
|
|
213
|
+
- [Faker::Camera](doc/default/camera.md)
|
|
136
214
|
- [Faker::Cannabis](doc/default/cannabis.md)
|
|
137
215
|
- [Faker::ChileRut](doc/default/chile_rut.md)
|
|
138
216
|
- [Faker::ChuckNorris](doc/default/chuck_norris.md)
|
|
@@ -143,6 +221,7 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
|
|
|
143
221
|
- [Faker::Commerce](doc/default/commerce.md)
|
|
144
222
|
- [Faker::Company](doc/default/company.md)
|
|
145
223
|
- [Faker::Compass](doc/default/compass.md)
|
|
224
|
+
- [Faker::Computer](doc/default/computer.md)
|
|
146
225
|
- [Faker::Construction](doc/default/construction.md)
|
|
147
226
|
- [Faker::Cosmere](doc/default/cosmere.md)
|
|
148
227
|
- [Faker::Crypto](doc/default/crypto.md)
|
|
@@ -154,19 +233,20 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
|
|
|
154
233
|
- [Faker::Dessert](doc/default/dessert.md)
|
|
155
234
|
- [Faker::Device](doc/default/device.md)
|
|
156
235
|
- [Faker::DrivingLicence](doc/default/driving_licence.md)
|
|
236
|
+
- [Faker::Drone](doc/drone/drone.md)
|
|
157
237
|
- [Faker::Educator](doc/default/educator.md)
|
|
158
238
|
- [Faker::ElectricalComponents](doc/default/electrical_components.md)
|
|
239
|
+
- [Faker::Emotion](doc/default/emotion.md)
|
|
159
240
|
- [Faker::Esport](doc/default/esport.md)
|
|
160
241
|
- [Faker::File](doc/default/file.md)
|
|
161
|
-
- [Faker::Fillmurray](doc/default/fillmurray.md)
|
|
162
242
|
- [Faker::Finance](doc/default/finance.md)
|
|
163
243
|
- [Faker::Food](doc/default/food.md)
|
|
164
|
-
- [Faker::Football](doc/default/football.md)
|
|
165
244
|
- [Faker::FunnyName](doc/default/funny_name.md)
|
|
166
245
|
- [Faker::Gender](doc/default/gender.md)
|
|
167
246
|
- [Faker::GreekPhilosophers](doc/default/greek_philosophers.md)
|
|
168
247
|
- [Faker::Hacker](doc/default/hacker.md)
|
|
169
248
|
- [Faker::Hipster](doc/default/hipster.md)
|
|
249
|
+
- [Faker::Hobby](doc/default/hobby.md)
|
|
170
250
|
- [Faker::House](doc/default/house.md)
|
|
171
251
|
- [Faker::IDNumber](doc/default/id_number.md)
|
|
172
252
|
- [Faker::IndustrySegments](doc/default/industry_segments.md)
|
|
@@ -177,11 +257,11 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
|
|
|
177
257
|
- [Faker::Kpop](doc/default/kpop.md)
|
|
178
258
|
- [Faker::Lorem](doc/default/lorem.md)
|
|
179
259
|
- [Faker::LoremFlickr](doc/default/lorem_flickr.md)
|
|
180
|
-
- [Faker::LoremPixel](doc/default/lorem_pixel.md)
|
|
181
260
|
- [Faker::Markdown](doc/default/markdown.md)
|
|
182
261
|
- [Faker::Marketing](doc/default/marketing.md)
|
|
183
262
|
- [Faker::Measurement](doc/default/measurement.md)
|
|
184
263
|
- [Faker::Military](doc/default/military.md)
|
|
264
|
+
- [Faker::Mountain](doc/default/mountain.md)
|
|
185
265
|
- [Faker::Name](doc/default/name.md)
|
|
186
266
|
- [Faker::Nation](doc/default/nation.md)
|
|
187
267
|
- [Faker::NatoPhoneticAlphabet](doc/default/nato_phonetic_alphabet.md)
|
|
@@ -202,6 +282,7 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
|
|
|
202
282
|
- [Faker::Stripe](doc/default/stripe.md)
|
|
203
283
|
- [Faker::Subscription](doc/default/subscription.md)
|
|
204
284
|
- [Faker::Superhero](doc/default/superhero.md)
|
|
285
|
+
- [Faker::Tea](doc/default/tea.md)
|
|
205
286
|
- [Faker::Team](doc/default/team.md)
|
|
206
287
|
- [Faker::Time](doc/default/time.md)
|
|
207
288
|
- [Faker::Twitter](doc/default/twitter.md)
|
|
@@ -209,86 +290,166 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
|
|
|
209
290
|
- [Faker::University](doc/default/university.md)
|
|
210
291
|
- [Faker::Vehicle](doc/default/vehicle.md)
|
|
211
292
|
- [Faker::Verbs](doc/default/verbs.md)
|
|
293
|
+
- [Faker::VulnerabilityIdentifier](doc/default/vulnerability_identifier.md)
|
|
212
294
|
- [Faker::WorldCup](doc/default/world_cup.md)
|
|
295
|
+
</details>
|
|
296
|
+
|
|
297
|
+
<details>
|
|
298
|
+
<summary>Blockchain</summary>
|
|
213
299
|
|
|
214
|
-
|
|
300
|
+
- [Faker::Blockchain::Aeternity](doc/blockchain/aeternity.md)
|
|
215
301
|
- [Faker::Blockchain::Bitcoin](doc/blockchain/bitcoin.md)
|
|
216
302
|
- [Faker::Blockchain::Ethereum](doc/blockchain/ethereum.md)
|
|
217
303
|
- [Faker::Blockchain::Tezos](doc/blockchain/tezos.md)
|
|
304
|
+
</details>
|
|
305
|
+
|
|
306
|
+
<details>
|
|
307
|
+
<summary>Books</summary>
|
|
218
308
|
|
|
219
|
-
### Books
|
|
220
309
|
- [Faker::Book](doc/books/book.md)
|
|
221
310
|
- [Faker::Books::CultureSeries](doc/books/culture_series.md)
|
|
222
311
|
- [Faker::Books::Dune](doc/books/dune.md)
|
|
223
312
|
- [Faker::Books::Lovecraft](doc/books/lovecraft.md)
|
|
313
|
+
- [Faker::Books::TheKingkillerChronicle](doc/books/the_kingkiller_chronicle.md)
|
|
314
|
+
</details>
|
|
315
|
+
|
|
316
|
+
<details>
|
|
317
|
+
<summary>Fantasy</summary>
|
|
318
|
+
|
|
319
|
+
- [Faker::Fantasy::Tolkien](doc/fantasy/tolkien.md)
|
|
320
|
+
</details>
|
|
321
|
+
|
|
322
|
+
<details>
|
|
323
|
+
<summary>Travel</summary>
|
|
324
|
+
|
|
325
|
+
- [Faker:Travel::Airport](doc/travel/airport.md)
|
|
326
|
+
- [Faker:Travel::TrainStation](doc/travel/train_station.md)
|
|
327
|
+
</details>
|
|
328
|
+
|
|
329
|
+
<details>
|
|
330
|
+
<summary>Creature</summary>
|
|
224
331
|
|
|
225
|
-
### Creature
|
|
226
332
|
- [Faker::Creature::Animal](doc/creature/animal.md)
|
|
333
|
+
- [Faker::Creature::Bird](doc/creature/bird.md)
|
|
227
334
|
- [Faker::Creature::Cat](doc/creature/cat.md)
|
|
228
335
|
- [Faker::Creature::Dog](doc/creature/dog.md)
|
|
229
336
|
- [Faker::Creature::Horse](doc/creature/horse.md)
|
|
337
|
+
</details>
|
|
338
|
+
|
|
339
|
+
<details>
|
|
340
|
+
<summary>Games</summary>
|
|
230
341
|
|
|
231
|
-
### Games
|
|
232
342
|
- [Faker::Game](doc/games/game.md)
|
|
343
|
+
- [Faker::Games::ClashOfClans](doc/games/clash_of_clans.md)
|
|
344
|
+
- [Faker::Games::DnD](doc/games/dnd.md)
|
|
233
345
|
- [Faker::Games::Dota](doc/games/dota.md)
|
|
234
346
|
- [Faker::Games::ElderScrolls](doc/games/elder_scrolls.md)
|
|
235
347
|
- [Faker::Games::Fallout](doc/games/fallout.md)
|
|
348
|
+
- [Faker::Games::FinalFantasyXIV](doc/games/final_fantasy_xiv.md)
|
|
236
349
|
- [Faker::Games::HalfLife](doc/games/half_life.md)
|
|
237
350
|
- [Faker::Games::Heroes](doc/games/heroes.md)
|
|
238
351
|
- [Faker::Games::HeroesOfTheStorm](doc/games/heroes_of_the_storm.md)
|
|
239
352
|
- [Faker::Games::LeagueOfLegends](doc/games/league_of_legends.md)
|
|
353
|
+
- [Faker::Games::Minecraft](doc/games/minecraft.md)
|
|
240
354
|
- [Faker::Games::Myst](doc/games/myst.md)
|
|
241
355
|
- [Faker::Games::Overwatch](doc/games/overwatch.md)
|
|
242
356
|
- [Faker::Games::Pokemon](doc/games/pokemon.md)
|
|
243
357
|
- [Faker::Games::SonicTheHedgehog](doc/games/sonic_the_hedgehog.md)
|
|
358
|
+
- [Faker::Games::StreetFighter](doc/games/street_fighter.md)
|
|
359
|
+
- [Faker::Games::SuperMario](doc/games/super_mario.md)
|
|
244
360
|
- [Faker::Games::SuperSmashBros](doc/games/super_smash_bros.md)
|
|
361
|
+
- [Faker::Games::Touhou](doc/games/touhou.md)
|
|
362
|
+
- [Faker::Games::WarhammerFantasy](doc/games/warhammer_fantasy.md)
|
|
245
363
|
- [Faker::Games::Witcher](doc/games/witcher.md)
|
|
246
364
|
- [Faker::Games::WorldOfWarcraft](doc/games/world_of_warcraft.md)
|
|
247
365
|
- [Faker::Games::Zelda](doc/games/zelda.md)
|
|
366
|
+
</details>
|
|
248
367
|
|
|
249
|
-
|
|
368
|
+
<details>
|
|
369
|
+
<summary>Japanese Media</summary>
|
|
370
|
+
|
|
371
|
+
- [Faker::JapaneseMedia::CowboyBebop](doc/japanese_media/cowboy_bebop.md)
|
|
250
372
|
- [Faker::JapaneseMedia::DragonBall](doc/japanese_media/dragon_ball.md)
|
|
251
373
|
- [Faker::JapaneseMedia::OnePiece](doc/japanese_media/one_piece.md)
|
|
374
|
+
- [Faker::JapaneseMedia::StudioGhibli](doc/japanese_media/studio_ghibli.md)
|
|
252
375
|
- [Faker::JapaneseMedia::SwordArtOnline](doc/japanese_media/sword_art_online.md)
|
|
376
|
+
- [Faker::JapaneseMedia::Naruto](doc/japanese_media/naruto.md)
|
|
377
|
+
- [Faker::JapaneseMedia::Doraemon](doc/japanese_media/doraemon.md)
|
|
378
|
+
- [Faker::JapaneseMedia::Conan](doc/japanese_media/conan.md)
|
|
379
|
+
- [Faker::JapaneseMedia::FmaBrotherhood](doc/japanese_media/fullmetal_alchemist_brotherhood.md)
|
|
380
|
+
</details>
|
|
381
|
+
|
|
382
|
+
<details>
|
|
383
|
+
<summary>Movies</summary>
|
|
253
384
|
|
|
254
|
-
### Movies
|
|
255
385
|
- [Faker::Movie](doc/movies/movie.md)
|
|
386
|
+
- [Faker::Movies::Avatar](doc/movies/avatar.md)
|
|
256
387
|
- [Faker::Movies::BackToTheFuture](doc/movies/back_to_the_future.md)
|
|
388
|
+
- [Faker::Movies::Departed](doc/movies/departed.md)
|
|
257
389
|
- [Faker::Movies::Ghostbusters](doc/movies/ghostbusters.md)
|
|
258
390
|
- [Faker::Movies::HarryPotter](doc/movies/harry_potter.md)
|
|
259
391
|
- [Faker::Movies::HitchhikersGuideToTheGalaxy](doc/movies/hitchhikers_guide_to_the_galaxy.md)
|
|
260
392
|
- [Faker::Movies::Hobbit](doc/movies/hobbit.md)
|
|
393
|
+
- [Faker::Movies::HowToTrainYourDragon](doc/movies/how_to_train_your_dragon.md)
|
|
261
394
|
- [Faker::Movies::Lebowski](doc/movies/lebowski.md)
|
|
262
395
|
- [Faker::Movies::LordOfTheRings](doc/movies/lord_of_the_rings.md)
|
|
263
396
|
- [Faker::Movies::PrincessBride](doc/movies/princess_bride.md)
|
|
264
397
|
- [Faker::Movies::StarWars](doc/movies/star_wars.md)
|
|
398
|
+
- [Faker::Movies::TRON](doc/movies/tron.md)
|
|
265
399
|
- [Faker::Movies::VForVendetta](doc/movies/v_for_vendetta.md)
|
|
400
|
+
</details>
|
|
401
|
+
|
|
402
|
+
<details>
|
|
403
|
+
<summary>Music</summary>
|
|
266
404
|
|
|
267
|
-
### Music
|
|
268
405
|
- [Faker::Music](doc/music/music.md)
|
|
269
406
|
- [Faker::Music::GratefulDead](doc/music/grateful_dead.md)
|
|
407
|
+
- [Faker::Music::Hiphop](doc/music/hiphop.md)
|
|
270
408
|
- [Faker::Music::Opera](doc/music/opera.md)
|
|
409
|
+
- [Faker::Music::PearlJam](doc/music/pearl_jam.md)
|
|
271
410
|
- [Faker::Music::Phish](doc/music/phish.md)
|
|
411
|
+
- [Faker::Music::Prince](doc/music/prince.md)
|
|
272
412
|
- [Faker::Music::RockBand](doc/music/rock_band.md)
|
|
413
|
+
- [Faker::Music::Rush](doc/music/rush.md)
|
|
414
|
+
- [Faker::Music::SmashingPumpkins](doc/music/smashing_pumpkins.md)
|
|
273
415
|
- [Faker::Music::UmphreysMcgee](doc/music/umphreys_mcgee.md)
|
|
416
|
+
</details>
|
|
417
|
+
|
|
418
|
+
<details>
|
|
419
|
+
<summary>Quotes</summary>
|
|
274
420
|
|
|
275
|
-
### Quotes
|
|
276
421
|
- [Faker::Quote](doc/quotes/quote.md)
|
|
422
|
+
- [Faker::Quotes::Chiquito](doc/quotes/chiquito.md)
|
|
423
|
+
- [Faker::Quotes::Rajnikanth](doc/quotes/rajnikanth.md)
|
|
277
424
|
- [Faker::Quotes::Shakespeare](doc/quotes/shakespeare.md)
|
|
425
|
+
</details>
|
|
278
426
|
|
|
279
|
-
|
|
427
|
+
<details>
|
|
428
|
+
<summary>Sports</summary>
|
|
429
|
+
|
|
430
|
+
- [Faker::Sports](doc/sports/sports.md)
|
|
280
431
|
- [Faker::Sports::Basketball](doc/sports/basketball.md)
|
|
432
|
+
- [Faker::Sports::Chess](doc/sports/chess.md)
|
|
281
433
|
- [Faker::Sports::Football](doc/sports/football.md)
|
|
434
|
+
- [Faker::Sports::Mountaineering](doc/sports/mountaineering.md)
|
|
435
|
+
- [Faker::Sports::Volleyball](doc/sports/volleyball.md)
|
|
436
|
+
</details>
|
|
437
|
+
|
|
438
|
+
<details>
|
|
439
|
+
<summary>Tv Shows</summary>
|
|
282
440
|
|
|
283
|
-
### Tv Shows
|
|
284
441
|
- [Faker::TvShows::AquaTeenHungerForce](doc/tv_shows/aqua_teen_hunger_force.md)
|
|
442
|
+
- [Faker::TvShows::Archer](doc/tv_shows/archer.md)
|
|
443
|
+
- [Faker::TvShows::BigBangTheory](doc/tv_shows/big_bang_theory.md)
|
|
285
444
|
- [Faker::TvShows::BojackHorseman](doc/tv_shows/bojack_horseman.md)
|
|
286
445
|
- [Faker::TvShows::BreakingBad](doc/tv_shows/breaking_bad.md)
|
|
446
|
+
- [Faker::TvShows::BrooklynNineNine](doc/tv_shows/brooklyn_nine_nine.md)
|
|
287
447
|
- [Faker::TvShows::Buffy](doc/tv_shows/buffy.md)
|
|
288
448
|
- [Faker::TvShows::Community](doc/tv_shows/community.md)
|
|
289
449
|
- [Faker::TvShows::DrWho](doc/tv_shows/dr_who.md)
|
|
290
450
|
- [Faker::TvShows::DumbAndDumber](doc/tv_shows/dumb_and_dumber.md)
|
|
291
451
|
- [Faker::TvShows::FamilyGuy](doc/tv_shows/family_guy.md)
|
|
452
|
+
- [Faker::TvShows::FinalSpace](doc/tv_shows/final_space.md)
|
|
292
453
|
- [Faker::TvShows::Friends](doc/tv_shows/friends.md)
|
|
293
454
|
- [Faker::TvShows::GameOfThrones](doc/tv_shows/game_of_thrones.md)
|
|
294
455
|
- [Faker::TvShows::HeyArnold](doc/tv_shows/hey_arnold.md)
|
|
@@ -302,63 +463,37 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
|
|
|
302
463
|
- [Faker::TvShows::SiliconValley](doc/tv_shows/silicon_valley.md)
|
|
303
464
|
- [Faker::TvShows::Simpsons](doc/tv_shows/simpsons.md)
|
|
304
465
|
- [Faker::TvShows::SouthPark](doc/tv_shows/south_park.md)
|
|
466
|
+
- [Faker::TvShows::Spongebob](doc/tv_shows/spongebob.md)
|
|
305
467
|
- [Faker::TvShows::StarTrek](doc/tv_shows/star_trek.md)
|
|
306
468
|
- [Faker::TvShows::Stargate](doc/tv_shows/stargate.md)
|
|
307
469
|
- [Faker::TvShows::StrangerThings](doc/tv_shows/stranger_things.md)
|
|
470
|
+
- [Faker::TvShows::Suits](doc/tv_shows/suits.md)
|
|
471
|
+
- [Faker::TvShows::Supernatural](doc/tv_shows/supernatural.md)
|
|
308
472
|
- [Faker::TvShows::TheExpanse](doc/tv_shows/the_expanse.md)
|
|
309
473
|
- [Faker::TvShows::TheFreshPrinceOfBelAir](doc/tv_shows/the_fresh_prince_of_bel_air.md)
|
|
310
474
|
- [Faker::TvShows::TheITCrowd](doc/tv_shows/the_it_crowd.md)
|
|
311
475
|
- [Faker::TvShows::TheThickOfIt](doc/tv_shows/the_thick_of_it.md)
|
|
312
476
|
- [Faker::TvShows::TwinPeaks](doc/tv_shows/twin_peaks.md)
|
|
313
477
|
- [Faker::TvShows::VentureBros](doc/tv_shows/venture_bros.md)
|
|
314
|
-
|
|
315
|
-
## Customization
|
|
316
|
-
Since you may want to make addresses and other types of data look different
|
|
317
|
-
depending on where in the world you are (US postal codes vs. UK postal codes,
|
|
318
|
-
for example), Faker uses the I18n gem to store strings (like state names) and
|
|
319
|
-
formats (US postal codes are NNNNN while UK postal codes are AAN NAA),
|
|
320
|
-
allowing you to get different formats by switching locales. Just set
|
|
321
|
-
Faker::Config.locale to the locale you want, and Faker will take care of the
|
|
322
|
-
rest.
|
|
323
|
-
|
|
324
|
-
If your locale doesn't already exist, create it in the `lib/locales` directory
|
|
325
|
-
and you can then override or add elements to suit your needs. See more about how to
|
|
326
|
-
use locales [here](lib/locales/README.md)
|
|
327
|
-
|
|
328
|
-
```yaml
|
|
329
|
-
en-au-ocker:
|
|
330
|
-
faker:
|
|
331
|
-
name:
|
|
332
|
-
# Existing faker field, new data
|
|
333
|
-
first_name:
|
|
334
|
-
- Charlotte
|
|
335
|
-
- Ava
|
|
336
|
-
- Chloe
|
|
337
|
-
- Emily
|
|
338
|
-
|
|
339
|
-
# New faker fields
|
|
340
|
-
ocker_first_name:
|
|
341
|
-
- Bazza
|
|
342
|
-
- Bluey
|
|
343
|
-
- Davo
|
|
344
|
-
- Johno
|
|
345
|
-
- Shano
|
|
346
|
-
- Shazza
|
|
347
|
-
region:
|
|
348
|
-
- South East Queensland
|
|
349
|
-
- Wide Bay Burnett
|
|
350
|
-
- Margaret River
|
|
351
|
-
- Port Pirie
|
|
352
|
-
- Gippsland
|
|
353
|
-
- Elizabeth
|
|
354
|
-
- Barossa
|
|
355
|
-
```
|
|
478
|
+
</details>
|
|
356
479
|
|
|
357
480
|
## Contributing
|
|
358
|
-
See [CONTRIBUTING.md](https://github.com/stympy/faker/blob/master/CONTRIBUTING.md).
|
|
359
481
|
|
|
360
|
-
|
|
361
|
-
|
|
482
|
+
If you have problems, please create a [GitHub Issue](/.github/ISSUE_TEMPLATE/bug-report.md).
|
|
483
|
+
|
|
484
|
+
Take a look at the [Contributing](CONTRIBUTING.md) document for
|
|
485
|
+
instructions on setting up the repo on your machine, understanding the codebase,
|
|
486
|
+
and creating a good pull request.
|
|
487
|
+
|
|
488
|
+
There is a [Discord channel](https://discord.gg/RMumTwB) to discuss anything
|
|
489
|
+
regarding improvements or feature requests.
|
|
490
|
+
|
|
491
|
+
Thank you, contributors!
|
|
492
|
+
|
|
493
|
+
## Versioning
|
|
494
|
+
|
|
495
|
+
Faker follows Semantic Versioning 2.0 as defined at https://semver.org.
|
|
362
496
|
|
|
363
497
|
## License
|
|
498
|
+
|
|
364
499
|
This code is free to use under the terms of the MIT license.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Faker
|
|
4
|
+
class Blockchain
|
|
5
|
+
class Aeternity < Base
|
|
6
|
+
class << self
|
|
7
|
+
##
|
|
8
|
+
# Produces a random Aeternity wallet address
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
#
|
|
12
|
+
# @example
|
|
13
|
+
# Faker::Blockchain::Aeternity.address
|
|
14
|
+
# #=> "ak_zvU8YQLagjcfng7Tg8yCdiZ1rpiWNp1PBn3vtUs44utSvbJVR"
|
|
15
|
+
#
|
|
16
|
+
def address
|
|
17
|
+
"ak_#{rand_strings}"
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
##
|
|
21
|
+
# Produces a random Aeternity transaction
|
|
22
|
+
#
|
|
23
|
+
# @return [String]
|
|
24
|
+
#
|
|
25
|
+
# @example
|
|
26
|
+
# Faker::Blockchain::Aeternity.transaction
|
|
27
|
+
# #=> "th_147nDP22h3pHrLt2qykTH4txUwQh1ccaXp"
|
|
28
|
+
#
|
|
29
|
+
def transaction
|
|
30
|
+
"th_#{rand_strings(51)}"
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
##
|
|
34
|
+
# Produces a random Aeternity contract
|
|
35
|
+
#
|
|
36
|
+
# @return [String]
|
|
37
|
+
#
|
|
38
|
+
# @example
|
|
39
|
+
# Faker::Blockchain::Aeternity.contract
|
|
40
|
+
# #=> "ct_Hk2JsNeWGEYQEHHQCfcBeGrwbhtYSwFTPdDhW2SvjFYVojyhW"
|
|
41
|
+
#
|
|
42
|
+
def contract
|
|
43
|
+
"ct_#{rand_strings}"
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
##
|
|
47
|
+
# Produces a random Aeternity oracle
|
|
48
|
+
#
|
|
49
|
+
# @return [String]
|
|
50
|
+
#
|
|
51
|
+
# @example
|
|
52
|
+
# Faker::Blockchain::Aeternity.oracle
|
|
53
|
+
# #=> "ok_28QDg7fkF5qiKueSdUvUBtCYPJdmMEoS73CztzXCRAwMGKHKZh"
|
|
54
|
+
#
|
|
55
|
+
def oracle
|
|
56
|
+
"ok_#{rand_strings(51)}"
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
protected
|
|
60
|
+
|
|
61
|
+
def rand_strings(length = 50)
|
|
62
|
+
hex_alphabet = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
|
63
|
+
var = +''
|
|
64
|
+
length.times { var << sample(shuffle(hex_alphabet.chars)) }
|
|
65
|
+
var
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|