hexillion 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -0
- data/CHANGELOG.md +3 -0
- data/lib/hexillion.rb +9 -1
- data/lib/hexillion/version.rb +1 -1
- data/spec/client_spec.rb +14 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c942f22c6a9559c161931f5ff15bd8dc84f619a
|
4
|
+
data.tar.gz: 4caa679c80350393774e0426f5b7cacd1d98f70a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be33409227872f68598b8e20cf56b3d80f5b8bc71d891dde7b48b260bfd07a986efc07a69885dd636c28d6cc316c37caeb9e2c7d2435016dd8bf7632fb0e8727
|
7
|
+
data.tar.gz: 71b028acb32695c9b2e2d4fecb4f969a295925a8126777634db99304876df638b6a1741a41510c02a31e5e540651d6968d570c78f0fb89269dfebf2b0a119c2c
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/lib/hexillion.rb
CHANGED
@@ -52,7 +52,15 @@ module Hexillion
|
|
52
52
|
|
53
53
|
def parse_xml(xml)
|
54
54
|
doc = Nokogiri::XML(xml)
|
55
|
-
|
55
|
+
|
56
|
+
records = doc.xpath(
|
57
|
+
<<-XPATH
|
58
|
+
.//QueryResult[
|
59
|
+
(ErrorCode='Success' or ErrorCode='ParseFailed') and
|
60
|
+
FoundMatch='Yes'
|
61
|
+
]/WhoisRecord
|
62
|
+
XPATH
|
63
|
+
)
|
56
64
|
|
57
65
|
strings = {
|
58
66
|
registrant_name: "Registrant Name",
|
data/lib/hexillion/version.rb
CHANGED
data/spec/client_spec.rb
CHANGED
@@ -134,5 +134,19 @@ describe Hexillion::Client do
|
|
134
134
|
|
135
135
|
expect(@hex.whois("example.com")[:xml_response]).to eq(xml)
|
136
136
|
end
|
137
|
+
|
138
|
+
it "allows error code 'ParseFailed' in response" do
|
139
|
+
@response_body = <<-XML
|
140
|
+
<QueryResult><ErrorCode>ParseFailed</ErrorCode><FoundMatch>Yes</FoundMatch><WhoisRecord>
|
141
|
+
<Registrant>
|
142
|
+
<Address>48 Cambridge Street</Address>
|
143
|
+
<Address>Level 3</Address>
|
144
|
+
<Email>me@example.com</Email>
|
145
|
+
</Registrant>
|
146
|
+
</WhoisRecord></QueryResult>
|
147
|
+
XML
|
148
|
+
|
149
|
+
expect(@hex.whois("example.com")[:registrant_email]).to eq("me@example.com")
|
150
|
+
end
|
137
151
|
end
|
138
152
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hexillion
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Flippa Developers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
90
|
version: '0'
|
91
91
|
requirements: []
|
92
92
|
rubyforge_project:
|
93
|
-
rubygems_version: 2.6.
|
93
|
+
rubygems_version: 2.6.11
|
94
94
|
signing_key:
|
95
95
|
specification_version: 4
|
96
96
|
summary: Provides a simple client for the Hexillion API
|