forked from ipinfo/ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0d46f86
commit 647141c
Showing
5 changed files
with
46 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,3 @@ | |
/spec/reports/ | ||
/tmp/ | ||
IPinfo-*.gem | ||
|
||
.byebug_history |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,52 +116,50 @@ def assert_ip4(resp) | |
assert_equal(resp.longitude, '-122.0775') | ||
assert_equal(resp.postal, '94043') | ||
assert_equal(resp.timezone, 'America/Los_Angeles') | ||
|
||
# No more available without auth token | ||
# assert_equal( | ||
# resp.asn, | ||
# { | ||
# "asn": 'AS15169', | ||
# "name": 'Google LLC', | ||
# "domain": 'google.com', | ||
# "route": '8.8.8.0/24', | ||
# "type": 'hosting' | ||
# } | ||
# ) | ||
# assert_equal( | ||
# resp.company, | ||
# { | ||
# "name": 'Google LLC', | ||
# "domain": 'google.com', | ||
# "type": 'hosting' | ||
# } | ||
# ) | ||
# assert_equal( | ||
# resp.privacy, | ||
# { | ||
# "vpn": false, | ||
# "proxy": false, | ||
# "tor": false, | ||
# "relay": false, | ||
# "hosting": true, | ||
# "service": '' | ||
# } | ||
# ) | ||
# assert_equal( | ||
# resp.abuse, | ||
# { | ||
# "address": 'US, CA, Mountain View, ' \ | ||
# '1600 Amphitheatre Parkway, 94043', | ||
# "country": 'US', | ||
# "email": '[email protected]', | ||
# "name": 'Abuse', | ||
# "network": '8.8.8.0/24', | ||
# "phone": '+1-650-253-0000' | ||
# } | ||
# ) | ||
# assert_equal(resp.domains[:ip], TEST_IPV4) | ||
# refute_nil(resp.domains[:total]) | ||
# refute_nil(resp.domains[:domains]) | ||
assert_equal( | ||
resp.asn, | ||
{ | ||
"asn": 'AS15169', | ||
"name": 'Google LLC', | ||
"domain": 'google.com', | ||
"route": '8.8.8.0/24', | ||
"type": 'hosting' | ||
} | ||
) | ||
assert_equal( | ||
resp.company, | ||
{ | ||
"name": 'Google LLC', | ||
"domain": 'google.com', | ||
"type": 'hosting' | ||
} | ||
) | ||
assert_equal( | ||
resp.privacy, | ||
{ | ||
"vpn": false, | ||
"proxy": false, | ||
"tor": false, | ||
"relay": false, | ||
"hosting": true, | ||
"service": '' | ||
} | ||
) | ||
assert_equal( | ||
resp.abuse, | ||
{ | ||
"address": 'US, CA, Mountain View, ' \ | ||
'1600 Amphitheatre Parkway, 94043', | ||
"country": 'US', | ||
"email": '[email protected]', | ||
"name": 'Abuse', | ||
"network": '8.8.8.0/24', | ||
"phone": '+1-650-253-0000' | ||
} | ||
) | ||
assert_equal(resp.domains[:ip], TEST_IPV4) | ||
refute_nil(resp.domains[:total]) | ||
refute_nil(resp.domains[:domains]) | ||
end | ||
|
||
def test_lookup_ip4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters