valid_email2 7.0.0 → 7.0.9
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 +5 -2
- data/.github/workflows/release.yaml +1 -0
- data/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +64 -0
- data/README.md +11 -0
- data/config/disposable_email_domains.txt +228 -2
- data/gemfiles/activemodel8.gemfile +5 -0
- data/lib/valid_email2/address.rb +7 -41
- data/lib/valid_email2/dns.rb +71 -0
- data/lib/valid_email2/email_validator.rb +3 -1
- data/lib/valid_email2/version.rb +1 -1
- data/spec/address_spec.rb +39 -39
- data/spec/dns_spec.rb +21 -0
- data/spec/spec_helper.rb +1 -0
- data/spec/valid_email2_spec.rb +3 -0
- data/valid_email2.gemspec +2 -1
- metadata +24 -7
- data/lib/valid_email2/dns_records_cache.rb +0 -37
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19268cc48de7dc2f1a351a2f8e3662e751752415c5b6922a81351175f9e1fc90
|
4
|
+
data.tar.gz: bbfc92895dde4a2389a25edbbd22399a0015d5681a0cd02fca8d2134c4bb1eef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d1f5dd354c0e709fb0927eb232da618255fa8b05e1c30ef5871bc05d3383562db9b59b7329f49486392d3ac7d65d974244e74cc9464af6efc7cd931037606d1
|
7
|
+
data.tar.gz: f4fd280d648f8575e2de52cc0b54a57c44f23f9fb75524338acb18ebbff3b914f76a7db38f46a1826fb3b4e0caf6ea6b1bfb703fe8844f489c08342e67e9f002
|
data/.github/workflows/ci.yaml
CHANGED
@@ -1,12 +1,15 @@
|
|
1
1
|
name: CI
|
2
|
-
on: [push,
|
2
|
+
on: [push, pull_request]
|
3
3
|
jobs:
|
4
4
|
test:
|
5
5
|
strategy:
|
6
6
|
fail-fast: false
|
7
7
|
matrix:
|
8
|
-
gemfile: [
|
8
|
+
gemfile: [activemodel6, activemodel7, activemodel8]
|
9
9
|
ruby: [3.1, 3.2, 3.3]
|
10
|
+
exclude:
|
11
|
+
- gemfile: activemodel8
|
12
|
+
ruby: 3.1
|
10
13
|
runs-on: ubuntu-latest
|
11
14
|
env:
|
12
15
|
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
|
@@ -1 +1 @@
|
|
1
|
-
{".":"7.0.
|
1
|
+
{".":"7.0.9"}
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,69 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [7.0.9](https://github.com/micke/valid_email2/compare/v7.0.8...v7.0.9) (2025-02-14)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* just trigger a release build ([3a3f0e0](https://github.com/micke/valid_email2/commit/3a3f0e045df1938121cfa47f5a538f09a2b89d81))
|
9
|
+
|
10
|
+
## [7.0.8](https://github.com/micke/valid_email2/compare/v7.0.7...v7.0.8) (2025-02-14)
|
11
|
+
|
12
|
+
|
13
|
+
### Bug Fixes
|
14
|
+
|
15
|
+
* checkout new version ([9906824](https://github.com/micke/valid_email2/commit/990682433d176c00351eff056c28a6dd72cd6d8a))
|
16
|
+
|
17
|
+
## [7.0.7](https://github.com/micke/valid_email2/compare/v7.0.6...v7.0.7) (2025-02-14)
|
18
|
+
|
19
|
+
|
20
|
+
### Bug Fixes
|
21
|
+
|
22
|
+
* use a different ruby-version for release ([5d9465b](https://github.com/micke/valid_email2/commit/5d9465be9d32f685b78d14c56c822428e7d33580))
|
23
|
+
|
24
|
+
## [7.0.6](https://github.com/micke/valid_email2/compare/v7.0.5...v7.0.6) (2025-02-14)
|
25
|
+
|
26
|
+
|
27
|
+
### Bug Fixes
|
28
|
+
|
29
|
+
* check corrupted bundler cache ([290009b](https://github.com/micke/valid_email2/commit/290009b92c3e69fc668e473215ed08ff2fc5a48d))
|
30
|
+
|
31
|
+
## [7.0.5](https://github.com/micke/valid_email2/compare/v7.0.4...v7.0.5) (2025-02-14)
|
32
|
+
|
33
|
+
|
34
|
+
### Bug Fixes
|
35
|
+
|
36
|
+
* do not cache deps in release please ([a53f765](https://github.com/micke/valid_email2/commit/a53f76548eaf3c286763b73cfca6f6061fc88d28))
|
37
|
+
|
38
|
+
## [7.0.4](https://github.com/micke/valid_email2/compare/v7.0.3...v7.0.4) (2025-02-14)
|
39
|
+
|
40
|
+
|
41
|
+
### Bug Fixes
|
42
|
+
|
43
|
+
* pinning dependency for release task ([2f7d554](https://github.com/micke/valid_email2/commit/2f7d554bc5c18d68e56a1abdcb52957443ad6288))
|
44
|
+
|
45
|
+
## [7.0.3](https://github.com/micke/valid_email2/compare/v7.0.2...v7.0.3) (2025-02-13)
|
46
|
+
|
47
|
+
|
48
|
+
### Bug Fixes
|
49
|
+
|
50
|
+
* Class level DNS cache ([#271](https://github.com/micke/valid_email2/issues/271)) ([50aad15](https://github.com/micke/valid_email2/commit/50aad153270287ee19fbd23c190758a55ad00920))
|
51
|
+
|
52
|
+
## [7.0.2](https://github.com/micke/valid_email2/compare/v7.0.1...v7.0.2) (2025-01-23)
|
53
|
+
|
54
|
+
|
55
|
+
### Bug Fixes
|
56
|
+
|
57
|
+
* Remove nytimes.com from list of disposable domains ([#267](https://github.com/micke/valid_email2/issues/267)) ([8173464](https://github.com/micke/valid_email2/commit/8173464e15c492556167d3227804976d3546d1b2))
|
58
|
+
|
59
|
+
## [7.0.1](https://github.com/micke/valid_email2/compare/v7.0.0...v7.0.1) (2024-12-02)
|
60
|
+
|
61
|
+
|
62
|
+
### Bug Fixes
|
63
|
+
|
64
|
+
* Add domain luxyss.com ([#264](https://github.com/micke/valid_email2/issues/264)) ([b04d316](https://github.com/micke/valid_email2/commit/b04d31680881cde8d1620b8f6233c05db10232ca))
|
65
|
+
* Update disposable domains from Yopmail ([#263](https://github.com/micke/valid_email2/issues/263)) ([fee055f](https://github.com/micke/valid_email2/commit/fee055f62294eb7991d9cd20ec04f0b27afdee45))
|
66
|
+
|
3
67
|
## [7.0.0](https://github.com/micke/valid_email2/compare/v6.0.0...v7.0.0) (2024-11-19)
|
4
68
|
|
5
69
|
|
data/README.md
CHANGED
@@ -89,6 +89,14 @@ To validate that the domain is not on the deny list (under config/deny_listed_em
|
|
89
89
|
validates :email, 'valid_email_2/email': { deny_list: true }
|
90
90
|
```
|
91
91
|
|
92
|
+
The allow_listed_email_domains.yml and deny_listed_email_domains.yml can be written as follows:
|
93
|
+
|
94
|
+
```yml
|
95
|
+
# config/deny_listed_email_domains.yml
|
96
|
+
- denied1.example.com
|
97
|
+
- denied2.example.com
|
98
|
+
```
|
99
|
+
|
92
100
|
To validate that email is not subaddressed:
|
93
101
|
```ruby
|
94
102
|
validates :email, 'valid_email_2/email': { disallow_subaddressing: true }
|
@@ -117,6 +125,7 @@ validates :email, 'valid_email_2/email': { mx: true, disposable: true, disallow_
|
|
117
125
|
> Note that this gem will let an empty email pass through so you will need to
|
118
126
|
> add `presence: true` if you require an email
|
119
127
|
|
128
|
+
|
120
129
|
### Use without ActiveModel
|
121
130
|
|
122
131
|
```ruby
|
@@ -128,6 +137,8 @@ address.valid_strict_mx? => true
|
|
128
137
|
address.subaddressed? => false
|
129
138
|
```
|
130
139
|
|
140
|
+
For other APIs, please check [lib/valid_email2/address.rb](https://github.com/micke/valid_email2/blob/main/lib/valid_email2/address.rb).
|
141
|
+
|
131
142
|
If you want to allow multibyte characters, set it explicitly.
|
132
143
|
|
133
144
|
```ruby
|