-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #93 from maxmind/horgh/email-normalize
Add additional email normalization
- Loading branch information
Showing
3 changed files
with
259 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,33 @@ | ||
# Changelog | ||
|
||
## v2.5.0 | ||
|
||
* Equivalent domain names are now normalized when `hash_address` is used. | ||
For example, `googlemail.com` will become `gmail.com`. | ||
* Periods are now removed from `gmail.com` email address local parts when | ||
`hash_address` is used. For example, `[email protected]` will become | ||
`[email protected]`. | ||
* Fastmail alias subdomain email addresses are now normalized when | ||
`hash_address` is used. For example, `[email protected]` will | ||
become `[email protected]`. | ||
* Additional `yahoo.com` email addresses now have aliases removed from | ||
their local part when `hash_address` is used. For example, | ||
`[email protected]` will become `[email protected]` for additional | ||
`yahoo.com` domains. | ||
* Duplicate `.com`s are now removed from email domain names when | ||
`hash_address` is used. For example, `example.com.com` will become | ||
`example.com`. | ||
* Extraneous characters after `.com` are now removed from email domain | ||
names when `hash_address` is used. For example, `example.comfoo` will | ||
become `example.com`. | ||
* Certain `.com` typos are now normalized to `.com` when `hash_address` is | ||
used. For example, `example.cam` will become `example.com`. | ||
* Additional `gmail.com` domain names with leading digits are now | ||
normalized when `hash_address` is used. For example, `100gmail.com` will | ||
become `gmail.com`. | ||
* Additional `gmail.com` typos are now normalized when `hash_address` is | ||
used. For example, `gmali.com` will become `gmail.com`. | ||
|
||
## v2.4.0 (2024-01-12) | ||
|
||
* Ruby 2.7+ is now required. If you're using Ruby 2.5 or 2.6, please use | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,14 +63,22 @@ | |
{ input: ' [email protected]', output: '[email protected]' }, | ||
{ | ||
input: '[email protected]|abc124472372', | ||
output: '[email protected]|abc124472372', | ||
output: '[email protected]', | ||
}, | ||
{ input: '[email protected]', output: '[email protected]' }, | ||
{ input: '[email protected]', output: '[email protected]' }, | ||
{ input: '[email protected]', output: '[email protected]' }, | ||
{ input: '[email protected]', output: '[email protected]' }, | ||
{ input: '[email protected]', output: 'gamil.com@gmail.com' }, | ||
{ input: '[email protected]', output: 'gamilcom@gmail.com' }, | ||
{ input: 'Test+alias@bücher.com', output: '[email protected]' }, | ||
{ input: '[email protected]', output: '[email protected]' }, | ||
{ input: '[email protected]', output: '[email protected]' }, | ||
{ input: '[email protected]', output: '[email protected]' }, | ||
{ input: '[email protected]', output: '[email protected]' }, | ||
{ input: '[email protected]', output: '[email protected]' }, | ||
{ input: '[email protected]', output: '[email protected]' }, | ||
{ input: '[email protected]', output: '[email protected]' }, | ||
{ input: '[email protected]', output: '[email protected]' }, | ||
] | ||
|
||
tests.each do |i| | ||
|