fat_fingers 0.1.28 → 0.1.29

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b4be1a5fb71d8c8e05c7018486ab68970be3f0b1
4
- data.tar.gz: 8971196eed930fb242b3e605f27697e976aef4d3
3
+ metadata.gz: 7b6296289b057635d8270208857c0e2d548718c4
4
+ data.tar.gz: 38861570ab7b127c63898cebcdad00c2062a779b
5
5
  SHA512:
6
- metadata.gz: 6001714aa13555877d5e9eb16a4aa913ade3b7a30dc43f509506058bf7a8c1b473bc6b81ad430ec88bcfb038f1e45371c1d9a5fbbd33f6fc81a7c3b6f6bb41e2
7
- data.tar.gz: 209826cdfe21b257409a2fda90c2e9cb1510e008429520d93032636996e94c244d3a9fc1da885a826206e8509aea018732ed86080aa8ccd6a138bb720631ea3a
6
+ metadata.gz: fed3b60932fd28ae5d7dd395c3177b1ec02d17231c7319e1650b9c94cb8d08a77bb4d9d3c0434a0c4e00487d6bebfdc1590d787772fa3d507550e952fa9c4719
7
+ data.tar.gz: de40efd876f319b36c9570e89777553f00cc542f2e698a6062c0e73492372b38a73604147e87d0d43eca6d2dcf90c98b27d03e2e8aa0c90a6d29aabd771b8ccd
data/lib/fat_fingers.rb CHANGED
@@ -13,6 +13,7 @@ class String
13
13
  # Returns the cleaned String.
14
14
  def clean_up_typoed_email
15
15
  downcase.
16
+ remove_mailto.
16
17
  remove_invalid_characters.
17
18
  fix_transposed_periods.
18
19
  remove_period_around_at_sign.
@@ -32,7 +33,11 @@ class String
32
33
  end
33
34
 
34
35
  protected
35
-
36
+
37
+ def remove_mailto
38
+ gsub(/\Amailto:/, "")
39
+ end
40
+
36
41
  def remove_invalid_characters
37
42
  gsub(/(\s|\#|\'|\"|\\)*/, "").
38
43
  gsub(/(\,|\.\.)/, ".").
@@ -216,7 +216,8 @@ class StringTest < MiniTest::Unit::TestCase
216
216
  " test@something.com",
217
217
  "test@something.com ",
218
218
  "TEST@SOMETHING.COM",
219
- "test@something.c9m"
219
+ "test@something.c9m",
220
+ "mailto:test@something.com"
220
221
  ]
221
222
  },
222
223
  # generic .net
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.28
4
+ version: 0.1.29
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: 2017-07-04 00:00:00.000000000 Z
12
+ date: 2017-09-18 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',