email_typo 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/FUNDING.yml +3 -0
- data/.rubocop.yml +3 -0
- data/README.md +28 -10
- data/email_typo.gemspec +3 -3
- data/fat_finger_last_commit +1 -0
- data/lib/email_typo/add_missing_period.rb +1 -1
- data/lib/email_typo/different_tlds.rb +1 -0
- data/lib/email_typo/gmail.rb +4 -1
- data/lib/email_typo/hotmail.rb +1 -1
- data/lib/email_typo/known_dot_com.rb +1 -1
- data/lib/email_typo/remove_invalid_chars.rb +2 -2
- data/lib/email_typo/version.rb +1 -1
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68d6856a8e16bd5bc126d50a00585d871314555a8d85777c4cdb44a59094e8d2
|
4
|
+
data.tar.gz: c7abbee0b56a9c8d4be377fcc79e7ac6bdda076f47f7889a42cce4058d462a3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5d9042dcf309fbd0869d8aac0fc582c96ab9490324ec5649940845f7dd35277b197517be4179b9ac9d9c57bb2142f7c4c64c387e4720051de1cb52b31556ad2
|
7
|
+
data.tar.gz: 49d5c382ebcf868de054d56d75ae7b19a30780d252d46f34bf82a7da439f3c420fd3d94f7b6da350121fae12090f53b90149c059370763cc1f87ad4b86aabcba
|
data/.github/FUNDING.yml
ADDED
data/.rubocop.yml
CHANGED
data/README.md
CHANGED
@@ -2,17 +2,23 @@
|
|
2
2
|
|
3
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
|
-
[![Test Coverage](https://codeclimate.com/github/fnando/email_typo/badges/coverage.svg)](https://codeclimate.com/github/fnando/email_typo/coverage)
|
6
5
|
[![Gem](https://img.shields.io/gem/v/email_typo.svg)](https://rubygems.org/gems/email_typo)
|
7
6
|
[![Gem](https://img.shields.io/gem/dt/email_typo.svg)](https://rubygems.org/gems/email_typo)
|
8
7
|
|
9
|
-
EmailTypo is a Ruby gem that gives you an easy, tested method that fixes email
|
8
|
+
EmailTypo is a Ruby gem that gives you an easy, tested method that fixes email
|
9
|
+
typos.
|
10
10
|
|
11
|
-
As an example: A user with the email "joe@gmail.com" accidentally enters in
|
11
|
+
As an example: A user with the email "joe@gmail.com" accidentally enters in
|
12
|
+
"joe@gmal.cmo", EmailTypo will fix it automatically.
|
12
13
|
|
13
|
-
EmailTypo is concerned with incorrectly-entered data (email provider names,
|
14
|
+
EmailTypo is concerned with incorrectly-entered data (email provider names,
|
15
|
+
TLDs), not with evaluating whether a particular domain is valid, or whether a
|
16
|
+
particular email address is legitimate. (That is, it's focused on fixing the
|
17
|
+
part that comes after the "@" in the email address.) It works really well for
|
18
|
+
helping you — and your users — when they accidentally type something in wrong.
|
14
19
|
|
15
|
-
**NOTE**: This is based on https://github.com/charliepark/fat_fingers, but
|
20
|
+
**NOTE**: This is based on https://github.com/charliepark/fat_fingers, but
|
21
|
+
without polluting the `String` class and with easier extension support.
|
16
22
|
|
17
23
|
## Installation
|
18
24
|
|
@@ -39,7 +45,9 @@ EmailTypo.call("john.doe@gmail.co")
|
|
39
45
|
#=> "john.doe@gmail.com"
|
40
46
|
```
|
41
47
|
|
42
|
-
To add/change the processors, add any object that responds to `#call(email)` to
|
48
|
+
To add/change the processors, add any object that responds to `#call(email)` to
|
49
|
+
`EmailTypo.default_processors`. The following example adds a processor for
|
50
|
+
`.uol.com.br`, a Brazilian email provider:
|
43
51
|
|
44
52
|
```ruby
|
45
53
|
EmailTypo.default_processors << lambda do |email|
|
@@ -49,14 +57,24 @@ end
|
|
49
57
|
|
50
58
|
## Development
|
51
59
|
|
52
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
60
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
61
|
+
`rake test` to run the tests. You can also run `bin/console` for an interactive
|
62
|
+
prompt that will allow you to experiment.
|
53
63
|
|
54
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To
|
64
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To
|
65
|
+
release a new version, update the version number in `version.rb`, and then run
|
66
|
+
`bundle exec rake release`, which will create a git tag for the version, push
|
67
|
+
git commits and tags, and push the `.gem` file to
|
68
|
+
[rubygems.org](https://rubygems.org).
|
55
69
|
|
56
70
|
## Contributing
|
57
71
|
|
58
|
-
Bug reports and pull requests are welcome on GitHub at
|
72
|
+
Bug reports and pull requests are welcome on GitHub at
|
73
|
+
https://github.com/fnando/email_typo. This project is intended to be a safe,
|
74
|
+
welcoming space for collaboration, and contributors are expected to adhere to
|
75
|
+
the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
59
76
|
|
60
77
|
## License
|
61
78
|
|
62
|
-
The gem is available as open source under the terms of the
|
79
|
+
The gem is available as open source under the terms of the
|
80
|
+
[MIT License](http://opensource.org/licenses/MIT).
|
data/email_typo.gemspec
CHANGED
@@ -7,10 +7,10 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.version = EmailTypo::VERSION
|
8
8
|
spec.authors = ["Nando Vieira"]
|
9
9
|
spec.email = ["fnando.vieira@gmail.com"]
|
10
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
10
11
|
|
11
|
-
spec.summary
|
12
|
-
|
13
|
-
].join(" ")
|
12
|
+
spec.summary = "Clean up e-mail strings when the user's made a typo " \
|
13
|
+
"(like 'gmail.cmo')."
|
14
14
|
spec.description = spec.summary
|
15
15
|
spec.homepage = "https://github.com/fnando/email_typo"
|
16
16
|
spec.license = "MIT"
|
@@ -0,0 +1 @@
|
|
1
|
+
3b87d86575161d0f7b2b0d327c98b549db726096
|
data/lib/email_typo/gmail.rb
CHANGED
data/lib/email_typo/hotmail.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.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nando Vieira
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -115,6 +115,7 @@ executables: []
|
|
115
115
|
extensions: []
|
116
116
|
extra_rdoc_files: []
|
117
117
|
files:
|
118
|
+
- ".github/FUNDING.yml"
|
118
119
|
- ".gitignore"
|
119
120
|
- ".rubocop.yml"
|
120
121
|
- ".travis.yml"
|
@@ -126,6 +127,7 @@ files:
|
|
126
127
|
- bin/console
|
127
128
|
- bin/setup
|
128
129
|
- email_typo.gemspec
|
130
|
+
- fat_finger_last_commit
|
129
131
|
- lib/email_typo.rb
|
130
132
|
- lib/email_typo/add_missing_m.rb
|
131
133
|
- lib/email_typo/add_missing_period.rb
|
@@ -151,7 +153,7 @@ homepage: https://github.com/fnando/email_typo
|
|
151
153
|
licenses:
|
152
154
|
- MIT
|
153
155
|
metadata: {}
|
154
|
-
post_install_message:
|
156
|
+
post_install_message:
|
155
157
|
rdoc_options: []
|
156
158
|
require_paths:
|
157
159
|
- lib
|
@@ -159,7 +161,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
159
161
|
requirements:
|
160
162
|
- - ">="
|
161
163
|
- !ruby/object:Gem::Version
|
162
|
-
version:
|
164
|
+
version: 2.3.0
|
163
165
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
164
166
|
requirements:
|
165
167
|
- - ">="
|
@@ -167,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
167
169
|
version: '0'
|
168
170
|
requirements: []
|
169
171
|
rubygems_version: 3.1.2
|
170
|
-
signing_key:
|
172
|
+
signing_key:
|
171
173
|
specification_version: 4
|
172
174
|
summary: Clean up e-mail strings when the user's made a typo (like 'gmail.cmo').
|
173
175
|
test_files: []
|