├── .github ├── ISSUE_TEMPLATE │ ├── bug-report.md │ └── feature-request.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── .rubocop.yml ├── .travis.yml ├── .yardopts ├── CHANGELOG.md ├── CONTRIBUTING.md ├── Gemfile ├── Gemfile.lock ├── History.md ├── License.txt ├── README.md ├── Rakefile ├── bin └── faker ├── doc ├── blockchain │ ├── aeternity.md │ ├── bitcoin.md │ ├── ethereum.md │ └── tezos.md ├── books │ ├── book.md │ ├── culture_series.md │ ├── dune.md │ └── lovecraft.md ├── creature │ ├── animal.md │ ├── cat.md │ ├── dog.md │ └── horse.md ├── default │ ├── address.md │ ├── alphanumeric.md │ ├── ancient.md │ ├── app.md │ ├── appliance.md │ ├── artist.md │ ├── avatar.md │ ├── bank.md │ ├── beer.md │ ├── boolean.md │ ├── bossa_nova.md │ ├── business.md │ ├── cannabis.md │ ├── chile_rut.md │ ├── chuck_norris.md │ ├── code.md │ ├── coffee.md │ ├── coin.md │ ├── color.md │ ├── commerce.md │ ├── company.md │ ├── compass.md │ ├── construction.md │ ├── cosmere.md │ ├── crypto.md │ ├── crypto_coin.md │ ├── currency.md │ ├── date.md │ ├── dc_comics.md │ ├── demographic.md │ ├── dessert.md │ ├── device.md │ ├── driving_licence.md │ ├── educator.md │ ├── electrical_components.md │ ├── esport.md │ ├── file.md │ ├── fillmurray.md │ ├── finance.md │ ├── food.md │ ├── funny_name.md │ ├── gender.md │ ├── greek_philosophers.md │ ├── hacker.md │ ├── harry_potter.md │ ├── hipster.md │ ├── hitchhikers_guide_to_the_galaxy.md │ ├── house.md │ ├── id_number.md │ ├── industry_segments.md │ ├── internet.md │ ├── invoice.md │ ├── job.md │ ├── json.md │ ├── kpop.md │ ├── lorem.md │ ├── lorem_flickr.md │ ├── lorem_pixel.md │ ├── markdown.md │ ├── marketing.md │ ├── measurement.md │ ├── michael_scott.md │ ├── military.md │ ├── name.md │ ├── nation.md │ ├── national_health_service.md │ ├── nato_phonetic_alphabet.md │ ├── number.md │ ├── omniauth.md │ ├── phone_number.md │ ├── placeholdit.md │ ├── programming_language.md │ ├── relationship.md │ ├── restaurant.md │ ├── rock_band.md │ ├── rupaul.md │ ├── science.md │ ├── slack_emoji.md │ ├── source.md │ ├── south_africa.md │ ├── space.md │ ├── string.md │ ├── stripe.md │ ├── subscription.md │ ├── superhero.md │ ├── team.md │ ├── time.md │ ├── twitter.md │ ├── types.md │ ├── university.md │ ├── vehicle.md │ ├── verbs.md │ └── world_cup.md ├── dessinanime │ └── disney.md ├── games │ ├── dota.md │ ├── elder_scrolls.md │ ├── fallout.md │ ├── game.md │ ├── half_life.md │ ├── heroes.md │ ├── heroes_of_the_storm.md │ ├── league_of_legends.md │ ├── myst.md │ ├── overwatch.md │ ├── pokemon.md │ ├── sonic_the_hedgehog.md │ ├── super_smash_bros.md │ ├── witcher.md │ ├── world_of_warcraft.md │ └── zelda.md ├── japanese_media │ ├── dragon_ball.md │ ├── one_piece.md │ └── sword_art_online.md ├── movies │ ├── back_to_the_future.md │ ├── ghostbusters.md │ ├── grateful_dead.md │ ├── harry_potter.md │ ├── hobbit.md │ ├── lebowski.md │ ├── lord_of_the_rings.md │ ├── movie.md │ ├── oss117.md │ ├── princess_bride.md │ ├── star_wars.md │ └── v_for_vendetta.md ├── music │ ├── grateful_dead.md │ ├── music.md │ ├── opera.md │ ├── phish.md │ ├── rock_band.md │ └── umphreys_mcgee.md ├── quotes │ ├── chiquito.md │ ├── quote.md │ └── shakespeare.md ├── sports │ ├── basketball.md │ └── football.md └── tv_shows │ ├── aqua_teen_hunger_force.md │ ├── bojack_horseman.md │ ├── breaking_bad.md │ ├── buffy.md │ ├── community.md │ ├── dr_who.md │ ├── dumb_and_dumber.md │ ├── family_guy.md │ ├── friends.md │ ├── game_of_thrones.md │ ├── hey_arnold.md │ ├── how_i_met_your_mother.md │ ├── kaamelott.md │ ├── michael_scott.md │ ├── new_girl.md │ ├── parks_and_rec.md │ ├── rick_and_morty.md │ ├── rupaul.md │ ├── seinfeld.md │ ├── silicon_valley.md │ ├── simpsons.md │ ├── south_park.md │ ├── star_trek.md │ ├── stargate.md │ ├── stranger_things.md │ ├── the_expanse.md │ ├── the_fresh_prince_of_bel_air.md │ ├── the_it_crowd.md │ ├── the_thick_of_it.md │ ├── twin_peaks.md │ └── venture_bros.md ├── faker.gemspec ├── lib ├── faker.rb ├── faker │ ├── blockchain │ │ ├── aeternity.rb │ │ ├── bitcoin.rb │ │ ├── ethereum.rb │ │ └── tezos.rb │ ├── books │ │ ├── book.rb │ │ ├── culture_series.rb │ │ ├── dune.rb │ │ └── lovecraft.rb │ ├── creature │ │ ├── animal.rb │ │ ├── cat.rb │ │ ├── dog.rb │ │ └── horse.rb │ ├── default │ │ ├── address.rb │ │ ├── alphanumeric.rb │ │ ├── ancient.rb │ │ ├── app.rb │ │ ├── appliance.rb │ │ ├── artist.rb │ │ ├── avatar.rb │ │ ├── bank.rb │ │ ├── beer.rb │ │ ├── boolean.rb │ │ ├── bossa_nova.rb │ │ ├── business.rb │ │ ├── cannabis.rb │ │ ├── chile_rut.rb │ │ ├── chuck_norris.rb │ │ ├── code.rb │ │ ├── coffee.rb │ │ ├── coin.rb │ │ ├── color.rb │ │ ├── commerce.rb │ │ ├── company.rb │ │ ├── compass.rb │ │ ├── construction.rb │ │ ├── cosmere.rb │ │ ├── crypto.rb │ │ ├── crypto_coin.rb │ │ ├── currency.rb │ │ ├── date.rb │ │ ├── dc_comics.rb │ │ ├── demographic.rb │ │ ├── dessert.rb │ │ ├── device.rb │ │ ├── driving_licence.rb │ │ ├── educator.rb │ │ ├── electrical_components.rb │ │ ├── esport.rb │ │ ├── file.rb │ │ ├── fillmurray.rb │ │ ├── finance.rb │ │ ├── food.rb │ │ ├── funny_name.rb │ │ ├── gender.rb │ │ ├── greek_philosophers.rb │ │ ├── hacker.rb │ │ ├── hipster.rb │ │ ├── house.rb │ │ ├── id_number.rb │ │ ├── industry_segments.rb │ │ ├── internet.rb │ │ ├── invoice.rb │ │ ├── job.rb │ │ ├── json.rb │ │ ├── kpop.rb │ │ ├── lorem.rb │ │ ├── lorem_flickr.rb │ │ ├── lorem_pixel.rb │ │ ├── markdown.rb │ │ ├── marketing.rb │ │ ├── measurement.rb │ │ ├── military.rb │ │ ├── name.rb │ │ ├── nation.rb │ │ ├── nato_phonetic_alphabet.rb │ │ ├── nhs.rb │ │ ├── number.rb │ │ ├── omniauth.rb │ │ ├── phone_number.rb │ │ ├── placeholdit.rb │ │ ├── programming_language.rb │ │ ├── relationship.rb │ │ ├── restaurant.rb │ │ ├── science.rb │ │ ├── slack_emoji.rb │ │ ├── source.rb │ │ ├── south_africa.rb │ │ ├── space.rb │ │ ├── string.rb │ │ ├── stripe.rb │ │ ├── subscription.rb │ │ ├── superhero.rb │ │ ├── team.rb │ │ ├── time.rb │ │ ├── twitter.rb │ │ ├── types.rb │ │ ├── university.rb │ │ ├── vehicle.rb │ │ ├── verb.rb │ │ └── world_cup.rb │ ├── dessinanime │ │ └── disney.rb │ ├── games │ │ ├── dota.rb │ │ ├── elder_scrolls.rb │ │ ├── fallout.rb │ │ ├── game.rb │ │ ├── half_life.rb │ │ ├── heroes.rb │ │ ├── heroes_of_the_storm.rb │ │ ├── league_of_legends.rb │ │ ├── myst.rb │ │ ├── overwatch.rb │ │ ├── pokemon.rb │ │ ├── sonic_the_hedgehog.rb │ │ ├── super_smash_bros.rb │ │ ├── witcher.rb │ │ ├── world_of_warcraft.rb │ │ └── zelda.rb │ ├── japanese_media │ │ ├── dragon_ball.rb │ │ ├── one_piece.rb │ │ └── sword_art_online.rb │ ├── movies │ │ ├── back_to_the_future.rb │ │ ├── ghostbusters.rb │ │ ├── harry_potter.rb │ │ ├── hobbit.rb │ │ ├── lebowski.rb │ │ ├── lord_of_the_rings.rb │ │ ├── movie.rb │ │ ├── oss117.rb │ │ ├── princess_bride.rb │ │ ├── star_wars.rb │ │ └── v_for_vendetta.rb │ ├── music │ │ ├── grateful_dead.rb │ │ ├── music.rb │ │ ├── opera.rb │ │ ├── phish.rb │ │ ├── rock_band.rb │ │ └── umphreys_mcgee.rb │ ├── quotes │ │ ├── chiquito.rb │ │ ├── quote.rb │ │ └── shakespeare.rb │ ├── sports │ │ ├── basketball.rb │ │ └── football.rb │ ├── tv_shows │ │ ├── aqua_teen_hunger_force.rb │ │ ├── bojack_horseman.rb │ │ ├── breaking_bad.rb │ │ ├── buffy.rb │ │ ├── community.rb │ │ ├── dr_who.rb │ │ ├── dumb_and_dumber.rb │ │ ├── family_guy.rb │ │ ├── friends.rb │ │ ├── game_of_thrones.rb │ │ ├── hey_arnold.rb │ │ ├── how_i_met_your_mother.rb │ │ ├── kaamelott.rb │ │ ├── michael_scott.rb │ │ ├── new_girl.rb │ │ ├── parks_and_rec.rb │ │ ├── rick_and_morty.rb │ │ ├── ru_paul.rb │ │ ├── seinfeld.rb │ │ ├── silicon_valley.rb │ │ ├── simpsons.rb │ │ ├── south_park.rb │ │ ├── star_trek.rb │ │ ├── stargate.rb │ │ ├── stranger_things.rb │ │ ├── the_expanse.rb │ │ ├── the_fresh_prince_of_bel_air.rb │ │ ├── the_it_crowd.rb │ │ ├── the_thick_of_it.rb │ │ ├── twin_peaks.rb │ │ └── venture_bros.rb │ └── version.rb ├── helpers │ ├── base58.rb │ ├── char.rb │ └── unique_generator.rb └── locales │ ├── README.md │ ├── ar.yml │ ├── bg.yml │ ├── ca-CAT.yml │ ├── ca.yml │ ├── da-DK.yml │ ├── de-AT.yml │ ├── de-CH.yml │ ├── de.yml │ ├── ee.yml │ ├── en-AU.yml │ ├── en-BORK.yml │ ├── en-CA.yml │ ├── en-GB.yml │ ├── en-IND.yml │ ├── en-MS.yml │ ├── en-NEP.yml │ ├── en-NG.yml │ ├── en-NZ.yml │ ├── en-PAK.yml │ ├── en-SG.yml │ ├── en-TH.yml │ ├── en-UG.yml │ ├── en-US.yml │ ├── en-ZA.yml │ ├── en-au-ocker.yml │ ├── en.yml │ ├── en │ ├── README.md │ ├── address.yml │ ├── ancient.yml │ ├── animal.yml │ ├── app.yml │ ├── appliance.yml │ ├── aqua_teen_hunger_force.yml │ ├── artist.yml │ ├── back_to_the_future.yml │ ├── bank.yml │ ├── basketball.yml │ ├── beer.yml │ ├── bojack_horseman.yml │ ├── book.yml │ ├── bossa_nova.yml │ ├── breaking_bad.yml │ ├── buffy.yml │ ├── business.yml │ ├── cannabis.yml │ ├── cat.yml │ ├── chiquito.yml │ ├── chuck_norris.yml │ ├── code.yml │ ├── coffee.yml │ ├── coin.yml │ ├── color.yml │ ├── commerce.yml │ ├── community.yml │ ├── company.yml │ ├── compass.yml │ ├── construction.yml │ ├── cosmere.yml │ ├── crypto_coin.yml │ ├── culture_series.yml │ ├── currency.yml │ ├── dc_comics.yml │ ├── demographic.yml │ ├── dessert.yml │ ├── device.yml │ ├── disney.yml │ ├── dog.yml │ ├── dota.yml │ ├── dr_who.yml │ ├── dragon_ball.yml │ ├── dumb_and_dumber.yml │ ├── dune.yml │ ├── educator.yml │ ├── elder_scrolls.yml │ ├── electrical_components.yml │ ├── esport.yml │ ├── fallout.yml │ ├── family_guy.yml │ ├── file.yml │ ├── finance.yml │ ├── food.yml │ ├── football.yml │ ├── fresh_prince_of_bel_air.yml │ ├── friends.yml │ ├── funny_name.yml │ ├── game.yml │ ├── game_of_thrones.yml │ ├── gender.yml │ ├── ghostbusters.yml │ ├── grateful_dead.yml │ ├── greek_philosophers.yml │ ├── hacker.yml │ ├── half_life.yml │ ├── harry_potter.yml │ ├── heroes.yml │ ├── heroes_of_the_storm.yml │ ├── hey_arnold.yml │ ├── hipster.yml │ ├── hobbit.yml │ ├── horse.yml │ ├── house.yml │ ├── how_i_met_your_mother.yml │ ├── id_number.yml │ ├── industry_segments.yml │ ├── internet.yml │ ├── invoice.yml │ ├── job.yml │ ├── kaamelott.yml │ ├── kpop.yml │ ├── league_of_legends.yml │ ├── lebowski.yml │ ├── lord_of_the_rings.yml │ ├── lorem.yml │ ├── lovecraft.yml │ ├── markdown.yml │ ├── marketing.yml │ ├── measurement.yml │ ├── michael_scott.yml │ ├── military.yml │ ├── movie.yml │ ├── music.yml │ ├── myst.yml │ ├── name.yml │ ├── nation.yml │ ├── nato_phonetic_alphabet.yml │ ├── new_girl.yml │ ├── one_piece.yml │ ├── opera.yml │ ├── oss117.yml │ ├── overwatch.yml │ ├── parks_and_rec.yml │ ├── phish.yml │ ├── phone_number.yml │ ├── pokemon.yml │ ├── princess_bride.yml │ ├── programming_language.yml │ ├── quote.yml │ ├── relationship.yml │ ├── restaurant.yml │ ├── rick_and_morty.yml │ ├── rock_band.yml │ ├── rupaul.yml │ ├── science.yml │ ├── seinfeld.yml │ ├── shakespeare.yml │ ├── silicon_valley.yml │ ├── simpsons.yml │ ├── slack_emoji.yml │ ├── sonic_the_hedgehog.yml │ ├── source.yml │ ├── south_park.yml │ ├── space.yml │ ├── star_trek.yml │ ├── star_wars.yml │ ├── stargate.yml │ ├── stranger_thing.yml │ ├── stripe.yml │ ├── subscription.yml │ ├── super_smash_bros.yml │ ├── superhero.yml │ ├── sword_art_online.yml │ ├── team.yml │ ├── the_expanse.yml │ ├── the_it_crowd.yml │ ├── the_thick_of_it.yml │ ├── twin_peaks.yml │ ├── umphreys_mcgee.yml │ ├── university.yml │ ├── v_for_vendetta.yml │ ├── vehicle.yml │ ├── venture_bros.yml │ ├── verbs.yml │ ├── witcher.yml │ ├── world_cup.yml │ ├── world_of_warcraft.yml │ ├── yoda.yml │ └── zelda.yml │ ├── es-MX.yml │ ├── es.yml │ ├── fa.yml │ ├── fi-FI.yml │ ├── fr-CA.yml │ ├── fr-CH.yml │ ├── fr.yml │ ├── he.yml │ ├── hy.yml │ ├── id.yml │ ├── it.yml │ ├── ja.yml │ ├── ko.yml │ ├── lv.yml │ ├── nb-NO.yml │ ├── nl.yml │ ├── no.yml │ ├── pl.yml │ ├── pt-BR.yml │ ├── pt.yml │ ├── ru.yml │ ├── sk.yml │ ├── sv.yml │ ├── th.yml │ ├── tr.yml │ ├── uk.yml │ ├── vi.yml │ ├── zh-CN.yml │ └── zh-TW.yml ├── script ├── destroy ├── generate └── txt2html ├── tasks ├── reformat_yaml.rake ├── test.rake └── website.rake └── test ├── faker ├── blockchain │ ├── aeternity.rb │ ├── bitcoin.rb │ ├── ethereum.rb │ └── tezos.rb ├── books │ ├── test_book.rb │ ├── test_dune.rb │ ├── test_faker_culture_series.rb │ └── test_lovecraft.rb ├── creature │ ├── test_faker_animal.rb │ ├── test_faker_cat.rb │ ├── test_faker_dog.rb │ └── test_faker_horse.rb ├── default │ ├── test_alphanum.rb │ ├── test_array_sample_method_compat.rb │ ├── test_avatar.rb │ ├── test_country_code.rb │ ├── test_faker_address.rb │ ├── test_faker_ancient.rb │ ├── test_faker_app.rb │ ├── test_faker_appliance.rb │ ├── test_faker_artist.rb │ ├── test_faker_bank.rb │ ├── test_faker_beer.rb │ ├── test_faker_birthday_in_leap_year.rb │ ├── test_faker_boolean.rb │ ├── test_faker_bossa_nova.rb │ ├── test_faker_business.rb │ ├── test_faker_cannabis.rb │ ├── test_faker_char.rb │ ├── test_faker_chile_rut.rb │ ├── test_faker_chuck_norris.rb │ ├── test_faker_city.rb │ ├── test_faker_code.rb │ ├── test_faker_coffee.rb │ ├── test_faker_coin.rb │ ├── test_faker_color.rb │ ├── test_faker_commerce.rb │ ├── test_faker_company.rb │ ├── test_faker_compass.rb │ ├── test_faker_construction.rb │ ├── test_faker_cosmere.rb │ ├── test_faker_crypto.rb │ ├── test_faker_crypto_coin.rb │ ├── test_faker_currency.rb │ ├── test_faker_date.rb │ ├── test_faker_dc_comics.rb │ ├── test_faker_demographic.rb │ ├── test_faker_dessert.rb │ ├── test_faker_device.rb │ ├── test_faker_dota.rb │ ├── test_faker_driving_licence.rb │ ├── test_faker_dune.rb │ ├── test_faker_educator.rb │ ├── test_faker_elder_scrolls.rb │ ├── test_faker_electrical_components.rb │ ├── test_faker_esport.rb │ ├── test_faker_fallout.rb │ ├── test_faker_file.rb │ ├── test_faker_fillmurray.rb │ ├── test_faker_finance.rb │ ├── test_faker_food.rb │ ├── test_faker_funny_name.rb │ ├── test_faker_games_heroes_of_the_storm.rb │ ├── test_faker_gender.rb │ ├── test_faker_greek_philosophers.rb │ ├── test_faker_hacker_talk.rb │ ├── test_faker_heroes.rb │ ├── test_faker_hipster.rb │ ├── test_faker_house.rb │ ├── test_faker_id_number.rb │ ├── test_faker_industry_segments.rb │ ├── test_faker_internet.rb │ ├── test_faker_job.rb │ ├── test_faker_job_locale.rb │ ├── test_faker_json.rb │ ├── test_faker_kpop.rb │ ├── test_faker_league_of_legends.rb │ ├── test_faker_lorem.rb │ ├── test_faker_lorem_flickr.rb │ ├── test_faker_markdown.rb │ ├── test_faker_marketing.rb │ ├── test_faker_measurement.rb │ ├── test_faker_military.rb │ ├── test_faker_movie.rb │ ├── test_faker_myst.rb │ ├── test_faker_name.rb │ ├── test_faker_nation.rb │ ├── test_faker_national_health_service.rb │ ├── test_faker_number.rb │ ├── test_faker_omniauth.rb │ ├── test_faker_overwatch.rb │ ├── test_faker_phone_number.rb │ ├── test_faker_pokemon.rb │ ├── test_faker_programming_language.rb │ ├── test_faker_relationship.rb │ ├── test_faker_restaurant.rb │ ├── test_faker_science.rb │ ├── test_faker_slack_emoji.rb │ ├── test_faker_sonic_the_hedgehog.rb │ ├── test_faker_source.rb │ ├── test_faker_south_africa.rb │ ├── test_faker_space.rb │ ├── test_faker_street.rb │ ├── test_faker_string.rb │ ├── test_faker_stripe.rb │ ├── test_faker_subscription.rb │ ├── test_faker_super_smash_bros.rb │ ├── test_faker_superhero.rb │ ├── test_faker_team.rb │ ├── test_faker_time.rb │ ├── test_faker_types.rb │ ├── test_faker_unique_generator.rb │ ├── test_faker_university.rb │ ├── test_faker_vehicle.rb │ ├── test_faker_verb.rb │ ├── test_faker_witcher.rb │ ├── test_faker_world_cup.rb │ ├── test_faker_zelda.rb │ ├── test_faker_zip_code.rb │ ├── test_half_life.rb │ ├── test_invoice.rb │ ├── test_lorem_pixel.rb │ ├── test_michael_scott.rb │ ├── test_nato_phonetic_alphabet.rb │ ├── test_placeholdit.rb │ ├── test_twitter.rb │ └── test_world_of_warcraft.rb ├── games │ └── test_game.rb ├── japanese_media │ ├── test_faker_dragon_ball.rb │ ├── test_faker_one_piece.rb │ └── test_faker_sword_art_online.rb ├── movies │ ├── test_faker_back_to_the_future.rb │ ├── test_faker_harry_potter.rb │ ├── test_faker_hitchhikers_guide_to_the_galaxy.rb │ ├── test_faker_hobbit.rb │ ├── test_faker_lebowski.rb │ ├── test_faker_lord_of_the_rings.rb │ ├── test_faker_movies_ghostbusters.rb │ ├── test_faker_princess_bride.rb │ ├── test_faker_star_wars.rb │ └── test_faker_v_for_vendetta.rb ├── music │ ├── test_faker_grateful_dead.rb │ ├── test_faker_music.rb │ ├── test_faker_opera.rb │ ├── test_faker_phish.rb │ ├── test_faker_rock_band.rb │ └── test_faker_umphreys_mcgee.rb ├── quotes │ ├── test_faker_chiquito.rb │ ├── test_faker_quote.rb │ └── test_faker_shakespeare.rb ├── sports │ ├── test_faker_basketball.rb │ └── test_faker_football.rb └── tv_shows │ ├── test_aqua_teen_hunger_force.rb │ ├── test_bojack_horseman.rb │ ├── test_breaking_bad.rb │ ├── test_buffy.rb │ ├── test_community.rb │ ├── test_dr_who.rb │ ├── test_dumb_and_dumber.rb │ ├── test_faker_kaamelott.rb │ ├── test_family_guy.rb │ ├── test_friends.rb │ ├── test_game_of_thrones.rb │ ├── test_hey_arnold.rb │ ├── test_how_i_met_your_mother.rb │ ├── test_michael_scott.rb │ ├── test_new_girl.rb │ ├── test_parks_and_rec.rb │ ├── test_rick_and_morty.rb │ ├── test_ru_paul.rb │ ├── test_seinfeld.rb │ ├── test_silicon_valley.rb │ ├── test_simpsons.rb │ ├── test_south_park.rb │ ├── test_star_trek.rb │ ├── test_stargate.rb │ ├── test_stranger_things.rb │ ├── test_the_expanse.rb │ ├── test_the_fresh_prince_of_bel_air.rb │ ├── test_the_it_crowd.rb │ ├── test_the_thick_of_it.rb │ ├── test_twin_peaks.rb │ └── test_venture_bros.rb ├── support └── assert_not_english.rb ├── test_ar_locale.rb ├── test_bg_locale.rb ├── test_ca_cat_locale.rb ├── test_ca_locale.rb ├── test_da_dk_locale.rb ├── test_de_at_locale.rb ├── test_de_ch_locale.rb ├── test_de_locale.rb ├── test_determinism.rb ├── test_ee_locale.rb ├── test_en_au_locale.rb ├── test_en_au_ocker_locale.rb ├── test_en_ca_locale.rb ├── test_en_gb_locale.rb ├── test_en_ind_locale.rb ├── test_en_locale.rb ├── test_en_ms_locale.rb ├── test_en_nep_locale.rb ├── test_en_ng_locale.rb ├── test_en_nz_locale.rb ├── test_en_pak_locale.rb ├── test_en_sg_locale.rb ├── test_en_th_locale.rb ├── test_en_ug_locale.rb ├── test_en_us_locale.rb ├── test_en_za_locale.rb ├── test_es_locale.rb ├── test_es_mx_locale.rb ├── test_fa_locale.rb ├── test_faker.rb ├── test_fi_locale.rb ├── test_flexible.rb ├── test_fr_ca_locale.rb ├── test_fr_ch_locale.rb ├── test_fr_locale.rb ├── test_he_locale.rb ├── test_helper.rb ├── test_hy_locale.rb ├── test_id_locale.rb ├── test_it_locale.rb ├── test_ja_locale.rb ├── test_ko_locale.rb ├── test_locale.rb ├── test_lv_locale.rb ├── test_nb_no_locale.rb ├── test_nl_locale.rb ├── test_no_no_locale.rb ├── test_pl_locale.rb ├── test_pt_br_locale.rb ├── test_pt_locale.rb ├── test_ru_locale.rb ├── test_seeding.rb ├── test_sk_locale.rb ├── test_sv_locale.rb ├── test_th_locale.rb ├── test_tr_locale.rb ├── test_uk_locale.rb ├── test_vi_locale.rb ├── test_zh_cn_locale.rb └── test_zh_tw_locale.rb /.github/ISSUE_TEMPLATE/bug-report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug Report 3 | about: Create a bug report 4 | title: "Issue title goes here" 5 | labels: needs-triage 6 | assignees: '' 7 | 8 | --- 9 | 10 | ## Describe the bug 11 | A clear and concise description of what the bug is. 12 | 13 | ## To Reproduce 14 | Describe the steps to reproduce the behavior. 15 | 16 | ## Expected behavior 17 | A clear and concise description of what you expected to happen. 18 | 19 | ## Additional context 20 | Add any other context about the problem here. 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature Request 3 | about: Suggest a new feature 4 | title: "Title goes here" 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. 12 | 13 | **If you're adding new objects, please describe how you would use them** 14 | A clear and concise description of examples that could be used with your new Faker methods. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Issue# 2 | ------ 3 | 4 | Example: 5 | 6 | https://github.com/faker-ruby/faker/issues/XXX 7 | 8 | OR 9 | 10 | `No-Story` 11 | 12 | Description: 13 | ------ 14 | *Describe what this PR does in a few lines. If you are adding a new faker generator, please tell us how you're going to use this object. Use cases are important because we need to make sure that our faker generators are useful. After adding the description, please delete this line.* 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | pkg/* 2 | 3 | # Ignore Bundle folder 4 | .bundle/* 5 | 6 | # Ignore Coveralls files 7 | coverage/* 8 | 9 | # Ignore Vim backup files. 10 | *~ 11 | 12 | # Ignore Vim swap files. 13 | *.swp 14 | 15 | # Ignore Ctags 16 | /tags 17 | 18 | # Ignore Finder metadata. 19 | .DS_Store 20 | 21 | .idea/* 22 | 23 | # Ignore rvm and rbenv files 24 | .ruby-version 25 | .ruby-gemset 26 | 27 | # Ignore YARD metadata and documentation. 28 | .yardoc/ 29 | yard_docs/ 30 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | env: 2 | global: 3 | - CC_TEST_REPORTER_ID=c9b8356df2031a5a72462555fe898245cf24d83c7bb82c40ddb5c6c6976c4319 4 | language: ruby 5 | cache: bundler 6 | rvm: 7 | - 2.3.8 8 | - 2.4.5 9 | - 2.5.3 10 | - 2.6.1 11 | - 2.7.0 12 | - ruby-head 13 | before_install: 14 | - yes | gem update --system=3.1.1 --force 15 | - gem install bundler:2.1.1 16 | before_script: 17 | - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter 18 | - chmod +x ./cc-test-reporter 19 | - ./cc-test-reporter before-build 20 | script: bundle exec rake 21 | after_script: 22 | - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT 23 | matrix: 24 | allow_failures: 25 | - rvm: ruby-head 26 | -------------------------------------------------------------------------------- /.yardopts: -------------------------------------------------------------------------------- 1 | --no-private 2 | --tag faker.version:"Available since" 3 | --exclude lib/faker/deprecate/ 4 | --output-dir yard_docs 5 | lib/**/*.rb -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | source 'https://rubygems.org' 4 | 5 | # Specify your gem's dependencies in faker.gemspec 6 | gemspec 7 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | $LOAD_PATH.unshift File.dirname(__FILE__) 4 | 5 | Dir['tasks/**/*.rake'].each { |rake| load rake } 6 | 7 | require 'bundler' 8 | Bundler::GemHelper.install_tasks 9 | 10 | desc 'Start a console session with Faker loaded' 11 | task :console do 12 | require 'irb' 13 | require 'irb/completion' 14 | require 'faker' # You know what to do. 15 | 16 | ARGV.clear 17 | IRB.start 18 | end 19 | 20 | require 'rubocop/rake_task' 21 | RuboCop::RakeTask.new 22 | 23 | require 'yard' 24 | YARD::Rake::YardocTask.new 25 | 26 | task default: %w[test rubocop] 27 | -------------------------------------------------------------------------------- /bin/faker: -------------------------------------------------------------------------------- 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) 6 | -------------------------------------------------------------------------------- /doc/blockchain/aeternity.md: -------------------------------------------------------------------------------- 1 | # Faker::Blockchain::Aeternity 2 | 3 | ```ruby 4 | Faker::Blockchain::Aeternity.address #=> "ak_zvU8YQLagjcfng7Tg8yCdiZ1rpiWNp1PBn3vtUs44utSvbJVR" 5 | 6 | Faker::Blockchain::Aeternity.transaction #=> "th_147nDP22h3pHrLt2qykTH4txUwQh1ccaXp" 7 | 8 | Faker::Blockchain::Aeternity.contract #=> "ct_Hk2JsNeWGEYQEHHQCfcBeGrwbhtYSwFTPdDhW2SvjFYVojyhW" 9 | 10 | Faker::Blockchain::Aeternity.oracle #=> "ok_28QDg7fkF5qiKueSdUvUBtCYPJdmMEoS73CztzXCRAwMGKHKZh" 11 | 12 | ``` 13 | -------------------------------------------------------------------------------- /doc/blockchain/bitcoin.md: -------------------------------------------------------------------------------- 1 | # Faker::Blockchain::Bitcoin 2 | 3 | ```ruby 4 | Faker::Blockchain::Bitcoin.address #=> "1HUoGjmgChmnxxYhz87YytV4gVjfPaExmh" 5 | 6 | Faker::Blockchain::Bitcoin.testnet_address #=> "msHGunDvoEwmVFXvd2Bub1SNw5RP1YHJaf" 7 | ``` 8 | -------------------------------------------------------------------------------- /doc/blockchain/ethereum.md: -------------------------------------------------------------------------------- 1 | # Faker::Blockchain::Ethereum 2 | 3 | Available since version 1.9.0. 4 | 5 | ```ruby 6 | Faker::Blockchain::Ethereum.address #=> "0xd392b0c0500700d02d27ab30805ec80ddd3320ff" 7 | ``` 8 | -------------------------------------------------------------------------------- /doc/blockchain/tezos.md: -------------------------------------------------------------------------------- 1 | # Faker::Blockchain::Tezos 2 | 3 | ```ruby 4 | Faker::Blockchain::Tezos.account #=> "tz1eUsgK6aj752Fbxwk5sAoEFvSDnPjZ4qvk" 5 | 6 | Faker::Blockchain::Tezos.contract #=> "KT1MroqeP15nnitB4CnNfkqHYa2NErhPPLWF" 7 | 8 | Faker::Blockchain::Tezos.operation #=> "onygWYXJX3xNstFLv9PcCrhQdCkENC795xwSinmTEc1jsDN4VDa" 9 | 10 | Faker::Blockchain::Tezos.block #=> "BMbhs2rkY1dvAkAyRytvPsjFQ2RiPrBhYkxvWpY65dzkdSuw58a" 11 | 12 | Faker::Blockchain::Tezos.signature #=> "edsigu165B7VFf3Dpw2QABVzEtCxJY2gsNBNcE3Ti7rRxtDUjqTFRpg67EdAQmY6YWPE5tKJDMnSTJDFu65gic8uLjbW2YwGvAZ" 13 | ``` 14 | -------------------------------------------------------------------------------- /doc/books/book.md: -------------------------------------------------------------------------------- 1 | # Faker::Book 2 | 3 | ```ruby 4 | # Random Book Title 5 | Faker::Book.title #=> "Le Hobbit", "Les Misérables" 6 | 7 | # Random Author 8 | Faker::Book.author #=> "J.R.R. Tolkien", "Honoré de Balzac" 9 | 10 | # Random Publisher 11 | Faker::Book.publisher #=> "Hachette" 12 | 13 | # Random Quotes 14 | Faker::Book.quote #=> "L’habit ne fait pas le moine", "Couvrez ce sein que je ne saurais voir" 15 | ``` 16 | -------------------------------------------------------------------------------- /doc/books/culture_series.md: -------------------------------------------------------------------------------- 1 | # Faker::Books::CultureSeries 2 | 3 | ```ruby 4 | Faker::Books::CultureSeries.book #=> "The Player of Games" 5 | 6 | Faker::Books::CultureSeries.culture_ship #=> "Fate Amenable To Change" 7 | 8 | Faker::Books::CultureSeries.culture_ship_class #=> "General Systems Vehicle" 9 | 10 | Faker::Books::CultureSeries.culture_ship_class_abv #=> "GSV" 11 | 12 | Faker::Books::CultureSeries.civ #=> "Culture" 13 | 14 | Faker::Books::CultureSeries.planet #=> "Xinth" 15 | ``` 16 | -------------------------------------------------------------------------------- /doc/books/dune.md: -------------------------------------------------------------------------------- 1 | # Faker::Books::Dune 2 | 3 | ### A Faker module beyond your dreams, test data beyond your imagination. 4 | 5 | ```ruby 6 | Faker::Books::Dune.character #=> "Leto Atreides" 7 | 8 | Faker::Books::Dune.title #=> "Duke" 9 | 10 | Faker::Books::Dune.planet #=> "Caladan" 11 | 12 | Faker::Books::Dune.quote #=> "A dead man, surely, no longer requires that water." 13 | 14 | # Keyword arguments: character 15 | Faker::Books::Dune.quote(character: "baron_harkonnen") #=> "He who controls the spice, controls the universe!" 16 | 17 | Faker::Books::Dune.saying #=> "You do not beg the sun for mercy." 18 | 19 | # Keyword arguments: source 20 | Faker::Books::Dune.saying(source: "fremen") #=> "May thy knife chip and shatter." 21 | ``` 22 | -------------------------------------------------------------------------------- /doc/creature/animal.md: -------------------------------------------------------------------------------- 1 | # Faker::Creature::Animal 2 | 3 | ```ruby 4 | Faker::Creature::Animal.name #=> "chèvre", "chat", "chimpanzé" 5 | ``` 6 | 7 | -------------------------------------------------------------------------------- /doc/creature/cat.md: -------------------------------------------------------------------------------- 1 | # Faker::Creature::Cat 2 | 3 | ```ruby 4 | # Random cat name 5 | Faker::Creature::Cat.name #=> "Caramel", "Popsy", "Felix" 6 | 7 | # Random cat race 8 | Faker::Creature::Cat.race #=> "Ocicat" ,"Persian", "Norvégien" 9 | 10 | # Random dog gender 11 | Faker::Creature::Cat.gender #=> "Femelle", "Mâle" 12 | 13 | # Random cat image 14 | # Keyword arguments: grayscale, width, height 15 | 16 | # => Random image between 250px and 350px 17 | Faker::Creature::Cat.image #=> "http://placekitten.com/250/350" - 18 | Faker::Creature::Cat.image(grayscale: true) #=> "http://placekitten.com/g/250/350" 19 | 20 | # => Specific size (only 1 image per size) 21 | Faker::Creature::Cat.image(grayscale: false, width: 200, height: 400) #=> "http://placekitten.com/200/400" 22 | ``` 23 | 24 | -------------------------------------------------------------------------------- /doc/creature/dog.md: -------------------------------------------------------------------------------- 1 | # Faker::Creature::Dog 2 | 3 | ```ruby 4 | # Random dog name 5 | Faker::Creature::Dog.name #=> "Noisette", "Cookie", "Marley" 6 | 7 | # Random dog race 8 | Faker::Creature::Dog.race #=> "Husky", "Beagle", "Labrador" 9 | 10 | # Random dog age 11 | Faker::Creature::Dog.age #=> "Chiot", "Adulte" 12 | 13 | # Random dog gender 14 | Faker::Creature::Dog.gender #=> "Femelle", "Mâle" 15 | 16 | # Random dog size 17 | Faker::Creature::Dog.size #=> "Petit", "Moyen" 18 | 19 | # Random dog image 20 | # Keyword arguments: grayscale, width, height 21 | 22 | # => Random image between 250px and 350px 23 | Faker::Creature::Dog.image #=> "https://placedog.net/250/350" - 24 | Faker::Creature::Dog.image(grayscale: true) #=> "https://placedog.net/250/350/g" 25 | 26 | # => Specific size (only 1 image per size) 27 | Faker::Creature::Dog.image(grayscale: false, width: 200, height: 400) #=> "https://placedog.net/200/400" 28 | ``` 29 | -------------------------------------------------------------------------------- /doc/creature/horse.md: -------------------------------------------------------------------------------- 1 | # Faker::Creature::Horse 2 | 3 | ```ruby 4 | Faker::Creature::Horse.name #=> "Galaxie", "Tournesol", "Cerise" 5 | 6 | Faker::Creature::Horse.breed #=> "Shetland", "Pur Sang Arabe" 7 | ``` 8 | 9 | -------------------------------------------------------------------------------- /doc/default/address.md: -------------------------------------------------------------------------------- 1 | # Faker::Address 2 | 3 | ```ruby 4 | Faker::Address.city #=> "Montpellier" 5 | 6 | Faker::Address.street_name #=> "Boulevard Saint-Dominique" 7 | 8 | Faker::Address.street_address #=> "3 Place de Presbourg" 9 | 10 | Faker::Address.secondary_address #=> "Apt. 389" 11 | 12 | Faker::Address.building_number #=> "7304" 13 | 14 | Faker::Address.zip_code #=> "70670" 15 | 16 | Faker::Address.zip #=> "70670" 17 | 18 | Faker::Address.state_abbr #=> "33", "91" 19 | 20 | Faker::Address.time_zone #=> "Europe/London" (Earth Random) 21 | 22 | Faker::Address.street_suffix #=> "Rue", "Allée" 23 | 24 | Faker::Address.state #=> "Île-de-France", "Guadeloupe" 25 | 26 | Faker::Address.country #=> Random Country 27 | 28 | Faker::Address.country_code #=> "FR" 29 | 30 | Faker::Address.latitude #=> "-58.17256227443719" 31 | 32 | Faker::Address.longitude #=> "-156.65548382095133" 33 | 34 | Faker::Address.full_address #=> "2 Passage Charlemagne, 34340 Niort" 35 | ``` 36 | -------------------------------------------------------------------------------- /doc/default/alphanumeric.md: -------------------------------------------------------------------------------- 1 | # Faker::Alphanumeric 2 | 3 | ```ruby 4 | # Keyword arguments: number 5 | Faker::Alphanumeric.alpha(number: 10) #=> "zlvubkrwga" 6 | 7 | # Keyword arguments: number, min_alpha, min_numeric 8 | Faker::Alphanumeric.alphanumeric(number: 10) #=> "3yfq2phxtb" 9 | Faker::Alphanumeric.alphanumeric(number: 10, min_alpha: 3) #=> "3yfq2phxtb" 10 | Faker::Alphanumeric.alphanumeric(number: 10, min_alpha: 3, min_numeric: 3) #=> "3yfq2phx8b" 11 | ``` 12 | -------------------------------------------------------------------------------- /doc/default/ancient.md: -------------------------------------------------------------------------------- 1 | # Faker::Ancient 2 | 3 | Dieux et personnage de la mythologie Grecque 4 | 5 | ```ruby 6 | Faker::Ancient.god #=> "Zeus" 7 | 8 | Faker::Ancient.primordial #=> "Gaia" 9 | 10 | Faker::Ancient.titan #=> "Atlas" 11 | 12 | Faker::Ancient.hero #=> "Achilles" 13 | ``` 14 | -------------------------------------------------------------------------------- /doc/default/app.md: -------------------------------------------------------------------------------- 1 | # Faker::App 2 | 3 | Available since version 1.4.3. 4 | 5 | ```ruby 6 | Faker::App.name #=> "Treeflex" 7 | 8 | Faker::App.version #=> "1.85" 9 | 10 | Faker::App.author #=> "Daphne Swift" 11 | 12 | Faker::App.semantic_version #=> "3.2.5" 13 | 14 | Faker::App.semantic_version(major: 42) #=> "42.5.2" 15 | 16 | Faker::App.semantic_version(minor: 100..101) #=> "42.100.4" 17 | 18 | Faker::App.semantic_version(patch: 5..6) #=> "7.2.6" 19 | ``` 20 | -------------------------------------------------------------------------------- /doc/default/appliance.md: -------------------------------------------------------------------------------- 1 | # Faker::Appliance 2 | 3 | ```ruby 4 | Faker::Appliance.brand #=> "IKEA" 5 | 6 | Faker::Appliance.equipment #=> "Ventilateur" 7 | ``` 8 | -------------------------------------------------------------------------------- /doc/default/artist.md: -------------------------------------------------------------------------------- 1 | # Faker::Artist 2 | 3 | ```ruby 4 | Faker::Artist.name #=> "Dali", "Picasso" 5 | 6 | Faker::Artist.painting #=> "La Joconde", "Les Nymphéas" 7 | ``` 8 | -------------------------------------------------------------------------------- /doc/default/avatar.md: -------------------------------------------------------------------------------- 1 | # Faker::Avatar 2 | 3 | ```ruby 4 | Faker::Avatar.image #=> "https://robohash.org/sitsequiquia.png?size=300x300&set=set1" 5 | 6 | Faker::Avatar.image(slug: "my-own-slug") #=> "https://robohash.org/my-own-slug.png?size=300x300&set=set1" 7 | 8 | Faker::Avatar.image(slug: "my-own-slug", size: "50x50") #=> "https://robohash.org/my-own-slug.png?size=50x50&set=set1" 9 | 10 | Faker::Avatar.image(slug: "my-own-slug", size: "50x50", format: "jpg") #=> "https://robohash.org/my-own-slug.jpg?size=50x50&set=set1" 11 | 12 | Faker::Avatar.image(slug: "my-own-slug", size: "50x50", format: "bmp") #=> "https://robohash.org/my-own-slug.bmp?size=50x50&set=set1" 13 | 14 | Faker::Avatar.image(slug: "my-own-slug", size: "50x50", format: "bmp", set: "set1", bgset: "bg1") #=> "https://robohash.org/my-own-slug.bmp?size=50x50&set=set1&bgset=bg1" 15 | ``` 16 | -------------------------------------------------------------------------------- /doc/default/bank.md: -------------------------------------------------------------------------------- 1 | # Faker::Bank 2 | ```ruby 3 | 4 | Faker::Bank.account_number #=> 6738582379 5 | 6 | # Keyword arguments: digits 7 | Faker::Bank.account_number(digits: 13) #=> 673858237902 8 | 9 | Faker::Bank.iban(country_code: "fr") #=> "FR6375388567752043" 10 | 11 | Faker::Bank.name #=> "BNP", "Banque Populaire" 12 | 13 | Faker::Bank.routing_number #=> "729343831" 14 | 15 | Faker::Bank.swift_bic #=> "AAFMGB21" 16 | ``` 17 | -------------------------------------------------------------------------------- /doc/default/beer.md: -------------------------------------------------------------------------------- 1 | # Faker::Beer 2 | 3 | ```ruby 4 | Faker::Beer.brand #=> "Heineken" 5 | 6 | Faker::Beer.name #=> "Hercules Double IPA" 7 | 8 | Faker::Beer.style #=> "IPA", "Belge" 9 | 10 | Faker::Beer.malts #=> "Malt de blé" 11 | 12 | Faker::Beer.alcohol #=> "6.3%" 13 | ``` 14 | -------------------------------------------------------------------------------- /doc/default/boolean.md: -------------------------------------------------------------------------------- 1 | # Faker::Boolean 2 | 3 | ```ruby 4 | Faker::Boolean.boolean #=> true 5 | 6 | # Keyword parameter: true_ratio 7 | Faker::Boolean.boolean(true_ratio: 0.2) #=> false 8 | ``` 9 | -------------------------------------------------------------------------------- /doc/default/bossa_nova.md: -------------------------------------------------------------------------------- 1 | # Faker::BossaNova 2 | 3 | ```ruby 4 | Faker::BossaNova.artist #=> "Tom Jobin" 5 | 6 | Faker::BossaNova.song #=> "Chega de Saudade" 7 | ``` 8 | -------------------------------------------------------------------------------- /doc/default/business.md: -------------------------------------------------------------------------------- 1 | # Faker::Business 2 | 3 | ```ruby 4 | Faker::Business.credit_card_number #=> "1228-1221-1221-1431" 5 | 6 | Faker::Business.credit_card_expiry_date #=> 7 | 8 | Faker::Business.credit_card_type #=> "visa" 9 | ``` 10 | -------------------------------------------------------------------------------- /doc/default/cannabis.md: -------------------------------------------------------------------------------- 1 | # Faker::Cannabis 2 | 3 | Available since version 1.9.0. 4 | 5 | ```ruby 6 | # Random strain 7 | Faker::Cannabis.strain #=> "24k" 8 | 9 | # Random cannabinoid_abbreviation 10 | Faker::Cannabis.cannabinoid_abbreviation #=> "THC" 11 | 12 | # Random cannabinoid 13 | Faker::Cannabis.cannabinoid #=> "Tetrahydrocannabinol" 14 | 15 | # Random terpene 16 | Faker::Cannabis.terpene #=> "α Pinene" 17 | 18 | # Random medical_use 19 | Faker::Cannabis.medical_use #=> "analgesic" 20 | 21 | # Random health_benefit 22 | Faker::Cannabis.health_benefit #=> "relieves pain" 23 | 24 | # Random category 25 | Faker::Cannabis.category #=> "capsules" 26 | 27 | # Random type 28 | Faker::Cannabis.type #=> "hybrid" 29 | 30 | # Random buzzword 31 | Faker::Cannabis.buzzword #=> "blunt wrap" 32 | 33 | # Random brand 34 | Faker::Cannabis.brand #=> "Chong's Choice" 35 | ``` 36 | -------------------------------------------------------------------------------- /doc/default/chile_rut.md: -------------------------------------------------------------------------------- 1 | # Faker::ChileRut 2 | 3 | ```ruby 4 | Faker::ChileRut.full_rut #=> "30686957-4" 5 | 6 | # Returns rut between 1 (default param) and 99999999 7 | Faker::ChileRut.rut #=> 11235813 8 | 9 | # Returns rut between passed minimum rut and 99999999 10 | # Keyword arguments: min_rut 11 | Faker::ChileRut.rut(min_rut: 20_890_156) #=> 31853211 12 | 13 | # Every call to rut or full_rut generates a new random rut, so last_rut and dv 14 | # allows you to get the separated parts of the full rut without losing the already generated rut 15 | Faker::ChileRut.rut #=> 23567131 16 | Faker::ChileRut.last_rut #=> 23567131 17 | Faker::ChileRut.dv #=> "k" 18 | 19 | # check_digit is an alias for dv, for English speaking devs 20 | Faker::ChileRut.rut #=> 30528772 21 | Faker::ChileRut.check_digit #=> "5" 22 | ``` 23 | -------------------------------------------------------------------------------- /doc/default/chuck_norris.md: -------------------------------------------------------------------------------- 1 | # Faker::ChuckNorris 2 | 3 | ```ruby 4 | Faker::ChuckNorris.fact #=> "Chuck Norris ne ment pas, c'est la vérité qui se trompe." 5 | ``` 6 | 7 | -------------------------------------------------------------------------------- /doc/default/code.md: -------------------------------------------------------------------------------- 1 | # Faker::Code 2 | 3 | ```ruby 4 | Faker::Code.npi #=> "0000126252" 5 | 6 | Faker::Code.isbn #=> "759021701-8" 7 | 8 | Faker::Code.ean #=> "4600051000057" 9 | 10 | Faker::Code.rut #=> "91389184-8" 11 | 12 | Faker::Code.nric #=> "S5589083H" 13 | 14 | Faker::Code.imei #= "546327785982623" 15 | 16 | Faker::Code.asin #=> "B00000IGGJ" 17 | 18 | Faker::Code.sin #=> "159160274" 19 | ``` 20 | -------------------------------------------------------------------------------- /doc/default/coffee.md: -------------------------------------------------------------------------------- 1 | # Faker::Coffee 2 | 3 | ```ruby 4 | Faker::Coffee.blend_name #=> "Summer Solstice" - English Only 5 | 6 | Faker::Coffee.origin #=> "Sidana, Ethiopie" 7 | 8 | Faker::Coffee.variety #=> "Long", "Expresso", "Latte" 9 | 10 | Faker::Coffee.notes #=> "Equilibré, Aqueux, thé vert, mandarine, fumé" 11 | 12 | Faker::Coffee.intensifier #=> "terne", "arrondi" 13 | ``` 14 | -------------------------------------------------------------------------------- /doc/default/coin.md: -------------------------------------------------------------------------------- 1 | # Faker::Coin 2 | 3 | ```ruby 4 | # Flip a coin 5 | Faker::Coin.flip #=> "Pile" 6 | 7 | # The currency of the coin 8 | Faker::Coin.name #=> "Philippine Peso" - English Only 9 | ``` 10 | -------------------------------------------------------------------------------- /doc/default/color.md: -------------------------------------------------------------------------------- 1 | # Faker::Color 2 | 3 | ```ruby 4 | Faker::Color.hex_color #=> "#31a785" 5 | 6 | Faker::Color.color_name #=> "Jaune" 7 | 8 | Faker::Color.rgb_color #=> [54, 233, 67] 9 | 10 | Faker::Color.hsl_color #=> [69.87, 0.66, 0.3] 11 | 12 | Faker::Color.hsla_color #=> [154.77, 0.36, 0.9, 0.26170574657729073] 13 | ``` 14 | -------------------------------------------------------------------------------- /doc/default/commerce.md: -------------------------------------------------------------------------------- 1 | # Faker::Commerce 2 | 3 | ```ruby 4 | Faker::Commerce.color #=> "Violet" 5 | 6 | # Keyword arguments: max, fixed_amount 7 | Faker::Commerce.department #=> "Epicerie, Santé & Beauté" 8 | Faker::Commerce.department(max: 5) #=> "Epicerie, Santé, Beauté & Bijoux" 9 | Faker::Commerce.department(max: 2, fixed_amount: true) #=> "Livres & Outils" 10 | 11 | Faker::Commerce.material #=> "Plastique" 12 | 13 | Faker::Commerce.product_name #=> "Petit banc en bois" 14 | 15 | # Produces a Float by default 16 | # Keyword arguments: range, as_string 17 | Faker::Commerce.price #=> 44.6 18 | Faker::Commerce.price(range: 0..10.0, as_string: true) #=> "2.18" 19 | 20 | # Generate a random promotion code. 21 | # Keyword arguments: digits 22 | Faker::Commerce.promotion_code #=> "AmazingDeal829102" 23 | Faker::Commerce.promotion_code(digits: 2) #=> "AmazingPrice57" 24 | ``` 25 | -------------------------------------------------------------------------------- /doc/default/company.md: -------------------------------------------------------------------------------- 1 | # Faker::Company 2 | 3 | ```ruby 4 | Faker::Company.name #=> "Faure EI", "Dumas et Gauthier" 5 | 6 | Faker::Company.suffix #=> "SA", "SAS" 7 | 8 | Faker::Company.industry #=> "Sécurité publique", "Textiles" 9 | 10 | Faker::Company.buzzword #=> "OpenSource", "Personnalisable" 11 | 12 | # Get a random company logo url in PNG format. 13 | Faker::Company.logo #=> "https://pigment.github.com/fake-logos/logos/medium/color/5.png" 14 | 15 | Faker::Company.type #=> "Entreprise privée", "Agence Gouvernementale" 16 | 17 | # Get a random profession 18 | Faker::Company.profession #=> "Dentiste", "Développeur Web" 19 | 20 | # Get a random French siren number 21 | Faker::Company.french_siren_number #=> "819489626" 22 | 23 | # Get a random French siret number 24 | Faker::Company.french_siret_number #=> "81948962600013" 25 | ``` 26 | -------------------------------------------------------------------------------- /doc/default/construction.md: -------------------------------------------------------------------------------- 1 | # Faker::Construction 2 | 3 | Available in future versions of faker 4 | 5 | ```ruby 6 | # Random material 7 | Faker::Construction.material #=> "Bois", "Fer" 8 | 9 | # Random subcontract category 10 | Faker::Construction.subcontract_category #=> "Plomberie","Maçonnerie" 11 | 12 | # Random heavy_equipment 13 | Faker::Construction.heavy_equipment #=> "Buldozer" 14 | 15 | # Random role 16 | Faker::Construction.role #=> "Ingénieur","Architecte" 17 | ``` 18 | -------------------------------------------------------------------------------- /doc/default/cosmere.md: -------------------------------------------------------------------------------- 1 | # Faker::Cosmere 2 | 3 | ```ruby 4 | Faker::Cosmere.aon #=> "Rao" 5 | 6 | Faker::Cosmere.shard_world #=> "Yolen" 7 | 8 | Faker::Cosmere.shard #=> "Ambition" 9 | 10 | Faker::Cosmere.surge #=> "Progression" 11 | 12 | Faker::Cosmere.knight_radiant #=> "Truthwatcher" 13 | 14 | Faker::Cosmere.metal #=> "Brass" 15 | 16 | Faker::Cosmere.allomancer #=> "Coinshot" 17 | 18 | Faker::Cosmere.feruchemist #=> "Archivist" 19 | 20 | Faker::Cosmere.herald #=> "Ishar" 21 | 22 | Faker::Cosmere.spren #=> "Flamespren" 23 | ``` 24 | -------------------------------------------------------------------------------- /doc/default/crypto.md: -------------------------------------------------------------------------------- 1 | # Faker::Crypto 2 | 3 | Available since version 1.6.4. 4 | 5 | ```ruby 6 | Faker::Crypto.md5 #=> "6b5ed240042e8a65c55ddb826c3408e6" 7 | 8 | Faker::Crypto.sha1 #=> "4e99e31c51eef8b2d290e709f757f92e558a503f" 9 | 10 | Faker::Crypto.sha256 #=> "51e4dbb424cd9db1ec5fb989514f2a35652ececef33f21c8dd1fd61bb8e3929d" 11 | ``` 12 | -------------------------------------------------------------------------------- /doc/default/crypto_coin.md: -------------------------------------------------------------------------------- 1 | # Faker::CryptoCoin 2 | 3 | ```ruby 4 | Faker::CryptoCoin.coin_name #=> "Bitcoin" 5 | 6 | Faker::CryptoCoin.acronym #=> "BTC" 7 | 8 | Faker::CryptoCoin.url_logo #=> "https://i.imgur.com/EFz61Ei.png" 9 | 10 | Faker::CryptoCoin.coin_array #=> ["Dash", "DASH", "https://i.imgur.com/2uX91cb.png"] 11 | 12 | Faker::CryptoCoin.coin_hash {:name=>"Ethereum", :acronym=>"ETH", :url_logo=>"https://i.imgur.com/uOPFCXj.png"} 13 | ``` 14 | -------------------------------------------------------------------------------- /doc/default/currency.md: -------------------------------------------------------------------------------- 1 | # Faker::Currency 2 | 3 | ```ruby 4 | Faker::Currency.name #=> "Swedish Krona" 5 | 6 | Faker::Currency.code #=> "USD" 7 | 8 | Faker::Currency.symbol #=> "$" 9 | ``` 10 | -------------------------------------------------------------------------------- /doc/default/dc_comics.md: -------------------------------------------------------------------------------- 1 | # Faker::DcComics 2 | 3 | A fun collection of hundreds of your favorite DC Comics Heroes, Heroines, Villains, Alter Egos and Side Characters. Have fun! 4 | 5 | ```ruby 6 | Faker::DcComics.hero #=> "Batman" 7 | 8 | Faker::DcComics.heroine #=> "Supergirl" 9 | 10 | Faker::DcComics.villain #=> "The Joker" 11 | 12 | Faker::DcComics.name #=> "Clark Kent" 13 | 14 | Faker::DcComics.title #=> "Teen Titans: The Judas Contract 15 | ``` 16 | -------------------------------------------------------------------------------- /doc/default/demographic.md: -------------------------------------------------------------------------------- 1 | # Faker::Demographic 2 | 3 | Available since version 1.7.3. 4 | 5 | ```ruby 6 | Faker::Demographic.educational_attainment #=> "Aucune scolarité terminée", "Baccalauréat" 7 | 8 | Faker::Demographic.demonym #=> "Indien", "Serbe" 9 | 10 | Faker::Demographic.marital_status #=> "Veuf", "Marié" 11 | 12 | Faker::Demographic.sex #=> "Homme" ou "Femme" 13 | 14 | Faker::Demographic.height #=> "1.61" 15 | # Keyword arguments: unit 16 | Faker::Demographic.height(unit: :imperial) #=> "6 ft, 2 in" 17 | ``` 18 | 19 | -------------------------------------------------------------------------------- /doc/default/dessert.md: -------------------------------------------------------------------------------- 1 | # Faker::Dessert 2 | 3 | Available since version 1.8.0. 4 | 5 | ```ruby 6 | # Random dessert variety 7 | Faker::Dessert.variety #=> "Mousse au chocolat", "Cheesecake" 8 | 9 | # Random dessert flavor 10 | Faker::Dessert.flavor #=> "Caramel au beurre salé", "Chocolat" 11 | ``` 12 | 13 | -------------------------------------------------------------------------------- /doc/default/device.md: -------------------------------------------------------------------------------- 1 | # Faker::Device 2 | 3 | Available since version 1.9.0. 4 | 5 | ```ruby 6 | Faker::Device.build_number #=> "5" 7 | 8 | Faker::Device.manufacturer #=> "Apple" 9 | 10 | Faker::Device.model_name #=> "iPhone 4" 11 | 12 | Faker::Device.platform #=> "webOS" 13 | 14 | Faker::Device.serial #=> "ejfjnRNInxh0363JC2WM" 15 | 16 | Faker::Device.version #=> "4" 17 | ``` 18 | -------------------------------------------------------------------------------- /doc/default/educator.md: -------------------------------------------------------------------------------- 1 | # Faker::Educator 2 | 3 | ```ruby 4 | Faker::Educator.university #=> "Université de Bordeaux Montaigne" 5 | 6 | Faker::Educator.secondary_school #=> "Lycée Victor Hugo" 7 | 8 | Faker::Educator.degree #=> "Master de Commerce International" 9 | 10 | Faker::Educator.subject #=> "Médecine", "Communications" 11 | ``` 12 | -------------------------------------------------------------------------------- /doc/default/electrical_components.md: -------------------------------------------------------------------------------- 1 | # Faker::ElectricalComponents 2 | 3 | Available since version 1.9.0. 4 | 5 | ```ruby 6 | Faker::ElectricalComponents.active #=> "Circuit Intégré" 7 | 8 | Faker::ElectricalComponents.passive #=> "Accéléromètre" 9 | 10 | Faker::ElectricalComponents.electromechanical #=> "Prise", "Fusible" 11 | ``` 12 | -------------------------------------------------------------------------------- /doc/default/esport.md: -------------------------------------------------------------------------------- 1 | # Faker::Esport 2 | 3 | ```ruby 4 | # Random player 5 | Faker::Esport.player #=> "Crimsix" 6 | 7 | # Random team 8 | Faker::Esport.team #=> "CLG" 9 | 10 | # Random league 11 | Faker::Esport.league #=> "IEM" 12 | 13 | # Random event 14 | Faker::Esport.event #=> "ESL Cologne" 15 | 16 | # Random game 17 | Faker::Esport.game #=> "Fornite", "League of Legends", "FIFA" 18 | ``` -------------------------------------------------------------------------------- /doc/default/fillmurray.md: -------------------------------------------------------------------------------- 1 | # Faker::Fillmurray 2 | 3 | ```ruby 4 | # Keyword arguments: grayscale, width, height 5 | Faker::Fillmurray.image #=> "http://www.fillmurray.com/300/300" 6 | Faker::Fillmurray.image(grayscale: true) #=> "http://fillmurray.com/g/300/300" 7 | Faker::Fillmurray.image(grayscale: false, width: 200, height: 400) #=> "http://fillmurray.com/200/400" 8 | ``` 9 | 10 | -------------------------------------------------------------------------------- /doc/default/finance.md: -------------------------------------------------------------------------------- 1 | # Faker::Finance 2 | 3 | ```ruby 4 | # Random credit card 5 | Faker::Finance.credit_card(:mastercard) #=> "6771-8921-2291-6236" 6 | Faker::Finance.credit_card(:mastercard, :visa) #=> "4448-8934-1277-7195" 7 | ``` 8 | -------------------------------------------------------------------------------- /doc/default/food.md: -------------------------------------------------------------------------------- 1 | # Faker::Food 2 | 3 | Available since version 1.7.0. 4 | 5 | ```ruby 6 | Faker::Food.description #=> "Deux croissants au beurre de votre choix (nature, amande ou fromage). Avec un côté de beurre aux herbes ou pâte à tartiner maison." 7 | 8 | Faker::Food.dish #=> "Pho", "Pizza" 9 | 10 | Faker::Food.fruits #=> "Pêche" 11 | 12 | Faker::Food.ingredient #=> "Vinaigre balsamique", "Poulet" 13 | 14 | Faker::Food.measurement #=> "1/2 cuillère à soupe" 15 | 16 | Faker::Food.metric_measurement #=> "millilitre" 17 | 18 | Faker::Food.vegetables #=> "Aubergine" 19 | ``` 20 | -------------------------------------------------------------------------------- /doc/default/funny_name.md: -------------------------------------------------------------------------------- 1 | # Faker::FunnyName 2 | 3 | Available since version 1.8.0. 4 | 5 | ```ruby 6 | ## Toujours Prénom / Nom 7 | Faker::FunnyName.name #=> "Sophie Fonfec", "Alain Térieur", "Laurent Gina" 8 | ``` 9 | 10 | -------------------------------------------------------------------------------- /doc/default/gender.md: -------------------------------------------------------------------------------- 1 | # Faker::Gender 2 | 3 | Available since version 1.9.0. 4 | 5 | ```ruby 6 | Faker::Gender.type #=> "Non-binaire" 7 | 8 | Faker::Gender.binary_type #=> "Femme" 9 | 10 | Faker::Gender.short_binary_type #=> "f" 11 | ``` 12 | -------------------------------------------------------------------------------- /doc/default/greek_philosophers.md: -------------------------------------------------------------------------------- 1 | # Faker::GreekPhilosophers 2 | 3 | Available since version 1.9.0. 4 | 5 | ```ruby 6 | Faker::GreekPhilosophers.name #=> "Aristote" 7 | 8 | Faker::GreekPhilosophers.quote #=> "Il n'y a point de génie sans un grain de folie." 9 | ``` 10 | -------------------------------------------------------------------------------- /doc/default/hacker.md: -------------------------------------------------------------------------------- 1 | # Faker::Hacker 2 | Are you having trouble writing tech-savvy dialogue for your latest screenplay? 3 | Worry not! Hollywood-grade technical talk is ready to fill out any form where you need to look smart. 4 | 5 | ```ruby 6 | # Full Phrase 7 | Faker::Hacker.say_something_smart #=> "Try to compress the SQL interface, maybe it will program the back-end hard drive!" 8 | 9 | # Short technical abbreviations 10 | Faker::Hacker.abbreviation #=> "RAM" 11 | 12 | # Hacker centric adjectives 13 | Faker::Hacker.adjective #=> "open-source" 14 | 15 | # Only the best hacker related nouns 16 | Faker::Hacker.noun #=> "bandwidth" 17 | 18 | # Actions that hackers take 19 | Faker::Hacker.verb #=> "bypass" 20 | 21 | # Verbs that end in -ing 22 | Faker::Hacker.ingverb #=> "synthesizing" 23 | ``` 24 | -------------------------------------------------------------------------------- /doc/default/harry_potter.md: -------------------------------------------------------------------------------- 1 | # Faker::HarryPotter 2 | 3 | Available since version 1.7.3. 4 | 5 | ```ruby 6 | Faker::HarryPotter.character #=> "Harry Potter" 7 | 8 | Faker::HarryPotter.location #=> "Hogwarts" 9 | 10 | Faker::HarryPotter.quote #=> "I solemnly swear that I am up to no good." 11 | 12 | Faker::HarryPotter.book #=> "Harry Potter and the Chamber of Secrets" 13 | 14 | Faker::HarryPotter.house #=> "Gryffindor" 15 | 16 | Faker::HarryPotter.spell #=> "Reparo" 17 | ``` 18 | -------------------------------------------------------------------------------- /doc/default/hitchhikers_guide_to_the_galaxy.md: -------------------------------------------------------------------------------- 1 | # Faker::HitchhikersGuideToTheGalaxy 2 | 3 | Available since version 1.8.0. 4 | 5 | ```ruby 6 | Faker::HitchhikersGuideToTheGalaxy.character #=> "Marvin" 7 | 8 | Faker::HitchhikersGuideToTheGalaxy.location #=> "Arthur Dent's house" 9 | 10 | Faker::HitchhikersGuideToTheGalaxy.marvin_quote #=> "Life? Don't talk to me about life." 11 | 12 | Faker::HitchhikersGuideToTheGalaxy.planet #=> "Magrathea" 13 | 14 | Faker::HitchhikersGuideToTheGalaxy.quote #=> "In the beginning, the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." 15 | 16 | Faker::HitchhikersGuideToTheGalaxy.specie #=> "Perfectly Normal Beast" 17 | 18 | Faker::HitchhikersGuideToTheGalaxy.starship #=> "Vogon Constructor Fleet" 19 | ``` 20 | -------------------------------------------------------------------------------- /doc/default/house.md: -------------------------------------------------------------------------------- 1 | # Faker::House 2 | 3 | ```ruby 4 | Faker::House.furniture #=> "Chaise","Commode" 5 | 6 | Faker::House.room #=> "Cuisine" 7 | ``` 8 | -------------------------------------------------------------------------------- /doc/default/industry_segments.md: -------------------------------------------------------------------------------- 1 | # Faker::IndustrySegments 2 | 3 | ```ruby 4 | Faker::IndustrySegments.industry #=> "Basic Materials" 5 | 6 | Faker::IndustrySegments.super_sector #=> "Basic Resources" 7 | 8 | Faker::IndustrySegments.sector #=> "Industrial Metals & Mining" 9 | 10 | Faker::IndustrySegments.sub_sector #=> "Nonferrous Metals" 11 | ``` 12 | -------------------------------------------------------------------------------- /doc/default/invoice.md: -------------------------------------------------------------------------------- 1 | # Faker::Invoice 2 | Module for creating valid invoice references. 3 | https://en.wikipedia.org/wiki/Creditor_Reference 4 | 5 | ```ruby 6 | Faker::Invoice.reference #=> "45656646957845" 7 | 8 | Faker::Invoice.creditor_reference #=> "RF34118592570724925498" 9 | ``` 10 | -------------------------------------------------------------------------------- /doc/default/job.md: -------------------------------------------------------------------------------- 1 | # Faker::Job 2 | 3 | ```ruby 4 | Faker::Job.title #=> "Manager International Marketing" 5 | 6 | Faker::Job.field #=> "Informatique" 7 | 8 | Faker::Job.seniority #=> "Régional" 9 | 10 | Faker::Job.position #=> "Stagiaire", "Manager" 11 | 12 | Faker::Job.key_skill #=> "Expert technique" 13 | 14 | Faker::Job.employment_type #=> "Temps plein" 15 | 16 | Faker::Job.education_level #=> "Master" 17 | ``` 18 | -------------------------------------------------------------------------------- /doc/default/kpop.md: -------------------------------------------------------------------------------- 1 | # Faker::Kpop 2 | 3 | ```ruby 4 | Faker::Kpop.i_groups # 1990's og groups => "Seo Taiji and Boys" 5 | 6 | Faker::Kpop.ii_groups # 2000's groups => "Girls' Generation" 7 | 8 | Faker::Kpop.iii_groups # 2010's groups => "Trouble Maker" 9 | 10 | Faker::Kpop.girl_groups # girl groups => "2NE1" 11 | 12 | Faker::Kpop.boy_bands # boy bands => "Exo" 13 | 14 | Faker::Kpop.solo # solo artists => "T.O.P" 15 | ``` 16 | -------------------------------------------------------------------------------- /doc/default/marketing.md: -------------------------------------------------------------------------------- 1 | # Faker::Marketing 2 | 3 | ```ruby 4 | Faker::Marketing.buzzwords #=> "rubber meets the road", "sprint to the finish line" 5 | ``` 6 | 7 | -------------------------------------------------------------------------------- /doc/default/measurement.md: -------------------------------------------------------------------------------- 1 | # Faker::Measurement 2 | 3 | ```ruby 4 | Faker::Measurement.metric_height #=> "2 mètres" 5 | 6 | Faker::Measurement.metric_length #=> "10 centimètres" 7 | 8 | Faker::Measurement.metric_volume #=> "1 litre" 9 | 10 | Faker::Measurement.metric_weight #=> "8 grammes" 11 | ``` 12 | -------------------------------------------------------------------------------- /doc/default/michael_scott.md: -------------------------------------------------------------------------------- 1 | # Faker::MichaelScott 2 | 3 | Available since version 1.9.0. 4 | 5 | ```ruby 6 | Faker::MichaelScott.quote #=> "I am Beyoncé, always." 7 | ``` 8 | -------------------------------------------------------------------------------- /doc/default/military.md: -------------------------------------------------------------------------------- 1 | # Faker::Military 2 | 3 | ```ruby 4 | # Armée de Terre 5 | Faker::Military.army_rank #=> "Lieutenant", "Caporal" 6 | # Armée de la Marine nationale 7 | Faker::Military.marines_rank #=> "Quartier-maître", "Colonel" 8 | # Armée de L'air 9 | Faker::Military.air_force_rank #=> "Aviateur", "Lieutenant-Colonel" 10 | 11 | ``` 12 | -------------------------------------------------------------------------------- /doc/default/name.md: -------------------------------------------------------------------------------- 1 | # Faker::Name 2 | 3 | ```ruby 4 | Faker::Name.name #=> "Jules Aubert" 5 | 6 | Faker::Name.name_with_middle #=> "Eliott Rolland Blanc" 7 | 8 | Faker::Name.first_name #=> "Mélissa" 9 | 10 | Faker::Name.last_name #=> "Fournier" 11 | 12 | Faker::Name.prefix #=> "M", "Mme" 13 | 14 | # Keyword arguments: number 15 | Faker::Name.initials #=> "ERB" 16 | Faker::Name.initials(number: 2) #=> "JA" 17 | ``` 18 | -------------------------------------------------------------------------------- /doc/default/nation.md: -------------------------------------------------------------------------------- 1 | # Faker::Nation 2 | 3 | ```ruby 4 | # Random Nationality 5 | Faker::Nation.nationality #=> "Népalais" 6 | 7 | # Random National Language 8 | Faker::Nation.language #=> "Hindi" 9 | 10 | # Random Capital City 11 | Faker::Nation.capital_city #=> "Georgetown" 12 | 13 | # Random National Flag 14 | Faker::Nation.flag #=> "🇫🇮" 15 | 16 | ``` -------------------------------------------------------------------------------- /doc/default/national_health_service.md: -------------------------------------------------------------------------------- 1 | # Faker::NationalHealthService 2 | 3 | ```ruby 4 | Faker::NationalHealthService.british_number #=> "403 958 5577" 5 | 6 | # Keyword arguments: number 7 | Faker::NationalHealthService.check_digit(number: 400_012_114) #=> 6 8 | ``` 9 | -------------------------------------------------------------------------------- /doc/default/nato_phonetic_alphabet.md: -------------------------------------------------------------------------------- 1 | # Faker::NatoPhoneticAlphabet 2 | 3 | Available since version 1.9.0. 4 | 5 | ```ruby 6 | # A code word from the NATO phonetic alphabet 7 | Faker::NatoPhoneticAlphabet.code_word #=> "Hotel" 8 | ``` 9 | -------------------------------------------------------------------------------- /doc/default/phone_number.md: -------------------------------------------------------------------------------- 1 | # Faker::PhoneNumber 2 | 3 | ```ruby 4 | Faker::PhoneNumber.phone_number #=> "+33 115144430", "0150278001" 5 | 6 | Faker::PhoneNumber.cell_phone #=> "07 83 19 52 97", "+33 667021781" 7 | ``` 8 | -------------------------------------------------------------------------------- /doc/default/programming_language.md: -------------------------------------------------------------------------------- 1 | # Faker::ProgrammingLanguage 2 | 3 | ```ruby 4 | Faker::ProgrammingLanguage.name #=> "Ruby" 5 | 6 | Faker::ProgrammingLanguage.creator #=> "Yukihiro Matsumoto" 7 | ``` 8 | -------------------------------------------------------------------------------- /doc/default/relationship.md: -------------------------------------------------------------------------------- 1 | # Faker::Relationship 2 | ### A Faker module for familial relationships. 3 | 4 | ```ruby 5 | # Keyword arguments: connection 6 | Faker::Relationship.familial #=> "Mère", "Grand-père" 7 | Faker::Relationship.familial(connection: 'direct') #=> "Mère", "Frère" 8 | Faker::Relationship.familial(connection: 'extended') #=> "Grand-mère", "Nièce", "Tante" 9 | 10 | Faker::Relationship.spouse #=> "Mari" ou "Femme" 11 | 12 | Faker::Relationship.parent #=> "Père" ou "Mère" 13 | 14 | Faker::Relationship.in_law #=> "Beau-frère" 15 | 16 | Faker::Relationship.sibling #=> "Soeur" ou "Frère" 17 | ``` 18 | -------------------------------------------------------------------------------- /doc/default/restaurant.md: -------------------------------------------------------------------------------- 1 | # Faker::Restaurant 2 | 3 | ```ruby 4 | Faker::Restaurant.name #=> "Guinguette du Port", "Le Restaurant Gourmand" 5 | 6 | Faker::Restaurant.type #=> "Français", "Vietnamien" 7 | 8 | Faker::Restaurant.description #=> "Nous nous engageons à utiliser les meilleurs ingrédients dans nos recettes. Aucune nourriture ne quitte notre cuisine que nous ne mangerions nous-mêmes." 9 | 10 | Faker::Restaurant.review #=> "Pour le dessert, nous avons commandé des churros couverts de chocolat et ils étaient délicieux aussi! Ils sont même venus avec des fruits frais (myrtilles et fraises)." 11 | ``` 12 | 13 | -------------------------------------------------------------------------------- /doc/default/rock_band.md: -------------------------------------------------------------------------------- 1 | # Faker::RockBand 2 | 3 | ```ruby 4 | Faker::RockBand.name #=> "Led Zeppelin" 5 | ``` 6 | -------------------------------------------------------------------------------- /doc/default/rupaul.md: -------------------------------------------------------------------------------- 1 | # Faker::RuPaul 2 | 3 | Available since version 1.8.0. 4 | 5 | ```ruby 6 | Faker::RuPaul.quote #=> "That's Funny, Tell Another One" 7 | 8 | Faker::RuPaul.queen #=> "Latrice Royale" 9 | ``` 10 | -------------------------------------------------------------------------------- /doc/default/science.md: -------------------------------------------------------------------------------- 1 | # Faker::Science 2 | 3 | ```ruby 4 | Faker::Science.element #=> "Carbone" 5 | 6 | Faker::Science.element_symbol #=> "Pb" 7 | 8 | Faker::Science.scientist #=> "Isaac Newton" 9 | ``` 10 | -------------------------------------------------------------------------------- /doc/default/source.md: -------------------------------------------------------------------------------- 1 | # Faker::Source 2 | Need to generate a code sample for something? Just give me the language (defaults to `ruby`, obviously). 3 | 4 | ```ruby 5 | # Keyword arguments: lang 6 | Faker::Source.hello_world #=> "print 'Hello World!'" 7 | Faker::Source.hello_world(lang: :javascript) #=> "alert('Hello World!');" 8 | 9 | # Keyword arguments: str, lang 10 | Faker::Source.print #=> "print 'some string'" 11 | Faker::Source.print(str: 'cake') #=> "print 'cake'" 12 | Faker::Source.print(str: 'cake', lang: :javascript) #=> "console.log('cake');" 13 | 14 | # Keyword arguments: lang 15 | Faker::Source.print_1_to_10 <<-DOC=> " 16 | 10.times do |i| 17 | print i 18 | end" 19 | DOC 20 | Faker::Source.print_1_to_10(lang: :javascript) <<-DOC=> " 21 | for (let i=0; i<10; i++) { 22 | console.log(i); 23 | }" 24 | DOC 25 | ``` 26 | -------------------------------------------------------------------------------- /doc/default/string.md: -------------------------------------------------------------------------------- 1 | # Faker::String 2 | Random UTF-8 string with optional nested length selectors. Very useful for testing. Guaranteed to find bugs in your code. Want robust code? Test with these. Includes every UTF-8 codepoint. 3 | 4 | ```ruby 5 | # Keyword arguments: length 6 | Faker::String.random #=> "3 뇦\u0017&y\u{3A109}$8^4* 녹豿4좘툢ꔾ쉙6ɉ\uA6 8TN畀챵|\"3쇤Ŵ" 7 | Faker::String.random(length: 4) #=> "⼨%0*" 8 | Faker::String.random(length: 3..12) #=> "\u{69FDC};秨툫" 9 | Faker::String.random(length: [0, 6]) #=> "I轤𣴒P溟L" 10 | Faker::String.random(length: [1, (2..5), [3, 6], nil]) #=> "葓L#ћ" 11 | ``` 12 | -------------------------------------------------------------------------------- /doc/default/subscription.md: -------------------------------------------------------------------------------- 1 | # Faker::Subscription 2 | 3 | ```ruby 4 | Faker::Subscription.plan #=> "Platinum" 5 | 6 | Faker::Subscription.status #=> "Active" 7 | 8 | Faker::Subscription.payment_method #=> "Paypal" 9 | 10 | Faker::Subscription.subscription_term #=> "Annual" 11 | 12 | Faker::Subscription.payment_term #=> "Monthly" 13 | ``` 14 | -------------------------------------------------------------------------------- /doc/default/superhero.md: -------------------------------------------------------------------------------- 1 | # Faker::Superhero 2 | 3 | Available since version 1.6.2. 4 | 5 | ```ruby 6 | # Random Superhero name 7 | Faker::Superhero.name #=> "Magnificent Shatterstar" 8 | 9 | # Random Superhero power 10 | Faker::Superhero.power #=> "Photokinesis" 11 | 12 | # Random Superhero prefix 13 | Faker::Superhero.prefix #=> "Captain" 14 | 15 | # Random Superhero suffix 16 | Faker::Superhero.suffix #=> "the Fated" 17 | 18 | # Random Superhero descriptor 19 | Faker::Superhero.descriptor #=> "Bizarro" 20 | ``` 21 | -------------------------------------------------------------------------------- /doc/default/team.md: -------------------------------------------------------------------------------- 1 | # Faker::Team 2 | 3 | ```ruby 4 | # Random Team Creature 5 | Faker::Team.creature #=> "gooses" 6 | 7 | # Random Team Name created from random US State (Faker::Address.state) prepended to a random Team Creature 8 | Faker::Team.name #=> "Oregon vixens" 9 | 10 | # Random Team State 11 | Faker::Team.state #=> "Oregon" 12 | 13 | # Random Team Sport 14 | Faker::Team.sport #=> "lacrosse" 15 | 16 | # Random Team Mascot 17 | Faker::Team.mascot #=> "Hugo" 18 | ``` 19 | 20 | -------------------------------------------------------------------------------- /doc/default/university.md: -------------------------------------------------------------------------------- 1 | # Faker::University 2 | 3 | Available since version 1.5.0. 4 | 5 | ```ruby 6 | # Random University Name 7 | Faker::University.name #=> "South Texas College" 8 | 9 | # Random University Prefix 10 | Faker::University.prefix #=> "North" 11 | 12 | # Random University Suffix 13 | Faker::University.suffix #=> "Institute" 14 | 15 | # Random Greek Organization 16 | Faker::University.greek_organization #=> "ABΓ" 17 | 18 | # Greek Alphabet 19 | Faker::University.greek_alphabet #=> ["Α", "B", "Γ", "Δ", ...] 20 | ``` 21 | -------------------------------------------------------------------------------- /doc/default/verbs.md: -------------------------------------------------------------------------------- 1 | # Faker::Verb 2 | 3 | ```ruby 4 | Faker::Verb.base #=> "conduire", "vider", "inscrire" 5 | 6 | Faker::Verb.past #=> "jeté", "évadé", "blessé" 7 | 8 | Faker::Verb.simple_present #=> "détache", "cherche", "respire" 9 | ``` 10 | 11 | -------------------------------------------------------------------------------- /doc/default/world_cup.md: -------------------------------------------------------------------------------- 1 | # Faker::WorldCup 2 | 3 | Available since version 1.9.0. 4 | 5 | ```ruby 6 | Faker::WorldCup.team #=> "South Korea" 7 | 8 | Faker::WorldCup.stadium #=> "Ekaterinburg Arena" 9 | 10 | Faker::WorldCup.city #=> "Saint Petersburg" 11 | 12 | # Keyword arguments: group 13 | Faker::WorldCup.group #=> "Egypt" 14 | Faker::WorldCup.group(group: 'group_A') #=> "Saudi Arabia" 15 | 16 | # Keyword arguments: country, type 17 | Faker::WorldCup.roster #=> "Héctor Cúper" 18 | Faker::WorldCup.roster(country: 'Russia', type: 'coach') #=> "Stanislav Cherchesov" 19 | ``` 20 | -------------------------------------------------------------------------------- /doc/dessinanime/disney.md: -------------------------------------------------------------------------------- 1 | # Faker::DessinAnime::Disney 2 | 3 | ```ruby 4 | # Film animation / dessin animé Disney aléatoire 5 | Faker::DessinAnime::Disney.film #=> "La Petite Sirène" 6 | 7 | # Citation aléatoire de personnage Disney 8 | Faker::DessinAnime::Disney.quote #=> "Sur une échelle de 1 à 10, tu vaux au moins 11."" 9 | 10 | # Personnage Disney aléatoire 11 | Faker::DessinAnime::Disney.character #=> "Polochon", "Ariel" 12 | ``` 13 | 14 | -------------------------------------------------------------------------------- /doc/games/dota.md: -------------------------------------------------------------------------------- 1 | # Faker::Games::Dota 2 | 3 | Available since version 1.9.0. 4 | 5 | ```ruby 6 | # Random hero 7 | Faker::Games::Dota.hero #=> "Abaddon" 8 | 9 | # Random item 10 | Faker::Games::Dota.item #=> "Armlet of Mordiggian" 11 | 12 | # Random team 13 | Faker::Games::Dota.team #=> "Evil Geniuses" 14 | 15 | # Random player 16 | Faker::Games::Dota.player #=> "Dendi" 17 | 18 | # Random quote 19 | # by default if you don't pass the hero parameter, the quote method will set hero as 'abbadon' 20 | Faker::Games::Dota.quote #=> "You have called death upon yourself." 21 | Faker::Games::Dota.quote(hero: 'alchemist') #=> "Better living through alchemy!" 22 | ``` 23 | -------------------------------------------------------------------------------- /doc/games/elder_scrolls.md: -------------------------------------------------------------------------------- 1 | # Faker::Games::ElderScrolls 2 | 3 | ```ruby 4 | Faker::Games::ElderScrolls.race #=> Argonien, Bréton 5 | 6 | Faker::Games::ElderScrolls.city #=> Solitude, Blancherive 7 | 8 | Faker::Games::ElderScrolls.creature #=> Troll, Dragon, Drémoran 9 | 10 | Faker::Games::ElderScrolls.region #=> Cyrodiil, Skryim 11 | 12 | Faker::Games::ElderScrolls.dragon #=> Dragon de Sang, Alduin 13 | 14 | Faker::Games::ElderScrolls.first_name #=> Athel, Farengar 15 | 16 | Faker::Games::ElderScrolls.last_name #=> Le Grand, Krex 17 | 18 | Faker::Games::ElderScrolls.name #=> Thrynn L'Invaincu 19 | ``` 20 | 21 | -------------------------------------------------------------------------------- /doc/games/fallout.md: -------------------------------------------------------------------------------- 1 | # Faker::Games::Fallout 2 | 3 | ```ruby 4 | Faker::Games::Fallout.character #=> "Dogmeat" 5 | 6 | Faker::Games::Fallout.faction #=> "The Institute" 7 | 8 | Faker::Games::Fallout.location #=> "Capital Wasteland" 9 | 10 | Faker::Games::Fallout.quote #=> "Democracy is non-negotiable" 11 | ``` 12 | -------------------------------------------------------------------------------- /doc/games/game.md: -------------------------------------------------------------------------------- 1 | # Faker::Game 2 | 3 | ```ruby 4 | # Random Game Title 5 | Faker::Game.title #=> "Half-Life", "Dofus", "World of Warcraft" 6 | 7 | # Random Game Genre 8 | Faker::Game.genre #=> "First-person shooter (FPS)", "Hack'n'Slash" 9 | 10 | # Random Game Platform 11 | Faker::Game.platform #=> "Nintendo DS", "Playstation 4" 12 | ``` 13 | -------------------------------------------------------------------------------- /doc/games/half_life.md: -------------------------------------------------------------------------------- 1 | # Faker::Games::HalfLife 2 | 3 | ```ruby 4 | # Any character from the game 5 | Faker::Games::HalfLife.character #=> "Gordon Freeman" 6 | 7 | # Any enemy from the game 8 | Faker::Games::HalfLife.enemy #=> "Houndeye" 9 | 10 | # Any location from the game 11 | Faker::Games::HalfLife.location #=> "Black Mesa Research Facility" 12 | ``` 13 | -------------------------------------------------------------------------------- /doc/games/heroes.md: -------------------------------------------------------------------------------- 1 | # Faker::Games::House 2 | 3 | ```ruby 4 | Faker::Games::Heroes.name #=> "Christian" 5 | 6 | Faker::Games::Heroes.specialty #=> "Ballista" 7 | 8 | Faker::Games::Heroes.klass #=> "Knight" 9 | ``` 10 | -------------------------------------------------------------------------------- /doc/games/heroes_of_the_storm.md: -------------------------------------------------------------------------------- 1 | # Faker::Games::HeroesOfTheStorm 2 | 3 | ```ruby 4 | Faker::Games::HeroesOfTheStorm.battleground #=> "Towers of Doom" 5 | 6 | Faker::Games::HeroesOfTheStorm.class #=> "Support" 7 | 8 | Faker::Games::HeroesOfTheStorm.hero #=> "Illidan" 9 | 10 | Faker::Games::HeroesOfTheStorm.quote #=> "MEAT!!!" 11 | ``` 12 | -------------------------------------------------------------------------------- /doc/games/league_of_legends.md: -------------------------------------------------------------------------------- 1 | # Faker::Games::LeagueOfLegends 2 | 3 | Available since version 1.8.0. 4 | 5 | ```ruby 6 | Faker::Games::LeagueOfLegends.champion #=> "Jarvan IV", "Fizz" 7 | 8 | Faker::Games::LeagueOfLegends.location #=> "Demacia", "Noxus", "Îles Obscures" 9 | 10 | Faker::Games::LeagueOfLegends.quote #=> "Mundo va où il veut" 11 | 12 | Faker::Games::LeagueOfLegends.summoner_spell #=> "Châtiment", "Embrasement" 13 | 14 | Faker::Games::LeagueOfLegends.masteries #=> "Mastodonte", "Démoniste", "Destructeur" 15 | 16 | Faker::Games::LeagueOfLegends.rank #=> "Bronze V", "Or II", "Grandmaster" 17 | ``` 18 | -------------------------------------------------------------------------------- /doc/games/myst.md: -------------------------------------------------------------------------------- 1 | # Faker::Games::Myst 2 | 3 | Available since version 1.9.0. 4 | 5 | ```ruby 6 | Faker::Games::Myst.game #=> "Myst III: Exile" 7 | 8 | Faker::Games::Myst.creature #=> "squee" 9 | 10 | Faker::Games::Myst.age #=> "Relto" 11 | 12 | Faker::Games::Myst.character #=> "Gehn" 13 | 14 | Faker::Games::Myst.quote #=> "I realized, the moment I fell into the fissure, that the Book would not be destroyed as I had planned." 15 | ``` 16 | -------------------------------------------------------------------------------- /doc/games/overwatch.md: -------------------------------------------------------------------------------- 1 | # Faker::Games::Overwatch 2 | 3 | Available since version 1.8.0. 4 | 5 | ```ruby 6 | Faker::Games::Overwatch.hero #=> "Tracer" 7 | 8 | Faker::Games::Overwatch.location #=> "Numbani" 9 | 10 | Faker::Games::Overwatch.quote #=> "It's high noon" 11 | ``` 12 | -------------------------------------------------------------------------------- /doc/games/pokemon.md: -------------------------------------------------------------------------------- 1 | # Faker::Games::Pokemon 2 | 3 | ```ruby 4 | Faker::Games::Pokemon.name #=> "Pikachu", "Rondoudou", "Artikodin" 5 | 6 | Faker::Games::Pokemon.location #=> "Bourg-Palette", "Vergazon" 7 | 8 | Faker::Games::Pokemon.move #=> "Flammèche", "Déflagration" 9 | ``` 10 | 11 | -------------------------------------------------------------------------------- /doc/games/sonic_the_hedgehog.md: -------------------------------------------------------------------------------- 1 | # Faker::Games::SonicTheHedgehog 2 | 3 | ```ruby 4 | # Any character from the games 5 | Faker::Games::SonicTheHedgehog.character #=> "Sonic the Hedgehog" 6 | 7 | # Any zone from the series 8 | Faker::Games::SonicTheHedgehog.zone #=> "The Legend of Zelda Zone" 9 | 10 | # Any game from the franchise 11 | Faker::Games::SonicTheHedgehog.game #=> "Waku Waku Sonic Patrol Car" 12 | ``` 13 | -------------------------------------------------------------------------------- /doc/games/super_smash_bros.md: -------------------------------------------------------------------------------- 1 | # Faker::Games::SuperSmashBros 2 | 3 | ```ruby 4 | # Any playable fighter from the series 5 | Faker::Games::SuperSmashBros.fighter #=> "Yoshi", "Marth" 6 | 7 | # Any stage from the series 8 | Faker::Games::SuperSmashBros.stage #=> "Temple", "Stade Pokemon" 9 | ``` 10 | -------------------------------------------------------------------------------- /doc/games/witcher.md: -------------------------------------------------------------------------------- 1 | # Faker::Games::Witcher 2 | 3 | ```ruby 4 | 5 | Faker::Games::Witcher.character # => "Triss Merigold" 6 | 7 | Faker::Games::Witcher.witcher # => "Geralt de Riv" 8 | 9 | Faker::Games::Witcher.location # => "Novigrad" 10 | 11 | Faker::Games::Witcher.school # => "Ecole du Loup" 12 | 13 | Faker::Games::Witcher.quote # => "Espèce de citadin va ! La viande pourrie, le fumier, la pisse ... Tout ça ce sont les bonnes odeurs de la campagne." 14 | 15 | # => "Troll", "Draugr" 16 | 17 | ``` -------------------------------------------------------------------------------- /doc/games/world_of_warcraft.md: -------------------------------------------------------------------------------- 1 | # Faker::Games::WorldOfWarcraft 2 | 3 | ```ruby 4 | # Personnage aléatoire du monde de World of Warcraft 5 | Faker::Games::WorldOfWarcraft.hero #=> "Onyxia", "Brann Barbe-de-bronze" 6 | 7 | # Citation aléatoire de personnage non joueur de World of Warcraft 8 | Faker::Games::WorldOfWarcraft.quote #=> "Le temps c'est de l'argent" 9 | 10 | # Zone aléatoire de World of Warcraft 11 | Faker::Games::WorldOfWarcraft.quote #=> "Darnassus", "Mulgore", "Nagrand" 12 | ``` 13 | 14 | -------------------------------------------------------------------------------- /doc/games/zelda.md: -------------------------------------------------------------------------------- 1 | # Faker::Games::Zelda 2 | 3 | Available since version 1.7.3. 4 | 5 | ```ruby 6 | # Random Zelda game 7 | Faker::Games::Zelda.game #=> "Ocarina of Time" -- On laisse en Anglais 8 | 9 | # Random Zelda character 10 | Faker::Games::Zelda.character #=> "Guru-Guru" 11 | 12 | # Random Zelda location 13 | Faker::Games::Zelda.location #=> "Toal", "Hyrule", "Village Cocorico" 14 | 15 | # Random Zelda item 16 | Faker::Games::Zelda.item #=> "Selle", "Rubis", "Bouclier des Sept Joyaux" 17 | ``` 18 | -------------------------------------------------------------------------------- /doc/japanese_media/dragon_ball.md: -------------------------------------------------------------------------------- 1 | # Faker::JapaneseMedia::DragonBall 2 | 3 | Available since version 1.8.0. 4 | 5 | ```ruby 6 | Faker::JapaneseMedia::DragonBall.character #=> "Sangoku", "Tortue Géniale" 7 | ``` 8 | 9 | -------------------------------------------------------------------------------- /doc/japanese_media/one_piece.md: -------------------------------------------------------------------------------- 1 | # Faker::JapaneseMedia::OnePiece 2 | 3 | ```ruby 4 | Faker::JapaneseMedia::OnePiece.character #=> "Monkey D. Luffy" 5 | 6 | Faker::JapaneseMedia::OnePiece.sea #=> "East Blue" 7 | 8 | Faker::JapaneseMedia::OnePiece.island #=> "Laftel" 9 | 10 | Faker::JapaneseMedia::OnePiece.location #=> "Foosha Village" 11 | 12 | Faker::JapaneseMedia::OnePiece.quote #=> "Un médecin, vite ! Ah... c'est moi !", "Plus il y a de fous, moins il y a de riz." 13 | Faker::JapaneseMedia::OnePiece.akuma_no_mi #=> "Gomu Gomu no Mi" 14 | ``` 15 | -------------------------------------------------------------------------------- /doc/japanese_media/sword_art_online.md: -------------------------------------------------------------------------------- 1 | # Faker::JapaneseMedia::SwordArtOnline 2 | 3 | Available since version 1.9.0. 4 | 5 | ```ruby 6 | # Random Sword Art Online real name 7 | Faker::JapaneseMedia::SwordArtOnline.real_name #=> "Kirigaya Kazuto" 8 | 9 | # Random Sword Art Online game name 10 | Faker::JapaneseMedia::SwordArtOnline.game_name #=> "Silica" 11 | 12 | # Random Sword Art Online location 13 | Faker::JapaneseMedia::SwordArtOnline.location #=> "Ruby Palace" 14 | 15 | # Random Sword Art Online item 16 | Faker::JapaneseMedia::SwordArtOnline.item #=> "Blackwyrm Coat" 17 | ``` 18 | -------------------------------------------------------------------------------- /doc/movies/back_to_the_future.md: -------------------------------------------------------------------------------- 1 | # Faker::Movies::BackToTheFuture 2 | 3 | ```ruby 4 | Faker::Movies::BackToTheFuture.character #=> "Marty McFly", 'Doc Emmett Brown' 5 | 6 | Faker::Movies::BackToTheFuture.date #=> '25 Octobre 1985' 7 | 8 | Faker::Movies::BackToTheFuture.quote #=> "Mais c'est quoi un gigawatt ??", "C'est vous l'doc" 9 | ``` 10 | 11 | -------------------------------------------------------------------------------- /doc/movies/ghostbusters.md: -------------------------------------------------------------------------------- 1 | # Faker::Ghostbusters 2 | 3 | ```ruby 4 | Faker::Movies::Ghostbusters.actor #=> "Bill Murray" 5 | 6 | Faker::Movies::Ghostbusters.character #=> "Dr. Egon Spengler" 7 | 8 | Faker::Movies::Ghostbusters.quote #=> "I tried to think of the most harmless thing. Something I loved from my childhood. Something that could never ever possibly destroy us. Mr. Stay Puft!"," 9 | ``` 10 | -------------------------------------------------------------------------------- /doc/movies/grateful_dead.md: -------------------------------------------------------------------------------- 1 | # Faker::Movies::GratefulDead 2 | 3 | ```ruby 4 | Faker::Movies::GratefulDead.player #=> "Jerry Garcia" 5 | 6 | Faker::Movies::GratefulDead.song #=> "China Cat Sunflower" 7 | ``` 8 | -------------------------------------------------------------------------------- /doc/movies/harry_potter.md: -------------------------------------------------------------------------------- 1 | # Faker::Movies::HarryPotter 2 | 3 | Available since version 1.7.3. 4 | 5 | ```ruby 6 | Faker::Movies::HarryPotter.character #=> "Harry Potter", "Garrick Ollivander" 7 | 8 | Faker::Movies::HarryPotter.location #=> "Poudlard", "Banque de Gringotts" 9 | 10 | Faker::Movies::HarryPotter.quote #=> "On a peur Potter ?", "Qu’est-ce que tu crains le plus, toi ? Faire un devoir qui n’aurait que 19/20 ?" 11 | 12 | Faker::Movies::HarryPotter.book #=> "Harry Potter et la Chambre des Secrets" 13 | 14 | Faker::Movies::HarryPotter.house #=> "Gryffondor" 15 | 16 | Faker::Movies::HarryPotter.spell #=> "Reparo", "Avada Kedavra" 17 | ``` 18 | -------------------------------------------------------------------------------- /doc/movies/hobbit.md: -------------------------------------------------------------------------------- 1 | # Faker::Movies::Hobbit 2 | 3 | Available since version 1.8.0. 4 | 5 | ```ruby 6 | # Any character from the book 7 | Faker::Movies::Hobbit.character #=> "Bilbon Sacquet", "Azog" 8 | 9 | # Un des 13 nains de la compagnie, Gandalf ou Bilbo 10 | Faker::Movies::Hobbit.thorins_company #=> "Thorin Ecu-de-Chêne" 11 | 12 | Faker::Movies::Hobbit.quote #=> "Il ne faut jamais se moquer des dragons vivants, Bilbo, pauvre idiot !", "Je suis le feu. Je suis.. la Mort." 13 | ``` 14 | -------------------------------------------------------------------------------- /doc/movies/lebowski.md: -------------------------------------------------------------------------------- 1 | # Faker::Movies::Lebowski 2 | 3 | Available since version 1.8.8. 4 | 5 | ```ruby 6 | Faker::Movies::Lebowski.actor #=> "John Goodman" 7 | 8 | Faker::Movies::Lebowski.character #=> "Jackie Treehorn" 9 | 10 | Faker::Movies::Lebowski.quote #=> "Forget it, Donny, you're out of your element!" 11 | ``` 12 | -------------------------------------------------------------------------------- /doc/movies/lord_of_the_rings.md: -------------------------------------------------------------------------------- 1 | # Faker::Movies::LordOfTheRings 2 | 3 | ```ruby 4 | Faker::Movies::LordOfTheRings.character #=> "Legolas", "Gandalf le Gris" 5 | 6 | Faker::Movies::LordOfTheRings.location #=> Minas Tirith", "Fondcombe" 7 | 8 | Faker::Movies::LordOfTheRings.quote #=> "Chouette… où est-ce qu’on va ?", "Vous ne passerez pas !" 9 | ``` 10 | -------------------------------------------------------------------------------- /doc/movies/movie.md: -------------------------------------------------------------------------------- 1 | # Faker::Movie 2 | 3 | ```ruby 4 | Faker::Movie.quote #=> "J’adore l’odeur du napalm au petit matin. - Apocalyse Now", "La différence entre toi et moi, c’est que moi j’ai la classe - Men in Black" 5 | ``` 6 | -------------------------------------------------------------------------------- /doc/movies/oss117.md: -------------------------------------------------------------------------------- 1 | # Faker::Movies::Oss117 2 | 3 | 4 | 5 | ```ruby 6 | Faker::Movies::Oss117.character #=> "Larmina El Akmar Betouche", "Hubert Bonisseur de La Bath" 7 | 8 | Faker::Movies::Oss117.quotes #=> "Il s'agirait de grandir hein, il s'agirait de grandir" 9 | ``` 10 | 11 | -------------------------------------------------------------------------------- /doc/movies/princess_bride.md: -------------------------------------------------------------------------------- 1 | # Faker::Movies::PrincessBride 2 | 3 | Available since version 1.9.0. 4 | 5 | ```ruby 6 | Faker::Movies::PrincessBride.character #=> "Dread Pirate Roberts" 7 | 8 | Faker::Movies::PrincessBride.quote #=> "Hello. My name is Inigo Montoya. You killed my father. Prepare to die!" 9 | ``` 10 | -------------------------------------------------------------------------------- /doc/movies/star_wars.md: -------------------------------------------------------------------------------- 1 | # Faker::Movies::StarWars 2 | 3 | Available since version 1.6.2. 4 | 5 | ```ruby 6 | Faker::Movies::StarWars.character #=> "Anakin Skywalker", "Boba Fett" 7 | 8 | Faker::Movies::StarWars.droid #=> "C-3PO", "BB-8" 9 | 10 | Faker::Movies::StarWars.planet #=> "Tatooine" 11 | 12 | Faker::Movies::StarWars.quote #=> ""Quand 900 ans comme moi tu auras, moins en forme tu seras !"" 13 | 14 | Faker::Movies::StarWars.quote(character: "dark_vador") #=> Luke, Je suis ton père!" 15 | 16 | Faker::Movies::StarWars.specie #=> "Gungan", "Twi'Lek" 17 | 18 | Faker::Movies::StarWars.vehicle #=> "Podracer", "Ski-Speeder" 19 | 20 | Faker::Movies::StarWars.wookiee_sentence #=> "Wyaaaaaa. Ruh ruh. Yo agaaha roooarrgh muaargaa." 21 | ``` 22 | 23 | -------------------------------------------------------------------------------- /doc/movies/v_for_vendetta.md: -------------------------------------------------------------------------------- 1 | # Faker::Movies::VForVendetta 2 | 3 | ```ruby 4 | Faker::Movies::VForVendetta.character #=> "V" 5 | 6 | Faker::Movies::VForVendetta.speech #=> "Remember, remember, the Fifth of November, the Gunpowder Treason and Plot. I know of no reason why the Gunpowder Treason should ever be forgot..." 7 | 8 | Faker::Movies::VForVendetta.quote #=> "People should not be afraid of their governments. Governments should be afraid of their people." 9 | ``` 10 | -------------------------------------------------------------------------------- /doc/music/grateful_dead.md: -------------------------------------------------------------------------------- 1 | # Faker::Music::GratefulDead 2 | 3 | ```ruby 4 | Faker::Music::GratefulDead.player #=> "Jerry Garcia" 5 | 6 | Faker::Music::GratefulDead.song #=> "Cassidy" 7 | ``` 8 | 9 | -------------------------------------------------------------------------------- /doc/music/music.md: -------------------------------------------------------------------------------- 1 | # Faker::Music 2 | 3 | Available since version 1.6.4. 4 | 5 | ```ruby 6 | Faker::Music.instrument #=> "Ukelélé", "Batterie" 7 | 8 | Faker::Music.band #=> "The Beatles" 9 | 10 | Faker::Music.album #=> "Sgt. Pepper's Lonely Hearts Club" 11 | 12 | Faker::Music.genre #=> "Rock", "Lofi", "Reggae" 13 | ``` 14 | -------------------------------------------------------------------------------- /doc/music/opera.md: -------------------------------------------------------------------------------- 1 | # Faker::Music::Opera 2 | 3 | ```ruby 4 | Faker::Music::Opera.verdi #=> "Il Trovatore" 5 | 6 | Faker::Music::Opera.rossini #=> "Il Barbiere di Siviglia" 7 | 8 | Faker::Music::Opera.donizetti #=> "Lucia di Lammermoor" 9 | 10 | Faker::Music::Opera.bellini #=> "Norma" 11 | ``` 12 | -------------------------------------------------------------------------------- /doc/music/phish.md: -------------------------------------------------------------------------------- 1 | # Faker::Music::Phish 2 | 3 | ```ruby 4 | Faker::Music::Phish.song #=> "Tweezer" 5 | ``` 6 | -------------------------------------------------------------------------------- /doc/music/rock_band.md: -------------------------------------------------------------------------------- 1 | # Faker::Music::RockBand 2 | 3 | ```ruby 4 | Faker::Music::RockBand.name #=> "Led Zeppelin", "The Police" 5 | ``` 6 | -------------------------------------------------------------------------------- /doc/music/umphreys_mcgee.md: -------------------------------------------------------------------------------- 1 | # Faker::Music::UmphreysMcgee 2 | 3 | ```ruby 4 | Faker::Music::UmphreysMcgee.song #=> "Dump City" 5 | ``` 6 | -------------------------------------------------------------------------------- /doc/quotes/chiquito.md: -------------------------------------------------------------------------------- 1 | # Faker::Quotes::Chiquito 2 | 3 | ```ruby 4 | Faker::Quotes::Chiquito.expression # => "¡Ereh un torpedo!" 5 | 6 | Faker::Quotes::Chiquito.term # => "Fistro" 7 | 8 | Faker::Quotes::Chiquito.sentence # => "Te llamo trigo por no llamarte Rodrigo" 9 | 10 | Faker::Quotes::Chiquito.joke # => "- Papár papár llévame al circo! 11 | # - Noorl! El que quiera verte que venga a la casa" 12 | ``` 13 | -------------------------------------------------------------------------------- /doc/quotes/quote.md: -------------------------------------------------------------------------------- 1 | # Faker::Quote 2 | 3 | Available since version 1.9.0. 4 | 5 | ```ruby 6 | Faker::Quote.famous_last_words #=> "My vocabulary did this to me. Your love will let you go on…" 7 | 8 | Faker::Quote.matz #=> "You want to enjoy life, don't you? If you get your job done quickly and your job is fun, that's good isn't it? That's the purpose of life, partly. Your life is better." 9 | 10 | Faker::Quote.most_interesting_man_in_the_world #=> "He can speak Russian… in French" 11 | 12 | Faker::Quote.robin #=> "Holy Razors Edge" 13 | 14 | Faker::Quote.singular_siegler #=> "Texas!" 15 | 16 | Faker::Quote.yoda #=> "Use your feelings, Obi-Wan, and find him you will." 17 | ``` 18 | 19 | -------------------------------------------------------------------------------- /doc/quotes/shakespeare.md: -------------------------------------------------------------------------------- 1 | # Faker::Quotes::Shakespeare 2 | 3 | ```ruby 4 | Faker::Quotes::Shakespeare.hamlet_quote # => "To be, or not to be: that is the question." 5 | 6 | Faker::Quotes::Shakespeare.as_you_like_it_quote # => "Can one desire too much of a good thing?." 7 | 8 | Faker::Quotes::Shakespeare.king_richard_iii_quote # => "Now is the winter of our discontent." 9 | 10 | Faker::Quotes::Shakespeare.romeo_and_juliet_quote # => "O Romeo, Romeo! wherefore art thou Romeo?." 11 | ``` 12 | -------------------------------------------------------------------------------- /doc/sports/basketball.md: -------------------------------------------------------------------------------- 1 | # Faker::Sports::Basketball 2 | 3 | ```ruby 4 | Faker::Sports::Basketball.team #=> "Golden State Warriors" 5 | 6 | Faker::Sports::Basketball.player #=> "LeBron James" 7 | 8 | Faker::Sports::Basketball.coach #=> "Gregg Popovich" 9 | 10 | Faker::Sports::Basketball.position #=> "Point Guard" 11 | ``` 12 | -------------------------------------------------------------------------------- /doc/sports/football.md: -------------------------------------------------------------------------------- 1 | # Faker::Sports::Football 2 | 3 | Available since version 1.9.0. 4 | 5 | ```ruby 6 | Faker::Sports::Football.team #=> "Manchester United" 7 | 8 | Faker::Sports::Football.player #=> "Lionel Messi" 9 | 10 | Faker::Sports::Football.coach #=> "Jose Mourinho" 11 | 12 | Faker::Sports::Football.competition #=> "FIFA World Cup" 13 | 14 | Faker::Sports::Football.position #=> "Defensive Midfielder" 15 | ``` 16 | -------------------------------------------------------------------------------- /doc/tv_shows/aqua_teen_hunger_force.md: -------------------------------------------------------------------------------- 1 | # Faker::TvShows::AquaTeenHungerForce 2 | 3 | ```ruby 4 | Faker::TvShows::AquaTeenHungerForce.character #=> "Master Shake" 5 | ``` 6 | 7 | -------------------------------------------------------------------------------- /doc/tv_shows/bojack_horseman.md: -------------------------------------------------------------------------------- 1 | # Faker::TvShows::BojackHorseman 2 | 3 | ```ruby 4 | Faker::TvShows::BojackHorseman.character #=> "BoJack Horseman"" 5 | 6 | Faker::TvShows::BojackHorseman.tongue_twister #=> "Did you steal a meal from Neal McBeal the Navy Seal?" 7 | 8 | Faker::TvShows::BojackHorseman.quote #=> "Not understanding that you're a horrible person doesn't make you less of a horrible person" 9 | ``` 10 | -------------------------------------------------------------------------------- /doc/tv_shows/breaking_bad.md: -------------------------------------------------------------------------------- 1 | # Faker::TvShows::BreakingBad 2 | 3 | Available since version 1.8.8. 4 | 5 | ```ruby 6 | Faker::TvShows::BreakingBad.character #=> "Walter White" 7 | 8 | Faker::TvShows::BreakingBad.episode #=> "Cancer Man" 9 | ``` 10 | -------------------------------------------------------------------------------- /doc/tv_shows/buffy.md: -------------------------------------------------------------------------------- 1 | # Faker::TvShows::Buffy 2 | 3 | ```ruby 4 | Faker::TvShows::Buffy.character #=> "Buffy Summers" 5 | 6 | Faker::TvShows::Buffy.quote #=> "If the apocalypse comes, beep me." 7 | 8 | Faker::TvShows::Buffy.celebrity #=> "John Ritter" 9 | 10 | Faker::TvShows::Buffy.big_bad #=> "Glory" 11 | 12 | Faker::TvShows::Buffy.episode #> "Once More, with Feeling" 13 | ``` 14 | -------------------------------------------------------------------------------- /doc/tv_shows/community.md: -------------------------------------------------------------------------------- 1 | # Faker::TvShows::Community 2 | 3 | Available since version 1.9.0. 4 | 5 | ```ruby 6 | Faker::TvShows::Community.characters #=> "Jeff Winger" 7 | 8 | Faker::TvShows::Community.quotes #=> I fear a political career could shine a negative light on my drug dealing." 9 | ``` 10 | -------------------------------------------------------------------------------- /doc/tv_shows/dr_who.md: -------------------------------------------------------------------------------- 1 | # Faker::TvShows::DrWho 2 | 3 | ```ruby 4 | Faker::TvShows::DrWho.character #=> "Captain Jack Harkness" 5 | 6 | Faker::TvShows::DrWho.the_doctor #=> "Ninth Doctor" 7 | 8 | Faker::TvShows::DrWho.actor #=> "Matt Smith" 9 | 10 | Faker::TvShows::DrWho.catch_phrase #=> "Fantastic!" 11 | 12 | Faker::TvShows::DrWho.quote #=> "Lots of planets have a north!" 13 | 14 | Faker::TvShows::DrWho.villain #=> "The Master" 15 | 16 | Faker::TvShows::DrWho.specie #=> "Dalek" 17 | ``` 18 | -------------------------------------------------------------------------------- /doc/tv_shows/dumb_and_dumber.md: -------------------------------------------------------------------------------- 1 | # Faker::TvShows::DumbAndDumber 2 | 3 | ```ruby 4 | Faker::TvShows::DumbAndDumber.actor #=> "Jim Carrey" 5 | 6 | Faker::TvShows::DumbAndDumber.character #=> "Harry Dunne" 7 | 8 | Faker::TvShows::DumbAndDumber.quote #=> "Why you going to the airport? Flying somewhere?" 9 | ``` 10 | -------------------------------------------------------------------------------- /doc/tv_shows/family_guy.md: -------------------------------------------------------------------------------- 1 | # Faker::TvShows::FamilyGuy 2 | 3 | ```ruby 4 | Faker::TvShows::FamilyGuy.character #=> "Peter Griffin" 5 | 6 | Faker::TvShows::FamilyGuy.location #=> "James Woods High" 7 | 8 | Faker::TvShows::FamilyGuy.quote #=> "It’s Peanut Butter Jelly Time." 9 | ``` 10 | -------------------------------------------------------------------------------- /doc/tv_shows/friends.md: -------------------------------------------------------------------------------- 1 | # Faker::TvShows::Friends 2 | 3 | Available since version 1.7.3. 4 | 5 | ```ruby 6 | Faker::TvShows::Friends.character #=> "Rachel Green" 7 | 8 | Faker::TvShows::Friends.location #=> "Central Perk" 9 | 10 | Faker::TvShows::Friends.quote #=> "We were on a break!" 11 | ``` 12 | -------------------------------------------------------------------------------- /doc/tv_shows/game_of_thrones.md: -------------------------------------------------------------------------------- 1 | # Faker::TvShows::GameOfThrones 2 | 3 | Available since version 1.6.6. 4 | 5 | ```ruby 6 | Faker::TvShows::GameOfThrones.character #=> "Tyrion Lannister" 7 | 8 | Faker::TvShows::GameOfThrones.house #=> "Stark" 9 | 10 | Faker::TvShows::GameOfThrones.city #=> "Lannisport" 11 | 12 | Faker::TvShows::GameOfThrones.quote #=> "Never forget who you are. The rest of the world won't. Wear it like an armor and it can never be used against you." 13 | 14 | Faker::TvShows::GameOfThrones.dragon #=> "Drogon" 15 | ``` 16 | -------------------------------------------------------------------------------- /doc/tv_shows/hey_arnold.md: -------------------------------------------------------------------------------- 1 | # Faker::TvShows::HeyArnold 2 | 3 | Available since version 1.8.0. 4 | 5 | ```ruby 6 | Faker::TvShows::HeyArnold.character #=> "Arnold" 7 | 8 | Faker::TvShows::HeyArnold.location #=> "Big Bob's Beeper Emporium" 9 | 10 | Faker::TvShows::HeyArnold.quote #=> "Stoop Kid's afraid to leave his stoop!" 11 | ``` 12 | -------------------------------------------------------------------------------- /doc/tv_shows/how_i_met_your_mother.md: -------------------------------------------------------------------------------- 1 | # Faker::TvShows::HowIMetYourMother 2 | 3 | Available since version 1.8.0. 4 | 5 | ```ruby 6 | Faker::TvShows::HowIMetYourMother.character #=> "Barney Stinson" 7 | 8 | Faker::TvShows::HowIMetYourMother.catch_phrase #=> "Legendary" 9 | 10 | Faker::TvShows::HowIMetYourMother.high_five #=> "Relapse Five" 11 | 12 | Faker::TvShows::HowIMetYourMother.quote #=> "Whenever I’m sad, I stop being sad and be awesome instead." 13 | ``` 14 | -------------------------------------------------------------------------------- /doc/tv_shows/kaamelott.md: -------------------------------------------------------------------------------- 1 | # Faker::TvShows::Kaamelott 2 | 3 | ```ruby 4 | Faker::TvShows::Kaamelott.quote #=> "Et à un moment... le sorcier s’est mis à nous menacer avec ses parties génitales." 5 | 6 | Faker::TvShows::Kaamelott.quote #=> "C’est pas faux !" 7 | ``` 8 | 9 | -------------------------------------------------------------------------------- /doc/tv_shows/michael_scott.md: -------------------------------------------------------------------------------- 1 | # Faker::TvShows::MichaelScott 2 | 3 | Available since version 1.9.0. 4 | 5 | ```ruby 6 | Faker::TvShows::MichaelScott.quote #=> "I am Beyoncé, always." 7 | ``` 8 | -------------------------------------------------------------------------------- /doc/tv_shows/new_girl.md: -------------------------------------------------------------------------------- 1 | # Faker::TvShows::NewGirl 2 | 3 | ```ruby 4 | Faker::TvShows::NewGirl.character #=> "Jessica Day" 5 | 6 | Faker::TvShows::NewGirl.quote #=> "Are you cooking a frittata in a sauce pan? What is this – prison?" 7 | ``` 8 | -------------------------------------------------------------------------------- /doc/tv_shows/parks_and_rec.md: -------------------------------------------------------------------------------- 1 | # Faker::TvShows::ParksAndRec 2 | 3 | ```ruby 4 | Faker::TvShows::ParksAndRec.character #=> "Leslie Knope" 5 | 6 | Faker::TvShows::ParksAndRec.city #=> "Pawnee" 7 | ``` 8 | -------------------------------------------------------------------------------- /doc/tv_shows/rick_and_morty.md: -------------------------------------------------------------------------------- 1 | # Faker::TvShows::RickAndMorty 2 | 3 | Available since version 1.8.0. 4 | 5 | ```ruby 6 | Faker::TvShows::RickAndMorty.character #=> "Rick Sanchez" 7 | 8 | Faker::TvShows::RickAndMorty.location #=> "Dimension C-132" 9 | 10 | Faker::TvShows::RickAndMorty.quote #=> "Ohh yea, you gotta get schwifty." 11 | ``` 12 | -------------------------------------------------------------------------------- /doc/tv_shows/rupaul.md: -------------------------------------------------------------------------------- 1 | # Faker::TvShows::RuPaul 2 | 3 | Available since version 1.8.0. 4 | 5 | ```ruby 6 | Faker::TvShows::RuPaul.quote #=> "That's Funny, Tell Another One" 7 | 8 | Faker::TvShows::RuPaul.queen #=> "Latrice Royale" 9 | ``` 10 | -------------------------------------------------------------------------------- /doc/tv_shows/seinfeld.md: -------------------------------------------------------------------------------- 1 | # Faker::TvShows::Seinfeld 2 | 3 | ```ruby 4 | Faker::TvShows::Seinfeld.character #=> George Costanza 5 | 6 | Faker::TvShows::Seinfeld.quote #=> I'm not a lesbian. I hate men, but I'm not a lesbian 7 | 8 | Faker::TvShows::Seinfeld.business #=> Kruger Industrial Smoothing 9 | ``` 10 | -------------------------------------------------------------------------------- /doc/tv_shows/silicon_valley.md: -------------------------------------------------------------------------------- 1 | # Faker::TvShows::SiliconValley 2 | 3 | ```ruby 4 | Faker::TvShows::SiliconValley.character # => "Jian Yang" 5 | 6 | Faker::TvShows::SiliconValley.company # => "Bachmanity" 7 | 8 | Faker::TvShows::SiliconValley.quote # => "I don't want to live in a world where someone else is making the world a better place better than we are." 9 | 10 | Faker::TvShows::SiliconValley.app # => "Nip Alert" 11 | 12 | Faker::TvShows::SiliconValley.invention # => "Tres Comas Tequila" 13 | 14 | Faker::TvShows::SiliconValley.motto # => "Our products are products, producing unrivaled results" 15 | 16 | Faker::TvShows::SiliconValley.url # => "http://www.piedpiper.com" 17 | 18 | Faker::TvShows::SiliconValley.email #=> "richard@piedpiper.test" 19 | ``` -------------------------------------------------------------------------------- /doc/tv_shows/simpsons.md: -------------------------------------------------------------------------------- 1 | # Faker::TvShows::Simpsons 2 | 3 | Available since version 1.8.0. 4 | 5 | ```ruby 6 | Faker::TvShows::Simpsons.character #=> "Charles Montgomery Burns" 7 | 8 | Faker::TvShows::Simpsons.location #=> "Moe's Tavern" 9 | 10 | Faker::TvShows::Simpsons.quote #=> "It takes two to lie: one to lie and one to listen." 11 | ``` 12 | -------------------------------------------------------------------------------- /doc/tv_shows/south_park.md: -------------------------------------------------------------------------------- 1 | # Faker::TvShows::SouthPark 2 | 3 | ```ruby 4 | Faker::TvShows::SouthPark.character #=> "Mr. Garrison" 5 | 6 | Faker::TvShows::SouthPark.quote #=> "I'm just getting a little cancer Stan" 7 | ``` 8 | -------------------------------------------------------------------------------- /doc/tv_shows/star_trek.md: -------------------------------------------------------------------------------- 1 | # Faker::TvShows::StarTrek 2 | 3 | Available since version 1.8.0. 4 | 5 | ```ruby 6 | Faker::TvShows::StarTrek.character #=> "Spock" 7 | 8 | Faker::TvShows::StarTrek.location #=> "Cardassia" 9 | 10 | Faker::TvShows::StarTrek.specie #=> "Ferengi" 11 | 12 | Faker::TvShows::StarTrek.villain #=> "Khan Noonien Singh" 13 | ``` 14 | -------------------------------------------------------------------------------- /doc/tv_shows/stargate.md: -------------------------------------------------------------------------------- 1 | # Faker::TvShows::Stargate 2 | 3 | ```ruby 4 | Faker::TvShows::Stargate.character #=> "Jack O'Neill" 5 | 6 | Faker::TvShows::Stargate.planet #=> "Abydos" 7 | 8 | Faker::TvShows::Stargate.quote #=> "General, request permission to beat the crap out of this man." 9 | ``` 10 | -------------------------------------------------------------------------------- /doc/tv_shows/stranger_things.md: -------------------------------------------------------------------------------- 1 | # Faker::TvShows::StrangerThings 2 | 3 | Available since version 1.9.0. 4 | 5 | ```ruby 6 | Faker::TvShows::StrangerThings.character #=> "six" 7 | 8 | Faker::TvShows::StrangerThings.quote #=> "Friends don't lie" 9 | ``` 10 | -------------------------------------------------------------------------------- /doc/tv_shows/the_expanse.md: -------------------------------------------------------------------------------- 1 | # Faker::TvShows::TheExpanse 2 | 3 | ```ruby 4 | Faker::TvShows::TheExpanse.character #=> "Jim Holden" 5 | 6 | Faker::TvShows::TheExpanse.location #=> "Ganymede" 7 | 8 | Faker::TvShows::TheExpanse.ship #=> "Nauvoo" 9 | 10 | Faker::TvShows::TheExpanse.quote #=> "I am that guy." 11 | ``` 12 | -------------------------------------------------------------------------------- /doc/tv_shows/the_fresh_prince_of_bel_air.md: -------------------------------------------------------------------------------- 1 | # Faker::TvShows::TheFreshPrinceOfBelAir 2 | 3 | ```ruby 4 | Faker::TvShows::TheFreshPrinceOfBelAir.character #=> "Will Smith" 5 | 6 | Faker::TvShows::TheFreshPrinceOfBelAir.celebrity #=> "Quincy Jones" 7 | 8 | Faker::TvShows::TheFreshPrinceOfBelAir.quote #=> "Girl, you look so good, I would marry your brother just to get in your family." 9 | ``` 10 | -------------------------------------------------------------------------------- /doc/tv_shows/the_it_crowd.md: -------------------------------------------------------------------------------- 1 | # Faker::TvShows::TheITCrowd 2 | 3 | ```ruby 4 | Faker::TvShows::TheITCrowd.actor #=> "Chris O'Dowd" 5 | 6 | Faker::TvShows::TheITCrowd.character #=> "Roy Trenneman" 7 | 8 | Faker::TvShows::TheITCrowd.email #=> "roy.trenneman@reynholm.test" 9 | 10 | Faker::TvShows::TheITCrowd.quote #=> "Hello, IT. Have you tried turning it off and on again?" 11 | ``` 12 | -------------------------------------------------------------------------------- /doc/tv_shows/the_thick_of_it.md: -------------------------------------------------------------------------------- 1 | # Faker::TvShows::TheThickOfIt 2 | 3 | ```ruby 4 | Faker::TvShows::TheThickOfIt.character #=> "Nicola Murray" 5 | 6 | Faker::TvShows::TheThickOfIt.department #=> "Shadow Cabinet" 7 | 8 | Faker::TvShows::TheThickOfIt.position #=> "Director of Communications" 9 | ``` 10 | -------------------------------------------------------------------------------- /doc/tv_shows/twin_peaks.md: -------------------------------------------------------------------------------- 1 | # Faker::TvShows::TwinPeaks 2 | 3 | Available since version 1.7.0. 4 | 5 | ```ruby 6 | Faker::TvShows::TwinPeaks.character #=> "Dale Cooper" 7 | 8 | Faker::TvShows::TwinPeaks.location #=> "Black Lodge" 9 | 10 | Faker::TvShows::TwinPeaks.quote #=> "The owls are not what they seem." 11 | ``` 12 | -------------------------------------------------------------------------------- /doc/tv_shows/venture_bros.md: -------------------------------------------------------------------------------- 1 | # Faker::TvShows::VentureBros 2 | 3 | ```ruby 4 | Faker::TvShows::VentureBros.character #=> "Scaramantula" 5 | 6 | Faker::TvShows::VentureBros.vehicle #=> "Monarchmobile" 7 | 8 | Faker::TvShows::VentureBros.organization #=> "Guild of Calamitous Intent" 9 | 10 | Faker::TvShows::VentureBros.quote #=> "Revenge like gazpacho soup, is best served cold, precise and merciless." 11 | ``` 12 | -------------------------------------------------------------------------------- /lib/faker/blockchain/ethereum.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | class Blockchain 5 | class Ethereum < Base 6 | class << self 7 | ## 8 | # Produces a random Ethereum wallet address 9 | # 10 | # @return [String] 11 | # 12 | # @example 13 | # Faker::Blockchain::Ethereum.address 14 | # #=> "0xd392b0c0500700d02d27ab30805ec80ddd3320ff" 15 | # 16 | # @faker.version 1.9.1 17 | def address 18 | hex_alphabet = '0123456789abcdef' 19 | var = +'0x' 20 | 40.times { var << sample(shuffle(hex_alphabet.split(''))) } 21 | var 22 | end 23 | end 24 | end 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /lib/faker/creature/animal.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | class Creature 5 | class Animal < Base 6 | class << self 7 | ## 8 | # Produces a random animal name 9 | # 10 | # @return [String] 11 | # 12 | # @example 13 | # Faker::Creature::Animal.name #=> "fly" 14 | # 15 | # @faker.version 1.9.2 16 | def name 17 | fetch('creature.animal.name') 18 | end 19 | end 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /lib/faker/creature/horse.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | class Creature 5 | class Horse < Base 6 | flexible :horse 7 | 8 | class << self 9 | ## 10 | # Produces a random name for a horse 11 | # 12 | # @return [String] 13 | # 14 | # @example 15 | # Faker::Creature::Horse.name #=> "Noir" 16 | # 17 | # @faker.version 1.9.2 18 | def name 19 | fetch('creature.horse.name') 20 | end 21 | 22 | ## 23 | # Produces a random horse breed 24 | # 25 | # @return [String] 26 | # 27 | # @example 28 | # Faker::Creature::Horse.breed #=> "Spanish Barb see Barb Horse" 29 | # 30 | # @faker.version 1.9.2 31 | def race 32 | fetch('creature.horse.race') 33 | end 34 | end 35 | end 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /lib/faker/default/appliance.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | class Appliance < Base 5 | class << self 6 | ## 7 | # Produces the name of an appliance brand. 8 | # 9 | # @return [String] 10 | # 11 | # @example 12 | # Faker::Appliance.brand #=> "Bosch" 13 | # 14 | # @faker.version 1.9.0 15 | def brand 16 | fetch('appliance.brand') 17 | end 18 | 19 | ## 20 | # Produces the name of a type of appliance equipment. 21 | # 22 | # @return [String] 23 | # 24 | # @example 25 | # Faker::Appliance.equipment #=> "Appliance plug" 26 | # 27 | # @faker.version 1.9.0 28 | def equipment 29 | fetch('appliance.equipment') 30 | end 31 | end 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /lib/faker/default/artist.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | class Artist < Base 5 | class << self 6 | ## 7 | # Produces the name of an artist. 8 | # 9 | # @return [String] 10 | # 11 | # @example 12 | # Faker::Artist.name #=> "Michelangelo" 13 | # 14 | # @faker.version 1.8.8 15 | def name 16 | fetch('artist.names') 17 | end 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /lib/faker/default/boolean.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | class Boolean < Base 5 | class << self 6 | ## 7 | # Produces a boolean 8 | # 9 | # @param true_ratio [Float] The likelihood (as a float, out of 1.0) for the method to return `true`. 10 | # @return [Boolean] 11 | # 12 | # @example 13 | # Faker::Boolean.boolean #=> true 14 | # @example 15 | # Faker::Boolean.boolean(true_ratio: 0.2) #=> false 16 | # 17 | # @faker.version 1.6.2 18 | def boolean(legacy_true_ratio = NOT_GIVEN, true_ratio: 0.5) 19 | warn_for_deprecated_arguments do |keywords| 20 | keywords << :true_ratio if legacy_true_ratio != NOT_GIVEN 21 | end 22 | (rand < true_ratio) 23 | end 24 | end 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /lib/faker/default/bossa_nova.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | class BossaNova < Base 5 | class << self 6 | ## 7 | # Produces the name of a bossa nova artist. 8 | # 9 | # @return [String] 10 | # 11 | # @example 12 | # Faker::BossaNova.artist #=> "Tom Jobin" 13 | # 14 | # @faker.version 1.8.3 15 | def artist 16 | fetch('bossa_nova.artists') 17 | end 18 | 19 | ## 20 | # Produces a bossa nova song. 21 | # 22 | # @return [String] 23 | # 24 | # @example 25 | # Faker::BossaNova.song #=> "Chega de Saudade" 26 | # 27 | # @faker.version 1.8.3 28 | def song 29 | fetch('bossa_nova.songs') 30 | end 31 | end 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /lib/faker/default/chuck_norris.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | class ChuckNorris < Base 5 | flexible :chuck_norris 6 | 7 | class << self 8 | # Produces a Chuck Norris Fact. 9 | # Original list of facts: 10 | # https://github.com/jenkinsci/chucknorris-plugin/blob/master/src/main/java/hudson/plugins/chucknorris/FactGenerator.java 11 | # 12 | # @return [String] 13 | # 14 | # @example 15 | # Faker::ChuckNorris.fact 16 | # #=> "Chuck Norris can solve the Towers of Hanoi in one move." 17 | # 18 | # @faker.version 1.6.4 19 | def fact 20 | fetch('chuck_norris.fact') 21 | end 22 | end 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /lib/faker/default/coin.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | class Coin < Base 5 | class << self 6 | ## 7 | # Retrieves a random coin from any country. 8 | # 9 | # @return [String] 10 | # 11 | # @example 12 | # Faker::Coin.name #=> "Brazilian Real" 13 | # 14 | # @faker.version 1.9.2 15 | def name 16 | fetch('currency.name') 17 | end 18 | 19 | ## 20 | # Retrieves a face to a flipped coin 21 | # 22 | # @return [String] 23 | # 24 | # @example 25 | # Faker::Coin.flip #=> "Heads" 26 | # 27 | # @faker.version 1.9.2 28 | def flip 29 | fetch('coin.flip') 30 | end 31 | end 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /lib/faker/default/construction.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | class Construction < Base 5 | def self.material 6 | fetch('construction.materials') 7 | end 8 | 9 | def self.heavy_equipment 10 | fetch('construction.heavy_equipment') 11 | end 12 | 13 | def self.trade 14 | fetch('construction.trades') 15 | end 16 | 17 | def self.subcontract_category 18 | fetch('construction.subcontract_categories') 19 | end 20 | 21 | def self.standard_cost_code 22 | fetch('construction.standard_cost_codes') 23 | end 24 | 25 | def self.role 26 | fetch('construction.roles') 27 | end 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /lib/faker/default/cosmere.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | class Cosmere < Base 5 | flexible :cosmere 6 | class << self 7 | def aon 8 | sample(aons) 9 | end 10 | 11 | def shard_world 12 | sample(shard_worlds) 13 | end 14 | 15 | def shard 16 | sample(shards) 17 | end 18 | 19 | def surge 20 | sample(surges) 21 | end 22 | 23 | def knight_radiant 24 | sample(knights_radiant) 25 | end 26 | 27 | def metal 28 | sample(metals) 29 | end 30 | 31 | def allomancer 32 | sample(allomancers) 33 | end 34 | 35 | def feruchemist 36 | sample(feruchemists) 37 | end 38 | 39 | def herald 40 | sample(heralds) 41 | end 42 | 43 | def spren 44 | sample(sprens) 45 | end 46 | end 47 | end 48 | end 49 | -------------------------------------------------------------------------------- /lib/faker/default/greek_philosophers.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | class GreekPhilosophers < Base 5 | class << self 6 | ## 7 | # Produces the name of a Greek philosopher. 8 | # 9 | # @return [String] 10 | # 11 | # @example 12 | # Faker::GreekPhilosophers.name #=> "Socrates" 13 | # 14 | # @faker.version 1.9.0 15 | def name 16 | fetch('greek_philosophers.names') 17 | end 18 | 19 | ## 20 | # Produces a quote from a Greek philosopher. 21 | # 22 | # @return [String] 23 | # 24 | # @example 25 | # Faker::GreekPhilosophers.quote #=> "Only the educated are free." 26 | # 27 | # @faker.version 1.9.0 28 | def quote 29 | fetch('greek_philosophers.quotes') 30 | end 31 | end 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /lib/faker/default/house.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | class House < Base 5 | class << self 6 | ## 7 | # Produces the name of a piece of furniture. 8 | # 9 | # @return [String] 10 | # 11 | # @example 12 | # Faker::House.furniture #=> "chair" 13 | # 14 | # @faker.version 1.9.2 15 | def furniture 16 | fetch('house.furniture') 17 | end 18 | 19 | ## 20 | # Produces the name of a room in a house. 21 | # 22 | # @return [String] 23 | # 24 | # @example 25 | # Faker::House.room #=> "kitchen" 26 | # 27 | # @faker.version 1.9.2 28 | def room 29 | fetch('house.rooms') 30 | end 31 | end 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /lib/faker/default/marketing.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | class Marketing < Base 5 | flexible :marketing 6 | 7 | class << self 8 | ## 9 | # Produces the name of a video game console or platform. 10 | # 11 | # @return [String] 12 | # 13 | # @example 14 | # Faker::Marketing.buzzwords #=> "rubber meets the road" 15 | # 16 | # @faker.version 1.9.4 17 | def buzzwords 18 | fetch('marketing.buzzwords') 19 | end 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /lib/faker/default/nato_phonetic_alphabet.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | class NatoPhoneticAlphabet < Base 5 | class << self 6 | ## 7 | # Produces a code word from the NATO phonetic alphabet. 8 | # 9 | # @return [String] 10 | # 11 | # @example 12 | # Faker::NatoPhoneticAlphabet.code_word #=> "Hotel" 13 | # 14 | # @faker.version 1.9.0 15 | def code_word 16 | fetch('nato_phonetic_alphabet.code_word') 17 | end 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /lib/faker/default/programming_language.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | class ProgrammingLanguage < Base 5 | class << self 6 | ## 7 | # Produces the name of a programming language. 8 | # 9 | # @return [String] 10 | # 11 | # @example 12 | # Faker::ProgrammingLanguage.name #=> "Ruby" 13 | # 14 | # @faker.version 1.8.5 15 | def name 16 | fetch('programming_language.name') 17 | end 18 | 19 | ## 20 | # Produces the name of a programming language's creator. 21 | # 22 | # @return [String] 23 | # 24 | # @example 25 | # Faker::ProgrammingLanguage.creator #=> "Yukihiro Matsumoto" 26 | # 27 | # @faker.version 1.8.5 28 | def creator 29 | fetch('programming_language.creator') 30 | end 31 | end 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /lib/faker/default/slack_emoji.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | class SlackEmoji < Base 5 | class << self 6 | def people 7 | fetch('slack_emoji.people') 8 | end 9 | 10 | def nature 11 | fetch('slack_emoji.nature') 12 | end 13 | 14 | def food_and_drink 15 | fetch('slack_emoji.food_and_drink') 16 | end 17 | 18 | def celebration 19 | fetch('slack_emoji.celebration') 20 | end 21 | 22 | def activity 23 | fetch('slack_emoji.activity') 24 | end 25 | 26 | def travel_and_places 27 | fetch('slack_emoji.travel_and_places') 28 | end 29 | 30 | def objects_and_symbols 31 | fetch('slack_emoji.objects_and_symbols') 32 | end 33 | 34 | def custom 35 | fetch('slack_emoji.custom') 36 | end 37 | 38 | def emoji 39 | parse('slack_emoji.emoji') 40 | end 41 | end 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /lib/faker/default/university.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | class University < Base 5 | flexible :university 6 | 7 | class << self 8 | def name 9 | parse('university.name') 10 | end 11 | 12 | def prefix 13 | fetch('university.prefix') 14 | end 15 | 16 | def suffix 17 | fetch('university.suffix') 18 | end 19 | 20 | def greek_organization 21 | Array.new(3) { |_| sample(greek_alphabet) }.join 22 | end 23 | 24 | def greek_alphabet 25 | %w[Α B Γ Δ E Z H Θ I K Λ M N Ξ 26 | O Π P Σ T Y Φ X Ψ Ω] 27 | end 28 | end 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /lib/faker/default/verb.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | class Verb < Base 5 | class << self 6 | def base 7 | fetch('verbs.base') 8 | end 9 | 10 | def past 11 | fetch('verbs.past') 12 | end 13 | 14 | def past_participle 15 | fetch('verbs.past_participle') 16 | end 17 | 18 | def simple_present 19 | fetch('verbs.simple_present') 20 | end 21 | 22 | def ing_form 23 | fetch('verbs.ing_form') 24 | end 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/faker/games/super_smash_bros.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | class Games 5 | class SuperSmashBros < Base 6 | class << self 7 | ## 8 | # Produces the name of a fighter from the Smash Bros games. 9 | # 10 | # @return [String] 11 | # 12 | # @example 13 | # Faker::Games::SuperSmashBros.fighter #=> "Mario" 14 | # 15 | # @faker.version 1.9.2 16 | def fighter 17 | fetch('games.super_smash_bros.fighter') 18 | end 19 | 20 | ## 21 | # Produces the name of a stage from the Smash Bros games. 22 | # 23 | # @return [String] 24 | # 25 | # @example 26 | # Faker::Games::SuperSmashBros.stage #=> "Final Destination" 27 | # 28 | # @faker.version 1.9.2 29 | def stage 30 | fetch('games.super_smash_bros.stage') 31 | end 32 | end 33 | end 34 | end 35 | end 36 | -------------------------------------------------------------------------------- /lib/faker/japanese_media/dragon_ball.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | class JapaneseMedia 5 | class DragonBall < Base 6 | class << self 7 | ## 8 | # Produces the name of a character from Dragon Ball. 9 | # 10 | # @return [String] 11 | # 12 | # @example 13 | # Faker::Games::DragonBall.character #=> "Goku" 14 | # 15 | # @faker.version 1.8.0 16 | def character 17 | fetch('dragon_ball.characters') 18 | end 19 | end 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /lib/faker/movies/movie.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | class Movie < Base 5 | class << self 6 | ## 7 | # Produces a quote from a movie. 8 | # 9 | # @return [String] 10 | # 11 | # @example 12 | # Faker::Movie.quote #=> "Bumble bee tuna" 13 | # 14 | # @faker.version 1.8.1 15 | def quote 16 | fetch('movie.quote') 17 | end 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /lib/faker/movies/oss117.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | class Movies 5 | class Oss117 < Base 6 | class << self 7 | 8 | def character 9 | fetch('oss117.characters') 10 | end 11 | 12 | def location 13 | fetch('oss117.locations') 14 | end 15 | 16 | def quotes 17 | fetch('oss117.quotes') 18 | end 19 | 20 | end 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/faker/music/grateful_dead.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative 'music' 4 | 5 | module Faker 6 | class Music 7 | class GratefulDead < Base 8 | class << self 9 | ## 10 | # Produces the name of a member of The Grateful Dead. 11 | # 12 | # @return [String] 13 | # 14 | # @example 15 | # Faker::Music::GratefulDead.player #=> "Jerry Garcia" 16 | # 17 | # @faker.version 1.9.2 18 | def player 19 | fetch('grateful_dead.players') 20 | end 21 | 22 | ## 23 | # Produces the name of a song by The Grateful Dead. 24 | # 25 | # @return [String] 26 | # 27 | # @example 28 | # Faker::Music::GratefulDead.song #=> "Cassidy" 29 | # 30 | # @faker.version 1.9.2 31 | def song 32 | fetch('grateful_dead.songs') 33 | end 34 | end 35 | end 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /lib/faker/music/phish.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | class Music 5 | class Phish < Base 6 | class << self 7 | ## 8 | # Produces the name of a song by Phish. 9 | # 10 | # @return [String] 11 | # 12 | # @example 13 | # Faker::Music::Phish.song #=> "Tweezer" 14 | # 15 | # @faker.version 1.9.2 16 | def song 17 | fetch('phish.song') 18 | end 19 | end 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /lib/faker/music/rock_band.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | class Music 5 | class RockBand < Base 6 | class << self 7 | ## 8 | # Produces the name of a rock band. 9 | # 10 | # @return [String] 11 | # 12 | # @example 13 | # Faker::Music::RockBand.name #=> "Led Zeppelin" 14 | # 15 | # @faker.version 1.7.0 16 | def name 17 | fetch('rock_band.name') 18 | end 19 | end 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /lib/faker/music/umphreys_mcgee.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | class Music 5 | class UmphreysMcgee < Base 6 | class << self 7 | ## 8 | # Produces the name of a song by Umphrey's McGee. 9 | # 10 | # @return [String] 11 | # 12 | # @example 13 | # Faker::Music::UmphreysMcgee.song #=> "Dump City" 14 | # 15 | # @faker.version 1.8.3 16 | def song 17 | fetch('umphreys_mcgee.song') 18 | end 19 | end 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /lib/faker/quotes/quote.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | class Quote < Base 5 | class << self 6 | def famous_last_words 7 | fetch('quote.famous_last_words') 8 | end 9 | 10 | def matz 11 | fetch('quote.matz') 12 | end 13 | 14 | def most_interesting_man_in_the_world 15 | fetch('quote.most_interesting_man_in_the_world') 16 | end 17 | 18 | def robin 19 | fetch('quote.robin') 20 | end 21 | 22 | def singular_siegler 23 | fetch('quote.singular_siegler') 24 | end 25 | 26 | # from: http://morecoolquotes.com/famous-yoda-quotes/ 27 | def yoda 28 | fetch('quote.yoda') 29 | end 30 | end 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /lib/faker/quotes/shakespeare.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | class Quotes 5 | class Shakespeare < Base 6 | class << self 7 | def hamlet_quote 8 | sample(hamlet) 9 | end 10 | 11 | def as_you_like_it_quote 12 | sample(as_you_like_it) 13 | end 14 | 15 | def king_richard_iii_quote 16 | sample(king_richard_iii) 17 | end 18 | 19 | def romeo_and_juliet_quote 20 | sample(romeo_and_juliet) 21 | end 22 | 23 | def hamlet 24 | fetch('shakespeare.hamlet') 25 | end 26 | 27 | def as_you_like_it 28 | fetch('shakespeare.as_you_like_it') 29 | end 30 | 31 | def king_richard_iii 32 | fetch('shakespeare.king_richard_iii') 33 | end 34 | 35 | def romeo_and_juliet 36 | fetch('shakespeare.romeo_and_juliet') 37 | end 38 | end 39 | end 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /lib/faker/tv_shows/aqua_teen_hunger_force.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | class TvShows 5 | class AquaTeenHungerForce < Base 6 | flexible :aqua_teen_hunger_force 7 | 8 | class << self 9 | ## 10 | # Produces a character from Aqua Teen Hunger Force. 11 | # 12 | # @return [String] 13 | # 14 | # @example 15 | # Faker::TvShows::AquaTeenHungerForce.character #=> "Master Shake" 16 | # 17 | # @faker.version 1.8.5 18 | def character 19 | fetch('aqua_teen_hunger_force.character') 20 | end 21 | end 22 | end 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /lib/faker/tv_shows/breaking_bad.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | class TvShows 5 | class BreakingBad < Base 6 | flexible :breaking_bad 7 | 8 | class << self 9 | ## 10 | # Produces the name of a character from Breaking Bad. 11 | # 12 | # @return [String] 13 | # 14 | # @example 15 | # Faker::TvShows::BreakingBad.character #=> "Walter White" 16 | # 17 | # @faker.version 1.8.8 18 | def character 19 | fetch('breaking_bad.character') 20 | end 21 | 22 | ## 23 | # Produces the name of an episode from Breaking Bad. 24 | # 25 | # @return [String] 26 | # 27 | # @example 28 | # Faker::TvShows::BreakingBad.episode #=> "Fly" 29 | # 30 | # @faker.version 1.8.8 31 | def episode 32 | fetch('breaking_bad.episode') 33 | end 34 | end 35 | end 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /lib/faker/tv_shows/kaamelott.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | class TvShows 5 | class Kaamelott < Base 6 | flexible :kaamelott 7 | 8 | class << self 9 | # Produces a Kaamelott. 10 | # 11 | # @return [String] 12 | # 13 | # @example 14 | # Faker::Rajnikanth.quote 15 | # #=> "Rajinikanth is so fast that he always comes yesterday." 16 | # 17 | # @faker.version 2.11.0 18 | def quote 19 | fetch('kaamelott.quote') 20 | end 21 | end 22 | end 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /lib/faker/tv_shows/michael_scott.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | class TvShows 5 | class MichaelScott < Base 6 | class << self 7 | # rubocop:disable Style/AsciiComments 8 | 9 | ## 10 | # Produces a quote from Michael Scott. 11 | # 12 | # @return [String] 13 | # 14 | # @example 15 | # Faker::TvShows::MichaelScott.quote 16 | # #=> "I am Beyoncé, always." 17 | # 18 | # @faker.version 1.9.0 19 | def quote 20 | fetch('michael_scott.quotes') 21 | end 22 | # rubocop:enable Style/AsciiComments 23 | end 24 | end 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /lib/faker/tv_shows/parks_and_rec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | class TvShows 5 | class ParksAndRec < Base 6 | flexible :parks_and_rec 7 | 8 | class << self 9 | ## 10 | # Produces a character from Parks and Recreation. 11 | # 12 | # @return [String] 13 | # 14 | # @example 15 | # Faker::TvShows::ParksAndRec.character #=> "Leslie Knope" 16 | # 17 | # @faker.version 1.9.0 18 | def character 19 | fetch('parks_and_rec.characters') 20 | end 21 | 22 | ## 23 | # Produces a city from Parks and Recreation. 24 | # 25 | # @return [String] 26 | # 27 | # @example 28 | # Faker::TvShows::ParksAndRec.city #=> "Pawnee" 29 | # 30 | # @faker.version 1.9.0 31 | def city 32 | fetch('parks_and_rec.cities') 33 | end 34 | end 35 | end 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /lib/faker/tv_shows/ru_paul.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | class TvShows 5 | class RuPaul < Base 6 | flexible :rupaul 7 | 8 | class << self 9 | ## 10 | # Produces a quote from RuPaul's Drag Race. 11 | # 12 | # @return [String] 13 | # 14 | # @example 15 | # Faker::TvShows::RuPaul.quote #=> "That's Funny, Tell Another One." 16 | # 17 | # @faker.version 1.8.0 18 | def quote 19 | fetch('rupaul.quotes') 20 | end 21 | 22 | ## 23 | # Produces a queen from RuPaul's Drag Race. 24 | # 25 | # @return [String] 26 | # 27 | # @example 28 | # Faker::TvShows::RuPaul.queen #=> "Latrice Royale" 29 | # 30 | # @faker.version 1.8.0 31 | def queen 32 | fetch('rupaul.queens') 33 | end 34 | end 35 | end 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /lib/faker/version.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker #:nodoc: 4 | VERSION = '2.11.0' 5 | end 6 | -------------------------------------------------------------------------------- /lib/helpers/base58.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Faker 4 | module Base58 5 | def self.encode(str) 6 | alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' 7 | base = alphabet.size 8 | 9 | lv = 0 10 | str.split('').reverse.each_with_index { |v, i| lv += v.unpack('C')[0] * 256**i } 11 | 12 | ret = +'' 13 | while lv.positive? 14 | lv, mod = lv.divmod(base) 15 | ret << alphabet[mod] 16 | end 17 | 18 | npad = str.match(/^#{0.chr}*/)[0].to_s.size 19 | '1' * npad + ret.reverse 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /lib/locales/de-CH.yml: -------------------------------------------------------------------------------- 1 | de-CH: 2 | faker: 3 | address: 4 | country_code: [CH, CH, CH, DE, AT, US, LI, US, HK, VN] 5 | postcode: ['1###', '2###', '3###', '4###', '5###', '6###', '7###', '8###', '9###'] 6 | default_country: [Schweiz] 7 | 8 | company: 9 | suffix: [AG, GmbH, und Söhne, und Partner, "& Co.", Gruppe, LLC, Inc.] 10 | name: 11 | - "#{Name.last_name} #{suffix}" 12 | - "#{Name.last_name}-#{Name.last_name}" 13 | - "#{Name.last_name}, #{Name.last_name} und #{Name.last_name}" 14 | 15 | internet: 16 | domain_suffix: [com, net, biz, ch, de, li, at, ch, ch] 17 | 18 | phone_number: 19 | formats: ['0800 ### ###', '0800 ## ## ##', '0## ### ## ##', '0## ### ## ##', '+41 ## ### ## ##', '0900 ### ###', '076 ### ## ##', '+4178 ### ## ##', '0041 79 ### ## ##'] 20 | -------------------------------------------------------------------------------- /lib/locales/en-BORK.yml: -------------------------------------------------------------------------------- 1 | en-BORK: 2 | faker: 3 | lorem: 4 | words: [Boot, I, Nu, Nur, Tu, Um, a, becoose-a, boot, bork, burn, chuuses, cumplete-a, cun, cunseqooences, curcoomstunces, dee, deeslikes, denuoonceeng, desures, du, eccuoont, ectooel, edfuntege-a, efueeds, egeeen, ell, ere-a, feend, foolt, frum, geefe-a, gesh, greet, heem, heppeeness, hes, hoo, hoomun, idea, ifer, in, incuoonter, injuy, itselff, ixcept, ixemple-a, ixerceese-a, ixpleeen, ixplurer, ixpuoond, ixtremely, knoo, lebureeuoos, lufes, meestekee, mester-booeelder, moost, mun, nu, nut, oobteeen, oocceseeunelly, ooccoor, ooff, oone-a, oor, peeen, peeenffool, physeecel, pleesoore-a, poorsooe-a, poorsooes, preeesing, prucoore-a, prudooces, reeght, reshunelly, resooltunt, sume-a, teecheengs, teke-a, thees, thet, thuse-a, treefiel, troot, tu, tueel, und, undertekes, unnuyeeng, uny, unyune-a, us, veell, veet, ves, vheech, vhu, yuoo, zee, zeere-a] 5 | -------------------------------------------------------------------------------- /lib/locales/en.yml: -------------------------------------------------------------------------------- 1 | en: 2 | time: 3 | formats: 4 | us: "%m/%d/%Y %I:%M %p" 5 | default: '%a, %d %b %Y %H:%M:%S %z' 6 | long: '%B %d, %Y %H:%M' 7 | short: '%d %b %H:%M' 8 | am: "AM" 9 | pm: "PM" 10 | faker: 11 | separator: ' & ' 12 | -------------------------------------------------------------------------------- /lib/locales/en/README.md: -------------------------------------------------------------------------------- 1 | To keep the English locale file from getting unwieldy, this directory is 2 | used for the translations that you might expect to find in `en.yml` in 3 | the parent directory. Each file in this directory corresponds to the 4 | Faker class of the same name. That is, `internet.yml` in this directory 5 | contains the data for the methods in `Faker::Internet`. 6 | 7 | Use the following YAML as the beginning of any new file you add to this 8 | directory: 9 | 10 | ``` 11 | en: 12 | faker: 13 | ``` 14 | -------------------------------------------------------------------------------- /lib/locales/en/aqua_teen_hunger_force.yml: -------------------------------------------------------------------------------- 1 | en: 2 | faker: 3 | aqua_teen_hunger_force: 4 | character: ["Carl Brutananadilewski", "Cybernetic Ghost of Christmas Past from the Future", "D.P", "Dr. Weird", "Dr. Wongburger", "Emory", "Err", "Frylock", "George Lowe", "Ignignokt", "Master Shake", "MC Pee Pants", "Meatwad", "Oglethorpe", "Skeeter", "Steve", "Turkatron"] 5 | -------------------------------------------------------------------------------- /lib/locales/en/business.yml: -------------------------------------------------------------------------------- 1 | en: 2 | faker: 3 | business: 4 | credit_card_numbers: ['1234-2121-1221-1211', '1212-1221-1121-1234', '1211-1221-1234-2201', '1228-1221-1221-1431'] 5 | credit_card_types: ['visa', 'mastercard', 'american_express', 'discover', 'diners_club', 'jcb', 'switch', 'solo', 'dankort', 'maestro', 'forbrugsforeningen', 'laser'] 6 | -------------------------------------------------------------------------------- /lib/locales/en/coin.yml: -------------------------------------------------------------------------------- 1 | en: 2 | faker: 3 | coin: 4 | flip: 5 | - Heads 6 | - Tails 7 | -------------------------------------------------------------------------------- /lib/locales/en/color.yml: -------------------------------------------------------------------------------- 1 | en: 2 | faker: 3 | color: 4 | name: [amaranth, amber, amethyst, apricot, aquamarine, azure, beige, black, blue, blush, bronze, brown, burgundy, byzantium, carmine, cerise, cerulean, champagne, chocolate, coffee, copper, coral, crimson, cyan, emerald, erin, fuchsia, gold, gray, green, grey, harlequin, indigo, ivory, jade, lavender, lemon, lilac, lime, magenta, maroon, mauve, ochre, olive, orange, orchid, peach, pear, periwinkle, pink, plum, puce, purple, raspberry, red, rose, ruby, salmon, sangria, sapphire, scarlet, silver, sky, tan, taupe, teal, turquoise, ultramarine, violet, viridian, white, yellow] 5 | -------------------------------------------------------------------------------- /lib/locales/en/dragon_ball.yml: -------------------------------------------------------------------------------- 1 | en: 2 | faker: 3 | dragon_ball: 4 | characters: ["Sangoku", "Vegeta", "Boo", "Freezer", "Son Gohan", "Bulma", "Trunks", "Cell", "Dodoria", "Baddack", "Bojack", "Broly", "Boubou", "Chaoz", "Chichi", "Cooler", "Dabla", "Gotrunks", "Elder", "Janemba", "Neptune", "Cachalot", "Tortue Génial", "Matou Malin", "Krilin", "Mâron", "Nappa", "Oolong", "Petit Coeur", "Sangohan", "Sangoten", "Hercule", "Shéron", "Végéku", "Videl", "Yamcha"] 5 | -------------------------------------------------------------------------------- /lib/locales/en/electrical_components.yml: -------------------------------------------------------------------------------- 1 | en: 2 | faker: 3 | electrical_components: 4 | active: ["Diode", "LED", "Rectifier", "Transistor", "JFET", "MOSFET", "Circuit intégré", "LCD", "Tube cathodique", "Tube à vide", "Batterie", " Pile à combustible "," Alimentation "] 5 | passive: ["Resistor", "Potentiomètre", "Condensateur", "Inducteur", "Transformateur", "Générateur", "Moteur", "Amplificateur magnétique", "Haut-parleur", "Capteur de mouvement", "Accéléromètre", "Thermocouple", "Antenne", "Oscillateur"] 6 | electromechanical: ["Dispositif piézoélectrique", "cristal", "Moteur à ultrasons", "Terminal", "Prise", "Cordon d'alimentation", "Interrupteur à bascule", "Interrupteur à glissière", "Interrupteur DIP", "Interrupteur à pédale", "Clavier" , "Disjoncteur", "Fusible", "Carte de circuit imprimé"] -------------------------------------------------------------------------------- /lib/locales/en/esport.yml: -------------------------------------------------------------------------------- 1 | en: 2 | faker: 3 | esport: 4 | players: ["Froggen", "Dendi", "Surefour", "Seagull", "xPeke", "shroud", "KennyS", "pasha", "RamboRay", "Crimsix", "ACE", "Grubby", "f0rest", "cArn", "Flash", "Faker", "Boxer", "Miracle", "Silvername"] 5 | teams: ["Dignitas", "OpTic Gaming", "FaZe", "iBUYPOWER", "Evil Geniuses", "Ninjas in Pijamas", "Natus Vincere", "Team SoloMid", "Cloud9", "Fnatic", "CLG", "EnVyUs", "Virtus.Pro", "Team Secret"] 6 | events: ["ESL Cologne", "MLG Meadowlands", "GFinity London", "Worlds", "IEM Championship", "League All Stars", "International"] 7 | leagues: ["ESL", "IEM", "MLG", "GFinity", "Starladder"] 8 | games: ["CS:GO", "League of Legends", "Overwatch", "StarCraft II", "Dota 2", "Super Smash Bros. Melee", "Hearthstone", "PUBG", "World of Warcraft", "FIFA", "Valorent", "Rocket League", "Fortnite"] 9 | -------------------------------------------------------------------------------- /lib/locales/en/gender.yml: -------------------------------------------------------------------------------- 1 | en: 2 | faker: 3 | gender: 4 | types: ["Féminin", "Masculin", "Non binaire", "Agender", "Genderfluid", "Genderqueer", "Bigender", "Pangender"] 5 | binary_types: ["Féminin", "Masculin"] 6 | short_binary_types: ["f", "m"] 7 | -------------------------------------------------------------------------------- /lib/locales/en/hacker.yml: -------------------------------------------------------------------------------- 1 | en: 2 | faker: 3 | hacker: 4 | abbreviation: [TCP,HTTP,SDD,RAM,GB,CSS,SSL,AGP,SQL,FTP,PCI,AI,ADP,RSS,XML,EXE,COM,HDD,THX,SMTP,SMS,USB,PNG,SAS,IB,SCSI,JSON,XSS,JBOD] 5 | adjective: [auxiliary,primary,back-end,digital,open-source,virtual,cross-platform,redundant,online,haptic,multi-byte,bluetooth,wireless,1080p,neural, optical,solid state,mobile] 6 | noun: [driver,protocol,bandwidth,panel,microchip,program,port,card,array,interface,system,sensor,firewall,hard drive,pixel,alarm,feed,monitor,application,transmitter,bus,circuit,capacitor,matrix] 7 | verb: [back up,bypass,hack,override,compress,copy,navigate,index,connect,generate,quantify,calculate,synthesize,input,transmit,program,reboot,parse] 8 | ingverb: [backing up,bypassing,hacking,overriding,compressing,copying,navigating,indexing,connecting,generating,quantifying,calculating, synthesizing,transmitting,programming,parsing] 9 | -------------------------------------------------------------------------------- /lib/locales/en/house.yml: -------------------------------------------------------------------------------- 1 | en: 2 | faker: 3 | house: 4 | furniture: ["chaise", fauteuil "," table "," table "," tabouret "," canapé "," canapé "," baignoire "," lit "," armoire "," tiroirs "," commode "," lampadaire "," table de chevet "," futon "] 5 | rooms: ["cuisine", "salon", "réception", "chambre", "chambre principale", "chambre d'amis", "salon", "véranda", "couloir", "cellier", "porche", "salle de bain", "salle de bain attenante", "cave", "grenier"] 6 | -------------------------------------------------------------------------------- /lib/locales/en/id_number.yml: -------------------------------------------------------------------------------- 1 | en: 2 | faker: 3 | id_number: 4 | valid: "#{IDNumber.ssn_valid}" 5 | invalid: ['000-##-####', '###-00-####', '###-##-0000', '666-##-####', '9##-##-####'] 6 | -------------------------------------------------------------------------------- /lib/locales/en/invoice.yml: -------------------------------------------------------------------------------- 1 | en: 2 | faker: 3 | invoice: 4 | reference: 5 | check_digit_method: method_731 6 | pattern: '\d{3,19}#' -------------------------------------------------------------------------------- /lib/locales/en/markdown.yml: -------------------------------------------------------------------------------- 1 | en: 2 | faker: 3 | markdown: 4 | headers: ["#", "##", "###", "####", "#####", "######"] 5 | emphasis: ["_", "~", "*", "**"] 6 | -------------------------------------------------------------------------------- /lib/locales/en/measurement.yml: -------------------------------------------------------------------------------- 1 | en: 2 | faker: 3 | measurement: 4 | height: ["inch", "foot"] 5 | length: ["yard", "foot", "mile"] 6 | volume: ["cup", "tablespoon", "teaspoon", "quart", "pint", "gallon", "fluid ounce"] 7 | weight: ["pound", "ounce", "ton"] 8 | metric_height: ["centimètre", "mètre"] 9 | metric_length: ["millimètre", "centimètre", "décimètre", "mètre", "décamètre", "hectomètre", "kilomètre"] 10 | metric_volume: ["millimètre", "littre"] 11 | metric_weight: ["milligramme", "centigramme", "décigramme", "gramme", "décagramme", "hectogramme", "kilogramme", "tonne"] 12 | -------------------------------------------------------------------------------- /lib/locales/en/military.yml: -------------------------------------------------------------------------------- 1 | en: 2 | faker: 3 | military: 4 | army_rank: ["Soldat","Caporal","Caporal Chef","Sergent","Sergent-Chef","Adjudant","Major","Lieutenant","Sous-Lieutenant","Capitaine","Commandant","Lieutenant-Colonel","Colonel","Général","Officier"] 5 | marines_rank: ["Aspirant","Troisième Classe","Deuxième Classe","Première Classe","Principal","Chef de Deuxième Classe","Chef de Première Classe","Général de Deuxième Classe","Général de Première Classe","Général Hors Classe","Capitaine","Lieutenant de vaisseau","Quartier maître","Contre maître","Major","Lieutenant Colonel","Colonel","General"] 6 | air_force_rank: ["Caporal-Chef","Caporal","Aviateur","Aviateur de 1ère Classe","Sergent","Sergent-Chef","Major","Adjudant-Chef","Adjudant","Capitaine","Lieutenant","Sous-Lieutenant","Colonel","Lieutenant-Colonel","Commandant","Général d'armée aérienne","Généram de brigade aérienne"] 7 | -------------------------------------------------------------------------------- /lib/locales/en/nato_phonetic_alphabet.yml: -------------------------------------------------------------------------------- 1 | en: 2 | faker: 3 | nato_phonetic_alphabet: 4 | code_word: ["Alpha", "Bravo", "Charlie", "Delta", "Echo", "Foxtrot", "Golf", "Hotel", "India", "Juliett", "Kilo", "Lima", "Mike", "November", "Oscar", "Papa", "Quebec", "Romeo", "Sierra", "Tango", "Uniform", "Victor", "Whiskey", "X-ray", "Yankee", "Zulu"] 5 | -------------------------------------------------------------------------------- /lib/locales/en/parks_and_rec.yml: -------------------------------------------------------------------------------- 1 | en: 2 | faker: 3 | parks_and_rec: 4 | characters: ["Leslie Knope","Ron Swanson","Ann Perkins","Mark Brendanawicz","Tom Haverford","April Ludgate","Andy Dwyer","Jerry Gergich", 5 | "Donna Meagle","Ben Wyatt","Chris Traeger","Craig Middlebrooks","Jean-Ralphio Saperstein","Li'l Sebastian","Mona-Lisa Saperstein","Orin", 6 | "Tammy 1","Tammy 2","Tammy Zero","Jeremy Jamm","Ethel Beavers","Crazy Ira","The Douche","Joan Callamezzo","Perd Hapley","Shauna Malwae-Tweep","Bobby Newport","Dr. Richard Nygard"] 7 | cities: ["Pawnee","Eagleton","Boraqua"] 8 | -------------------------------------------------------------------------------- /lib/locales/en/relationship.yml: -------------------------------------------------------------------------------- 1 | en: 2 | faker: 3 | relationship: 4 | familial: 5 | direct: ['Father', 'Mother', 'Sister', 'Brother'] 6 | extended: ['Grandfather', 'Grandmother', 'Uncle', 'Aunt', 'Cousin', 'Niece', 'Nephew', 'Grandson', 'Granddaughter'] 7 | in_law: ['Father-in-law', 'Mother-in-law', 'Sister-in-law', 'Brother-in-law'] 8 | spouse: ['Husband', 'Wife'] 9 | parent: ['Father', 'Mother'] 10 | sibling: ['Sister', 'Brother'] 11 | -------------------------------------------------------------------------------- /lib/locales/en/source.yml: -------------------------------------------------------------------------------- 1 | en: 2 | faker: 3 | source: 4 | hello_world: 5 | ruby: "puts 'Hello World!'" 6 | javascript: "alert('Hello World!');" 7 | print: 8 | ruby: "puts 'faker_string_to_print'" 9 | javascript: "console.log('faker_string_to_print');" 10 | print_1_to_10: 11 | ruby: " 12 | (1..10).each { |i| puts i }" 13 | javascript: " 14 | for (let i=0; i<10; i++) { 15 | console.log(i); 16 | }" 17 | -------------------------------------------------------------------------------- /lib/locales/en/subscription.yml: -------------------------------------------------------------------------------- 1 | en: 2 | faker: 3 | subscription: 4 | plans: ["Free Trial", "Basic", "Starter", "Essential", "Student", "Bronze", "Standard", "Silver", "Gold", "Platinum", "Professional", "Business", "Diamond", "Premium"] 5 | statuses: ["Active", "Idle", "Blocked", "Pending"] 6 | payment_methods: ["Credit card", "Debit card", "Paypal", "Cash", "Money transfer", "Bitcoins", "Cheque", "Apple Pay", "Google Pay", "WeChat Pay", "Alipay", "Visa checkout"] 7 | subscription_terms: ["Daily", "Weekly", "Monthly", "Annual", "Biennal", "Triennal", "Quinquennal", "Lifetime"] 8 | payment_terms: ["Payment in advance", "Monthly", "Annual", "Full subscription"] 9 | -------------------------------------------------------------------------------- /lib/locales/en/university.yml: -------------------------------------------------------------------------------- 1 | en: 2 | faker: 3 | university: 4 | prefix: [The, Northern, North, Western, West, Southern, South, Eastern, East] 5 | suffix: [University, Institute, College, Academy] 6 | name: 7 | - "#{Name.last_name} #{University.suffix}" 8 | - "#{University.prefix} #{Name.last_name} #{University.suffix}" 9 | - "#{University.prefix} #{Name.last_name}" 10 | - "#{University.prefix} #{Address.state} #{University.suffix}" 11 | -------------------------------------------------------------------------------- /lib/locales/no.yml: -------------------------------------------------------------------------------- 1 | no-NO: 2 | faker: 3 | invoice: 4 | reference: 5 | # Source: https://www.nordea.com/Images/37-48872/Func_Spec_Credit_Advice.pdf 6 | check_digit_method: kidmod10 7 | pattern: '\d{24}#' 8 | -------------------------------------------------------------------------------- /script/destroy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | 4 | APP_ROOT = File.join(File.dirname(__FILE__), '..') 5 | 6 | begin 7 | require 'rubigen' 8 | rescue LoadError 9 | require 'rubygems' 10 | require 'rubigen' 11 | end 12 | require 'rubigen/scripts/destroy' 13 | 14 | ARGV.shift if ['--help', '-h'].include?(ARGV[0]) 15 | RubiGen::Base.use_component_sources! %i[rubygems newgem newgem_theme test_unit] 16 | RubiGen::Scripts::Destroy.new.run(ARGV) 17 | -------------------------------------------------------------------------------- /script/generate: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | 4 | APP_ROOT = File.join(File.dirname(__FILE__), '..') 5 | 6 | begin 7 | require 'rubigen' 8 | rescue LoadError 9 | require 'rubygems' 10 | require 'rubigen' 11 | end 12 | require 'rubigen/scripts/generate' 13 | 14 | ARGV.shift if ['--help', '-h'].include?(ARGV[0]) 15 | RubiGen::Base.use_component_sources! %i[rubygems newgem newgem_theme test_unit] 16 | RubiGen::Scripts::Generate.new.run(ARGV) 17 | -------------------------------------------------------------------------------- /tasks/reformat_yaml.rake: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'yaml' 4 | 5 | desc 'Reformat a yaml file into a common format' 6 | task :reformat_yaml, [:filename] do |_, args| 7 | args.with_defaults(filename: nil) 8 | 9 | raise ArgumentError, 'A filename is required. `bundle exec rake reformat_yaml["lib/path/to/fil"]`' if args[:filename].nil? 10 | 11 | root_dir = File.absolute_path(File.join(__dir__, '..')) 12 | target_file = File.join(root_dir, args[:filename]) 13 | reformat_file(target_file) 14 | end 15 | 16 | def reformat_file(filename) 17 | puts "reformatting #{filename}" 18 | 19 | input = YAML.load_file(filename) 20 | output = input.to_yaml 21 | 22 | output.sub!(/^---\n/, '') # remove header 23 | 24 | File.write(filename, output) 25 | end 26 | -------------------------------------------------------------------------------- /tasks/test.rake: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'rake/testtask' 4 | 5 | Rake::TestTask.new do |t| 6 | t.libs << 'test' 7 | t.libs << '.' 8 | t.test_files = FileList['test/**/**/test*.rb'] 9 | t.warning = true 10 | end 11 | 12 | task default: :test 13 | -------------------------------------------------------------------------------- /tasks/website.rake: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | desc 'Generate website files' 4 | task :website_generate do 5 | (Dir['website/**/*.txt'] - Dir['website/version*.txt']).each do |txt| 6 | sh %( ./script/txt2html #{txt} > #{txt.gsub(/txt$/, 'html')} ) 7 | end 8 | end 9 | 10 | desc 'Upload website files to rubyforge' 11 | task :website_upload do 12 | remote_dir = '/var/www/gforge-projects/faker/' 13 | local_dir = 'website' 14 | sh %(rsync -acCv #{local_dir}/ #{ENV['USER']}@rubyforge.org:#{remote_dir}) 15 | end 16 | 17 | desc 'Generate and upload website files' 18 | task website: %i[website_generate website_upload publish_docs] 19 | -------------------------------------------------------------------------------- /test/faker/blockchain/aeternity.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerAeternity < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Blockchain::Aeternity 8 | end 9 | 10 | def test_address 11 | assert_match(/ak_([0-9a-zA-Z]{50}$)/, @tester.address) 12 | end 13 | 14 | def test_transaction 15 | assert_match(/th_([0-9a-zA-Z]{51}$)/, @tester.transaction) 16 | end 17 | 18 | def test_contract 19 | assert_match(/ct_([0-9a-zA-Z]{50}$)/, @tester.contract) 20 | end 21 | 22 | def test_oracle 23 | assert_match(/ok_([0-9a-zA-Z]{51}$)/, @tester.oracle) 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /test/faker/blockchain/bitcoin.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerBitcoin < Test::Unit::TestCase 6 | def test_address 7 | assert Faker::Blockchain::Bitcoin.address.match(/^[13][1-9A-Za-z][^OIl]{20,40}/) 8 | end 9 | 10 | def test_deterministic_address 11 | Faker::Config.random = Random.new(42) 12 | v = Faker::Blockchain::Bitcoin.address 13 | Faker::Config.random = Random.new(42) 14 | assert v == Faker::Blockchain::Bitcoin.address 15 | end 16 | 17 | def test_testnet_address 18 | assert_match(/\A[mn][1-9A-Za-z]{32,34}\Z/, Faker::Blockchain::Bitcoin.testnet_address) 19 | assert_not_match(/[OIl]/, Faker::Blockchain::Bitcoin.testnet_address) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /test/faker/blockchain/ethereum.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerEthereum < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Blockchain::Ethereum 8 | end 9 | 10 | def test_address 11 | assert @tester.address.match(/0x([a-fA-F0-9]{40})/) 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /test/faker/books/test_book.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerBook < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Book 8 | end 9 | 10 | def test_title 11 | assert @tester.title.match(/(\w+\.? ?){2,3}/) 12 | end 13 | 14 | def test_author 15 | assert @tester.author.match(/(\w+\.? ?){2,3}/) 16 | end 17 | 18 | def test_publisher 19 | assert @tester.publisher.match(/(\w+\.? ?){2,3}/) 20 | end 21 | 22 | def test_genre 23 | assert @tester.genre.match(/(\w+\.? ?){2,3}/) 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /test/faker/books/test_dune.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerBooksDune < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Books::Dune 8 | end 9 | 10 | def test_character 11 | assert @tester.character.match(/\w+/) 12 | end 13 | 14 | def test_title 15 | assert @tester.title.match(/\w+/) 16 | end 17 | 18 | def test_planet 19 | assert @tester.planet.match(/\w+/) 20 | end 21 | 22 | def test_quote 23 | assert @tester.quote.match(/\w+/) 24 | end 25 | 26 | def test_saying 27 | assert @tester.saying.match(/\w+/) 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /test/faker/books/test_faker_culture_series.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerCultureSeries < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Books::CultureSeries 8 | end 9 | 10 | def test_book 11 | assert @tester.book.match(/\w+/) 12 | end 13 | 14 | def test_culture_ship 15 | assert @tester.culture_ship.match(/\w+/) 16 | end 17 | 18 | def test_culture_ship_class 19 | assert @tester.culture_ship_class.match(/\w+/) 20 | end 21 | 22 | def test_culture_ship_abv 23 | assert @tester.culture_ship_class_abv.match(/\w+/) 24 | end 25 | 26 | def test_civ 27 | assert @tester.civ.match(/\w+/) 28 | end 29 | 30 | def test_planet 31 | assert @tester.planet.match(/\w+/) 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /test/faker/creature/test_faker_animal.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerCreatureAnimal < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Creature::Animal 8 | end 9 | 10 | def test_name 11 | assert @tester.name.match(/\w+/) 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /test/faker/creature/test_faker_cat.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerCat < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Creature::Cat 8 | end 9 | 10 | def test_name 11 | assert @tester.name.match(/\w+\.?/) 12 | end 13 | 14 | def test_breed 15 | assert @tester.breed.match(/\w+\.?/) 16 | end 17 | 18 | def test_registry 19 | assert @tester.registry.match(/\w+\.?/) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /test/faker/creature/test_faker_dog.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerDog < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Creature::Dog 8 | end 9 | 10 | def test_name 11 | assert @tester.name.match(/\w+\.?/) 12 | end 13 | 14 | def test_breed 15 | assert @tester.breed.match(/\w+\.?/) 16 | end 17 | 18 | def test_sound 19 | assert @tester.sound.match(/\w+\.?/) 20 | end 21 | 22 | def test_meme_phrase 23 | assert @tester.meme_phrase.match(/\w+\.?/) 24 | end 25 | 26 | def test_age 27 | assert @tester.age.match(/\w+\.?/) 28 | end 29 | 30 | def test_gender 31 | assert @tester.gender.match(/\w+\.?/) 32 | end 33 | 34 | def test_coat_length 35 | assert @tester.coat_length.match(/\w+\.?/) 36 | end 37 | 38 | def test_size 39 | assert @tester.size.match(/\w+\.?/) 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /test/faker/creature/test_faker_horse.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerHorse < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Creature::Horse 8 | end 9 | 10 | def test_name 11 | assert @tester.name.match(/\w+\.?/) 12 | end 13 | 14 | def test_breed 15 | assert @tester.breed.match(/\w+\.?/) 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_ancient.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerAncient < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Ancient 8 | end 9 | 10 | def test_god 11 | assert @tester.god.match(/\w+/) 12 | end 13 | 14 | def test_primordial 15 | assert @tester.primordial.match(/\w+/) 16 | end 17 | 18 | def test_titan 19 | assert @tester.titan.match(/\w+/) 20 | end 21 | 22 | def test_hero 23 | assert @tester.hero.match(/\w+/) 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_appliance.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerAppliance < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Appliance 8 | end 9 | 10 | def test_brand 11 | assert @tester.brand.match(/\w/) 12 | end 13 | 14 | def test_equipment 15 | assert @tester.equipment.match(/\w/) 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_artist.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerArtist < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Artist 8 | end 9 | 10 | def test_name 11 | assert @tester.name.match(/\w+/) 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_boolean.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | require 'minitest/mock' 5 | 6 | class TestFakerBoolean < Test::Unit::TestCase 7 | def setup 8 | @tester = Faker::Boolean 9 | end 10 | 11 | def test_boolean 12 | assert [true, false].include?(@tester.boolean) 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_bossa_nova.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerBossaNova < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::BossaNova 8 | end 9 | 10 | def test_artists 11 | assert @tester.artist.match(/\w+/) 12 | end 13 | 14 | def test_songs 15 | assert @tester.song.match(/\w+/) 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_char.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerChar < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Char 8 | end 9 | 10 | def test_fix_umlauts 11 | assert @tester.fix_umlauts('ä') == 'ae' 12 | assert @tester.fix_umlauts('ö') == 'oe' 13 | assert @tester.fix_umlauts('ü') == 'ue' 14 | assert @tester.fix_umlauts('ß') == 'ss' 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_chile_rut.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestChileRut < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::ChileRut 8 | end 9 | 10 | def test_full_rut 11 | assert @tester.full_rut(min_rut: 6, fixed: true) == '6-k' 12 | assert @tester.full_rut(min_rut: 30_686_957, fixed: true) == '30686957-4' 13 | end 14 | 15 | def test_rut_length 16 | assert !@tester.rut.to_s.empty? 17 | assert @tester.rut.to_s.length <= 8 18 | end 19 | 20 | # We need to set specific rut before testing the check digit 21 | # since the whole idea of the method revolves around calculating 22 | # the check digit for that specific rut. 23 | def test_check_digit 24 | assert @tester.rut(min_rut: 30_686_957, fixed: true) == 30_686_957 25 | assert @tester.dv == '4' 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_chuck_norris.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerChuckNorris < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::ChuckNorris 8 | end 9 | 10 | def test_fact 11 | assert @tester.fact.match(/.*chuck.*/i) 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_coin.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerCoin < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Coin 8 | end 9 | 10 | def test_name 11 | assert @tester.name.match(/\w+/) 12 | end 13 | 14 | def test_flip 15 | assert @tester.flip.match(/\w+/) 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_crypto.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerCrypto < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Crypto 8 | end 9 | 10 | def test_md5 11 | assert @tester.md5.match(/\A[a-z0-9]{32}\z/) 12 | end 13 | 14 | def test_sha1 15 | assert @tester.sha1.match(/\A[a-z0-9]{40}\z/) 16 | end 17 | 18 | def test_sha256 19 | assert @tester.sha256.match(/\A[a-z0-9]{64}\z/) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_currency.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerCurrency < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Currency 8 | end 9 | 10 | def test_name 11 | assert @tester.name.match(/[\w\' ]+/) 12 | end 13 | 14 | def test_code 15 | assert @tester.code.match(/[A-Z]{3}/) 16 | end 17 | 18 | def test_symbol 19 | assert_instance_of String, @tester.symbol 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_dc_comics.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerDcComics < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::DcComics 8 | end 9 | 10 | def test_hero 11 | assert @tester.hero.match(/\w+/) 12 | end 13 | 14 | def test_heroine 15 | assert @tester.heroine.match(/\w+/) 16 | end 17 | 18 | def test_villain 19 | assert @tester.villain.match(/\w+/) 20 | end 21 | 22 | def test_name 23 | assert @tester.name.match(/\w+/) 24 | end 25 | 26 | def test_title 27 | assert @tester.title.match(/(\w+\.? ?){2,3}/) 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_demographic.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerDemographic < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Demographic 8 | end 9 | 10 | def test_race 11 | assert @tester.race.match(/\w+/) 12 | end 13 | 14 | def test_educational_attainment 15 | assert @tester.educational_attainment.match(/\w+/) 16 | end 17 | 18 | def test_marital_status 19 | assert @tester.marital_status.match(/\w+/) 20 | end 21 | 22 | def test_demonym 23 | assert @tester.demonym.match(/\w+/) 24 | end 25 | 26 | def test_sex 27 | assert %w[Male Female].include?(@tester.sex) 28 | end 29 | 30 | def test_height_imperial 31 | assert @tester.height(unit: :imperial).match(/\w+/) 32 | end 33 | 34 | def test_height_metric 35 | assert @tester.height.match(/\w+/) 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_dessert.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerDessert < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Dessert 8 | end 9 | 10 | def test_variety 11 | assert @tester.variety.match(/\w+/) 12 | end 13 | 14 | def test_topping 15 | assert @tester.topping.match(/\w+/) 16 | end 17 | 18 | def test_flavor 19 | assert @tester.flavor.match(/\w+/) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_device.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerDevice < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Device 8 | end 9 | 10 | def test_model_name 11 | assert @tester.model_name.match(/\w+/) 12 | end 13 | 14 | def test_platform 15 | assert @tester.platform.match(/\w+/) 16 | end 17 | 18 | def test_version 19 | assert @tester.version.positive? 20 | assert @tester.version <= 1000 21 | end 22 | 23 | def test_build_number 24 | assert @tester.build_number.positive? 25 | assert @tester.build_number <= 500 26 | end 27 | 28 | def test_manufacturer 29 | assert @tester.manufacturer.match(/\w+/) 30 | end 31 | 32 | def test_serial 33 | assert @tester.serial.match(/\w+/) 34 | end 35 | end 36 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_educator.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerEducator < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Educator 8 | end 9 | 10 | def test_university 11 | assert @tester.university.match(/(\w+\.? ?){2,3}/) 12 | end 13 | 14 | def test_degree 15 | assert @tester.degree.match(/(\w+\.? ?\(?\)?){3,6}/) 16 | end 17 | 18 | def test_subject 19 | assert @tester.subject.match(/(\w+\.? ?\(?\)?){1,3}/) 20 | end 21 | 22 | def test_course_name 23 | assert @tester.course_name.match(/(\w+\.? ?\(?\)?){1,3} \d{3}/) 24 | end 25 | 26 | def test_secondary_school 27 | assert @tester.secondary_school.match(/(\w+\.? ?){2,3}/) 28 | end 29 | 30 | def test_campus 31 | assert @tester.campus.match(/(\w+\.? ?){1,2}/) 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_elder_scrolls.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerElderScrolls < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Games::ElderScrolls 8 | end 9 | 10 | def test_race 11 | assert @tester.race.match(/\w+/) 12 | end 13 | 14 | def test_region 15 | assert @tester.region.match(/\w+/) 16 | end 17 | 18 | def test_city 19 | assert @tester.city.match(/\w+/) 20 | end 21 | 22 | def test_dragon 23 | assert @tester.dragon.match(/\w+/) 24 | end 25 | 26 | def test_creature 27 | assert @tester.creature.match(/\w+/) 28 | end 29 | 30 | def test_name 31 | assert @tester.name.match(/\w+/) 32 | end 33 | 34 | def test_first_name 35 | assert @tester.first_name.match(/\w+/) 36 | end 37 | 38 | def test_last_name 39 | assert @tester.last_name.match(/\w+/) 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_electrical_components.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerElectricalComponents < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::ElectricalComponents 8 | end 9 | 10 | def test_active 11 | assert @tester.active.match(/\w+/) 12 | end 13 | 14 | def test_passive 15 | assert @tester.passive.match(/\w+/) 16 | end 17 | 18 | def test_electromechanical 19 | assert @tester.electromechanical.match(/\w+/) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_esport.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerEsport < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Esport 8 | end 9 | 10 | def test_team 11 | assert @tester.team.match(/\w+/) 12 | end 13 | 14 | def test_league 15 | assert @tester.league.match(/\w+/) 16 | end 17 | 18 | def test_game 19 | assert @tester.game.match(/\w+/) 20 | end 21 | 22 | def test_player 23 | assert @tester.player.match(/\w+/) 24 | end 25 | 26 | def test_event 27 | assert @tester.event.match(/\w+/) 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_fallout.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerFallout < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Games::Fallout 8 | end 9 | 10 | def test_hero 11 | assert @tester.character.match(/\w+/) 12 | end 13 | 14 | def test_faction 15 | assert @tester.faction.match(/\w+/) 16 | end 17 | 18 | def test_location 19 | assert @tester.location.match(/\w+/) 20 | end 21 | 22 | def test_quote 23 | assert @tester.quote.match(/\w+/) 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_finance.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerFinance < Test::Unit::TestCase 6 | def setup 7 | Faker::Config.locale = nil 8 | end 9 | 10 | def test_vat_number 11 | assert Faker::Finance.vat_number.match(/\w+/) 12 | end 13 | 14 | def test_vat_number_with_invalid_params 15 | assert_raise ArgumentError do 16 | Faker::Finance.vat_number(country: Faker::Lorem.word) 17 | end 18 | end 19 | 20 | def test_vat_number_with_valid_params 21 | Faker::Finance.vat_number_keys.each do |country| 22 | assert Faker::Finance.vat_number(country: country).match(/\w+/) 23 | end 24 | end 25 | 26 | def test_south_african_vat_number 27 | assert_match(/\AZA\d{10,11}\z/, Faker::Finance.vat_number(country: 'ZA')) 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_funny_name.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerFunnyName < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::FunnyName 8 | end 9 | 10 | def test_name 11 | res = @tester.name 12 | assert res.is_a?(String) && !res.empty? 13 | end 14 | 15 | def test_two_word_name 16 | res = @tester.two_word_name 17 | assert res.count(' ') == 1 18 | end 19 | 20 | def test_three_word_name 21 | res = @tester.three_word_name 22 | assert res.count(' ') == 2 23 | end 24 | 25 | def test_four_word_name 26 | res = @tester.four_word_name 27 | assert res.count(' ') == 3 28 | end 29 | 30 | def test_name_with_initial 31 | res = @tester.name_with_initial 32 | assert res.count('.').positive? 33 | end 34 | end 35 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_games_heroes_of_the_storm.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerGamesHeroesOfTheStorm < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Games::HeroesOfTheStorm 8 | end 9 | 10 | def test_battleground 11 | assert @tester.battleground.match(/\w+/) 12 | end 13 | 14 | def test_class 15 | assert @tester.class.match(/\w+/) 16 | end 17 | 18 | def test_hero 19 | assert @tester.hero.match(/\w+/) 20 | end 21 | 22 | def test_quote 23 | assert @tester.quote.match(/\w+/) 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_gender.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerGender < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Gender 8 | end 9 | 10 | def test_type 11 | assert @tester.type.match(/\w+/) 12 | end 13 | 14 | def test_binary_type 15 | assert @tester.binary_type.match(/\w+/) 16 | end 17 | 18 | def test_short_binary_type 19 | assert @tester.short_binary_type.match(/f|m/) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_greek_philosophers.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerGreekPhilosophers < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::GreekPhilosophers 8 | end 9 | 10 | def test_name 11 | assert @tester.name.match(/\w+/) 12 | end 13 | 14 | def test_quote 15 | assert @tester.quote.match(/\w+/) 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_hacker_talk.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerHacker < Test::Unit::TestCase 6 | def setup 7 | @hacker = Faker::Hacker 8 | @phrases = @hacker.phrases 9 | end 10 | 11 | def test_phrases 12 | assert @phrases.size == 8 13 | @phrases.each do |phrase| 14 | refute phrase.to_s.empty? 15 | end 16 | end 17 | 18 | def test_noun 19 | assert @hacker.noun.match(/\w+/) 20 | end 21 | 22 | def test_abbreviation 23 | assert @hacker.abbreviation.match(/\w+/) 24 | end 25 | 26 | def test_adjective 27 | assert @hacker.adjective.match(/\w+/) 28 | end 29 | 30 | def test_verb 31 | assert @hacker.verb.match(/\w+/) 32 | end 33 | 34 | def test_ingverb 35 | assert @hacker.ingverb.match(/\w+/) 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_heroes.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerHeroes < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Games::Heroes 8 | end 9 | 10 | def test_name 11 | assert @tester.name.match(/\w+/) 12 | end 13 | 14 | def test_specialty 15 | assert @tester.specialty.match(/\w+/) 16 | end 17 | 18 | def test_klass 19 | assert @tester.klass.match(/\w+/) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_house.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerHouse < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::House 8 | end 9 | 10 | def test_furniture 11 | assert @tester.furniture.match(/\w+/) 12 | end 13 | 14 | def test_room 15 | assert @tester.room.match(/\w+/) 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_industry_segments.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerIndustrySegments < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::IndustrySegments 8 | end 9 | 10 | def test_industry 11 | assert @tester.industry.match(/(\w+\.? ?){2,3}/) 12 | end 13 | 14 | def test_super_sector 15 | assert @tester.super_sector.match(/(\w+\.? ?){2,3}/) 16 | end 17 | 18 | def test_sector 19 | assert @tester.sector.match(/(\w+\.? ?){2,3}/) 20 | end 21 | 22 | def test_sub_sector 23 | assert @tester.sub_sector.match(/(\w+\.? ?){2,3}/) 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_job.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerJob < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Job 8 | end 9 | 10 | def test_title 11 | assert @tester.title.match(/(\w+\.? ?){2,3}/) 12 | end 13 | 14 | def test_field 15 | assert @tester.field.match(/(\w+\.? ?)/) 16 | end 17 | 18 | def test_key_skill 19 | assert @tester.key_skill.match(/(\w+\.? ?)/) 20 | end 21 | 22 | def test_position 23 | assert @tester.position.match(/(\w+\.? ?)/) 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_job_locale.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerJobLocale < Test::Unit::TestCase 6 | def setup 7 | Faker::Config.locale = 'en-AU' 8 | @tester = Faker::Job 9 | end 10 | 11 | def teardown 12 | Faker::Config.locale = nil 13 | end 14 | 15 | def test_locale_without_jobs_defaults_to_en 16 | assert @tester.position.match(/(\w+\.? ?)/) 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_kpop.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerKpop < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Kpop 8 | end 9 | 10 | def test_i_groups 11 | assert @tester.i_groups.match(/\w+/) 12 | end 13 | 14 | def test_ii_groups 15 | assert @tester.ii_groups.match(/\w+/) 16 | end 17 | 18 | def test_iii_groups 19 | assert @tester.iii_groups.match(/\w+/) 20 | end 21 | 22 | def test_girl_groups 23 | assert @tester.girl_groups.match(/\w+/) 24 | end 25 | 26 | def test_boy_bands 27 | assert @tester.boy_bands.match(/\w+/) 28 | end 29 | 30 | def test_solo 31 | assert @tester.solo.match(/\w+/) 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_league_of_legends.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerLeagueOfLegends < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Games::LeagueOfLegends 8 | end 9 | 10 | def test_champions 11 | assert_match(/\w+/, @tester.champion) 12 | end 13 | 14 | def test_location 15 | assert_match(/\w+/, @tester.location) 16 | end 17 | 18 | def test_quote 19 | assert_match(/\w+/, @tester.quote) 20 | end 21 | 22 | def test_summoner_spell 23 | assert_match(/\w+/, @tester.summoner_spell) 24 | end 25 | 26 | def test_masteries 27 | assert_match(/\w+/, @tester.masteries) 28 | end 29 | 30 | def test_rank 31 | assert_match(/\w+/, @tester.rank) 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_marketing.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerMarketing < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Marketing 8 | end 9 | 10 | def test_buzzwords 11 | assert @tester.buzzwords.match(/\w+/) 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_military.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerMilitary < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Military 8 | end 9 | 10 | def test_army_rank 11 | assert @tester.army_rank.match(/\w/) 12 | end 13 | 14 | def test_marines_rank 15 | assert @tester.marines_rank.match(/\w/) 16 | end 17 | 18 | def test_navy_rank 19 | assert @tester.navy_rank.match(/\w/) 20 | end 21 | 22 | def test_air_force_rank 23 | assert @tester.air_force_rank.match(/\w/) 24 | end 25 | 26 | def test_dod_paygrade 27 | assert @tester.dod_paygrade.match(/\w/) 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_movie.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerMovie < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Movie 8 | end 9 | 10 | def test_quote 11 | assert @tester.quote.match(/\w+/) 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_myst.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerMyst < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Games::Myst 8 | end 9 | 10 | def test_game 11 | assert @tester.game.match(/\w+/) 12 | end 13 | 14 | def test_creature 15 | assert @tester.creature.match(/\w+/) 16 | end 17 | 18 | def test_age 19 | assert @tester.age.match(/\w+/) 20 | end 21 | 22 | def test_character 23 | assert @tester.character.match(/\w+/) 24 | end 25 | 26 | def test_quote 27 | assert @tester.quote.match(/\w+/) 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_nation.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerNation < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Nation 8 | end 9 | 10 | def test_flag 11 | assert @tester.flag.match(/\p{M}*+/) 12 | end 13 | 14 | def test_nationality 15 | assert @tester.nationality.match(/(\w+\.? ?){2,3}/) 16 | end 17 | 18 | def test_language 19 | assert @tester.language.match(/[A-Z][a-z]+\.?/) 20 | end 21 | 22 | def test_capital_city 23 | assert @tester.capital_city.match(/(\w+\.? ?){2,3}/) 24 | end 25 | 26 | def test_national_sport 27 | assert @tester.national_sport.match(/(\w+\.? ?){2,3}/) 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_national_health_service.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerNationalHealthService < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::NationalHealthService 8 | end 9 | 10 | def test_nhs_british_number 11 | assert_match(/\A\d{3}\s\d{3}\s\d{4}\z/, @tester.british_number) 12 | end 13 | 14 | def test_nhs_check_digit_equals_10 15 | Faker::NationalHealthService.stub(:rand, 458_617_434) do 16 | assert_match('458 617 4331', @tester.british_number) 17 | end 18 | end 19 | 20 | def test_nhs_check_digit 21 | assert_equal 6, @tester.check_digit(number: 400_012_114) 22 | end 23 | 24 | def test_nhs_check_digit_11 25 | assert_equal 0, @tester.check_digit(number: 418_513_625) 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_overwatch.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerOverwatch < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Games::Overwatch 8 | end 9 | 10 | def test_hero 11 | assert @tester.hero.match(/\w+/) 12 | end 13 | 14 | def test_location 15 | assert @tester.location.match(/\w+/) 16 | end 17 | 18 | def test_quote 19 | assert @tester.quote.match(/\w+/) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_phone_number.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerPhone < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::PhoneNumber 8 | @phone_with_country_code_regex = /\A\+(\s|\d|\-|\(|\)|x|\.)*\z/ 9 | end 10 | 11 | def test_country_code 12 | assert @tester.country_code.match(/\A\+[\d|-]+\z/) 13 | end 14 | 15 | def test_phone_number_with_country_code 16 | assert @tester.phone_number_with_country_code.match(@phone_with_country_code_regex) 17 | end 18 | 19 | def test_cell_phone_with_country_code 20 | assert @tester.cell_phone_with_country_code.match(@phone_with_country_code_regex) 21 | end 22 | 23 | def test_cell_phone_in_e164 24 | assert @tester.cell_phone_in_e164.match(@phone_with_country_code_regex) 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_pokemon.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerPokemon < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Games::Pokemon 8 | end 9 | 10 | def test_name 11 | assert @tester.name.match(/\w+/) 12 | end 13 | 14 | def test_location 15 | assert @tester.location.match(/\w+/) 16 | end 17 | 18 | def test_move 19 | assert @tester.move.match(/\w+/) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_programming_language.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerProgrammingLanguage < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::ProgrammingLanguage 8 | end 9 | 10 | def test_name 11 | assert @tester.name.match(/\w/) 12 | end 13 | 14 | def test_creator 15 | assert @tester.creator.match(/\w/) 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_restaurant.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerRestaurant < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Restaurant 8 | end 9 | 10 | def test_name 11 | assert @tester.name.is_a?(String) 12 | end 13 | 14 | def test_type 15 | assert @tester.type.is_a?(String) 16 | end 17 | 18 | def test_description 19 | assert @tester.description.is_a?(String) 20 | end 21 | 22 | def test_review 23 | assert @tester.review.is_a?(String) 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_science.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerScience < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Science 8 | end 9 | 10 | def test_element 11 | assert @tester.element.match(/\w+/) 12 | end 13 | 14 | def test_element_symbol 15 | assert @tester.element.match(/\w{1,2}/) 16 | end 17 | 18 | def test_scientist 19 | assert @tester.scientist.match(/\w+/) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_sonic_the_hedgehog.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerGamesSonicTheHedgehog < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Games::SonicTheHedgehog 8 | end 9 | 10 | def test_character 11 | assert @tester.character.match(/\w+/) 12 | end 13 | 14 | def test_zone 15 | assert @tester.zone.match(/\w+/) 16 | end 17 | 18 | def test_game 19 | assert @tester.game.match(/\w+/) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_subscription.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerSubscription < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Subscription 8 | end 9 | 10 | def test_plan 11 | assert @tester.plan.match(/\w+/) 12 | end 13 | 14 | def test_status 15 | assert @tester.status.match(/\w+/) 16 | end 17 | 18 | def test_payment_method 19 | assert @tester.payment_method.match(/\w+/) 20 | end 21 | 22 | def test_subscription_term 23 | assert @tester.subscription_term.match(/\w+/) 24 | end 25 | 26 | def test_payment_term 27 | assert @tester.payment_term.match(/\w+/) 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_super_smash_bros.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerGamesSuperSmashBros < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Games::SuperSmashBros 8 | end 9 | 10 | def test_fighter 11 | assert @tester.fighter.match(/\w+/) 12 | end 13 | 14 | def test_stage 15 | assert @tester.stage.match(/\w+/) 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_superhero.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerSuperhero < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Superhero 8 | end 9 | 10 | def test_power 11 | assert @tester.power.match(/\w+\.?/) 12 | end 13 | 14 | def test_name 15 | assert @tester.name.match(/\w+\.?/) 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_team.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerTeam < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Team 8 | end 9 | 10 | def test_name 11 | assert @tester.name.match(/(\w+\.? ?){2}/) 12 | end 13 | 14 | def test_creature 15 | assert @tester.creature.match(/(\w+){1}/) 16 | end 17 | 18 | def test_state 19 | assert @tester.state.match(/(\w+){1}/) 20 | end 21 | 22 | def test_sport 23 | assert @tester.sport.match(/(\w+){1}/) 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_verb.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerVerb < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Verb 8 | end 9 | 10 | def test_base 11 | assert @tester.base.match(/\w+/) 12 | end 13 | 14 | def test_past 15 | assert @tester.past.match(/\w+/) 16 | end 17 | 18 | def test_past_participle 19 | assert @tester.past_participle.match(/\w+/) 20 | end 21 | 22 | def test_simple_present 23 | assert @tester.simple_present.match(/\w+/) 24 | end 25 | 26 | def test_ing_form 27 | assert @tester.ing_form.match(/\w+/) 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_witcher.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerWitcher < Test::Unit::TestCase 6 | def setup 7 | @witcher = Faker::Games::Witcher 8 | end 9 | 10 | def test_character 11 | assert @witcher.character.match(/\w+/) 12 | end 13 | 14 | def test_location 15 | assert @witcher.location.match(/\w+/) 16 | end 17 | 18 | def test_school 19 | assert @witcher.school.match(/\w+/) 20 | end 21 | 22 | def test_witcher 23 | assert @witcher.witcher.match(/\w+/) 24 | end 25 | 26 | def test_monster 27 | assert @witcher.monster.match(/\w+/) 28 | end 29 | 30 | def test_quote 31 | assert @witcher.quote.match(/\w+/) 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_world_cup.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerWorldCup < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::WorldCup 8 | end 9 | 10 | def test_team 11 | assert @tester.team.match(/\w+/) 12 | end 13 | 14 | def test_stadium 15 | assert @tester.stadium.match(/\w+/) 16 | end 17 | 18 | def test_city 19 | assert @tester.city.match(/\w+/) 20 | end 21 | 22 | def test_group 23 | assert @tester.group.match(/\w+/) 24 | end 25 | 26 | def test_roster 27 | assert @tester.roster.match(/\w+/) 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /test/faker/default/test_faker_zelda.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerZelda < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Games::Zelda 8 | end 9 | 10 | def test_game 11 | assert @tester.game.match(/\w+\.?/) 12 | end 13 | 14 | def test_character 15 | assert @tester.character.match(/\w+\.?/) 16 | end 17 | 18 | def test_location 19 | assert @tester.location.match(/\w+\.?/) 20 | end 21 | 22 | def test_item 23 | assert @tester.item.match(/\w+\.?/) 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /test/faker/default/test_half_life.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerGamesHalfLife < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Games::HalfLife 8 | end 9 | 10 | def test_character 11 | assert @tester.character.match(/\w+/) 12 | end 13 | 14 | def test_enemy 15 | assert @tester.enemy.match(/\w+/) 16 | end 17 | 18 | def test_location 19 | assert @tester.location.match(/\w+/) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /test/faker/default/test_michael_scott.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZeddBox/faker_fr/21b9945f46cd768cd38470d8f4a43d48a558f236/test/faker/default/test_michael_scott.rb -------------------------------------------------------------------------------- /test/faker/default/test_nato_phonetic_alphabet.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerNatoPhoneticAlphabet < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::NatoPhoneticAlphabet 8 | end 9 | 10 | def test_code_word 11 | assert @tester.code_word.match(/\w+/) 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /test/faker/default/test_world_of_warcraft.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestWorldOfWarcraft < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Games::WorldOfWarcraft 8 | end 9 | 10 | def test_heroes 11 | assert @tester.hero.match(/\w+/) 12 | end 13 | 14 | def test_quotes 15 | assert @tester.quote.match(/\w+/) 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /test/faker/games/test_game.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerGame < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Game 8 | end 9 | 10 | def test_title 11 | assert @tester.title.match(/\w+/) 12 | end 13 | 14 | def test_genre 15 | assert @tester.genre.match(/\w+/) 16 | end 17 | 18 | def test_platform 19 | assert @tester.platform.match(/\w+/) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /test/faker/japanese_media/test_faker_dragon_ball.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerJapaneseMediaDragonBall < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::JapaneseMedia::DragonBall 8 | end 9 | 10 | def test_character 11 | assert @tester.character.match(/\w+/) 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /test/faker/japanese_media/test_faker_one_piece.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerJapaneseOnePiece < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::JapaneseMedia::OnePiece 8 | end 9 | 10 | def test_character 11 | assert @tester.character.match(/\w+/) 12 | end 13 | 14 | def test_sea 15 | assert @tester.sea.match(/\w+/) 16 | end 17 | 18 | def test_island 19 | assert @tester.island.match(/\w+/) 20 | end 21 | 22 | def test_location 23 | assert @tester.location.match(/\w+/) 24 | end 25 | 26 | def test_quote 27 | assert @tester.quote.match(/\w+/) 28 | end 29 | 30 | def test_akuma_no_mi 31 | assert @tester.akuma_no_mi.match(/\w+/) 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /test/faker/japanese_media/test_faker_sword_art_online.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerJapaneseSwordArtOnline < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::JapaneseMedia::SwordArtOnline 8 | end 9 | 10 | def test_real_name 11 | assert @tester.real_name.match(/\w+\.?/) 12 | end 13 | 14 | def test_game_name 15 | assert @tester.game_name.match(/\w+\.?/) 16 | end 17 | 18 | def test_location 19 | assert @tester.location.match(/\w+\.?/) 20 | end 21 | 22 | def test_item 23 | assert @tester.item.match(/\w+\.?/) 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /test/faker/movies/test_faker_back_to_the_future.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerBackToTheFuture < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Movies::BackToTheFuture 8 | end 9 | 10 | def test_character 11 | assert @tester.character.match(/\w+/) 12 | end 13 | 14 | def test_date 15 | assert @tester.date.match(/\w+/) 16 | end 17 | 18 | def test_quote 19 | assert @tester.quote.match(/\w+/) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /test/faker/movies/test_faker_harry_potter.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerHarryPotter < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Movies::HarryPotter 8 | end 9 | 10 | def test_character 11 | assert @tester.character.match(/\w+/) 12 | end 13 | 14 | def test_location 15 | assert @tester.location.match(/\w+/) 16 | end 17 | 18 | def test_quote 19 | assert @tester.quote.match(/\w+/) 20 | end 21 | 22 | def test_book 23 | assert @tester.book.match(/\w+/) 24 | end 25 | 26 | def test_house 27 | assert @tester.house.match(/\w+/) 28 | end 29 | 30 | def test_spell 31 | assert @tester.spell.match(/\w+/) 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /test/faker/movies/test_faker_hitchhikers_guide_to_the_galaxy.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerHitchhikersGuideToTheGalaxy < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Movies::HitchhikersGuideToTheGalaxy 8 | end 9 | 10 | def test_character 11 | assert @tester.character.match(/\w+/) 12 | end 13 | 14 | def test_location 15 | assert @tester.location.match(/\w+/) 16 | end 17 | 18 | def test_marvin_quote 19 | assert @tester.marvin_quote.match(/\w+/) 20 | end 21 | 22 | def test_planet 23 | assert @tester.planet.match(/\w+/) 24 | end 25 | 26 | def test_quote 27 | assert @tester.quote.match(/\w+/) 28 | end 29 | 30 | def test_specie 31 | assert @tester.specie.match(/\w+/) 32 | end 33 | 34 | def test_starship 35 | assert @tester.starship.match(/\w+/) 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /test/faker/movies/test_faker_hobbit.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerMoviesHobbit < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Movies::Hobbit 8 | end 9 | 10 | def test_character 11 | assert @tester.character.match(/\w+/) 12 | end 13 | 14 | def test_quote 15 | assert @tester.quote.match(/\w+/) 16 | end 17 | 18 | def test_location 19 | assert @tester.location.match(/\w+/) 20 | end 21 | 22 | def test_thorins_company 23 | assert @tester.thorins_company.match(/\w+/) 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /test/faker/movies/test_faker_lebowski.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerLebowski < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Movies::Lebowski 8 | end 9 | 10 | def test_actor 11 | assert @tester.actor.match(/\w+/) 12 | end 13 | 14 | def test_character 15 | assert @tester.character.match(/\w+/) 16 | end 17 | 18 | def test_quote 19 | assert @tester.quote.match(/\w+/) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /test/faker/movies/test_faker_lord_of_the_rings.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerLordOfTheRings < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Movies::LordOfTheRings 8 | end 9 | 10 | def test_character 11 | assert @tester.character.match(/\w+/) 12 | end 13 | 14 | def test_location 15 | assert @tester.location.match(/\w+/) 16 | end 17 | 18 | def test_quote 19 | assert @tester.quote.match(/\w+/) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /test/faker/movies/test_faker_movies_ghostbusters.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerMoviesGhostbusters < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Movies::Ghostbusters 8 | end 9 | 10 | def test_actor 11 | assert @tester.actor.match(/\w+/) 12 | end 13 | 14 | def test_character 15 | assert @tester.character.match(/\w+/) 16 | end 17 | 18 | def test_quote 19 | assert @tester.quote.match(/\w+/) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /test/faker/movies/test_faker_princess_bride.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerPrincessBride < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Movies::PrincessBride 8 | end 9 | 10 | def test_character 11 | assert @tester.character.match(/\w+/) 12 | end 13 | 14 | def test_quote 15 | assert @tester.quote.match(/\w+/) 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /test/faker/movies/test_faker_v_for_vendetta.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerVForVendetta < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Movies::VForVendetta 8 | end 9 | 10 | def test_character 11 | assert @tester.character.match(/\w+/) 12 | end 13 | 14 | def test_speech 15 | assert @tester.speech.match(/\w+/) 16 | end 17 | 18 | def test_quote 19 | assert @tester.quote.match(/\w+/) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /test/faker/music/test_faker_grateful_dead.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerGratefulDead < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Music::GratefulDead 8 | end 9 | 10 | def test_player 11 | assert @tester.player.match(/\w/) 12 | end 13 | 14 | def test_song 15 | assert @tester.song.match(/\w/) 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /test/faker/music/test_faker_opera.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerOpera < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Music::Opera 8 | end 9 | 10 | def verdi 11 | assert @tester.verdi.match(/\w+/i) 12 | end 13 | 14 | def rossini 15 | assert @tester.rossini.match(/\w+/i) 16 | end 17 | 18 | def donizetti 19 | assert @tester.donizetti.match(/\w+/i) 20 | end 21 | 22 | def bellini 23 | assert @tester.bellini.match(/\w+/i) 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /test/faker/music/test_faker_phish.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerPhish < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Music::Phish 8 | end 9 | 10 | def test_song 11 | assert @tester.song.match(/\w+/) 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /test/faker/music/test_faker_rock_band.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerRockBand < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Music::RockBand 8 | end 9 | 10 | def test_name 11 | assert @tester.name.match(/\w+/) 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /test/faker/music/test_faker_umphreys_mcgee.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerUmphreysMcgee < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Music::UmphreysMcgee 8 | end 9 | 10 | def test_song 11 | assert @tester.song.match(/\w+/) 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /test/faker/quotes/test_faker_chiquito.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerChiquito < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Quotes::Chiquito 8 | end 9 | 10 | def test_expression 11 | assert @tester.expression.match(/\w+/) 12 | end 13 | 14 | def test_term 15 | assert @tester.term.match(/\w+/) 16 | end 17 | 18 | def test_joke 19 | assert @tester.joke.match(/\w+/) 20 | end 21 | 22 | def test_sentence 23 | assert @tester.sentence.match(/\w+/) 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /test/faker/quotes/test_faker_quote.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerYoda < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Quote 8 | end 9 | 10 | def test_famous_last_words 11 | assert @tester.famous_last_words.match(/\w+/) 12 | end 13 | 14 | def test_matz 15 | assert @tester.matz.match(/\w+/) 16 | end 17 | 18 | def test_most_interesting_man_in_the_world 19 | assert @tester.most_interesting_man_in_the_world.match(/\w+/) 20 | end 21 | 22 | def test_robin 23 | assert @tester.robin.match(/\w+/) 24 | end 25 | 26 | def test_singular_siegler 27 | assert @tester.singular_siegler.match(/\w+/) 28 | end 29 | 30 | def test_yoda 31 | assert @tester.yoda.match(/\w+/) 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /test/faker/quotes/test_faker_shakespeare.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerShakespeare < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Quotes::Shakespeare 8 | end 9 | 10 | def test_as_you_like_it_quote 11 | assert @tester.as_you_like_it_quote.match(/\w+/) 12 | end 13 | 14 | def test_king_richard_iii_quote 15 | assert @tester.king_richard_iii_quote.match(/\w+/) 16 | end 17 | 18 | def test_romeo_and_juliet_quote 19 | assert @tester.romeo_and_juliet_quote.match(/\w+/) 20 | end 21 | 22 | def test_hamlet_quote 23 | assert @tester.hamlet_quote.match(/\w+/) 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /test/faker/sports/test_faker_basketball.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerBasketball < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Sports::Basketball 8 | end 9 | 10 | def test_team 11 | assert @tester.team.match(/\w+/) 12 | end 13 | 14 | def test_player 15 | assert @tester.player.match(/\w+/) 16 | end 17 | 18 | def test_coach 19 | assert @tester.coach.match(/\w+/) 20 | end 21 | 22 | def test_position 23 | assert @tester.position.match(/\w+/) 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /test/faker/sports/test_faker_football.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerFootball < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::Sports::Football 8 | end 9 | 10 | def test_team 11 | assert @tester.team.match(/\w+/) 12 | end 13 | 14 | def test_player 15 | assert @tester.player.match(/\w+/) 16 | end 17 | 18 | def test_coach 19 | assert @tester.coach.match(/\w+/) 20 | end 21 | 22 | def test_competition 23 | assert @tester.competition.match(/\w+/) 24 | end 25 | 26 | def test_position 27 | assert @tester.position.match(/\w+/) 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /test/faker/tv_shows/test_aqua_teen_hunger_force.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerTvShowsAquaTeenHungerForce < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::TvShows::AquaTeenHungerForce 8 | end 9 | 10 | def test_character 11 | assert @tester.character.match(/\w/) 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /test/faker/tv_shows/test_bojack_horseman.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerTvShowsBojackHorseman < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::TvShows::BojackHorseman 8 | end 9 | 10 | def test_character 11 | assert @tester.character.match(/\w+/) 12 | end 13 | 14 | def test_tongue_twister 15 | assert @tester.tongue_twister.match(/\w+/) 16 | end 17 | 18 | def test_quote 19 | assert @tester.quote.match(/\w+/) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /test/faker/tv_shows/test_breaking_bad.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerTvShowsBreakingBad < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::TvShows::BreakingBad 8 | end 9 | 10 | def test_character 11 | 10.times { assert @tester.character.match(/[\w]+/) } 12 | end 13 | 14 | def test_episode 15 | 10.times { assert @tester.episode.match(/[\w]+/) } 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /test/faker/tv_shows/test_buffy.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerTvShowsBuffy < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::TvShows::Buffy 8 | end 9 | 10 | def test_character 11 | assert @tester.character.match(/\w+/) 12 | end 13 | 14 | def test_quote 15 | assert @tester.quote.match(/\w+/) 16 | end 17 | 18 | def test_celebrity 19 | assert @tester.celebrity.match(/\w+/) 20 | end 21 | 22 | def test_big_bad 23 | assert @tester.big_bad.match(/\w+/) 24 | end 25 | 26 | def test_episode 27 | assert @tester.episode.match(/\w+/) 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /test/faker/tv_shows/test_community.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerTvShowsCommunity < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::TvShows::Community 8 | end 9 | 10 | def test_character 11 | assert @tester.characters.match(/\w/) 12 | end 13 | 14 | def test_quote 15 | assert @tester.quotes.match(/\w/) 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /test/faker/tv_shows/test_dumb_and_dumber.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerTvShowsDumbAndDumber < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::TvShows::DumbAndDumber 8 | end 9 | 10 | def test_actor 11 | assert @tester.actor.match(/\w+/) 12 | end 13 | 14 | def test_character 15 | assert @tester.character.match(/\w+/) 16 | end 17 | 18 | def test_quote 19 | assert @tester.quote.match(/\w+/) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /test/faker/tv_shows/test_faker_kaamelott.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestKaamelott < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::TvShow::Kaamelott 8 | end 9 | 10 | def test_quote 11 | assert @tester.quote.match(/\w+/) 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /test/faker/tv_shows/test_family_guy.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerTvShowsFamilyGuy < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::TvShows::FamilyGuy 8 | end 9 | 10 | def test_character 11 | assert @tester.character.match(/\w/) 12 | end 13 | 14 | def test_location 15 | assert @tester.location.match(/\w/) 16 | end 17 | 18 | def test_quote 19 | assert @tester.quote.match(/\w/) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /test/faker/tv_shows/test_friends.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerTvShowsFriends < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::TvShows::Friends 8 | end 9 | 10 | def test_character 11 | assert @tester.character.match(/\w+/) 12 | end 13 | 14 | def test_location 15 | assert @tester.location.match(/\w+/) 16 | end 17 | 18 | def test_quote 19 | assert @tester.quote.match(/\w+/) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /test/faker/tv_shows/test_game_of_thrones.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerTvShowsGameOfThrones < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::TvShows::GameOfThrones 8 | end 9 | 10 | def test_character 11 | assert @tester.character.match(/\w+/) 12 | end 13 | 14 | def test_house 15 | assert @tester.house.match(/\w+/) 16 | end 17 | 18 | def test_city 19 | assert @tester.city.match(/\w+/) 20 | end 21 | 22 | def test_quote 23 | assert @tester.quote.match(/\w+/) 24 | end 25 | 26 | def test_dragon 27 | assert @tester.dragon.match(/\w+/) 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /test/faker/tv_shows/test_hey_arnold.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerTvShowsHeyArnold < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::TvShows::HeyArnold 8 | end 9 | 10 | def test_character 11 | assert @tester.character.match(/\w+/) 12 | end 13 | 14 | def test_location 15 | assert @tester.location.match(/\w+/) 16 | end 17 | 18 | def test_quote 19 | assert @tester.quote.match(/\w+/) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /test/faker/tv_shows/test_how_i_met_your_mother.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerTvShowsHowIMetYourMother < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::TvShows::HowIMetYourMother 8 | end 9 | 10 | def test_character 11 | assert @tester.character.match(/\w+/) 12 | end 13 | 14 | def test_catch_phrase 15 | assert @tester.catch_phrase.match(/\w+/) 16 | end 17 | 18 | def test_high_five 19 | assert @tester.high_five.match(/\w+/) 20 | end 21 | 22 | def test_quote 23 | assert @tester.quote.match(/\w+/) 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /test/faker/tv_shows/test_michael_scott.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerMichaelScott < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::TvShows::MichaelScott 8 | end 9 | 10 | def test_quote 11 | assert @tester.quote.match(/\w+/) 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /test/faker/tv_shows/test_new_girl.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerTvShowsNewGirl < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::TvShows::NewGirl 8 | end 9 | 10 | def test_character 11 | assert @tester.character.match(/\w+/) 12 | end 13 | 14 | def test_quote 15 | assert @tester.quote.match(/\w+/) 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /test/faker/tv_shows/test_parks_and_rec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerTvShowsParksAndRec < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::TvShows::ParksAndRec 8 | end 9 | 10 | def test_character 11 | assert @tester.character.match(/\w+/) 12 | end 13 | 14 | def test_city 15 | assert @tester.city.match(/\w+/) 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /test/faker/tv_shows/test_rick_and_morty.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerTvShowsRickAndMorty < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::TvShows::RickAndMorty 8 | end 9 | 10 | def test_character 11 | assert @tester.character.match(/\w+/) 12 | end 13 | 14 | def test_location 15 | assert @tester.location.match(/\w+/) 16 | end 17 | 18 | def test_quote 19 | assert @tester.quote.match(/\w+/) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /test/faker/tv_shows/test_ru_paul.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerRuPaul < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::TvShows::RuPaul 8 | end 9 | 10 | def test_quote 11 | assert @tester.quote.match(/\w+/i) 12 | end 13 | 14 | def test_queen 15 | assert @tester.queen.match(/\w+/i) 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /test/faker/tv_shows/test_seinfeld.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerTvShowsSeinfeld < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::TvShows::Seinfeld 8 | end 9 | 10 | def test_character 11 | assert @tester.character.match(/\w+/) 12 | end 13 | 14 | def test_quote 15 | assert @tester.quote.match(/\w+/) 16 | end 17 | 18 | def test_business 19 | assert @tester.quote.match(/\w+/) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /test/faker/tv_shows/test_silicon_valley.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerTvShowsSiliconValley < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::TvShows::SiliconValley 8 | end 9 | 10 | def test_characters 11 | assert @tester.character.match(/\w+/) 12 | end 13 | 14 | def test_companies 15 | assert @tester.company.match(/\w+/) 16 | end 17 | 18 | def test_quotes 19 | assert @tester.quote.match(/\w+/) 20 | end 21 | 22 | def test_apps 23 | assert @tester.app.match(/\w+/) 24 | end 25 | 26 | def test_inventions 27 | assert @tester.invention.match(/\w+/) 28 | end 29 | 30 | def test_mottos 31 | assert @tester.motto.match(/\w+/) 32 | end 33 | 34 | def test_urls 35 | assert @tester.url.match(/\w+/) 36 | end 37 | 38 | def test_email 39 | assert @tester.email.match(/\w+/) 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /test/faker/tv_shows/test_simpsons.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerTvShowsSimpsons < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::TvShows::Simpsons 8 | Faker::Config.locale = nil 9 | end 10 | 11 | def test_characters 12 | 10.times { assert @tester.character.match(/[\w]+/) } 13 | end 14 | 15 | def test_locations 16 | 10.times { assert @tester.location.match(/[\w]+/) } 17 | end 18 | 19 | def test_quote 20 | 10.times { assert @tester.quote.match(/[\w]+/) } 21 | end 22 | 23 | def test_locales 24 | [nil, 'en', 'de'].each do |_locale_name| 25 | Faker::Config.locale = 'de' 26 | assert @tester.character.is_a? String 27 | assert @tester.location .is_a? String 28 | assert @tester.quote .is_a? String 29 | end 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /test/faker/tv_shows/test_south_park.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerTvShowsSouthPark < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::TvShows::SouthPark 8 | end 9 | 10 | def test_character 11 | assert @tester.character.match(/\w+/) 12 | end 13 | 14 | def test_quote 15 | assert @tester.quote.match(/\w+/) 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /test/faker/tv_shows/test_star_trek.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerTvShowsStarTrek < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::TvShows::StarTrek 8 | end 9 | 10 | def test_characters 11 | assert @tester.character.match(/\w+/) 12 | end 13 | 14 | def test_locations 15 | assert @tester.location.match(/\w+/) 16 | end 17 | 18 | def test_species 19 | assert @tester.specie.match(/\w+/) 20 | end 21 | 22 | def test_villains 23 | assert @tester.villain.match(/\w+/) 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /test/faker/tv_shows/test_stargate.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerTvShowsStargate < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::TvShows::Stargate 8 | end 9 | 10 | def test_character 11 | assert @tester.character.match(/\w+/) 12 | end 13 | 14 | def test_planet 15 | assert @tester.planet.match(/\w+/) 16 | end 17 | 18 | def test_quote 19 | assert @tester.quote.match(/\w+/) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /test/faker/tv_shows/test_stranger_things.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerTvShowsThings < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::TvShows::StrangerThings 8 | end 9 | 10 | def test_characters 11 | assert @tester.character.match(/\w+/) 12 | end 13 | 14 | def test_quotes 15 | assert @tester.quote.match(/\w+/) 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /test/faker/tv_shows/test_the_expanse.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerTvShowsTheExpanse < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::TvShows::TheExpanse 8 | end 9 | 10 | def test_character 11 | assert @tester.character.match(/\w+/) 12 | end 13 | 14 | def test_location 15 | assert @tester.location.match(/\w+/) 16 | end 17 | 18 | def test_quote 19 | assert @tester.quote.match(/\w+/) 20 | end 21 | 22 | def test_ship 23 | assert @tester.ship.match(/\w+/) 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /test/faker/tv_shows/test_the_fresh_prince_of_bel_air.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerTvShowsTheFreshPrinceOfBelAir < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::TvShows::TheFreshPrinceOfBelAir 8 | end 9 | 10 | def test_character 11 | assert @tester.character.match(/\w+/) 12 | end 13 | 14 | def test_celebrity 15 | assert @tester.celebrity.match(/\w+/) 16 | end 17 | 18 | def test_quote 19 | assert @tester.quote.match(/\w+/) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /test/faker/tv_shows/test_the_it_crowd.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerTvShowsTheItCrowd < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::TvShows::TheITCrowd 8 | end 9 | 10 | def test_actors 11 | assert @tester.actor.match(/\w+/) 12 | end 13 | 14 | def test_characters 15 | assert @tester.character.match(/\w+/) 16 | end 17 | 18 | def test_emails 19 | assert @tester.email.match(/\w+/) 20 | end 21 | 22 | def test_quotes 23 | assert @tester.quote.match(/\w+/) 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /test/faker/tv_shows/test_the_thick_of_it.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerTvShowsTheThickOfIt < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::TvShows::TheThickOfIt 8 | end 9 | 10 | def test_character 11 | assert @tester.character.match(/\w+/) 12 | end 13 | 14 | def test_department 15 | assert @tester.department.match(/\w+/) 16 | end 17 | 18 | def test_position 19 | assert @tester.position.match(/\w+/) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /test/faker/tv_shows/test_twin_peaks.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerTvShowsTwinPeaks < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::TvShows::TwinPeaks 8 | end 9 | 10 | def test_character 11 | assert @tester.character.match(/\w+/) 12 | end 13 | 14 | def test_location 15 | assert @tester.location.match(/\w+/) 16 | end 17 | 18 | def test_quote 19 | assert @tester.quote.match(/\w+/) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /test/faker/tv_shows/test_venture_bros.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative '../../test_helper' 4 | 5 | class TestFakerTvShowsVentureBros < Test::Unit::TestCase 6 | def setup 7 | @tester = Faker::TvShows::VentureBros 8 | end 9 | 10 | def test_character 11 | assert @tester.character.match(/\w+/) 12 | end 13 | 14 | def test_vehicle 15 | assert @tester.vehicle.match(/\w+/) 16 | end 17 | 18 | def test_organization 19 | assert @tester.organization.match(/\w+/) 20 | end 21 | 22 | def test_quote 23 | assert @tester.quote.match(/\w+/) 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /test/support/assert_not_english.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | def assert_not_english(word) 4 | assert_not_match(/[a-zA-Z]/, word) 5 | end 6 | -------------------------------------------------------------------------------- /test/test_ca_locale.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative 'test_helper' 4 | 5 | class TestCaLocale < Test::Unit::TestCase 6 | def setup 7 | Faker::Config.locale = 'ca' 8 | end 9 | 10 | def teardown 11 | Faker::Config.locale = nil 12 | end 13 | 14 | def test_ca_color_methods 15 | assert Faker::Color.color_name.is_a? String 16 | end 17 | 18 | def test_ca_name_methods 19 | assert Faker::Name.female_first_name.is_a? String 20 | assert Faker::Name.female_prefix.is_a? String 21 | assert Faker::Name.male_first_name.is_a? String 22 | assert Faker::Name.male_prefix.is_a? String 23 | assert Faker::Name.last_name.is_a? String 24 | assert Faker::Name.first_name.is_a? String 25 | assert Faker::Name.name.is_a? String 26 | assert Faker::Name.name_with_middle.is_a? String 27 | end 28 | end 29 | -------------------------------------------------------------------------------- /test/test_de_ch_locale.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative 'test_helper' 4 | 5 | class TestDeChLocale < Test::Unit::TestCase 6 | def setup 7 | Faker::Config.locale = 'de-CH' 8 | end 9 | 10 | def teardown 11 | Faker::Config.locale = nil 12 | end 13 | 14 | def test_de_ch_address_methods 15 | assert Faker::Address.country_code.is_a? String 16 | assert Faker::Address.default_country.is_a? String 17 | assert Faker::Address.postcode.is_a? String 18 | assert_equal('Schweiz', Faker::Address.default_country) 19 | end 20 | 21 | def test_de_ch_company_methods 22 | assert Faker::Company.suffix.is_a? String 23 | assert Faker::Company.name.is_a? String 24 | end 25 | 26 | def test_de_ch_internet_methods 27 | assert Faker::Internet.domain_suffix.is_a? String 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /test/test_en_th_locale.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative 'test_helper' 4 | 5 | class TestEnThLocale < Test::Unit::TestCase 6 | def setup 7 | Faker::Config.locale = 'en-TH' 8 | end 9 | 10 | def teardown 11 | Faker::Config.locale = nil 12 | end 13 | 14 | def test_en_th_name_methods 15 | assert Faker::Name.first_name.is_a? String 16 | assert Faker::Name.last_name.is_a? String 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /test/test_fa_locale.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative 'test_helper' 4 | 5 | class TestFaLocale < Test::Unit::TestCase 6 | def setup 7 | Faker::Config.locale = 'fa' 8 | end 9 | 10 | def teardown 11 | Faker::Config.locale = nil 12 | end 13 | 14 | def test_fa_methods 15 | assert Faker::Name.first_name.is_a? String 16 | assert Faker::Name.last_name.is_a? String 17 | assert Faker::Name.prefix.is_a? String 18 | assert Faker::Name.name_with_middle.is_a? String 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /test/test_seeding.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative 'test_helper' 4 | 5 | class TestSeeding < Test::Unit::TestCase 6 | def setup; end 7 | 8 | def test_deterministic 9 | Faker::Config.random = Random.new(5) 10 | first_random = Faker::Number.number(digits: 100_000) 11 | Faker::Config.random = Random.new(5) 12 | second_random = Faker::Number.number(digits: 100_000) 13 | Faker::Config.random = Random.new 14 | Faker::Config.random = nil 15 | third_random = Faker::Number.number(digits: 100_000) 16 | 17 | assert first_random == second_random 18 | # Tiny chance this will fail randomly if the unseeded Random just so 19 | # happen generates the same number as Random.new(5) 20 | assert first_random != third_random 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /test/test_th_locale.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative 'test_helper' 4 | 5 | class TestThLocale < Test::Unit::TestCase 6 | def setup 7 | Faker::Config.locale = 'th' 8 | end 9 | 10 | def teardown 11 | Faker::Config.locale = nil 12 | end 13 | 14 | def test_th_name_methods 15 | assert Faker::Name.first_name.is_a? String 16 | assert Faker::Name.last_name.is_a? String 17 | end 18 | end 19 | --------------------------------------------------------------------------------