| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
faker-ruby is transitioning to no longer generating potentially 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. Documentation and tests have been updated. - add deprecation message for `free_email` and `safe_email` to use `email` instead. Second step: - remove deprecated generators and locales. Co-authored-by: Thiago Araujo <thd.araujo@gmail.com>
| # Keyword arguments: safe ('example' and 'test' suffixes) | ||
| Faker::Internet.domain_suffix #=> "info" | ||
| Faker::Internet.domain_suffix(safe: true) #=> "example" |
There was a problem hiding this comment.
suggestion (minor): since we're making breaking changes here, it may be good to also rename this to #tld
Sorry, something went wrong.
There was a problem hiding this comment.
Could you clarify more why you think this is a breaking change? If the argument is not provided, the generator still works 🤔
I like the idea of using tld. Maybe we can introduce an alias in another PR? This one is already getting too big 😅
Sorry, something went wrong.
There was a problem hiding this comment.
let me know what you think and I will merge this once I hear back from you :) Thanks for the review @Zeragamba
Sorry, something went wrong.
There was a problem hiding this comment.
I was thinking about this PR being a breaking change or not. The way this PR handles the problem is by maintaining backwards compatibility for those who want to use unsafe domains. What is going to change is the behavior: the results will be safe by default. It doesn't seem like a breaking change to me. What am I missing?
Sorry, something went wrong.
There was a problem hiding this comment.
I agree with you, Stefanni.
Sorry, something went wrong.
There was a problem hiding this comment.
@vbrazo did you mean to approve this PR? Just checking because I see your comments but not an approval 🍡 Thank you!
Sorry, something went wrong.
| # frozen_string_literal: true | ||
|
|
||
| module Faker | ||
| # rubocop:disable Style/IfUnlessModifier |
There was a problem hiding this comment.
question: should this also be disabled in the project's rubocop?
Sorry, something went wrong.
There was a problem hiding this comment.
I don't mind disabling it for the project! I wasn't sure this was what we wanted so I only added it here.
I will push a commit once I figure out how to fix my ssh keys to be able to push again ><
Sorry, something went wrong.
There was a problem hiding this comment.
Changed it in 4a46759
Sorry, something went wrong.
| Faker::Internet.email(name: 'Nancy') #=> "nancy@terry.test" | ||
| Faker::Internet.email(name: 'Janelle Santiago', separators: ['+']) #=> "janelle+santiago@becker.example" | ||
| Faker::Internet.email(domain: 'gmail.com') #=> "foo@gmail.com" | ||
| Faker::Internet.email(name: 'sam smith', separators: ['-'], domain: 'test') #=> "sam-smith@test.test" |
There was a problem hiding this comment.
Thanks for adding more examples and completing the Internet doc.
Sorry, something went wrong.
There was a problem hiding this comment.
💯
Sorry, something went wrong.
Faker now does the right thing by default, awesome! faker-ruby/faker#2733
Prior to this commit, the following deprecation warning was appearing in the terminal: NOTE: Faker::Internet.safe_email is deprecated; use email instead. It will be removed on or after 2023-10. More here: faker-ruby/faker#2733
Prior to this commit, the following deprecation warning was appearing in the terminal: NOTE: Faker::Internet.safe_email is deprecated; use email instead. It will be removed on or after 2023-10. More here: faker-ruby/faker#2733
* build(deps-dev): Bump faker from 3.2.3 to 3.3.1 Bumps [faker](https://github.com/faker-ruby/faker) from 3.2.3 to 3.3.1. - [Release notes](https://github.com/faker-ruby/faker/releases) - [Changelog](https://github.com/faker-ruby/faker/blob/main/CHANGELOG.md) - [Commits](faker-ruby/faker@v3.2.3...v3.3.1) --- updated-dependencies: - dependency-name: faker dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * fix: Use `Faker::Internet.email` instead of `free_email` ## Related PR - faker-ruby/faker#2733 - faker-ruby/faker#2841 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Toshimaru <me@toshimaru.net>
| Back | FazBrowse Home | New Git URL |
Summary
Fixes #2431
faker-ruby is transitioning to no longer generating potentially real email and url addresses.
The migration plan is:
First step:
Second step (after October 2023):
To give users time, once the first step is released, users will have until October 2023 to make the necessary changes.
Other Information