-
-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update whois.nic.lv parser #146
Merged
Merged
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
ad2e2d3
Update whois.nic.lv parser
0c5910e
Put back proper status checking for whois.nic.lv
50372b4
Restore empty lines for grouping methods.
4ca28fc
Rename whois.nic.lv fixture files.
35ca735
Fix invalid spec introduced in previous commit.
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
23 changes: 0 additions & 23 deletions
23
spec/fixtures/responses/whois.nic.lv/status_available.expected
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,8 @@ | ||
#status | ||
should: %s == :available | ||
|
||
#available? | ||
should: %s == true | ||
|
||
#registered? | ||
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[Domain] | ||
Domain: farug0e7er.lv | ||
Status: free | ||
|
||
[Whois] | ||
Updated: 2012-01-30 12:12:27.309824 |
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 |
---|---|---|
|
@@ -7,7 +7,6 @@ | |
#registered? | ||
should: %s == true | ||
|
||
|
||
#created_on | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The separator exists to group properties by scope. Please restore line 10 and 21. |
||
should: %s raise_error(Whois::PropertyNotSupported) | ||
|
||
|
@@ -18,7 +17,6 @@ | |
#expires_on | ||
should: %s raise_error(Whois::PropertyNotSupported) | ||
|
||
|
||
#nameservers | ||
should: %s (array) | ||
should: %s have(4).items | ||
|
60 changes: 32 additions & 28 deletions
60
spec/fixtures/responses/whois.nic.lv/status_registered.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 |
---|---|---|
@@ -1,33 +1,37 @@ | ||
[Domain] | ||
Domain: google.lv | ||
Status: active | ||
Changed: 2009-06-10T00:00:00+03:00 | ||
|
||
% Information from TLD .lv whois service. | ||
% Please visit http://www.nic.lv for more information. | ||
[Holder] | ||
Type: Legal person | ||
Name: Google, Inc. | ||
Email: dns-admin@google.com | ||
Fax: +1.6502530001 | ||
Phone: +1.6502530000 | ||
Address: 1600 Amphitheatre Parkway, Mountain View, CA, 94043, USA | ||
RegNr: None | ||
|
||
domain: google.lv | ||
descr: Google, Inc. | ||
admin-c: 9370-LUMII | ||
tech-c: 13942-LUMII | ||
nserver: ns1.google.com | ||
nserver: ns2.google.com | ||
nserver: ns3.google.com | ||
nserver: ns4.google.com | ||
changed: dns-reg@nic.lv 20090610 | ||
source: LUMII | ||
|
||
person: <hidden> | ||
address: none | ||
phone: +12083895740 | ||
fax-no: +12083895799 | ||
e-mail: ccops@markmonitor.com | ||
nic-hdl: 13942-LUMII | ||
source: LUMII | ||
|
||
person: <hidden> | ||
address: none | ||
phone: +1 650 330 0100 | ||
fax-no: +1 650 618 1499 | ||
e-mail: dns-admin@google.com | ||
nic-hdl: 9370-LUMII | ||
source: LUMII | ||
[Tech] | ||
Type: Natural person | ||
Email: ccops@markmonitor.com | ||
Fax: +12083895799 | ||
Phone: +12083895740 | ||
|
||
[Registrar] | ||
Type: Legal person | ||
Name: MarkMonitor Inc. | ||
Email: ccops@markmonitor.com | ||
Fax: +12083895771 | ||
Phone: +12083895740 | ||
Address: 391 N.Ancestor place, Boise, ID 83704 Idaho, USA | ||
RegNr: 82-0513468 | ||
|
||
[Nservers] | ||
Nserver: ns1.google.com | ||
Nserver: ns2.google.com | ||
Nserver: ns3.google.com | ||
Nserver: ns4.google.com | ||
|
||
[Whois] | ||
Updated: 2012-01-30T12:12:27.309824+00:00 |
60 changes: 0 additions & 60 deletions
60
spec/whois/record/parser/responses/whois.nic.lv/status_available_spec.rb
This file was deleted.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
spec/whois/record/parser/responses/whois.nic.lv/status_free_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,39 @@ | ||
# 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/whois.nic.lv/status_free.expected | ||
# | ||
# and regenerate the tests with the following rake task | ||
# | ||
# $ rake spec:generate | ||
# | ||
|
||
require 'spec_helper' | ||
require 'whois/record/parser/whois.nic.lv.rb' | ||
|
||
describe Whois::Record::Parser::WhoisNicLv, "status_free.expected" do | ||
|
||
before(:each) do | ||
file = fixture("responses", "whois.nic.lv/status_free.txt") | ||
part = Whois::Record::Part.new(:body => File.read(file)) | ||
@parser = klass.new(part) | ||
end | ||
|
||
describe "#status" do | ||
it do | ||
@parser.status.should == :available | ||
end | ||
end | ||
describe "#available?" do | ||
it do | ||
@parser.available?.should == true | ||
end | ||
end | ||
describe "#registered?" do | ||
it do | ||
@parser.registered?.should == false | ||
end | ||
end | ||
end |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't remove extra lines 46 and 57, they exists to group methods by scope.