whoisxmlapi 0.0.13 → 0.0.15
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/.gitignore +0 -1
- data/Gemfile.lock +47 -0
- data/lib/whoisxmlapi/client.rb +5 -5
- data/lib/whoisxmlapi/contact.rb +1 -0
- data/lib/whoisxmlapi/result.rb +4 -0
- data/lib/whoisxmlapi/version.rb +1 -1
- data/whoisxmlapi.gemspec +2 -2
- metadata +8 -7
data/.gitignore
CHANGED
data/Gemfile.lock
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
whoisxmlapi (0.0.14)
|
5
|
+
activesupport (~> 3.2)
|
6
|
+
httparty
|
7
|
+
mongoid
|
8
|
+
public_suffix (~> 1.4.6)
|
9
|
+
|
10
|
+
GEM
|
11
|
+
remote: https://rubygems.org/
|
12
|
+
specs:
|
13
|
+
activemodel (3.2.22)
|
14
|
+
activesupport (= 3.2.22)
|
15
|
+
builder (~> 3.0.0)
|
16
|
+
activesupport (3.2.22)
|
17
|
+
i18n (~> 0.6, >= 0.6.4)
|
18
|
+
multi_json (~> 1.0)
|
19
|
+
builder (3.0.4)
|
20
|
+
httparty (0.13.5)
|
21
|
+
json (~> 1.8)
|
22
|
+
multi_xml (>= 0.5.2)
|
23
|
+
i18n (0.7.0)
|
24
|
+
json (1.8.3)
|
25
|
+
mongoid (3.1.7)
|
26
|
+
activemodel (~> 3.2)
|
27
|
+
moped (~> 1.4)
|
28
|
+
origin (~> 1.0)
|
29
|
+
tzinfo (~> 0.3.29)
|
30
|
+
moped (1.5.3)
|
31
|
+
multi_json (1.11.2)
|
32
|
+
multi_xml (0.5.5)
|
33
|
+
origin (1.1.0)
|
34
|
+
public_suffix (1.4.6)
|
35
|
+
rake (10.4.2)
|
36
|
+
tzinfo (0.3.44)
|
37
|
+
|
38
|
+
PLATFORMS
|
39
|
+
ruby
|
40
|
+
|
41
|
+
DEPENDENCIES
|
42
|
+
bundler (~> 1.3)
|
43
|
+
rake
|
44
|
+
whoisxmlapi!
|
45
|
+
|
46
|
+
BUNDLED WITH
|
47
|
+
1.10.6
|
data/lib/whoisxmlapi/client.rb
CHANGED
@@ -30,7 +30,7 @@ module WhoisXMLAPI
|
|
30
30
|
:password => WhoisXMLAPI.password
|
31
31
|
}
|
32
32
|
begin
|
33
|
-
r = HTTParty.get("#{WhoisXMLAPI.domain}/whoisserver/WhoisService", :query => xquery)
|
33
|
+
r = HTTParty.get("#{WhoisXMLAPI.domain}/whoisserver/WhoisService", :query => xquery, :timeout => 120)
|
34
34
|
rescue Exception => e
|
35
35
|
WhoisXMLAPI.logger.info("Error getting Whois info: #{e}")
|
36
36
|
res = WhoisXMLAPI::Unavailable.new
|
@@ -82,7 +82,7 @@ module WhoisXMLAPI
|
|
82
82
|
:username => WhoisXMLAPI.username,
|
83
83
|
:password => WhoisXMLAPI.password
|
84
84
|
}
|
85
|
-
r = HTTParty.get("#{WhoisXMLAPI.domain}/reverse-whois-api/search.php", :query => rquery)
|
85
|
+
r = HTTParty.get("#{WhoisXMLAPI.domain}/reverse-whois-api/search.php", :query => rquery, :timeout => 120)
|
86
86
|
if WhoisXMLAPI.callbacks[:rwhois]
|
87
87
|
WhoisXMLAPI.callbacks[:rwhois].each do |cb|
|
88
88
|
cb.call
|
@@ -103,7 +103,7 @@ module WhoisXMLAPI
|
|
103
103
|
:username => WhoisXMLAPI.username,
|
104
104
|
:password => WhoisXMLAPI.password
|
105
105
|
}
|
106
|
-
r = HTTParty.get("#{WhoisXMLAPI.domain}/reverse-whois-api/search.php", :query => rquery)
|
106
|
+
r = HTTParty.get("#{WhoisXMLAPI.domain}/reverse-whois-api/search.php", :query => rquery, :timeout => 120)
|
107
107
|
if WhoisXMLAPI.callbacks[:rwhois]
|
108
108
|
WhoisXMLAPI.callbacks[:rwhois].each do |cb|
|
109
109
|
cb.call
|
@@ -133,7 +133,7 @@ module WhoisXMLAPI
|
|
133
133
|
:userName => WhoisXMLAPI.username,
|
134
134
|
:password => WhoisXMLAPI.password
|
135
135
|
}
|
136
|
-
r = HTTParty.get("#{WhoisXMLAPI.domain}/whoisserver/WhoisService", :query => xquery)
|
136
|
+
r = HTTParty.get("#{WhoisXMLAPI.domain}/whoisserver/WhoisService", :query => xquery, :timeout => 120)
|
137
137
|
|
138
138
|
resp = JSON.parse(r.parsed_response)
|
139
139
|
resp["DomainInfo"]["domainAvailability"] == "UNAVAILABLE"
|
@@ -146,7 +146,7 @@ module WhoisXMLAPI
|
|
146
146
|
:username => WhoisXMLAPI.username,
|
147
147
|
:password => WhoisXMLAPI.password
|
148
148
|
}
|
149
|
-
r = HTTParty.get("#{WhoisXMLAPI.domain}/accountServices.php", :query => aquery)
|
149
|
+
r = HTTParty.get("#{WhoisXMLAPI.domain}/accountServices.php", :query => aquery, :timeout => 120)
|
150
150
|
JSON.parse(r.parsed_response)
|
151
151
|
end
|
152
152
|
end
|
data/lib/whoisxmlapi/contact.rb
CHANGED
data/lib/whoisxmlapi/result.rb
CHANGED
@@ -11,6 +11,8 @@ module WhoisXMLAPI
|
|
11
11
|
field :record_expires
|
12
12
|
field :registrar
|
13
13
|
field :nameservers, :type => Array
|
14
|
+
field :data_error
|
15
|
+
field :status
|
14
16
|
|
15
17
|
has_one :registrant, :as => :contactable, :class_name => "WhoisXMLAPI::Contact", :autosave => true
|
16
18
|
has_one :admin, :as => :contactable, :class_name => "WhoisXMLAPI::Contact", :autosave => true
|
@@ -21,6 +23,8 @@ module WhoisXMLAPI
|
|
21
23
|
|
22
24
|
def parse(record)
|
23
25
|
self.domain = record['domainName']
|
26
|
+
self.data_error = record['dataError'] ? record['dataError'] : nil
|
27
|
+
self.status = record['status'] ? record['status'] : nil
|
24
28
|
|
25
29
|
if record['registryData']
|
26
30
|
self.record_created = record['registryData']['createdDate']
|
data/lib/whoisxmlapi/version.rb
CHANGED
data/whoisxmlapi.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.name = "whoisxmlapi"
|
8
8
|
spec.version = WhoisXMLAPI::VERSION
|
9
9
|
spec.authors = ["Christopher Maujean", "David Hillard"]
|
10
|
-
spec.email = ["
|
10
|
+
spec.email = ["dhillard@brandle.net"]
|
11
11
|
spec.description = %q{Gem for accessing the Whois XML API via JSON, with caching}
|
12
12
|
spec.summary = %q{whoisxmlapi.com access}
|
13
13
|
spec.homepage = "http://brandle.net/"
|
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.add_dependency "activesupport", "~> 3.2"
|
22
22
|
spec.add_dependency "mongoid"
|
23
23
|
spec.add_dependency "httparty"
|
24
|
-
spec.add_dependency "public_suffix"
|
24
|
+
spec.add_dependency "public_suffix", "~> 1.4.6"
|
25
25
|
|
26
26
|
spec.add_development_dependency "bundler", "~> 1.3"
|
27
27
|
spec.add_development_dependency "rake"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: whoisxmlapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.15
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-
|
13
|
+
date: 2015-09-23 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -65,17 +65,17 @@ dependencies:
|
|
65
65
|
requirement: !ruby/object:Gem::Requirement
|
66
66
|
none: false
|
67
67
|
requirements:
|
68
|
-
- -
|
68
|
+
- - ~>
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version:
|
70
|
+
version: 1.4.6
|
71
71
|
type: :runtime
|
72
72
|
prerelease: false
|
73
73
|
version_requirements: !ruby/object:Gem::Requirement
|
74
74
|
none: false
|
75
75
|
requirements:
|
76
|
-
- -
|
76
|
+
- - ~>
|
77
77
|
- !ruby/object:Gem::Version
|
78
|
-
version:
|
78
|
+
version: 1.4.6
|
79
79
|
- !ruby/object:Gem::Dependency
|
80
80
|
name: bundler
|
81
81
|
requirement: !ruby/object:Gem::Requirement
|
@@ -110,13 +110,14 @@ dependencies:
|
|
110
110
|
version: '0'
|
111
111
|
description: Gem for accessing the Whois XML API via JSON, with caching
|
112
112
|
email:
|
113
|
-
-
|
113
|
+
- dhillard@brandle.net
|
114
114
|
executables: []
|
115
115
|
extensions: []
|
116
116
|
extra_rdoc_files: []
|
117
117
|
files:
|
118
118
|
- .gitignore
|
119
119
|
- Gemfile
|
120
|
+
- Gemfile.lock
|
120
121
|
- LICENSE.txt
|
121
122
|
- README.md
|
122
123
|
- Rakefile
|