valid_email 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: e74f85e1ed674767b2c063685a30bb2ebbc6e9fe
4
- data.tar.gz: fe2254848da959f25c12732890ba4acd020c618d
2
+ SHA256:
3
+ metadata.gz: a9140846f85c886cbf8c21beca0082020b34a4462ac56ffe26646b3c1be7efe4
4
+ data.tar.gz: d68d2387df5b30ce19eed3454fcfc1d34d2277540f7152cf6f163015f4a3cbba
5
5
  SHA512:
6
- metadata.gz: c5b07afeee1c98a219e66d40358e46a898939951cfeb6f5aef6d2bd6f76b77f62e3da37442d614746905c54b0a6acee5cf5f4c1ae3fa67a18f2607b1d2d95493
7
- data.tar.gz: db5b162817ff28baee70881951062943363808f7f519954d15e91a0eb66207839249b84f8f0b819396e4a22c16de18081a4e209d9d8e4d42126559a5fde3f924
6
+ metadata.gz: 789c5000ea576b7e25ce08fc1f3f692f64e3eb522e056619f0810611a2779130a25cae0a60fe959900e8b8a20087f8dafdda2fa626e579ed9b73b16592631593
7
+ data.tar.gz: 2e4173a119f587573325ada13f934f9b97a9a8fce6bdb7dfc89ed040e48db7957ccecd5a8846d526dda6152bd8f0d48dc36234eae57d44b8da6de6ff03438eec
@@ -11,3 +11,5 @@ rvm:
11
11
  - 2.4.0
12
12
  - jruby-19mode
13
13
  - jruby-20mode
14
+ before_install:
15
+ - gem install bundler
@@ -90,14 +90,13 @@ class ValidateEmail
90
90
  m = Mail::Address.new(value)
91
91
  return false unless m.domain
92
92
 
93
- mx = []
94
93
  Resolv::DNS.open do |dns|
95
94
  dns.timeouts = MxValidator.config[:timeouts] unless MxValidator.config[:timeouts].empty?
96
- mx.concat dns.getresources(m.domain, Resolv::DNS::Resource::IN::MX)
97
- mx.concat dns.getresources(m.domain, Resolv::DNS::Resource::IN::A) if fallback
98
- end
99
95
 
100
- return mx.any?
96
+ return dns.getresources(m.domain, Resolv::DNS::Resource::IN::MX).size > 0 || (
97
+ fallback && dns.getresources(m.domain, Resolv::DNS::Resource::IN::A).size > 0
98
+ )
99
+ end
101
100
  rescue Mail::Field::ParseError
102
101
  false
103
102
  end
@@ -1 +1 @@
1
- ValidEmailVersion = "0.1.0"
1
+ ValidEmailVersion = "0.1.1"
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
7
7
  s.version = ValidEmailVersion
8
8
  s.authors = ["Ramihajamalala Hery"]
9
9
  s.email = ["hery@rails-royce.org"]
10
- s.homepage = "http://my.rails-royce.org/2010/07/21/email-validation-in-ruby-on-rails-without-regexp"
10
+ s.homepage = "https://github.com/hallelujah/valid_email"
11
11
  s.summary = %q{ActiveModel Validation for email}
12
12
  s.description = %q{ActiveModel Validation for email}
13
13
  s.license = 'MIT'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: valid_email
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ramihajamalala Hery
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-27 00:00:00.000000000 Z
11
+ date: 2018-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -108,7 +108,7 @@ files:
108
108
  - spec/spec_helper.rb
109
109
  - spec/validate_email_spec.rb
110
110
  - valid_email.gemspec
111
- homepage: http://my.rails-royce.org/2010/07/21/email-validation-in-ruby-on-rails-without-regexp
111
+ homepage: https://github.com/hallelujah/valid_email
112
112
  licenses:
113
113
  - MIT
114
114
  metadata: {}
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
128
128
  version: '0'
129
129
  requirements: []
130
130
  rubyforge_project: valid_email
131
- rubygems_version: 2.6.10
131
+ rubygems_version: 2.7.6
132
132
  signing_key:
133
133
  specification_version: 4
134
134
  summary: ActiveModel Validation for email