email_typo 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +126 -0
- data/.travis.yml +8 -4
- data/README.md +1 -1
- data/email_typo.gemspec +0 -1
- data/lib/email_typo.rb +2 -0
- data/lib/email_typo/dot_com.rb +2 -2
- data/lib/email_typo/gmail.rb +1 -1
- data/lib/email_typo/known_dot_com.rb +4 -1
- data/lib/email_typo/remove_mailto.rb +7 -0
- data/lib/email_typo/version.rb +3 -1
- metadata +5 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1b2bb8b32af16302a1fbc103c69d81fc49b8586eaf04828f6f5805b060ad319e
|
4
|
+
data.tar.gz: 415393c2f3fe10f979641799f75735b0ac89ed1ee020d898e2d5f2d52f9fd87c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6ec7d969ce82f3f10e6fbdd5b1da4a592a2cdfa8c734064d9618a4186d59d406d61fbb0a83bdc74ab92087004865579ac566bb41302d9293abdb6db6da7918c
|
7
|
+
data.tar.gz: 4b920c7ceb864f4976d266174d65f8b141e376dd842d9ea4bffb513e08dd5d9718fa0b77f46825c0664daedef1402efe886a3a955ee63a74ebb4c5e298913b61
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,126 @@
|
|
1
|
+
AllCops:
|
2
|
+
Exclude:
|
3
|
+
- "bin/**/*"
|
4
|
+
- "gemfiles/**/*"
|
5
|
+
- "vendor/**/*"
|
6
|
+
- "Gemfile"
|
7
|
+
- "Rakefile"
|
8
|
+
- "*.gemspec"
|
9
|
+
- "config.ru"
|
10
|
+
|
11
|
+
Style/Alias:
|
12
|
+
EnforcedStyle: prefer_alias_method
|
13
|
+
|
14
|
+
Style/FrozenStringLiteralComment:
|
15
|
+
EnforcedStyle: always
|
16
|
+
|
17
|
+
Style/ClassCheck:
|
18
|
+
EnforcedStyle: kind_of?
|
19
|
+
|
20
|
+
Metrics/LineLength:
|
21
|
+
Max: 80
|
22
|
+
|
23
|
+
Style/BlockDelimiters:
|
24
|
+
Enabled: false
|
25
|
+
|
26
|
+
Style/RegexpLiteral:
|
27
|
+
Enabled: false
|
28
|
+
|
29
|
+
Metrics/AbcSize:
|
30
|
+
Enabled: false
|
31
|
+
|
32
|
+
Style/PerlBackrefs:
|
33
|
+
Enabled: false
|
34
|
+
|
35
|
+
ClassLength:
|
36
|
+
Enabled: false
|
37
|
+
|
38
|
+
CyclomaticComplexity:
|
39
|
+
Enabled: false
|
40
|
+
|
41
|
+
Documentation:
|
42
|
+
Enabled: false
|
43
|
+
|
44
|
+
Encoding:
|
45
|
+
Enabled: false
|
46
|
+
|
47
|
+
FileName:
|
48
|
+
Enabled: false
|
49
|
+
|
50
|
+
IfUnlessModifier:
|
51
|
+
Enabled: false
|
52
|
+
|
53
|
+
MethodLength:
|
54
|
+
Enabled: false
|
55
|
+
|
56
|
+
ModuleFunction:
|
57
|
+
Enabled: false
|
58
|
+
|
59
|
+
OneLineConditional:
|
60
|
+
Enabled: false
|
61
|
+
|
62
|
+
ParameterLists:
|
63
|
+
Enabled: false
|
64
|
+
|
65
|
+
Proc:
|
66
|
+
Enabled: false
|
67
|
+
|
68
|
+
SingleLineBlockParams:
|
69
|
+
Enabled: false
|
70
|
+
|
71
|
+
VariableInterpolation:
|
72
|
+
Enabled: false
|
73
|
+
|
74
|
+
Style/TrailingCommaInLiteral:
|
75
|
+
Enabled: false
|
76
|
+
|
77
|
+
WhileUntilModifier:
|
78
|
+
Enabled: false
|
79
|
+
|
80
|
+
PredicateName:
|
81
|
+
NamePrefixBlacklist:
|
82
|
+
- is_
|
83
|
+
|
84
|
+
StringLiterals:
|
85
|
+
EnforcedStyle: double_quotes
|
86
|
+
SupportedStyles:
|
87
|
+
- single_quotes
|
88
|
+
- double_quotes
|
89
|
+
|
90
|
+
DotPosition:
|
91
|
+
EnforcedStyle: leading
|
92
|
+
|
93
|
+
SpaceBeforeBlockBraces:
|
94
|
+
EnforcedStyle: space
|
95
|
+
|
96
|
+
SpaceInsideBlockBraces:
|
97
|
+
EnforcedStyle: no_space
|
98
|
+
|
99
|
+
DoubleNegation:
|
100
|
+
Enabled: false
|
101
|
+
|
102
|
+
SpaceInsideBlockBraces:
|
103
|
+
SpaceBeforeBlockParameters: false
|
104
|
+
|
105
|
+
SpaceInsideHashLiteralBraces:
|
106
|
+
Enabled: false
|
107
|
+
|
108
|
+
PercentLiteralDelimiters:
|
109
|
+
PreferredDelimiters:
|
110
|
+
'%': '[]'
|
111
|
+
'%i': '[]'
|
112
|
+
'%q': '[]'
|
113
|
+
'%Q': '[]'
|
114
|
+
'%r': '[]'
|
115
|
+
'%s': '[]'
|
116
|
+
'%w': '[]'
|
117
|
+
'%W': '[]'
|
118
|
+
'%x': '[]'
|
119
|
+
|
120
|
+
Style/CollectionMethods:
|
121
|
+
PreferredMethods:
|
122
|
+
collect: 'map'
|
123
|
+
collect!: 'map!'
|
124
|
+
inject: 'reduce'
|
125
|
+
detect: 'find'
|
126
|
+
find_all: 'select'
|
data/.travis.yml
CHANGED
@@ -2,13 +2,17 @@ sudo: false
|
|
2
2
|
cache: bundler
|
3
3
|
language: ruby
|
4
4
|
rvm:
|
5
|
-
- 2.
|
5
|
+
- 2.5.2
|
6
6
|
before_install: gem install bundler
|
7
7
|
script: bundle exec rake
|
8
8
|
notifications:
|
9
9
|
email: false
|
10
|
-
|
11
|
-
-
|
10
|
+
before_script:
|
11
|
+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
12
|
+
- chmod +x ./cc-test-reporter
|
13
|
+
- "./cc-test-reporter before-build"
|
14
|
+
after_script:
|
15
|
+
- "./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT"
|
12
16
|
env:
|
13
17
|
global:
|
14
|
-
secure:
|
18
|
+
secure: XU0SxxhufYnJNYC88bsAHseHtK4fd12B97b7NwHxnND9dDbUPCuGI9mkt06wTZchWnB4nDuS4SF6ib73zAP1JI3m7f2FyazAqrgm/OneXy8GYVQtbrG2+1XObSMc7ONX8K/+VGVnZi2nHO3XyC7VRWQreppVK8U24P7qNpJzmWUTy8XqvJT0ZTupELhbikh1cY1np/ammV4eX6QwoeSDd0Wx5QM4D/P06NEXqQ7PdYBBIDuB8zFwSZLh/Q8wNDiOwcUVJTULh/nLmdGMclCcp/aRPrbbWk01scS3khqiJK8SfujeDYNJeuaECGm/9r9MZHvH9Qd88aUJBZcxJRXJiZJ6xuYvc7WnF8tNxGp8xNYTr9/YJrUPPMDdoLr50LyXiY1wf3A0dQHdGNIv5gd7pMoEK+kg0dkqcnhg6OQNRkihudbFuORdKRocIVzHgxB3We+FBnqfexgzLNoYU3eJB3IL8nS0dRX2lSP36SDXTkZNUxflDgGLmoz//FRll3WJ1VsGOkZqBPA2TMoRxqLyhaVnXuPS5uiBUu4gAC4df4HWPAtM1LFtI1HvMenKOYFDqjrPqLevtmQTP/72zl84GAA3hoBGnPgOh2GBtAo/nn5ExbWQUfHSYMwSVD3rrMhe5Lt7G6mzg8hkGU7hYOKwrfSUq/i3+omS0gwHEUBh2vQ=
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# EmailTypo
|
2
2
|
|
3
|
-
[![Travis-CI](https://travis-ci.org/fnando/email_typo.
|
3
|
+
[![Travis-CI](https://travis-ci.org/fnando/email_typo.svg)](https://travis-ci.org/fnando/email_typo)
|
4
4
|
[![Code Climate](https://codeclimate.com/github/fnando/email_typo/badges/gpa.svg)](https://codeclimate.com/github/fnando/email_typo)
|
5
5
|
[![Test Coverage](https://codeclimate.com/github/fnando/email_typo/badges/coverage.svg)](https://codeclimate.com/github/fnando/email_typo/coverage)
|
6
6
|
[![Gem](https://img.shields.io/gem/v/email_typo.svg)](https://rubygems.org/gems/email_typo)
|
data/email_typo.gemspec
CHANGED
data/lib/email_typo.rb
CHANGED
@@ -16,6 +16,7 @@ require_relative "./email_typo/known_dot_com"
|
|
16
16
|
require_relative "./email_typo/period_around_at_sign"
|
17
17
|
require_relative "./email_typo/providers"
|
18
18
|
require_relative "./email_typo/remove_invalid_chars"
|
19
|
+
require_relative "./email_typo/remove_mailto"
|
19
20
|
require_relative "./email_typo/transposed_periods"
|
20
21
|
require_relative "./email_typo/yahoo"
|
21
22
|
|
@@ -26,6 +27,7 @@ module EmailTypo
|
|
26
27
|
end
|
27
28
|
|
28
29
|
self.default_processors = [
|
30
|
+
RemoveMailTo,
|
29
31
|
RemoveInvalidChars,
|
30
32
|
TransposedPeriods,
|
31
33
|
PeriodAroundAtSign,
|
data/lib/email_typo/dot_com.rb
CHANGED
@@ -7,7 +7,7 @@ module EmailTypo
|
|
7
7
|
.gsub(/\.com\.$/, ".com")
|
8
8
|
.gsub(/\.com(?!cast|\.|@).{1,3}$/, ".com")
|
9
9
|
.gsub(/\.co[^op]$/, ".com")
|
10
|
-
.gsub(/\.c*(c|ci|coi|l|m|n|o|op|cp|0)*m+o*$/, ".com")
|
11
|
-
.gsub(/\.(c|v|x)o+(m|n)$/, ".com")
|
10
|
+
.gsub(/\.c*(c|ck|ci|coi|l|m|n|o|op|cp|0|9)*m+o*$/, ".com")
|
11
|
+
.gsub(/\.(c|f|v|x)o+(m|n)$/, ".com")
|
12
12
|
end
|
13
13
|
end
|
data/lib/email_typo/gmail.rb
CHANGED
data/lib/email_typo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: email_typo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nando Vieira
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -80,20 +80,6 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: codeclimate-test-reporter
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
83
|
description: Clean up e-mail strings when the user's made a typo (like 'gmail.cmo').
|
98
84
|
email:
|
99
85
|
- fnando.vieira@gmail.com
|
@@ -102,6 +88,7 @@ extensions: []
|
|
102
88
|
extra_rdoc_files: []
|
103
89
|
files:
|
104
90
|
- ".gitignore"
|
91
|
+
- ".rubocop.yml"
|
105
92
|
- ".travis.yml"
|
106
93
|
- CODE_OF_CONDUCT.md
|
107
94
|
- Gemfile
|
@@ -126,6 +113,7 @@ files:
|
|
126
113
|
- lib/email_typo/period_around_at_sign.rb
|
127
114
|
- lib/email_typo/providers.rb
|
128
115
|
- lib/email_typo/remove_invalid_chars.rb
|
116
|
+
- lib/email_typo/remove_mailto.rb
|
129
117
|
- lib/email_typo/transposed_periods.rb
|
130
118
|
- lib/email_typo/version.rb
|
131
119
|
- lib/email_typo/yahoo.rb
|
@@ -148,8 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
136
|
- !ruby/object:Gem::Version
|
149
137
|
version: '0'
|
150
138
|
requirements: []
|
151
|
-
|
152
|
-
rubygems_version: 2.6.11
|
139
|
+
rubygems_version: 3.0.1
|
153
140
|
signing_key:
|
154
141
|
specification_version: 4
|
155
142
|
summary: Clean up e-mail strings when the user's made a typo (like 'gmail.cmo').
|