Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Faker::Internet.domain, Faker::Internet.email to support the user controlling the TLD #1838

Closed
olleolleolle opened this issue Nov 19, 2019 · 1 comment

Comments

@olleolleolle
Copy link
Contributor

olleolleolle commented Nov 19, 2019

Problem: The user assuming that domain: keyword argument accepts domains including TLDs

Current: Here's a usage which I think has a confusing outcome:

Faker::Internet.email(domain: "wilkinson.net")
# => "[email protected]"

Expected 1: Given no TLD in the domain argument, one is provided:

Faker::Internet.email(domain: "wilkinson")
# => "[email protected]"

Expected 2: Given a TLD in the domain argument, that one is used:

Faker::Internet.email(domain: "wilkinson.net")
# => "[email protected]"

Describe alternatives you've considered

Alternatives:

  • a new tld: keyword, to say what the tld (or, domain suffix) should be
@olleolleolle olleolleolle changed the title Faker::Internet.domain, Faker::Internet.email Faker::Internet.domain, Faker::Internet.email to support the user controlling the TLD Nov 19, 2019
@vbrazo vbrazo closed this as completed Nov 19, 2019
@olleolleolle
Copy link
Contributor Author

Oh, I meant to say "this is the behaviour that I expect", and that the now-documented one is confusing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants