email_inquire 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +16 -10
- data/data/common_providers.txt +43 -0
- data/data/one_time_email_providers.txt +1376 -0
- data/data/uk_tld.txt +15 -0
- data/data/unique_domain_providers.txt +5 -0
- data/lib/email_inquire/inquirer.rb +18 -73
- data/lib/email_inquire/version.rb +1 -1
- metadata +5 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 054c0718956f4988d89e7334f330bcb9c8b40daa
|
4
|
+
data.tar.gz: 371dc37d1317eb263dd215bbed23f522dcb60b5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f0f4313682a4cf9e742c17e2da191156d15f9b855c6eab44312c980fcd9dd64a25580a993b9701fb0da8c3211dfe27c9fca66d1ddad85c6ef4abde30a298701
|
7
|
+
data.tar.gz: 1a3b8191e89fda41a981f1f4f5670831f282599b4257b6aa90d1b82a133e12534d1bcf0fad7b01842fefd9401e8f14e65159a146800249328c11dfb2bfa550a8
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/email_inquire.svg)](https://badge.fury.io/rb/email_inquire) [![Build Status](https://travis-ci.org/maximeg/email_inquire.svg?branch=master)](https://travis-ci.org/maximeg/email_inquire)
|
4
4
|
|
5
|
-
EmailInquire is a library to validate email for common typos and one-time email
|
5
|
+
EmailInquire is a library to validate email for common typos and one-time email providers.
|
6
6
|
|
7
7
|
## Why?
|
8
8
|
|
@@ -18,23 +18,27 @@ Your users :
|
|
18
18
|
|
19
19
|
While we can't do so much for the name part of the email address, for the domain part, we can be smart!
|
20
20
|
|
21
|
+
And also, we don't want for users to use one-time email addresses (also called burner email addresses).
|
22
|
+
|
21
23
|
### Supported cases
|
22
24
|
|
23
|
-
One char typo for common email providers of France, United Kingdom and USA:
|
25
|
+
One char typo for 43 common email providers of France, United Kingdom and USA:
|
24
26
|
|
25
27
|
- `gmil.com` => hint `gmail.com`
|
26
28
|
- `hitmail.com` => hint `hotmail.com`
|
27
29
|
- `outloo.com` => hint `outlook.com`
|
28
30
|
- `virinmedia.com` => hint `virginmedia.com`
|
31
|
+
- ...
|
29
32
|
|
30
|
-
United Kingdom `.xx.uk
|
33
|
+
United Kingdom `.xx.uk` domains:
|
31
34
|
|
32
35
|
- `foo.couk` => hint `foo.co.uk`
|
33
36
|
- `fooco.uk` => hint `foo.co.uk`
|
34
37
|
- `foo.uk` => hint `foo.co.uk`
|
35
38
|
- `foo.judiciary.uk` => ok!
|
39
|
+
- ...
|
36
40
|
|
37
|
-
|
41
|
+
Providers with an unique domain:
|
38
42
|
|
39
43
|
- `gmail.fr` => hint `gmail.com`
|
40
44
|
- `gmail.de` => hint `gmail.com`
|
@@ -42,11 +46,12 @@ Provider with an unique TLD domain:
|
|
42
46
|
- `free.com` => hint `free.fr`
|
43
47
|
- `laposte.com` => hint `laposte.net`
|
44
48
|
- `laposte.fr` => hint `laposte.net`
|
49
|
+
- ...
|
45
50
|
|
46
|
-
|
51
|
+
1375 one-time email providers (a.k.a. burners, [source](https://github.com/wesbos/burner-email-providers)):
|
47
52
|
|
48
53
|
- `yopmail.com` => invalid
|
49
|
-
-
|
54
|
+
- ...
|
50
55
|
|
51
56
|
## Installation
|
52
57
|
|
@@ -77,7 +82,7 @@ Methods of `EmailInquire::Response`:
|
|
77
82
|
| `#status` | The status of the validation | `:valid` `:invalid` or `:hint` |
|
78
83
|
| `#valid?` | Is the email valid ? | `true` or `false` |
|
79
84
|
| `#invalid?` | Is the email invalid ? | `true` or `false` |
|
80
|
-
| `#hint?` | Is there a possible mistake and you have to show
|
85
|
+
| `#hint?` | Is there a possible mistake and you have to show a hint to the user ? | `true` or `false` |
|
81
86
|
| `#replacement` | A proposal replacement email address for when status is `:hint` | `"john.doe@gmail.com"` or nil |
|
82
87
|
|
83
88
|
### Examples
|
@@ -120,7 +125,8 @@ A _"Did you mean xxx@yyy.zzz ?"_ has the following advantages:
|
|
120
125
|
- user is educated;
|
121
126
|
- mini whaoo effect;
|
122
127
|
|
123
|
-
This _"Did you mean xxx@yyy.zzz ?"_ is better being actionable, and appearing to be so: a click or
|
128
|
+
This _"Did you mean xxx@yyy.zzz ?"_ is better being actionable, and appearing to be so: a click or
|
129
|
+
tap on it should replace the email by the suggestion.
|
124
130
|
|
125
131
|
```
|
126
132
|
+---------------------------------------+ +---------+
|
@@ -129,7 +135,7 @@ This _"Did you mean xxx@yyy.zzz ?"_ is better being actionable, and appearing to
|
|
129
135
|
Did you mean john.doe@yahoo.com ?
|
130
136
|
```
|
131
137
|
|
132
|
-
Note that you could even have this validation for your Sign In
|
138
|
+
Note that you could even have this validation for your Sign In form...
|
133
139
|
|
134
140
|
## Development
|
135
141
|
|
@@ -139,7 +145,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
139
145
|
|
140
146
|
## Contributing
|
141
147
|
|
142
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
148
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/maximeg/email_inquire.
|
143
149
|
|
144
150
|
|
145
151
|
## License
|
@@ -0,0 +1,43 @@
|
|
1
|
+
aim.com
|
2
|
+
aliceadsl.fr
|
3
|
+
aol.co.uk
|
4
|
+
aol.com
|
5
|
+
att.net
|
6
|
+
bbox.fr
|
7
|
+
bellsouth.net
|
8
|
+
blueyonder.co.uk
|
9
|
+
btinternet.com
|
10
|
+
charter.net
|
11
|
+
cox.net
|
12
|
+
free.fr
|
13
|
+
gmail.com
|
14
|
+
gmx.fr
|
15
|
+
googlemail.com
|
16
|
+
hotmail.co.uk
|
17
|
+
hotmail.com
|
18
|
+
hotmail.fr
|
19
|
+
icloud.com
|
20
|
+
laposte.net
|
21
|
+
live.co.uk
|
22
|
+
live.com
|
23
|
+
live.fr
|
24
|
+
me.com
|
25
|
+
msn.com
|
26
|
+
neuf.fr
|
27
|
+
ntlworld.com
|
28
|
+
numericable.fr
|
29
|
+
orange.fr
|
30
|
+
outlook.com
|
31
|
+
outlook.fr
|
32
|
+
rocketmail.com
|
33
|
+
sbcglobal.net
|
34
|
+
sfr.fr
|
35
|
+
sky.com
|
36
|
+
talktalk.net
|
37
|
+
verizon.net
|
38
|
+
virginmedia.com
|
39
|
+
wanadoo.fr
|
40
|
+
yahoo.co.uk
|
41
|
+
yahoo.com
|
42
|
+
yahoo.fr
|
43
|
+
ymail.com
|