valid_email2 3.2.0 → 3.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +7 -1
- data/CHANGELOG.md +3 -0
- data/README.md +2 -2
- data/config/disposable_email_domains.txt +18 -18
- data/gemfiles/activemodel3.gemfile +1 -1
- data/gemfiles/activemodel4.gemfile +1 -1
- data/gemfiles/activemodel5.gemfile +1 -1
- data/gemfiles/activemodel6.gemfile +5 -0
- data/lib/valid_email2.rb +2 -2
- data/lib/valid_email2/version.rb +1 -1
- data/pull_mailchecker_emails.rb +2 -2
- data/spec/valid_email2_spec.rb +1 -1
- data/valid_email2.gemspec +1 -0
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3e4a4d583c6ad8a5e3758c5dcb287616283dec67992ee006168697b80b092d8
|
4
|
+
data.tar.gz: 14a322e79fbe29504b89a25f5cab6667ed61e82379f35f440ea1c6f93c36dd66
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58de91a219767f5f27a5d8edd7d9eaa6a8cf65c614f00ea687acbf383b45d98158f5208f7dcd46f4d4a5ff7295ae28700dfa10c922707c50d8f460ea2257f53e
|
7
|
+
data.tar.gz: 9069d8f4b4f002e4464433daa648457400ff90c844bec3613305920d87964bdcb4124af4a5cb36b68d0bdfeb53937f9ffb990370a788e8848f7065fc149c136d
|
data/.travis.yml
CHANGED
@@ -3,15 +3,21 @@ language: ruby
|
|
3
3
|
sudo: false
|
4
4
|
|
5
5
|
rvm:
|
6
|
+
- 2.7
|
6
7
|
- 2.6
|
7
8
|
- 2.5
|
8
9
|
- 2.4
|
9
|
-
- 2.3
|
10
10
|
|
11
11
|
gemfile:
|
12
12
|
- gemfiles/activemodel3.gemfile
|
13
13
|
- gemfiles/activemodel4.gemfile
|
14
14
|
- gemfiles/activemodel5.gemfile
|
15
|
+
- gemfiles/activemodel6.gemfile
|
16
|
+
|
17
|
+
jobs:
|
18
|
+
exclude:
|
19
|
+
- rvm: 2.4
|
20
|
+
gemfile: gemfiles/activemodel6.gemfile
|
15
21
|
|
16
22
|
before_install:
|
17
23
|
- gem install bundler
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -123,11 +123,11 @@ end
|
|
123
123
|
|
124
124
|
## Requirements
|
125
125
|
|
126
|
-
This gem requires Rails 3.2 or
|
127
|
-
* Ruby-2.3
|
126
|
+
This gem requires Rails 3.2 or higher. It is tested against Rails 3, 4, 5 and 6 using:
|
128
127
|
* Ruby-2.4
|
129
128
|
* Ruby-2.5
|
130
129
|
* Ruby-2.6
|
130
|
+
* Ruby-2.7
|
131
131
|
|
132
132
|
## Upgrading to v3.0.0
|
133
133
|
|
@@ -5,10 +5,10 @@
|
|
5
5
|
000777.info
|
6
6
|
001.igg.biz
|
7
7
|
0033.pl
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
0039.cf
|
9
|
+
0039.ga
|
10
|
+
0039.gq
|
11
|
+
0039.ml
|
12
12
|
007game.ru
|
13
13
|
00b2bcr51qv59xst2.cf
|
14
14
|
00b2bcr51qv59xst2.ga
|
@@ -28,24 +28,24 @@
|
|
28
28
|
02466.ga
|
29
29
|
02466.gq
|
30
30
|
02466.ml
|
31
|
-
|
31
|
+
027168.com
|
32
32
|
03-genkzmail.ga
|
33
33
|
0317123.cn
|
34
34
|
0530fk.com
|
35
35
|
0543sh.com
|
36
36
|
0662dq.com
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
37
|
+
07819.cf
|
38
|
+
07819.ga
|
39
|
+
07819.gq
|
40
|
+
07819.ml
|
41
|
+
07819.tk
|
42
|
+
079i080nhj.info
|
43
|
+
080mail.com
|
44
|
+
0815.ru
|
45
|
+
0815.ry
|
46
|
+
0815.su
|
47
|
+
0845.ru
|
48
|
+
09ojsdhad.info
|
49
49
|
0accounts.com
|
50
50
|
0ak.org
|
51
51
|
0box.eu
|
@@ -33678,4 +33678,4 @@ zzv2bfja5.pl
|
|
33678
33678
|
zzz.co
|
33679
33679
|
zzz.com
|
33680
33680
|
zzzmail.pl
|
33681
|
-
zzzzzzzzzzzzz.com
|
33681
|
+
zzzzzzzzzzzzz.com
|
data/lib/valid_email2.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
require "valid_email2/email_validator"
|
4
4
|
|
5
5
|
module ValidEmail2
|
6
|
-
BLACKLIST_FILE = "config/blacklisted_email_domains"
|
6
|
+
BLACKLIST_FILE = "config/blacklisted_email_domains.yml"
|
7
7
|
WHITELIST_FILE = "config/whitelisted_email_domains.yml"
|
8
8
|
DISPOSABLE_FILE = File.expand_path('../config/disposable_email_domains.txt', __dir__)
|
9
9
|
|
@@ -12,7 +12,7 @@ module ValidEmail2
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def self.blacklist
|
15
|
-
@
|
15
|
+
@blacklist ||= if File.exist?(BLACKLIST_FILE)
|
16
16
|
YAML.load_file(File.expand_path(BLACKLIST_FILE))
|
17
17
|
else
|
18
18
|
[]
|
data/lib/valid_email2/version.rb
CHANGED
data/pull_mailchecker_emails.rb
CHANGED
@@ -10,7 +10,7 @@ whitelisted_emails = %w(
|
|
10
10
|
hush.ai hush.com hushmail.me naver.com qq.com example.com
|
11
11
|
)
|
12
12
|
|
13
|
-
existing_emails =
|
13
|
+
existing_emails = File.open("config/disposable_email_domains.txt") { |f| f.read.split("\n") }
|
14
14
|
|
15
15
|
url = "https://raw.githubusercontent.com/FGRibreau/mailchecker/master/list.txt"
|
16
16
|
resp = Net::HTTP.get_response(URI.parse(url))
|
@@ -19,4 +19,4 @@ remote_emails = resp.body.split("\n").flatten - whitelisted_emails
|
|
19
19
|
|
20
20
|
result_emails = (existing_emails + remote_emails).map(&:strip).uniq.sort
|
21
21
|
|
22
|
-
File.open("config/disposable_email_domains.
|
22
|
+
File.open("config/disposable_email_domains.txt", "w") {|f| f.write result_emails.join("\n") }
|
data/spec/valid_email2_spec.rb
CHANGED
@@ -189,7 +189,7 @@ describe ValidEmail2 do
|
|
189
189
|
end
|
190
190
|
|
191
191
|
it "is invalid if the domain is blacklisted" do
|
192
|
-
user = TestUserDisallowBlacklisted.new(email: "foo
|
192
|
+
user = TestUserDisallowBlacklisted.new(email: "foo@blacklisted-test.com")
|
193
193
|
expect(user.valid?).to be_falsey
|
194
194
|
end
|
195
195
|
end
|
data/valid_email2.gemspec
CHANGED
@@ -23,6 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.add_development_dependency "bundler", "~> 2.0"
|
24
24
|
spec.add_development_dependency "rake", "~> 12.3.3"
|
25
25
|
spec.add_development_dependency "rspec", "~> 3.5.0"
|
26
|
+
spec.add_development_dependency "pry"
|
26
27
|
spec.add_runtime_dependency "mail", "~> 2.5"
|
27
28
|
spec.add_runtime_dependency "activemodel", ">= 3.2"
|
28
29
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: valid_email2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Micke Lisinge
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-03-
|
11
|
+
date: 2020-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 3.5.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: pry
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: mail
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,6 +114,7 @@ files:
|
|
100
114
|
- gemfiles/activemodel3.gemfile
|
101
115
|
- gemfiles/activemodel4.gemfile
|
102
116
|
- gemfiles/activemodel5.gemfile
|
117
|
+
- gemfiles/activemodel6.gemfile
|
103
118
|
- lib/valid_email2.rb
|
104
119
|
- lib/valid_email2/address.rb
|
105
120
|
- lib/valid_email2/email_validator.rb
|