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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e89fa6bea118d4f54d4ee6ea5dd3f058e01ee7fab20c9c05d8eeb76d417594db
4
- data.tar.gz: 97471e4711a440828eb9ff206d4849feb9973bccdca57a4d360b8fb57de900d1
3
+ metadata.gz: f3e4a4d583c6ad8a5e3758c5dcb287616283dec67992ee006168697b80b092d8
4
+ data.tar.gz: 14a322e79fbe29504b89a25f5cab6667ed61e82379f35f440ea1c6f93c36dd66
5
5
  SHA512:
6
- metadata.gz: b0e66d4f531d751f48b9023386087e7a34d7b6cef25fe3cc8a6aea84374eeda1dc4eaa4a305aa75c544744c237df63cdea15b5698ca7687c6ff5fe5872354086
7
- data.tar.gz: 54b086904b861a989c96e78b27df093a4c267d809f9a7e1fad2966dc1022a547a78e55496d87b274a5270168199a448c9e9c29fb4cbe814c9ecbbd577b74415b
6
+ metadata.gz: 58de91a219767f5f27a5d8edd7d9eaa6a8cf65c614f00ea687acbf383b45d98158f5208f7dcd46f4d4a5ff7295ae28700dfa10c922707c50d8f460ea2257f53e
7
+ data.tar.gz: 9069d8f4b4f002e4464433daa648457400ff90c844bec3613305920d87964bdcb4124af4a5cb36b68d0bdfeb53937f9ffb990370a788e8848f7065fc149c136d
@@ -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
@@ -1,3 +1,6 @@
1
+ ## Version 3.2.1
2
+ * Fix loading of blacklisted domains
3
+
1
4
  ## Version 3.2.0
2
5
  * Add option to disallow dotted email addresses https://github.com/micke/valid_email2/pull/146
3
6
  * Update list of disposable email domains with another 18,327 domains
data/README.md CHANGED
@@ -123,11 +123,11 @@ end
123
123
 
124
124
  ## Requirements
125
125
 
126
- This gem requires Rails 3.2 or 4.0 or higher. It is tested against both versions using:
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
- '0039.cf'
9
- '0039.ga'
10
- '0039.gq'
11
- '0039.ml'
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
- '027168.com'
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
- '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'
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
@@ -1,5 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'activemodel', '~> 3.2.22.5'
3
+ gem 'activemodel', '~> 3.2'
4
4
 
5
5
  gemspec path: '../'
@@ -1,5 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'activemodel', '~> 4.2.10'
3
+ gem 'activemodel', '~> 4.2'
4
4
 
5
5
  gemspec path: '../'
@@ -1,5 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'activemodel', '~> 5.2.1'
3
+ gem 'activemodel', '~> 5.2'
4
4
 
5
5
  gemspec path: '../'
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'activemodel', '~> 6.0'
4
+
5
+ gemspec path: '../'
@@ -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
- @whitelist ||= if File.exist?(BLACKLIST_FILE)
15
+ @blacklist ||= if File.exist?(BLACKLIST_FILE)
16
16
  YAML.load_file(File.expand_path(BLACKLIST_FILE))
17
17
  else
18
18
  []
@@ -1,3 +1,3 @@
1
1
  module ValidEmail2
2
- VERSION = "3.2.0"
2
+ VERSION = "3.2.1"
3
3
  end
@@ -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 = YAML.load_file("config/disposable_email_domains.yml")
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.yml", "w") {|f| f.write result_emails.to_yaml }
22
+ File.open("config/disposable_email_domains.txt", "w") {|f| f.write result_emails.join("\n") }
@@ -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@#{ValidEmail2.blacklist.first}")
192
+ user = TestUserDisallowBlacklisted.new(email: "foo@blacklisted-test.com")
193
193
  expect(user.valid?).to be_falsey
194
194
  end
195
195
  end
@@ -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.0
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-18 00:00:00.000000000 Z
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