wlvalidate 0.3.4 → 0.3.6
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.
- data/lib/wlvalidate.rb +5 -5
- metadata +2 -2
data/lib/wlvalidate.rb
CHANGED
@@ -27,7 +27,7 @@ module WLValidate
|
|
27
27
|
@@dns_updated = 0
|
28
28
|
@@dns_server = "8.8.8.8"
|
29
29
|
@@default_dns_server = "8.8.4.4"
|
30
|
-
@@dns_type =
|
30
|
+
@@dns_type = 2
|
31
31
|
|
32
32
|
def initialize( dns_server="8.8.4.4", dns_type=1 )
|
33
33
|
# PURPOSE: Executes code before anything else runs (hence Initialize)
|
@@ -200,23 +200,23 @@ module WLValidate
|
|
200
200
|
tmpIP = Dnsruby::Resolv.getaddress(tmpHost)
|
201
201
|
resolvedHost = Dnsruby::Resolv.getname(tmpIP)
|
202
202
|
if tmpHost == resolvedHost
|
203
|
-
hashReturn = { "type" => "A", "result" => "PASS", "data" => tmpHost, "ext_data" => tmpIP }
|
203
|
+
hashReturn = { "type" => "A", "result" => "PASS", "data" => tmpHost, "ext_data" => tmpIP, "ip" => tmpIP }
|
204
204
|
arrayReturn.push(hashReturn)
|
205
205
|
hashReturn = {}
|
206
206
|
end
|
207
207
|
rescue Dnsruby::ResolvTimeout
|
208
|
-
hashReturn = { "type" => "A", "result" => "ERROR", "data" => tmpHost, "ext_data" => "Timed out while attempting rDNS lookup" }
|
208
|
+
hashReturn = { "type" => "A", "result" => "ERROR", "data" => tmpHost, "ext_data" => "Timed out while attempting rDNS lookup", "ip" => tmpIP }
|
209
209
|
arrayReturn.push(hashReturn)
|
210
210
|
hashReturn = {}
|
211
211
|
rescue
|
212
|
-
#hashReturn = { "type" => "A", "result" => "ERROR", "data" => tmpHost, "ext_data" => "Unable to resolve rDNS for host" }
|
212
|
+
#hashReturn = { "type" => "A", "result" => "ERROR", "data" => tmpHost, "ext_data" => "Unable to resolve rDNS for host", "ip" => tmpIP }
|
213
213
|
#arrayReturn.push(hashReturn)
|
214
214
|
#hashReturn = {}
|
215
215
|
end
|
216
216
|
i += 1
|
217
217
|
end
|
218
218
|
if arrayReturn.empty?
|
219
|
-
hashReturn = { "type" => "A", "result" => "FAIL", "data" => "No data", "ext_data" => "No SendGrid IPs" }
|
219
|
+
hashReturn = { "type" => "A", "result" => "FAIL", "data" => "No data", "ext_data" => "No SendGrid IPs", "ip" => "none" }
|
220
220
|
arrayReturn.push(hashReturn)
|
221
221
|
hashReturn = {}
|
222
222
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wlvalidate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-02-
|
12
|
+
date: 2013-02-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: dnsruby
|