Permalink
Browse files

Significant whitespaces and CHANGELOG for GH-154

  • Loading branch information...
1 parent 5047538 commit ac3b9d1748b17cbf7db7e2aceade4f4671569195 @weppos committed Mar 21, 2012
View
@@ -3,8 +3,12 @@
## Master
+* SERVER: Added .BY (GH-154) TLD server.
+
* NEW: Added full whois.audns.net.au parser.
+* NEW: Added full whois.cctld.by server (GH-154).
+
* CHANGED: Moved scanners from Whois::Record::Parser::Scanners to Whois::Record::Scanners.
* FIXED: .IE availability checking returns incorrect results (GH-155)
@@ -21,7 +25,7 @@
* SERVER: Updated ipv4 allocations.
-* SERVER: Added .RS, .LK, .HR (GH-122), .NC (GH-109) TLD server.
+* SERVER: Added .RS, .LK, .HR (GH-122), .NC (GH-109) TLD servers.
* NEW: Added full whois.dreamhost.com parser.
@@ -7,33 +7,37 @@
#++
require 'whois/record/parser/base'
-require 'whois/record/scanners/whois.cctld.by'
+require 'whois/record/scanners/whois.cctld.by.rb'
module Whois
class Record
class Parser
- #
- # = whois.cctld.by parser
- #
# Parser for the whois.cctld.by server.
+ #
+ # @see Whois::Record::Parser::Example
+ # The Example parser for the list of all available methods.
#
# @author Aliaksei Kliuchnikau <aliaksei.kliuchnikau@gmail.com>
+ # @since RELEASE
class WhoisCctldBy < Base
include Scanners::Ast
property_not_supported :disclaimer
+
property_supported :domain do
node("Domain Name", &:downcase)
end
property_not_supported :domain_id
+
property_not_supported :referral_whois
property_not_supported :referral_url
+
property_supported :status do
if available?
:available
@@ -50,6 +54,7 @@ class WhoisCctldBy < Base
!available?
end
+
property_supported :created_on do
node("Creation Date") { |value| Time.parse(value) }
end
@@ -62,11 +67,13 @@ class WhoisCctldBy < Base
node("Expiration Date") { |value| Time.parse(value) }
end
+
property_supported :registrar do
node("Registrar") do |registrar|
- Record::Registrar.new(:id => registrar,
- :name => registrar,
- :organization => registrar
+ Record::Registrar.new(
+ :id => registrar,
+ :name => registrar,
+ :organization => registrar
)
end
end
@@ -77,12 +84,14 @@ class WhoisCctldBy < Base
property_not_supported :technical_contacts
+
property_supported :nameservers do
Array.wrap(node("Name Server")).map do |name|
- Nameserver.new(name.downcase)
+ Nameserver.new(:name => name.downcase)
end
end
+
# Initializes a new {Scanners::WhoisCctldBy} instance
# passing the {#content_for_scanner}
# and calls +parse+ on it.
@@ -91,7 +100,8 @@ class WhoisCctldBy < Base
def parse
Scanners::WhoisCctldBy.new(content_for_scanner).parse
end
+
end
end
end
-end
+end
@@ -12,12 +12,10 @@ module Whois
class Record
module Scanners
- #
- # = whois.cctld.by scanner
- #
# Scanner for the whois.cctld.by server.
#
# @author Aliaksei Kliuchnikau <aliaksei.kliuchnikau@gmail.com>
+ # @since RELEASE
class WhoisCctldBy < Base
self.tokenizers += [
@@ -42,7 +40,8 @@ class WhoisCctldBy < Base
tokenizer :skip_provider_signature do
@input.scan(/^(.+)\n/)
end
+
end
end
end
-end
+end
@@ -1,18 +1,21 @@
#disclaimer
should: %s raise_error(Whois::PropertyNotSupported)
+
#domain
should: %s == nil
#domain_id
should: %s raise_error(Whois::PropertyNotSupported)
+
#referral_whois
should: %s raise_error(Whois::PropertyNotSupported)
#referral_url
should: %s raise_error(Whois::PropertyNotSupported)
+
#status
should: %s == :available
@@ -22,6 +25,7 @@
#registered?
should: %s == false
+
#created_on
should: %s == nil
@@ -31,6 +35,7 @@
#expires_on
should: %s == nil
+
#registrar
should: %s == nil
@@ -43,6 +48,7 @@
#technical_contacts
should: %s raise_error(Whois::PropertyNotSupported)
+
#nameservers
should: %s CLASS(array)
- should: %s == []
+ should: %s == []
@@ -1,18 +1,21 @@
#disclaimer
should: %s raise_error(Whois::PropertyNotSupported)
+
#domain
should: %s == "active.by"
#domain_id
should: %s raise_error(Whois::PropertyNotSupported)
+
#referral_whois
should: %s raise_error(Whois::PropertyNotSupported)
#referral_url
should: %s raise_error(Whois::PropertyNotSupported)
+
#status
should: %s == :registered
@@ -22,6 +25,7 @@
#registered?
should: %s == true
+
#created_on
should: %s CLASS(time)
should: %s == Time.parse("2003-02-02 15:50:44 UTC")
@@ -34,6 +38,7 @@
should: %s CLASS(time)
should: %s == Time.parse("2013-12-21 10:07:40 UTC")
+
#registrar
should: %s CLASS(registrar)
should: %s.id == "Active Technologies LLC"
@@ -49,10 +54,11 @@
#technical_contacts
should: %s raise_error(Whois::PropertyNotSupported)
+
#nameservers
should: %s CLASS(array)
should: %s SIZE(2)
should: %s[0] CLASS(nameserver)
should: %s[0].name == "ns1.activeby.net"
should: %s[1] CLASS(nameserver)
- should: %s[1].name == "ns2.activeby.net"
+ should: %s[1].name == "ns2.activeby.net"

0 comments on commit ac3b9d1

Please sign in to comment.