Skip to content

Commit

Permalink
refactor: 💡 remove safe_email, free_email from internet.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hatsu38 committed Oct 17, 2023
1 parent a22651c commit 7bf4dd6
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions doc/default/internet.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
# Faker::Internet

### About faker-ruby transition to be RFC 2606 compliant

faker-ruby is transitioning to no longer generating real email and url addresses.

The migration plan is:
- First step:
- change `email` and `domain_name` to be RFC 2606 compliant. Both now generate safe values by default using the Reserved Top Level DNS Names: `example` and `test`. To maintain backwards compatibility and give users the option to use non-safe domains at their own risk, custom domains are allowed.
- add deprecation message for `free_email` and `safe_email` users to switch to `email` instead.
- Second step (after October 2023):
- remove deprecated generators and locales.

To give users time, once the first step is released, users will have until October 2023 to make the necessary changes.

```ruby
# Keyword arguments: name, username, email, password, domain_name, user_agent, uuid etc...
Faker::Internet.user #=> { username: 'alexie', email: 'trudie@grant.test' }
Expand All @@ -25,15 +12,6 @@ Faker::Internet.email(name: 'Janelle Santiago', separators: ['+']) #=> "janelle+
Faker::Internet.email(domain: 'gmail.com') #=> "foo@gmail.com"
Faker::Internet.email(name: 'sam smith', separators: ['-'], domain: 'test') #=> "sam-smith@test.test"

# Keyword arguments: name
Faker::Internet.free_email #=> "freddy@gmail.com"
Faker::Internet.free_email(name: 'Nancy') #=> "nancy@yahoo.com"

# Generates an RFC 2606 compliant fake email, which means it will never deliver successfully
# Keyword arguments: name
Faker::Internet.safe_email #=> "christelle@example.org"
Faker::Internet.safe_email(name: 'Nancy') #=> "nancy@example.net"

# Keyword arguments: specifier, separators
Faker::Internet.username #=> "alexie"
Faker::Internet.username(specifier: 'Nancy') #=> "nancy"
Expand Down

0 comments on commit 7bf4dd6

Please sign in to comment.