A summary of data about the Ruby ecosystem.

https://github.com/faker-ruby/faker

A library for generating fake data such as names, addresses, and phone numbers.
https://github.com/faker-ruby/faker

Keywords

fake ruby

Keywords from Contributors

activerecord mvc activejob rubocop static-code-analysis code-formatter rubygems rack rspec sidekiq

Last synced: about 18 hours ago
JSON representation

Repository metadata

A library for generating fake data such as names, addresses, and phone numbers.

README.md

Faker Gem Version Build Status Total Downloads Downloads

Quick links

Features

  • Internet: Email addresses, Passwords, Domains, etc.
  • Date and Time: Travel back in time or to the future.
  • Person: Names, Genders, Bios, Job titles, and more.
  • Number and String: Random numbers and strings.
  • Location: Addresses, Zip Codes, Street Names, States, and Countries.
  • Finance: Account Details, Transactions, and Crypto Addresses.
  • Localization - Customize faker with over 40 locales to generate realistic-looking Names, Addresses, and Phone Numbers.

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.

For a complete list of the generators, see Generators.

Getting Started

Start by including faker in your Gemfile:

gem 'faker'

Then run bundle install.

Usage

require 'faker'

Faker::Name.name                      #=> "Christophe Bartell"
Faker::Internet.password              #=> "Vg5mSvY1UeRg7"
Faker::Internet.email                 #=> "eliza@mann.test"
Faker::Address.full_address           #=> "5479 William Way, East Sonnyhaven, LA 63637"
Faker::Markdown.emphasis              #=> "Quo qui aperiam. Amet corrupti distinctio. Sit quia *dolor.*"
Faker::Lorem.paragraph                #=> "Recusandae minima consequatur. Expedita sequi blanditiis. Ut fuga et."
Faker::Alphanumeric.alpha(number: 10) #=> "zlvubkrwga"
Faker::ProgrammingLanguage.name       #=> "Ruby"

Table of Contents

Notes

  • 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.
  • Values also can be deterministic if you use the deterministic feature, see Deterministic Random.
  • This is the main branch of Faker and may contain changes that are not yet released. The list of all versions is available here.

Ensuring unique values

To ensure Faker generates unique values, prefix your method call with unique:

Faker::Name.unique.name # This will return a unique name every time it is called

If too many unique values are requested from a generator that has a limited
number of potential values, a Faker::UniqueGenerator::RetryLimitExceeded
exception may be raised. It is possible to clear the record of unique values
that have been returned, for example between tests.

Faker::Name.unique.clear     # Clears used values for Faker::Name
Faker::UniqueGenerator.clear # Clears used values for all generators

You can also give some already-used values to the unique generator if you have
collisions with the generated data (i.e., using FactoryBot with random and
manually set values).

# Faker::<generator>.unique.exclude(method, arguments, list)

# Add 'azerty' and 'wxcvbn' to the string generator with 6 char length
Faker::Lorem.unique.exclude :string, [number: 6], %w[azerty wxcvbn]

Deterministic Random

Faker supports seeding of its pseudo-random number generator (PRNG)
to provide deterministic output of repeated method calls.

Faker::Config.random = Random.new(42)
Faker::Lorem.word              #=> "velit"
Faker::Lorem.word              #=> "quisquam"

Faker::Config.random = Random.new(42)
Faker::Lorem.word              #=> "velit"
Faker::Lorem.word              #=> "quisquam"

Faker::Config.random = nil     # seeds the PRNG using default entropy sources
Faker::Config.random.seed      #=> 185180369676275068918401850258677722187
Faker::Lorem.word              #=> "ipsam"

Localization

You may want Faker to print information depending on your location in the world.
To assist you in this, Faker uses the I18n gem to store strings and formats to
represent the names and postal codes of the area of your choosing.

Just set the locale you want as shown below, and Faker will take care of the rest.

Faker::Config.locale = 'es'
# or
Faker::Config.locale = :es

To override Faker's locales, and set it on threaded server environments
check out the locales README.

Minitest and Faker >= 2.22

To prevent Faker (version >= 2.22) from generating duplicate values when using Minitest,
you might need to add the following to the test_helper.rb or rails_helper.rb file:

  Faker::Config.random = Random.new

Generators

To see the full list, check out the GENERATORS document.

Contributing

Note: We are not accepting proposals for new generators and locales. The Contributing guide has a few notes about this decision.

Take a look at the Contributing document for
instructions on setting up the repo on your machine, opening bug reports, understanding the codebase,
and creating a good pull request.

There is a Discord channel to discuss anything
regarding improvements or feature requests. This is not actively monitored by the current maintainers.

Thank you, contributors!

Versioning

Faker follows Semantic Versioning 2.0 as defined at https://semver.org.

Inspiration

Faker was inspired by Perl's Data::Faker library.

In the media

License

This code is free to use under the terms of the MIT license.


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: about 19 hours ago

Total Commits: 2,583
Total Committers: 1,042
Avg Commits per committer: 2.479
Development Distribution Score (DDS): 0.902

Commits in past year: 95
Committers in past year: 24
Avg Commits per committer in past year: 3.958
Development Distribution Score (DDS) in past year: 0.579

Name Email Commits
Vitor Oliveira v****o@g****m 253
Benjamin Curtis b****s@g****m 158
dependabot[bot] 4****]@u****m 142
dependabot-preview[bot] 2****]@u****m 67
Connor Shea c****a@g****m 52
Juha j****s@o****m 48
Stefanni Brasil s****l@g****m 46
Stefanni Brasil s****l@p****e 45
danielTiringer 5****r@u****m 30
Benjamin Curtis b****n@b****m 28
Koichi ITO k****o@g****m 25
Stephen A. Wilson s****6@h****m 24
Sibi s****i@p****n 20
Katrina Owen k****n@g****m 17
gkunwar g****9@g****m 16
Simon Fish si@m****h 13
salexzee s****b@c****m 13
Sudeep Tarlekar s****r@g****m 13
Thiago Araujo t****o@g****m 12
Yuko Miura 4****n@u****m 11
Thiago Araujo 7****o@u****m 11
Steven Atkinson m****k@g****m 11
Bryan Mytko b****o@g****m 11
danielTiringer t****l@g****m 10
Pascal Schumacher p****r@g****t 10
Geremia Taglialatela t****a@u****m 10
Akira Matsuda r****e@d****p 10
Tiago Farias a****m@g****m 9
Cathy Cramer c****r@r****m 9
Maxmiliano Franco Braga m****o@g****m 8
and 1012 more...

Committer domains:


Issue and Pull Request metadata

Last synced: about 22 hours ago

Total issues: 88
Total pull requests: 583
Average time to close issues: 7 months
Average time to close pull requests: 20 days
Total issue authors: 68
Total pull request authors: 136
Average comments per issue: 4.5
Average comments per pull request: 0.9
Merged pull request: 324
Bot issues: 1
Bot pull requests: 255

Past year issues: 21
Past year pull requests: 127
Past year average time to close issues: about 1 month
Past year average time to close pull requests: 15 days
Past year issue authors: 13
Past year pull request authors: 25
Past year average comments per issue: 1.38
Past year average comments per pull request: 0.61
Past year merged pull request: 48
Past year bot issues: 0
Past year bot pull requests: 66

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/faker-ruby/faker

Top Issue Authors

  • stefannibrasil (14)
  • thdaraujo (4)
  • ozydingo (2)
  • PhiliGor (2)
  • rocket-turtle (2)
  • alextaujenis (2)
  • danielnolan (1)
  • schwern (1)
  • Oli0li (1)
  • calvinballing (1)
  • elangovan-selvaraj (1)
  • sjjbirch (1)
  • nsilva-ta (1)
  • dependabot[bot] (1)
  • theycallmeswift (1)

Top Pull Request Authors

  • dependabot[bot] (255)
  • stefannibrasil (49)
  • thdaraujo (21)
  • keshavbiswa (11)
  • alextaujenis (11)
  • sudeeptarlekar (10)
  • wonderer007 (6)
  • connie-feng (5)
  • ruban-thilak (4)
  • fco-acuna (4)
  • matthewmayer (4)
  • garrettgregor (4)
  • capak07 (4)
  • francktrouillez (4)
  • lexisvar (4)

Top Issue Labels

  • 🐞 Issue: Bug (36)
  • 💡 Issue: Feature Request (13)
  • ⚒️ Improvement (7)
  • 🎒 Beginner Friendly (6)
  • 🏷️ Issue: Has Attached PR (4)
  • 💭 Discussion (3)
  • 🙏🏽 Issue: Needs More Information (2)
  • 🤔 Needs Decision (2)
  • 🙏🏽 Issue: PR Welcome (2)
  • Chores (2)
  • Deprecation (1)
  • rubyconf2023 (1)
  • 🤔 Issue: Needs to Investigate (1)
  • 🥐 Issue: Flaky Spec (1)
  • Won't Fix (1)
  • Breaking change (1)
  • dependencies (1)

Top Pull Request Labels

  • dependencies (255)
  • ruby (62)
  • 🙏🏽 PR: Needs Further Updates (20)
  • ⏲️ PR: In Queue for Review (15)
  • ⚒️ Improvement (9)
  • 🌐 Update Locales (9)
  • 🐞 PR: Bugfix (8)
  • ⭐ PR: Feature (8)
  • 🏃🏽 PR: In Progress (7)
  • rubyconf2023 (7)
  • Stale (4)
  • 🙏🏽 PR: Needs Documentation (4)
  • 🙏🏽 PR: Needs Tests (4)
  • ⌛ PR: Needs More Information (2)
  • 🤔 Needs Decision (2)
  • Deprecation (2)
  • github_actions (2)
  • 💭 Discussion (1)
  • 💡 Issue: Feature Request (1)

Package metadata

gem.coop: faker

Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc.

  • Homepage: https://github.com/faker-ruby/faker
  • Documentation: http://www.rubydoc.info/gems/faker/
  • Licenses: MIT
  • Latest release: 3.6.0 (published about 1 month ago)
  • Last Synced: 2026-03-02T13:02:50.361Z (about 22 hours ago)
  • Versions: 94
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 308,389,310 Total
  • Docker Downloads: 287,195,445
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 0.027%
    • Downloads: 0.08%
  • Maintainers (4)
rubygems.org: faker

Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc.

  • Homepage: https://github.com/faker-ruby/faker
  • Documentation: http://www.rubydoc.info/gems/faker/
  • Licenses: MIT
  • Latest release: 3.6.0 (published about 1 month ago)
  • Last Synced: 2026-03-02T00:31:30.731Z (1 day ago)
  • Versions: 94
  • Dependent Packages: 1,074
  • Dependent Repositories: 143,796
  • Downloads: 308,313,791 Total
  • Docker Downloads: 287,195,445
  • Rankings:
    • Dependent packages count: 0.046%
    • Downloads: 0.084%
    • Forks count: 0.098%
    • Dependent repos count: 0.105%
    • Stargazers count: 0.109%
    • Average: 0.157%
    • Docker downloads count: 0.502%
  • Maintainers (4)
proxy.golang.org: github.com/faker-ruby/faker

  • Homepage:
  • Documentation: https://pkg.go.dev/github.com/faker-ruby/faker#section-documentation
  • Licenses: mit
  • Latest release: v3.6.0+incompatible (published about 1 month ago)
  • Last Synced: 2026-02-19T08:52:39.549Z (12 days ago)
  • Versions: 87
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent packages count: 6.999%
    • Average: 8.173%
    • Dependent repos count: 9.346%
ubuntu-23.10: ruby-faker

  • Homepage: https://github.com/faker-ruby/faker
  • Licenses:
  • Latest release: 2.21.0-1 (published 18 days ago)
  • Last Synced: 2026-02-13T18:19:35.635Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-24.04: ruby-faker

  • Homepage: https://github.com/faker-ruby/faker
  • Licenses:
  • Latest release: 2.21.0-1 (published 25 days ago)
  • Last Synced: 2026-02-06T15:08:45.333Z (25 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
ubuntu-23.04: ruby-faker

  • Homepage: https://github.com/faker-ruby/faker
  • Licenses:
  • Latest release: 2.21.0-1 (published 20 days ago)
  • Last Synced: 2026-02-11T06:39:05.384Z (20 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-24.10: ruby-faker

  • Homepage: https://github.com/faker-ruby/faker
  • Licenses:
  • Latest release: 2.21.0-1 (published 22 days ago)
  • Last Synced: 2026-02-09T16:31:21.102Z (22 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
debian-12: ruby-faker

  • Homepage: https://github.com/faker-ruby/faker
  • Documentation: https://packages.debian.org/bookworm/ruby-faker
  • Licenses:
  • Latest release: 2.21.0-1 (published 18 days ago)
  • Last Synced: 2026-02-12T23:29:00.339Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-22.04: ruby-faker

  • Homepage: https://github.com/faker-ruby/faker
  • Licenses:
  • Latest release: 1.9.1-3 (published 18 days ago)
  • Last Synced: 2026-02-13T13:16:33.488Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%

Dependencies

.github/workflows/ruby.yml actions
  • actions/checkout v3 composite
  • ruby/setup-ruby v1 composite
.github/workflows/codeql.yml actions
  • actions/checkout v4 composite
  • github/codeql-action/analyze v2 composite
  • github/codeql-action/autobuild v2 composite
  • github/codeql-action/init v2 composite
Gemfile rubygems
  • benchmark >= 0
  • minitest = 5.26.1
  • pry = 0.15.2
  • rake = 13.3.1
  • rubocop = 1.81.7
  • rubocop-minitest = 0.38.2
  • rubocop-rake = 0.7.1
  • simplecov = 0.22.0
  • test-unit = 3.7.1
  • timecop = 0.9.10
  • yard = 0.9.37
faker.gemspec rubygems
  • i18n >= 1.8.11, < 2
Gemfile.lock rubygems
  • ast 2.4.3
  • benchmark 0.5.0
  • bundler 2.4.22
  • coderay 1.1.3
  • concurrent-ruby 1.3.5
  • docile 1.4.1
  • faker 3.5.3
  • i18n 1.14.7
  • json 2.16.0
  • language_server-protocol 3.17.0.5
  • lint_roller 1.1.0
  • method_source 1.1.0
  • minitest 5.26.1
  • parallel 1.27.0
  • parser 3.3.10.0
  • power_assert 3.0.1
  • prism 1.6.0
  • pry 0.15.2
  • racc 1.8.1
  • rainbow 3.1.1
  • rake 13.3.1
  • regexp_parser 2.11.3
  • rubocop 1.81.7
  • rubocop-ast 1.48.0
  • rubocop-minitest 0.38.2
  • rubocop-rake 0.7.1
  • ruby-progressbar 1.13.0
  • simplecov 0.22.0
  • simplecov-html 0.13.2
  • simplecov_json_formatter 0.1.4
  • test-unit 3.7.1
  • timecop 0.9.10
  • unicode-display_width 3.2.0
  • unicode-emoji 4.1.0
  • yard 0.9.37

Score: 37.20832893697207