mail_box_validator 1.0.0 → 1.0.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
  SHA1:
3
- metadata.gz: 4ae86132c9970aaa61ea82e0126026288e625b72
4
- data.tar.gz: de0671e7e99b868f92aa181df9a4e99294650ba6
3
+ metadata.gz: b3662097278f7804b3b30d8469ebab96c3826126
4
+ data.tar.gz: e1d4b4c60a1066d2a70a7d1f0dc585bb15765117
5
5
  SHA512:
6
- metadata.gz: e0952e9fa21bd3b4b50b1baa4dda2a6f3e1c3ed1689da7400e0db2ece387e0c5c8fa1ec54af111b089c74bd0e771bfe09bd2cb77a027a60fe9c00f5e337a0511
7
- data.tar.gz: 70bc03d759ded9f943a7cc24dab443584092c222a793781b76abfca0dcd451036055364a73f64727c4979f5c63301e83af6a683920760412d3833c3f6191ff67
6
+ metadata.gz: 97c5b2719c8d266117324739587afe145f366af1b4dcbc17787bfaea5e30b4eca038b2a85e17f39d7404e91316d43c5c00b6551753a4764b9e354db02a497e13
7
+ data.tar.gz: b657ceb096350d2e65eaccc3b1d31811bb86cd5806d28dcc7f75ca0c1414254255ef8cd23fbd1e6adc413c09d966d3a0c97028a70522ca6a7b2e9658af13f15f
@@ -7,12 +7,12 @@ module MailBoxValidator
7
7
  def valid?(mail_address)
8
8
  domain = mail_address.slice(/@(.*)/, 1)
9
9
  mx = mail_exchanger_record_for(domain)
10
- mx.present? && mx.all?(&return_valid?)
10
+ mx.present? && mx.all?(&return_valid?(mail_address))
11
11
  end
12
12
 
13
13
  private
14
14
 
15
- def return_valid?
15
+ def return_valid?(mail_address)
16
16
  Proc.new do |host|
17
17
  response_for(mail_address, host).match(/^2\d{2}/).present?
18
18
  end
@@ -1,3 +1,3 @@
1
1
  module MailBoxValidator
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mail_box_validator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bidu Developers