fat_fingers 0.1.32 → 0.1.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/fat_fingers.rb +3 -3
- data/test/test_fat_fingers.rb +8 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: eb6f8a7cc2412733c32efd0e9f23c192bb1641fc
|
|
4
|
+
data.tar.gz: 2289eca30c478e4e617412e21ac7982c254147ad
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c4b4e398176bf666670e52236a8c40d47939348957b7b90c519dfaa6025500c2283c8cf0a6a961ef6be1f84e7718e9d60be2b30b7dddb31d2bb1502b681553c9
|
|
7
|
+
data.tar.gz: 3c5f94cabcc0f7e473d89dbfefc8d3047dff14806ea9bd7b14cd4b4944b48aabe9e35eafd3b62768af5b54c66da0298ffc30e9fade6802d3ee7c3b9f8868e5e7
|
data/lib/fat_fingers.rb
CHANGED
|
@@ -103,16 +103,16 @@ protected
|
|
|
103
103
|
gsub(/@co?(m|n)a?cas?t{0,2}\./,"@comcast.").
|
|
104
104
|
gsub(/@sbc?gl?ob[al]{0,2}l?\./, "@sbcglobal.").
|
|
105
105
|
gsub(/@ver?i?z?on\./,"@verizon.").
|
|
106
|
-
gsub(/@icl{0,2}
|
|
106
|
+
gsub(/@icl{0,2}o?u?d\./,"@icloud.").
|
|
107
107
|
gsub(/@outl?ook?\./,"@outlook.")
|
|
108
108
|
end
|
|
109
109
|
|
|
110
110
|
def clean_up_known_coms
|
|
111
|
-
gsub(/(aol
|
|
111
|
+
gsub(/(@aol|@googlemail|@gmail|@hotmail|@yahoo|@icloud|@outlook)\.(co|net|org)$/, '\1.com')
|
|
112
112
|
end
|
|
113
113
|
|
|
114
114
|
def add_a_period_if_they_forgot_it
|
|
115
115
|
gsub(/([^\.])(com|org|net)$/, '\1.\2')
|
|
116
116
|
end
|
|
117
117
|
|
|
118
|
-
end
|
|
118
|
+
end
|
data/test/test_fat_fingers.rb
CHANGED
|
@@ -147,7 +147,10 @@ class StringTest < MiniTest::Unit::TestCase
|
|
|
147
147
|
bad: [
|
|
148
148
|
"test@icoud.com",
|
|
149
149
|
"test@icloud.co",
|
|
150
|
-
"test@icloud.net"
|
|
150
|
+
"test@icloud.net",
|
|
151
|
+
"test@iclod.com",
|
|
152
|
+
"test@iclud.com",
|
|
153
|
+
"test@icld.com"
|
|
151
154
|
]
|
|
152
155
|
},
|
|
153
156
|
# outlook.com
|
|
@@ -287,7 +290,9 @@ class StringTest < MiniTest::Unit::TestCase
|
|
|
287
290
|
"test@ymail.com",
|
|
288
291
|
"test@army.mil",
|
|
289
292
|
"test@anything.comcast.com",
|
|
290
|
-
"test@anything.comcastbiz.net"
|
|
293
|
+
"test@anything.comcastbiz.net",
|
|
294
|
+
"test@dogmail.net",
|
|
295
|
+
"test@engaol.net"
|
|
291
296
|
]
|
|
292
297
|
|
|
293
298
|
|
|
@@ -322,4 +327,4 @@ class StringTest < MiniTest::Unit::TestCase
|
|
|
322
327
|
refute_equal "test@something.#{tld}", "test@something.#{tld}".clean_up_typoed_email
|
|
323
328
|
end
|
|
324
329
|
end
|
|
325
|
-
end
|
|
330
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fat_fingers
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.33
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Charlie Park
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2019-
|
|
12
|
+
date: 2019-07-22 00:00:00.000000000 Z
|
|
13
13
|
dependencies: []
|
|
14
14
|
description: Makes sure users don't accidentally create an account for the wrong e-mail
|
|
15
15
|
address. Because 'gmial' isn't actually what they meant to type. Similarly, 'yaho.com',
|