valid_email2 4.0.3 → 4.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yaml +28 -0
- data/.gitignore +1 -0
- data/CHANGELOG.md +8 -0
- data/README.md +7 -18
- data/config/disposable_email_domains.txt +107026 -2
- data/gemfiles/activemodel7.gemfile +5 -0
- data/lib/valid_email2/address.rb +4 -4
- data/lib/valid_email2/version.rb +1 -1
- data/pull_mailchecker_emails.rb +10 -6
- data/spec/address_spec.rb +37 -0
- metadata +7 -4
- data/.travis.yml +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ccfc9cd993422b2126dca11205e9c3547579957fcb23c0b446ddaa976501faf
|
4
|
+
data.tar.gz: 8f746a9dc3009b6f71d7d0780a0a7c922cfed3911bffdfdf92c49d142fd7beba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: acbf8fb6f1bf70c613b5883390a7a63d431902487c42267c87f929b77955fcbe37a746a339f493e3e37b3fe0e91ebfe7f08ef08a67120596319575c42d1c62a4
|
7
|
+
data.tar.gz: 479ade490d2732727608ede25e8e5758e6f738079b78e6eb768572f3375682156d3baab573ef16b30d73e6d6a1c764534f81c8441d061d15d79ff8d90606a961
|
@@ -0,0 +1,28 @@
|
|
1
|
+
name: CI
|
2
|
+
on: [push, pull_request]
|
3
|
+
jobs:
|
4
|
+
test:
|
5
|
+
strategy:
|
6
|
+
fail-fast: false
|
7
|
+
matrix:
|
8
|
+
gemfile: [ activemodel5, activemodel6, activemodel7 ]
|
9
|
+
ruby: [2.5, 2.6, 2.7, "3.0", 3.1]
|
10
|
+
exclude:
|
11
|
+
- gemfile: activemodel7
|
12
|
+
ruby: 2.5
|
13
|
+
- gemfile: activemodel7
|
14
|
+
ruby: 2.6
|
15
|
+
- gemfile: activemodel5
|
16
|
+
ruby: "3.0"
|
17
|
+
- gemfile: activemodel5
|
18
|
+
ruby: 3.1
|
19
|
+
runs-on: ubuntu-latest
|
20
|
+
env:
|
21
|
+
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
|
22
|
+
steps:
|
23
|
+
- uses: actions/checkout@v2
|
24
|
+
- uses: ruby/setup-ruby@v1
|
25
|
+
with:
|
26
|
+
ruby-version: ${{ matrix.ruby }}
|
27
|
+
bundler-cache: true
|
28
|
+
- run: bundle exec rake
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## Version 4.0.5
|
2
|
+
* Remove false positive mail2word.com
|
3
|
+
* Pull new domains
|
4
|
+
|
5
|
+
## Version 4.0.4
|
6
|
+
* Add new domains https://github.com/micke/valid_email2/pull/196
|
7
|
+
* Pull new domains
|
8
|
+
|
1
9
|
## Version 4.0.3
|
2
10
|
* Remove false positive (139.com) #188
|
3
11
|
* Pull new domains
|
data/README.md
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
# ValidEmail2
|
2
|
-
[](https://travis-ci.org/micke/valid_email2)
|
3
2
|
[](http://badge.fury.io/rb/valid_email2)
|
4
3
|
|
5
4
|
Validate emails with the help of the `mail` gem instead of some clunky regexp.
|
@@ -89,7 +88,7 @@ To validate that email is not subaddressed:
|
|
89
88
|
validates :email, 'valid_email_2/email': { disallow_subaddressing: true }
|
90
89
|
```
|
91
90
|
|
92
|
-
To validate that email does not contain a dot before the @:
|
91
|
+
To validate that email does not contain a dot anywhere before the @:
|
93
92
|
```ruby
|
94
93
|
validates :email, 'valid_email_2/email': { disallow_dotted: true }
|
95
94
|
```
|
@@ -130,27 +129,17 @@ It is a good idea to stub out that validation in your test environment.
|
|
130
129
|
Do so by adding this in your `spec_helper`:
|
131
130
|
```ruby
|
132
131
|
config.before(:each) do
|
133
|
-
allow_any_instance_of(ValidEmail2::Address).to
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
Validating `disposable` e-mails triggers a `mx` validation alongside checking if
|
139
|
-
the domain is disposable. The above stub does not apply to the `disposable`
|
140
|
-
validation and should therefore be individually stubbed with:
|
141
|
-
```ruby
|
142
|
-
config.before(:each) do
|
143
|
-
allow_any_instance_of(ValidEmail2::Address).to receive(:mx_server_is_in?).and_return(false)
|
132
|
+
allow_any_instance_of(ValidEmail2::Address).to receive_messages(
|
133
|
+
valid_mx?: true,
|
134
|
+
valid_strict_mx?: true,
|
135
|
+
mx_server_is_in?: false
|
136
|
+
)
|
144
137
|
end
|
145
138
|
```
|
146
139
|
|
147
140
|
## Requirements
|
148
141
|
|
149
|
-
This gem
|
150
|
-
* Ruby-2.5
|
151
|
-
* Ruby-2.6
|
152
|
-
* Ruby-2.7
|
153
|
-
* Ruby-3.0
|
142
|
+
This gem is tested against currently supported Ruby and Rails versions. For an up to date list, check the build matrix in the [workflow](.github/workflows/ci.yaml).
|
154
143
|
|
155
144
|
## Upgrading to v3.0.0
|
156
145
|
|