{"id":13400425,"url":"https://github.com/faker-ruby/faker","last_synced_at":"2026-03-05T01:04:25.480Z","repository":{"id":471410,"uuid":"96395","full_name":"faker-ruby/faker","owner":"faker-ruby","description":"A library for generating fake data such as names, addresses, and phone numbers.","archived":false,"fork":false,"pushed_at":"2025-05-04T18:54:44.000Z","size":13634,"stargazers_count":11356,"open_issues_count":16,"forks_count":3181,"subscribers_count":136,"default_branch":"main","last_synced_at":"2025-05-05T14:09:31.323Z","etag":null,"topics":["fake","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/faker-ruby.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"License.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2008-12-24T17:20:37.000Z","updated_at":"2025-05-05T11:30:48.000Z","dependencies_parsed_at":"2023-10-16T10:42:51.702Z","dependency_job_id":"fcaed411-741f-4ac7-80a8-7f7946b96637","html_url":"https://github.com/faker-ruby/faker","commit_stats":{"total_commits":2478,"total_committers":996,"mean_commits":"2.4879518072289155","dds":0.8979015334947539,"last_synced_commit":"789251c0d24833597e0aba0d8a7ba6776bad812e"},"previous_names":["stympy/faker"],"tags_count":89,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faker-ruby%2Ffaker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faker-ruby%2Ffaker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faker-ruby%2Ffaker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faker-ruby%2Ffaker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/faker-ruby","download_url":"https://codeload.github.com/faker-ruby/faker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252544793,"owners_count":21765436,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fake","ruby"],"created_at":"2024-07-30T19:00:51.896Z","updated_at":"2026-03-05T01:04:25.458Z","avatar_url":"https://github.com/faker-ruby.png","language":"Ruby","readme":"# Faker [![Gem Version][version-badge]][rubygems] [![Build Status][github-actions-badge]][github-actions] [![Total Downloads][downloads-total]][rubygems] [![Downloads][downloads-badge]][rubygems]\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/36028424/40263395-4318481e-5b44-11e8-92e5-3dcc1ce169b3.png\" width=\"400\"/\u003e\n  \u003cp\u003eGenerate (almost) realistic fake data for testing, demos, and populating your database during development.\u003c/p\u003e\n\u003c/div\u003e\n\n[version-badge]: https://img.shields.io/gem/v/faker.svg\n[rubygems]: https://rubygems.org/gems/faker\n[github-actions-badge]: https://img.shields.io/github/actions/workflow/status/faker-ruby/faker/.github/workflows/ruby.yml?branch=main\n[github-actions]: https://github.com/faker-ruby/faker/actions\n[downloads-total]: https://img.shields.io/gem/dt/faker.svg\n[downloads-badge]: https://img.shields.io/gem/dtv/faker.svg\n[downloads-badge]: https://img.shields.io/gem/dtv/faker.svg\n\n## Quick links\n\n- 📖 **[Read the documentation for the latest version][rubydocs].**\n- 📢 **[See what's changed in recent versions][changelog].**\n\n[rubydocs]: https://www.rubydoc.info/gems/faker/\n[changelog]: CHANGELOG.md\n\n## Features\n\n- Internet: Email addresses, Passwords, Domains, etc.\n- Date and Time: Travel back in time or to the future.\n- Person: Names, Genders, Bios, Job titles, and more.\n- Number and String: Random numbers and strings.\n- Location: Addresses, Zip Codes, Street Names, States, and Countries.\n- Finance: Account Details, Transactions, and Crypto Addresses.\n- Localization - Customize faker with over 40 locales to generate realistic-looking Names, Addresses, and Phone Numbers.\n\n\u003e **Note:** The generated names, addresses, emails, phone numbers, and/or other data might return valid information. Please be careful when using faker in your tests.\n\nFor a complete list of the generators, see [Generators](./GENERATORS.md).\n\n## Getting Started\n\nStart by including `faker` in your Gemfile:\n\n```ruby\ngem 'faker'\n```\n\nThen run `bundle install`.\n\n## Usage\n\n```ruby\nrequire 'faker'\n\nFaker::Name.name                      #=\u003e \"Christophe Bartell\"\nFaker::Internet.password              #=\u003e \"Vg5mSvY1UeRg7\"\nFaker::Internet.email                 #=\u003e \"eliza@mann.test\"\nFaker::Address.full_address           #=\u003e \"5479 William Way, East Sonnyhaven, LA 63637\"\nFaker::Markdown.emphasis              #=\u003e \"Quo qui aperiam. Amet corrupti distinctio. Sit quia *dolor.*\"\nFaker::Lorem.paragraph                #=\u003e \"Recusandae minima consequatur. Expedita sequi blanditiis. Ut fuga et.\"\nFaker::Alphanumeric.alpha(number: 10) #=\u003e \"zlvubkrwga\"\nFaker::ProgrammingLanguage.name       #=\u003e \"Ruby\"\n```\n\n## Table of Contents\n\n- [Faker    ](#faker----)\n  - [Quick links](#quick-links)\n  - [Features](#features)\n  - [Getting Started](#getting-started)\n  - [Usage](#usage)\n  - [Table of Contents](#table-of-contents)\n    - [Notes](#notes)\n    - [Ensuring unique values](#ensuring-unique-values)\n    - [Deterministic Random](#deterministic-random)\n    - [Localization](#localization)\n    - [Minitest and Faker \\\u003e= 2.22](#minitest-and-faker--222)\n  - [Generators](#generators)\n  - [Contributing](#contributing)\n  - [Versioning](#versioning)\n  - [Inspiration](#inspiration)\n  - [In the media](#in-the-media)\n  - [License](#license)\n\n### Notes\n\n* While Faker generates data at random, returned values are not guaranteed to be unique by default. To explicitly specify when you require unique values, see [Ensuring Unique Values](#ensuring-unique-values).\n* Values also can be deterministic if you use the deterministic feature, see [Deterministic Random](#deterministic-random).\n* This is the `main` branch of Faker and may contain changes that are not yet released. The list of all versions is [available here](https://github.com/stympy/faker/releases).\n\n### Ensuring unique values\n\nTo ensure Faker generates unique values, prefix your method call with `unique`:\n\n```ruby\nFaker::Name.unique.name # This will return a unique name every time it is called\n```\n\nIf too many unique values are requested from a generator that has a limited\nnumber of potential values, a `Faker::UniqueGenerator::RetryLimitExceeded`\nexception may be raised. It is possible to clear the record of unique values\nthat have been returned, for example between tests.\n\n```ruby\nFaker::Name.unique.clear     # Clears used values for Faker::Name\nFaker::UniqueGenerator.clear # Clears used values for all generators\n```\n\nYou can also give some already-used values to the unique generator if you have\ncollisions with the generated data (i.e., using FactoryBot with random and\nmanually set values).\n\n```ruby\n# Faker::\u003cgenerator\u003e.unique.exclude(method, arguments, list)\n\n# Add 'azerty' and 'wxcvbn' to the string generator with 6 char length\nFaker::Lorem.unique.exclude :string, [number: 6], %w[azerty wxcvbn]\n```\n\n### Deterministic Random\n\nFaker supports seeding of its pseudo-random number generator (PRNG)\nto provide deterministic output of repeated method calls.\n\n```ruby\nFaker::Config.random = Random.new(42)\nFaker::Lorem.word              #=\u003e \"velit\"\nFaker::Lorem.word              #=\u003e \"quisquam\"\n\nFaker::Config.random = Random.new(42)\nFaker::Lorem.word              #=\u003e \"velit\"\nFaker::Lorem.word              #=\u003e \"quisquam\"\n\nFaker::Config.random = nil     # seeds the PRNG using default entropy sources\nFaker::Config.random.seed      #=\u003e 185180369676275068918401850258677722187\nFaker::Lorem.word              #=\u003e \"ipsam\"\n```\n\n### Localization\n\nYou may want Faker to print information depending on your location in the world.\nTo assist you in this, Faker uses the `I18n` gem to store strings and formats to\nrepresent the names and postal codes of the area of your choosing.\n\nJust set the locale you want as shown below, and Faker will take care of the rest.\n\n```ruby\nFaker::Config.locale = 'es'\n# or\nFaker::Config.locale = :es\n```\n\nTo override Faker's locales, and set it on threaded server environments\ncheck out the [locales README](lib/locales/README.md).\n\n### Minitest and Faker \u003e= 2.22\n\nTo prevent Faker (version \u003e= 2.22) from [generating duplicate values](https://github.com/faker-ruby/faker/issues/2534) when using Minitest,\nyou might need to add the following to the `test_helper.rb` or `rails_helper.rb` file:\n\n```ruby\n  Faker::Config.random = Random.new\n```\n\n## Generators\n\nTo see the full list, check out the [GENERATORS](./GENERATORS.md) document.\n\n## Contributing\n\n**Note**: We are not accepting proposals for new generators and locales. The [Contributing](https://github.com/faker-ruby/faker/blob/main/CONTRIBUTING.md) guide has a few notes about this decision.\n\nTake a look at the [Contributing](https://github.com/faker-ruby/faker/blob/main/CONTRIBUTING.md) document for\ninstructions on setting up the repo on your machine, opening bug reports, understanding the codebase,\nand creating a good pull request.\n\nThere is a [Discord channel](https://discord.gg/RMumTwB) to discuss anything\nregarding improvements or feature requests. This is not actively monitored by the current maintainers.\n\nThank you, contributors!\n\n## Versioning\n\nFaker follows Semantic Versioning 2.0 as defined at https://semver.org.\n\n## Inspiration\n\nFaker was inspired by [Perl's Data::Faker library](https://metacpan.org/pod/Data::Faker).\n\n## In the media\n\n- 📰 [With Great Humor Comes Great Developer Engagement] - KTH Royal Institute of Technology research\n- 🎧 [Computer und Kommunikation 4.5.2024, komplette Sendung] - Deutschland Funk Radio Interview\n\n[With Great Humor Comes Great Developer Engagement]: https://arxiv.org/pdf/2312.01680\n[Computer und Kommunikation 4.5.2024, komplette Sendung]: https://www.deutschlandfunk.de/computer-und-kommunikation-4-5-2024-komplette-sendung-dlf-16492b03-100.html\n\n## License\n\nThis code is free to use under the terms of the MIT license.\n","funding_links":[],"categories":["Free and open source tools to get rid of your testing data woes","Ruby","Languages","Testing","Libraries"],"sub_categories":["Misc"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaker-ruby%2Ffaker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffaker-ruby%2Ffaker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaker-ruby%2Ffaker/lists"}