Remove EmailValidator dependency #109
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are various email validators in other gems like https://github.com/afair/email_address and https://github.com/emailable/emailable-ruby. Since this gem pulls in https://github.com/K-and-R/email_validator, it can cause issues if you use the other gems.
There is really no reason for this dependency and conflict when a simple format validation should suffice.
I ran into this because we are adding https://github.com/omniauth/omniauth_openid_connect to implement OIDC support. I was getting these weird test failures and came to realize the problem was that omniauth_openid_connect pulls in this gem, which pulls in the email_validator gem. Since we use emailable-ruby, it was conflicting since they both use the
emailkey to define their validator.Also, if you're open to more dependency reduction, I debated making another PR to remove https://github.com/perfectline/validates_url. I find that less gem dependencies is a win for all usually. Less unintended issues and less to worry about updating.