Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kero.yachay.pe parser now recognizes throttled responses
- Loading branch information
Showing
16 changed files
with
128 additions
and
18 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
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
2 changes: 2 additions & 0 deletions
2
spec/fixtures/responses/kero.yachay.pe/response_throttled.expected
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#response_throttled? | ||
should: %s == true |
18 changes: 18 additions & 0 deletions
18
spec/fixtures/responses/kero.yachay.pe/response_throttled.txt
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
TERMS OF USE: You are not authorized to access or query our Whois | ||
database through the use of electronic processes that are high-volume and | ||
automated. Whois database is provided as a service to the internet | ||
community. | ||
|
||
The data is for information purposes only. Red Cientifica Peruana does not | ||
guarantee its accuracy. By submitting a Whois query, you agree to abide | ||
by the following terms of use: You agree that you may use this Data only | ||
for lawful purposes and that under no circumstances will you use this Data | ||
to: (1) allow, enable, or otherwise support the transmission of mass | ||
unsolicited, commercial advertising or solicitations via e-mail, telephone, | ||
or facsimile; or (2) enable high volume, automated, electronic processes. | ||
|
||
The compilation, repackaging, dissemination or other use of this Data is | ||
expressly prohibited. | ||
|
||
Your request could not be performed. | ||
Looup quota exceeded. |
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 |
---|---|---|
|
@@ -21,3 +21,8 @@ | |
#nameservers | ||
should: %s CLASS(array) | ||
should: %s == [] | ||
|
||
|
||
|
||
#response_throttled? | ||
should: %s == false |
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 |
---|---|---|
|
@@ -22,3 +22,8 @@ | |
should: %s CLASS(array) | ||
should: %s SIZE(0) | ||
should: %s == [] | ||
|
||
|
||
|
||
#response_throttled? | ||
should: %s == false |
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 |
---|---|---|
|
@@ -23,5 +23,9 @@ | |
should: %s == [] | ||
|
||
|
||
|
||
#response_throttled? | ||
should: %s == false | ||
|
||
#response_unavailable? | ||
should: %s == false |
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 |
---|---|---|
|
@@ -23,5 +23,9 @@ | |
should: %s == [] | ||
|
||
|
||
|
||
#response_throttled? | ||
should: %s == false | ||
|
||
#response_unavailable? | ||
should: %s == false |
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 |
---|---|---|
|
@@ -33,6 +33,7 @@ | |
should: %s[3].name == "ns4.google.com" | ||
|
||
|
||
|
||
#response_throttled? | ||
should: %s == false | ||
|
||
|
29 changes: 29 additions & 0 deletions
29
spec/whois/record/parser/responses/kero.yachay.pe/response_throttled_spec.rb
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# encoding: utf-8 | ||
|
||
# This file is autogenerated. Do not edit it manually. | ||
# If you want change the content of this file, edit | ||
# | ||
# /spec/fixtures/responses/kero.yachay.pe/response_throttled.expected | ||
# | ||
# and regenerate the tests with the following rake task | ||
# | ||
# $ rake spec:generate | ||
# | ||
|
||
require 'spec_helper' | ||
require 'whois/record/parser/kero.yachay.pe.rb' | ||
|
||
describe Whois::Record::Parser::KeroYachayPe, "response_throttled.expected" do | ||
|
||
subject do | ||
file = fixture("responses", "kero.yachay.pe/response_throttled.txt") | ||
part = Whois::Record::Part.new(:body => File.read(file)) | ||
described_class.new(part) | ||
end | ||
|
||
describe "#response_throttled?" do | ||
it do | ||
subject.response_throttled?.should == true | ||
end | ||
end | ||
end |
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
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