diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 1ca2ee67..00000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,8 +0,0 @@ -version: 2 -updates: - - package-ecosystem: bundler - directory: / - schedule: - interval: daily - time: '04:00' - open-pull-requests-limit: 10 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a0f334ab..c2b0c357 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,20 +8,18 @@ on: jobs: build: strategy: + fail-fast: false matrix: - ruby-version: - - "2.6" - - "2.7" - - "3.0" - - "3.1" + ruby: ['2.7', '3.0', '3.1', '3.2', '3.3', '3.4', head, jruby, jruby-head, truffleruby, truffleruby-head] platform: [ubuntu-latest] runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: ${{ matrix.ruby-version }} + ruby-version: ${{ matrix.ruby }} + bundler-cache: true - name: Install dependencies run: bundle install - name: Run tests diff --git a/.gitignore b/.gitignore index ed8bdb2a..a84ab18b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ /.bundle/ /Gemfile.lock /pkg/ +.ruby-version # YARD /.yardoc diff --git a/CHANGELOG.md b/CHANGELOG.md index 2efd1254..9063ae21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,8 +5,32 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/). #### Release 2.0.0 +- FIX: Updated parser for .RO tld +- FIX: Fixed support for all Donuts Inc. TLDs as they rebranded to Identity Digital Inc. +- FIX: Updated parser for .SO tld +- FIX: Updated parser for .CL tld +- FIX: Updated parser for .PT tld +- CHANGED: Adding ruby 3 to the test suite + updating jruby and remove it from the allowed failures +- FIX: Fixed .SO parser not loading correctly under jRuby +- NEW: Add support for ActiveSupport 7 + reduce ActiveSupport usage for Array.wap +- NEW: Added support for all (or fixing existing) CentralNic TLDs (136 at the time: .ADAC, .AE.ORG, .ALLFINANZ, .ART, .AUTO, .AUTOS, .BABY, .BAR, .BEAUTY, .BEST, .BH, .BLOG, .BMW, .BOATS, .BOND, .BOX, .BR.COM, .BUILD, .CAM, .CAR, .CARS, .CASE, .CEO, .CFD, .CN.COM, .CO.COM, .CO.NL, .CO.NO, .CO.RO, .COLLEGE, .COM.DE, .COM.SE, .COOP, .CYOU, .DE.COM, .DEALER, .DELOITTE, .DESI, .DESIGN, .DHL, .DVAG, .ETISALAT, .EU.COM, .FANS, .FEEDBACK, .FM, .FO, .FORUM, .FRESENIUS, .FRL, .FUN, .GAY, .GB.NET, .GD, .GENT, .GR.COM, .HAIR, .HOMES, .HOST, .HU.NET, .ICU, .IN.NET, .INC, .INK, .JP.NET, .JPN.COM, .KFH, .KPN, .KRED, .LIDL, .LONDON, .LOVE, .LPL, .LPLFINANCIAL, .LUXURY, .MAKEUP, .MEX.COM, .MINI, .MONSTER, .MOTORCYCLES, .MUSIC, .ONLINE, .OOO, .PID, .POHL, .PRESS, .PROTECTION, .PW, .QPON, .QUEST, .RADIO.AM, .REIT, .RENT, .REST, .RU.COM, .SA.COM, .SAARLAND, .SBS, .SCHWARZ, .SE.NET, .SECURITY, .SFR, .SHOP.RO, .SITE, .SKIN, .SMART, .SPACE, .STC, .STCGROUP, .STORAGE, .STORE, .TECH, .THEATRE, .TICKETS, .TUI, .UK.COM, .UK.NET, .UNO, .US.COM, .US.ORG, .VG, .VIVA, .WEBSITE, .WIKI, .WME, .موقع, .اتصالات, .البحرين, .بيتك, .VERMÖGENSBERATER, .VERMÖGENSBERATUNG, .XYZ, .YACHTS, .ZA.BZ, .ZA.COM, .ZUERICH) +- FIX: Updated parser for .IN tld which changed name +- FIX: Updated parser for .MX tld (and derivates: .COM.MX, .ORG.MX, etc.) which changed name +- FIX: Updated parser for .COM.AU tld (based on #100) Thanks @kovalevsky +- NEW: Added support for all DonutsInc TLDs (241 at the time: .ACADEMY, .ACCOUNTANTS, .ACTOR, .AGENCY, .AIRFORCE, .APARTMENTS, .ARMY, .ASSOCIATES, .ATTORNEY, .AUCTION, .BAND, .BARGAINS, .BIKE, .BINGO, .BOUTIQUE, .BUILDERS, .BUSINESS, .CAB, .CAFE, .CAMERA, .CAMP, .CAPITAL, .CARDS, .CARE, .CAREERS, .CASH, .CASINO, .CATERING, .CENTER, .CHARITY, .CHAT, .CHEAP, .CHURCH, .CITY, .CLAIMS, .CLEANING, .CLINIC, .CLOTHING, .COACH, .CODES, .COFFEE, .COMMUNITY, .COMPANY, .COMPUTER, .CONDOS, .CONSTRUCTION, .CONTACT, .CONTRACTORS, .COOL, .COUPONS, .CREDIT, .CREDITCARD, .CRUISES, .DANCE, .DATING, .DEALS, .DEGREE, .DELIVERY, .DEMOCRAT, .DENTAL, .DENTIST, .DIAMONDS, .DIGITAL, .DIRECT, .DIRECTORY, .DISCOUNT, .DOCTOR, .DOG, .DOMAINS, .EDUCATION, .EMAIL, .ENERGY, .ENGINEER, .ENGINEERING, .ENTERPRISES, .EQUIPMENT, .ESTATE, .EVENTS, .EXCHANGE, .EXPERT, .EXPOSED, .EXPRESS, .FAIL, .FAMILY, .FAN, .FARM, .FINANCE, .FINANCIAL, .FISH, .FITNESS, .FLIGHTS, .FLORIST, .FOOTBALL, .FORSALE, .FOUNDATION, .FUND, .FURNITURE, .FUTBOL, .FYI, .GALLERY, .GAMES, .GIFTS, .GIVES, .GLASS, .GMBH, .GOLD, .GOLF, .GRAPHICS, .GRATIS, .GRIPE, .GROUP, .GUIDE, .GURU, .HAUS, .HEALTHCARE, .HOCKEY, .HOLDINGS, .HOLIDAY, .HOSPITAL, .HOUSE, .IMMO, .IMMOBILIEN, .INDUSTRIES, .INSTITUTE, .INSURE, .INTERNATIONAL, .INVESTMENTS, .IRISH, .JETZT, .JEWELRY, .KAUFEN, .KITCHEN, .LAND, .LAWYER, .LEASE, .LEGAL, .LIFE, .LIGHTING, .LIMITED, .LIMO, .LIVE, .LOANS, .LTD, .MAISON, .MANAGEMENT, .MARKET, .MARKETING, .MBA, .MEDIA, .MEMORIAL, .MODA, .MONEY, .MORTGAGE, .MOVIE, .NAVY, .NETWORK, .NEWS, .NINJA, .PARTNERS, .PARTS, .PHOTOGRAPHY, .PHOTOS, .PICTURES, .PIZZA, .PLACE, .PLUMBING, .PLUS, .PRODUCTIONS, .PROPERTIES, .PUB, .RECIPES, .REHAB, .REISE, .REISEN, .RENTALS, .REPAIR, .REPORT, .REPUBLICAN, .RESTAURANT, .REVIEWS, .RIP, .ROCKS, .RUN, .SALE, .SALON, .SARL, .SCHOOL, .SCHULE, .SERVICES, .SHOES, .SHOPPING, .SHOW, .SINGLES, .SOCCER, .SOCIAL, .SOFTWARE, .SOLAR, .SOLUTIONS, .STUDIO, .STYLE, .SUPPLIES, .SUPPLY, .SUPPORT, .SURGERY, .SYSTEMS, .TAX, .TAXI, .TEAM, .TECHNOLOGY, .TENNIS, .THEATER, .TIENDA, .TIPS, .TIRES, .TODAY, .TOOLS, .TOURS, .TOWN, .TOYS, .TRAINING, .TRAVEL, .UNIVERSITY, .VACATIONS, .VENTURES, .VET, .VIAJES, .VIDEO, .VILLAS, .VIN, .VISION, .VOYAGE, .WATCH, .WINE, .WORKS, .WORLD, .WTF, .ZONE, .企业, .娱乐, .游戏, .商店) +- FIX: Updated parser for .CA tld +- NEW: Added parser for .WORLD tld +- NEW: Add whois.nic.google (support for .APP, .DEV, .HOW, .PAGE, .SOY) and update xn--q9jyb4c (.みんな) to use whois.nic.google (based on #124) Thanks @derekjc +- NEW: Added parser for .CLOUD tld +- FIX: Updated parser for .CO tld +- FIX: Updated parser for .FI tld (based on #133) Thanks @elguitar +- FIX: Fix throttled response detection for .CO.UK, .ME, .INFO, .MOBI (and most other Afilias based) +- CHANGED: Make sure times are parsed as UTC when no zone is specified (instead of using machine timezone) + improve parsing of some timezone when present and set japanese timezone. +- FIX: Big update and refactoring of all the Afilias based parser format, fixing broken parsing for .ME, .ORG, .INFO, .PRO, .BZ, .GI, .LC, .MN, .SC, .VC, .AG, .IN, .AERO, .ASIA, .MOBI, .POST, .XXX. (based on #34) Thanks @raszi and @jarthod +- CHANGED: Standardize a bit more the Registar object by always filling the name first (instead of sometimes filling organisation instead and sometimes duplicate both). Only fill "organization" when it's a real different property provided by the whois server. +- FIX: AFNIC parsers date format to avoid returning negative dates (#119) Thanks @itghlu +- CHANGED: Updated .IN.UA parsers to the latest response. (#69, #135) Thanks @Vanav and @jarthod - CHANGED: Minimum Ruby version 2.6 - - FIXED: Addressed security issues with eval and YAML.load. Thanks Francis Beaudoin diff --git a/README.md b/README.md index 19ffe869..2bdf0eae 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,16 @@ +⚠️ WARNING: this repository is a fork of https://github.com/weppos/whois-parser. I created it because the maintainer seems [to have paused](https://github.com/weppos/whois-parser/pull/135) so the project was lagging more and more behind actual WHOIS definitions and the [PR piling up](https://github.com/weppos/whois-parser/pulls). I hope we'll be able to merge this back into the main project eventually but in the meantime if you need a more up-to-date and maintained version you can use this one: + +Gemfile: +```ruby +gem 'whois-parser', github: 'jarthod/whois-parser' # Unofficial but more up-to-date fork, check status at https://github.com/jarthod/whois-parser +``` + +I'll try to merge as much existing PR as possible into this fork and provide my own updates too. I don't want to release the gem under another name at the moment to make it easier to go back to the official gem if possible, if so I'll update this page so you can check it from time to time when you see this comment in your Gemfile. The [CHANGELOG](CHANGELOG.md) file will be updated with all the changes in this fork, you can compare it with the upstream [CHANGELOG](https://github.com/weppos/whois-parser/blob/master/CHANGELOG.md) + +Below is the unmodified upstream Readme to make merging easier. + +--- + # [Whois](https://whoisrb.org/) Parser Whois Parser is a — pure Ruby — WHOIS parser. diff --git a/Rakefile b/Rakefile index 40f76254..16521494 100644 --- a/Rakefile +++ b/Rakefile @@ -31,3 +31,7 @@ CLOBBER.include "yardoc" Dir["tasks/**/*.rake"].each do |file| load(file) end + +task :console do + system "irb -r rubygems -I lib -r whois-parser.rb" +end \ No newline at end of file diff --git a/lib/whois/parser.rb b/lib/whois/parser.rb index 32b9be3f..1744d120 100644 --- a/lib/whois/parser.rb +++ b/lib/whois/parser.rb @@ -8,11 +8,9 @@ require 'whois' -require 'active_support/core_ext/array/extract_options' -require 'active_support/core_ext/array/wrap' -require 'active_support/core_ext/class/attribute' -require 'active_support/core_ext/kernel/singleton_class' +require 'active_support' require 'active_support/core_ext/object/blank' +require 'active_support/core_ext/class/attribute' require 'active_support/core_ext/time/calculations' require_relative 'parser/version' @@ -91,9 +89,8 @@ def self.bug!(error, message) PROPERTY_STATE_SUPPORTED = :supported - # Returns the proper parser instance for given part. - # The parser class is selected according to the - # value of the #host attribute for given part. + # Instanciate the proper parser instance for given part. + # The parser class is determined using .parser_for # # @param [Whois::Record::Part] part The part to get the parser for. # @@ -112,37 +109,43 @@ def self.bug!(error, message) # # => # # def self.parser_for(part) - parser_klass(part.host).new(part) - rescue LoadError - Parsers.const_defined?("Blank") || autoload("blank") - Parsers::Blank.new(part) + parser_klass(part).new(part) end - # Detects the proper parser class according to given host + # Detects the proper parser class according to given part # and returns the class constant. + # The parser class is selected according to the values of the + # #host and #body attributes for given part. # # This method autoloads missing parser classes. If you want to define # a custom parser, simple make sure the class is loaded in the Ruby # environment before this method is called. # - # @param [String] host The server host. + # @param [Whois::Record::Part] part The part to get the parser for. # # @return [Class] The instance of Class representing the parser Class - # corresponding to host. If host doesn't have + # corresponding to part. If part doesn't have # a specific parser implementation, then returns # the {Whois::Parsers::Blank} {Class}. # The {Class} is expected to be a child of {Whois::Parsers::Base}. - # @raises LoadError If the class is not found. # # @example # - # Parser.parser_klass("whois.example.com") + # Parser.parser_klass(Whois::Record::Part.new(host: "whois.example.com")) # # => Whois::Parsers::WhoisExampleCom # - def self.parser_klass(host) - name = host_to_parser(host) - Parsers.const_defined?(name) || autoload(host) - Parsers.const_get(name) + def self.parser_klass(part) + autoload(part.host) + rescue LoadError + # Some WHOIS services like Donuts Inc covers hundred of TLDs (https://donuts.domains/what-we-do/top-level-domain-portfolio/) + # But using one host per TLD, so in this case it's easier to match on the disclaimer directly to cover all hosts + if part.body&.include?("Terms of Use: Identity Digital Inc.") + autoload("donuts_inc") + elsif part.body&.include?("The Whois and RDAP services are provided by CentralNic") + autoload("central_nic") + else + autoload("blank") + end end # Converts host to the corresponding parser class name. @@ -172,7 +175,9 @@ def self.host_to_parser(host) # @return [void] # def self.autoload(name) - require "whois/parsers/#{name}" + class_name = host_to_parser(name) + require_relative "parsers/#{name}.rb" unless Parsers.const_defined?(class_name) + Parsers.const_get(class_name) end diff --git a/lib/whois/parsers/base.rb b/lib/whois/parsers/base.rb index c663f509..aac1414d 100644 --- a/lib/whois/parsers/base.rb +++ b/lib/whois/parsers/base.rb @@ -13,7 +13,6 @@ require_relative '../parser/nameserver' require_relative '../scanners/scannable' - module Whois class Parsers @@ -169,12 +168,10 @@ def property_supported?(property) # @return [Nil] if the timestamp can't be parsed # @return [Time] # - def self.parse_time(timestamp) + def self.parse_time(timestamp, timezone: 'UTC') return unless timestamp.is_a?(String) && !timestamp.empty? - - Time.parse(timestamp).change(usec: 0) - rescue ArgumentError - nil + zone = Time.find_zone(timezone) or raise ArgumentError.new("Invalid timezone: #{timezone.inspect}") + zone.parse(timestamp)&.change(usec: 0) end # @return [Whois::Record::Part] The part referenced by this parser. @@ -377,16 +374,18 @@ def cached_properties_fetch(key) private - def typecast(value, type) - if Array == type - Array.wrap(value) + def wrap(object) + if object.nil? + [] + elsif object.respond_to?(:to_ary) + object.to_ary || [object] else - value + [object] end end - def parse_time(timestamp) - self.class.parse_time(timestamp) + def parse_time(timestamp, **args) + self.class.parse_time(timestamp, **args) end def handle_property(property, *args) @@ -400,7 +399,7 @@ def handle_property(property, *args) case property.to_s when /_contacts$/, "nameservers" - typecast(value, Array) + wrap(value) else value end diff --git a/lib/whois/parsers/base_afilias.rb b/lib/whois/parsers/base_afilias.rb index ecd05dbb..12d5237a 100644 --- a/lib/whois/parsers/base_afilias.rb +++ b/lib/whois/parsers/base_afilias.rb @@ -7,7 +7,7 @@ #++ -require_relative 'base' +require_relative 'base_icann_compliant' require 'whois/scanners/base_afilias' @@ -17,68 +17,13 @@ class Parsers # Base parser for Afilias servers. # # @abstract - class BaseAfilias < Base - include Scanners::Scannable + class BaseAfilias < BaseIcannCompliant self.scanner = Scanners::BaseAfilias - property_supported :disclaimer do - node("field:disclaimer") - end - - - property_supported :domain do - node("Domain Name", &:downcase) - end - - property_supported :domain_id do - node("Domain ID") - end - - property_supported :status do - Array.wrap(node("Status")) - end - - property_supported :available? do - !!node("status:available") - end - - property_supported :registered? do - !available? - end - - - property_supported :created_on do - node("Created On") do |value| - parse_time(value) - end - end - - property_supported :updated_on do - node("Last Updated On") do |value| - parse_time(value) - end - end - - property_supported :expires_on do - node("Expiration Date") do |value| - parse_time(value) - end - end - - - property_supported :registrar do - node("Sponsoring Registrar") do |value| - id, name = decompose_registrar(value) || - Whois::Parser.bug!(ParserError, "Unknown registrar format `#{value}'") - - Parser::Registrar.new( - id: id, - name: name - ) - end + Array(node("Domain Status")) end property_supported :registrant_contacts do @@ -95,44 +40,47 @@ class BaseAfilias < Base property_supported :nameservers do - Array.wrap(node("Name Server")).reject(&:empty?).map do |name| + Array(node("Name Server")).reject(&:empty?).map do |name| Parser::Nameserver.new(:name => name.downcase) end end + # Checks whether the response has been throttled. + # + # @return [Boolean] + # + # @example + # WHOIS LIMIT EXCEEDED - SEE WWW.PIR.ORG/WHOIS FOR DETAILS + # + def response_throttled? + !!node("response:throttled") + end private def build_contact(element, type) - node("#{element} ID") do - address = ["", "1", "2", "3"] - .map { |i| node("#{element} Street#{i}") } - .delete_if { |i| i.nil? || i.empty? } - .join("\n") - + node("#{element} Organization") do + address = ["", "1", "2", "3"]. + map { |i| node("#{element} Street#{i}") }. + delete_if { |i| i.nil? || i.empty? }. + join("\n").presence Parser::Contact.new( - :type => type, - :id => node("#{element} ID"), - :name => node("#{element} Name"), - :organization => node("#{element} Organization"), - :address => address, - :city => node("#{element} City"), - :zip => node("#{element} Postal Code"), - :state => node("#{element} State/Province"), - :country_code => node("#{element} Country"), - :phone => node("#{element} Phone"), - :fax => node("#{element} FAX") || node("#{element} Fax"), - :email => node("#{element} Email") + type: type, + id: node("Registry #{element} ID"), + name: node("#{element} Name"), + organization: node("#{element} Organization"), + address: address, + city: node("#{element} City"), + zip: node("#{element} Postal Code"), + state: node("#{element} State/Province"), + country_code: node("#{element} Country"), + phone: node("#{element} Phone"), + fax: node("#{element} Fax"), + email: node("#{element} Email") ) end end - def decompose_registrar(value) - if value =~ /(.+?) \((.+?)\)/ - [::Regexp.last_match(2), ::Regexp.last_match(1)] - end - end - end end diff --git a/lib/whois/parsers/base_afilias2.rb b/lib/whois/parsers/base_afilias2.rb deleted file mode 100644 index 52c35fd1..00000000 --- a/lib/whois/parsers/base_afilias2.rb +++ /dev/null @@ -1,140 +0,0 @@ -#-- -# Ruby Whois -# -# An intelligent pure Ruby WHOIS client and parser. -# -# Copyright (c) 2009-2022 Simone Carletti -#++ - - -require_relative 'base' -require 'whois/scanners/base_afilias' - - -module Whois - class Parsers - - # Base parser for Afilias servers. - # - # @abstract - class BaseAfilias2 < Base - include Scanners::Scannable - - self.scanner = Scanners::BaseAfilias - - - property_supported :disclaimer do - node("field:disclaimer") - end - - - property_supported :domain do - node("Domain Name", &:downcase) - end - - property_supported :domain_id do - node("Domain ID") - end - - - property_supported :status do - Array.wrap(node("Domain Status")) - end - - property_supported :available? do - !!node("status:available") - end - - property_supported :registered? do - !available? - end - - - property_supported :created_on do - node("Creation Date") do |value| - parse_time(value) - end - end - - property_supported :updated_on do - node("Updated Date") do |value| - parse_time(value) - end - end - - property_supported :expires_on do - node("Registry Expiry Date") do |value| - parse_time(value) - end - end - - - property_supported :registrar do - node("Sponsoring Registrar") do |value| - id, name = decompose_registrar(value) - - Parser::Registrar.new({ - id: id, - name: name, - }) - end - end - - property_supported :registrant_contacts do - build_contact("Registrant", Parser::Contact::TYPE_REGISTRANT) - end - - property_supported :admin_contacts do - build_contact("Admin", Parser::Contact::TYPE_ADMINISTRATIVE) - end - - property_supported :technical_contacts do - build_contact("Tech", Parser::Contact::TYPE_TECHNICAL) - end - - - property_supported :nameservers do - Array.wrap(node("Name Server")).reject(&:empty?).map do |name| - Parser::Nameserver.new(:name => name.downcase) - end - end - - - private - - def build_contact(element, type) - node("#{element} ID") do - address = ["", "1", "2", "3"] - .map { |i| node("#{element} Street#{i}") } - .delete_if { |i| i.nil? || i.empty? } - .join("\n") - - Parser::Contact.new( - :type => type, - :id => node("#{element} ID"), - :name => node("#{element} Name"), - :organization => node("#{element} Organization"), - :address => address, - :city => node("#{element} City"), - :zip => node("#{element} Postal Code"), - :state => node("#{element} State/Province"), - :country_code => node("#{element} Country"), - :phone => node("#{element} Phone"), - :fax => node("#{element} FAX") || node("#{element} Fax"), - :email => node("#{element} Email") - ) - end - end - - def decompose_registrar(value) - if value =~ /(.+?) \((.+?)\)/ - [::Regexp.last_match(2), ::Regexp.last_match(1)] - else - [nil, value] - end - end - - end - - end -end diff --git a/lib/whois/parsers/base_cocca.rb b/lib/whois/parsers/base_cocca.rb index 8b897fec..37064c51 100644 --- a/lib/whois/parsers/base_cocca.rb +++ b/lib/whois/parsers/base_cocca.rb @@ -75,8 +75,7 @@ class BaseCocca < Base property_supported :registrar do if content_for_scanner =~ /Registrar Name: (.+)\n/ Parser::Registrar.new( - name: ::Regexp.last_match(1), - organization: nil, + name: $1, url: content_for_scanner.slice(/Registration URL: (.+)\n/, 1) ) end diff --git a/lib/whois/parsers/base_cocca2.rb b/lib/whois/parsers/base_cocca2.rb index c45f2f18..e219a932 100644 --- a/lib/whois/parsers/base_cocca2.rb +++ b/lib/whois/parsers/base_cocca2.rb @@ -35,7 +35,7 @@ class BaseCocca2 < Base # TODO: /pending delete/ => :redemption # TODO: /pending purge/ => :redemption property_supported :status do - list = Array.wrap(node("Domain Status")).map(&:downcase) + list = Array(node("Domain Status")).map(&:downcase) case when list.include?("no object found") :available @@ -80,7 +80,7 @@ class BaseCocca2 < Base property_supported :nameservers do - Array.wrap(node("Name Server")).map do |name| + Array(node("Name Server")).map do |name| Parser::Nameserver.new(name: name) end end diff --git a/lib/whois/parsers/base_icann_compliant.rb b/lib/whois/parsers/base_icann_compliant.rb index aeec908c..cccb1e1f 100644 --- a/lib/whois/parsers/base_icann_compliant.rb +++ b/lib/whois/parsers/base_icann_compliant.rb @@ -21,11 +21,17 @@ class Parsers class BaseIcannCompliant < Base include Scanners::Scannable - self.scanner = Scanners::BaseIcannCompliant + self.scanner = Scanners::BaseIcannCompliant, { + pattern_available: /^No Data Found/ + } + + property_supported :disclaimer do + node("field:disclaimer") + end property_supported :domain do - node("Domain Name", &:downcase) + node("Domain Name")&.downcase end property_supported :domain_id do @@ -34,8 +40,9 @@ class BaseIcannCompliant < Base property_supported :status do - # status = Array.wrap(node('Domain Status')) - if available? + if reserved? + :reserved + elsif available? :available else :registered @@ -52,21 +59,15 @@ class BaseIcannCompliant < Base property_supported :created_on do - node("Creation Date") do |value| - parse_time(value) - end + parse_time(node("Creation Date")) end property_supported :updated_on do - node("Updated Date") do |value| - parse_time(value) - end + parse_time(node("Updated Date")) end property_supported :expires_on do - node("Registrar Registration Expiration Date") do |value| - parse_time(value) - end + parse_time(node("Registry Expiry Date")) || parse_time(node("Registrar Registration Expiration Date")) end @@ -76,7 +77,6 @@ class BaseIcannCompliant < Base Parser::Registrar.new({ id: node("Registrar IANA ID"), name: node("Registrar"), - organization: node("Registrar"), url: node("Registrar URL"), }) end @@ -96,11 +96,18 @@ class BaseIcannCompliant < Base property_supported :nameservers do - Array.wrap(node("Name Server") || node("Name Servers")).reject(&:empty?).map do |name| + Array(node("Name Server") || node("Name Servers")).reject(&:empty?).map do |name| Parser::Nameserver.new(name: name.downcase) end end + def reserved? + !!node("status:reserved") + end + + def response_throttled? + !!node("response:throttled") + end protected @@ -135,14 +142,17 @@ def contact_address_attribute(element) private def value_for_phone_property(element, property) - [ - value_for_property(element, "#{property}"), - value_for_property(element, "#{property} Ext"), - ].reject(&:empty?).join(' ext: ') + node("#{element} #{property}") do |phone| + ext = node("#{element} #{property} Ext") + phone += " ext: #{ext}" if ext.present? + phone + end end def value_for_property(element, property) - Array.wrap(node("#{element} #{property}")).reject(&:empty?).join(', ') + node("#{element} #{property}") do |values| + Array(values).reject(&:empty?).join(', ') + end end end diff --git a/lib/whois/parsers/base_iisse.rb b/lib/whois/parsers/base_iisse.rb index c0189675..bd4b9166 100644 --- a/lib/whois/parsers/base_iisse.rb +++ b/lib/whois/parsers/base_iisse.rb @@ -88,7 +88,7 @@ class BaseIisse < Base # property_supported :nameservers do node("nserver") do |values| - Array.wrap(values).map do |line| + Array(values).map do |line| name, ipv4 = line.split(/\s+/) Parser::Nameserver.new(name: name, ipv4: ipv4) end diff --git a/lib/whois/parsers/base_nic_fr.rb b/lib/whois/parsers/base_nic_fr.rb index 05996201..d5aef099 100644 --- a/lib/whois/parsers/base_nic_fr.rb +++ b/lib/whois/parsers/base_nic_fr.rb @@ -25,6 +25,7 @@ class BaseNicFr < Base when "registered" then :registered when "redemption" then :redemption when "blocked" then :inactive + when "deleted" then :deleted # The 'frozen' status seems to be a status # where a registered domain is placed to prevent changes # and/or when changes can't be made. @@ -52,22 +53,19 @@ class BaseNicFr < Base property_supported :created_on do if content_for_scanner =~ /created:\s+(.+)\n/ - d, m, y = ::Regexp.last_match(1).split("/") - parse_time("#{y}-#{m}-#{d}") + parse_time($1) end end property_supported :updated_on do if content_for_scanner =~ /last-update:\s+(.+)\n/ - d, m, y = ::Regexp.last_match(1).split("/") - parse_time("#{y}-#{m}-#{d}") + parse_time($1) end end property_supported :expires_on do if content_for_scanner =~ /Expiry Date:\s+(.+)\n/ - d, m, y = ::Regexp.last_match(1).split("/") - parse_time("#{y}-#{m}-#{d}") + parse_time($1) end end @@ -136,7 +134,7 @@ def parse_contact(element, type) end end - updated_on = values["changed"] ? Time.utc(*values["changed"].split(" ").first.split("/").reverse) : nil + updated_on = values["changed"] ? parse_time(values["changed"].split(" ").first) : nil Parser::Contact.new({ :type => type, diff --git a/lib/whois/parsers/base_shared1.rb b/lib/whois/parsers/base_shared1.rb index c94d1be8..3b2ffb73 100644 --- a/lib/whois/parsers/base_shared1.rb +++ b/lib/whois/parsers/base_shared1.rb @@ -37,7 +37,7 @@ class BaseShared1 < Base if respond_to?(:reserved?) && reserved? :reserved else - Array.wrap(node("Status")) + Array(node("Status")) end end @@ -60,9 +60,8 @@ class BaseShared1 < Base property_supported :registrar do node('Registrar Name') do |name| Parser::Registrar.new( - :id => node('Registrar ID'), - :name => node('Registrar Name'), - :organization => node('Registrar Name') + id: node('Registrar ID'), + name: node('Registrar Name') ) end end diff --git a/lib/whois/parsers/base_shared2.rb b/lib/whois/parsers/base_shared2.rb index 4a0129c0..3c5a7e85 100644 --- a/lib/whois/parsers/base_shared2.rb +++ b/lib/whois/parsers/base_shared2.rb @@ -39,7 +39,7 @@ class BaseShared2 < Base property_supported :status do - node("Domain Status") { |value| Array.wrap(value) } + node("Domain Status") { |value| Array(value) } end property_supported :available? do @@ -67,8 +67,8 @@ class BaseShared2 < Base property_supported :registrar do node("Sponsoring Registrar") do |str| Parser::Registrar.new( - :id => node("Sponsoring Registrar IANA ID"), - :name => node("Sponsoring Registrar") + id: node("Sponsoring Registrar IANA ID"), + name: node("Sponsoring Registrar") ) end end @@ -88,7 +88,7 @@ class BaseShared2 < Base property_supported :nameservers do - Array.wrap(node("Name Server")).map do |name| + Array(node("Name Server")).map do |name| Parser::Nameserver.new(:name => name.downcase) end end diff --git a/lib/whois/parsers/base_shared3.rb b/lib/whois/parsers/base_shared3.rb index f7736a37..d5454820 100644 --- a/lib/whois/parsers/base_shared3.rb +++ b/lib/whois/parsers/base_shared3.rb @@ -70,10 +70,8 @@ class BaseShared3 < Base property_supported :registrar do node("registrar") do |raw| Parser::Registrar.new( - :id => nil, - :name => node("registrar"), - :organization => nil, - :url => node("url") + name: node("registrar"), + url: node("url") ) end end diff --git a/lib/whois/parsers/base_verisign.rb b/lib/whois/parsers/base_verisign.rb index 3d4710c8..68b09831 100644 --- a/lib/whois/parsers/base_verisign.rb +++ b/lib/whois/parsers/base_verisign.rb @@ -77,7 +77,7 @@ class BaseVerisign < Base property_supported :nameservers do - Array.wrap(node("Name Server")).reject { |value| value =~ /no nameserver/i }.map do |name| + Array(node("Name Server")).reject { |value| value =~ /no nameserver/i }.map do |name| Parser::Nameserver.new(name: name.downcase) end end diff --git a/lib/whois/parsers/base_whoisd.rb b/lib/whois/parsers/base_whoisd.rb index 51d4b914..82db4203 100644 --- a/lib/whois/parsers/base_whoisd.rb +++ b/lib/whois/parsers/base_whoisd.rb @@ -38,8 +38,7 @@ class BaseWhoisd < Base property_supported :status do node('status') do |value| - values = Array.wrap(value) - status = values.each do |s| + status = Array(value).each do |s| v = self.class.status_mapping[s.downcase] break v if v end @@ -100,7 +99,7 @@ class BaseWhoisd < Base property_supported :nameservers do lines = node_nsset['nserver'] rescue nil - Array.wrap(lines).map do |line| + Array(lines).map do |line| if line =~ /(.+) \((.+)\)/ name = ::Regexp.last_match(1) ipv4, ipv6 = ::Regexp.last_match(2).split(', ') diff --git a/lib/whois/parsers/central_nic.rb b/lib/whois/parsers/central_nic.rb new file mode 100644 index 00000000..959f61f9 --- /dev/null +++ b/lib/whois/parsers/central_nic.rb @@ -0,0 +1,47 @@ +#-- +# Ruby Whois +# +# An intelligent pure Ruby WHOIS client and parser. +# +# Copyright (c) 2009-2018 Simone Carletti +#++ + +require_relative 'base_icann_compliant' + +module Whois + class Parsers + + # Parser for the whois.centralnic.com server. + class CentralNic < BaseIcannCompliant + include Scanners::Scannable + + self.scanner = Scanners::BaseIcannCompliant, { + pattern_available: /^The queried object does not exist:.+\(?DOMAIN NOT FOUND\)?/, + pattern_disclaimer: /^The Whois and RDAP services are provided by CentralNic/ + } + + private + + def build_contact(element, type) + node("#{element} Email") do |email| + Parser::Contact.new( + type: type, + id: node("#{element} ID"), + name: node("#{element} Name"), + organization: node("#{element} Organization"), + city: node("#{element} City"), + address: contact_address_attribute(element), + zip: node("#{element} Postal Code"), + state: node("#{element} State/Province"), + country_code: node("#{element} Country"), + phone: node("#{element} Phone"), + fax: node("#{element} FAX") || node("#{element} Fax"), + email: email + ) + end + end + + end + + end +end diff --git a/lib/whois/parsers/donuts_inc.rb b/lib/whois/parsers/donuts_inc.rb new file mode 100644 index 00000000..4daf60ed --- /dev/null +++ b/lib/whois/parsers/donuts_inc.rb @@ -0,0 +1,31 @@ +#-- +# Ruby Whois +# +# An intelligent pure Ruby WHOIS client and parser. +# +# Copyright (c) 2009-2018 Simone Carletti +#++ + + +require_relative 'base_icann_compliant' + + +module Whois + class Parsers + + # Parser for the whois.donuts.com server. + # + # @see Whois::Parsers::Example + # The Example parser for the list of all available methods. + # + class DonutsInc < BaseIcannCompliant + + self.scanner = Scanners::BaseIcannCompliant, { + pattern_available: /^Domain not found\./, + pattern_reserved: /^The registration of this domain is restricted/ + } + + end + + end +end diff --git a/lib/whois/parsers/whois.aero.rb b/lib/whois/parsers/whois.aero.rb index fe6c760a..c5c30104 100644 --- a/lib/whois/parsers/whois.aero.rb +++ b/lib/whois/parsers/whois.aero.rb @@ -21,32 +21,17 @@ class Parsers class WhoisAero < BaseAfilias self.scanner = Scanners::BaseAfilias, { - pattern_reserved: /^Name is restricted from registration\n/, + pattern_reserved: /^This domain name has been reserved by SITA/, } - property_supported :status do if reserved? :reserved else - Array.wrap(node("Domain Status")) - end - end - - - property_supported :updated_on do - node("Updated On") do |value| - parse_time(value) + Array(node("Domain Status")) end end - property_supported :expires_on do - node("Expires On") do |value| - parse_time(value) - end - end - - # NEWPROPERTY def reserved? !!node("status:reserved") diff --git a/lib/whois/parsers/whois.afilias.net.rb b/lib/whois/parsers/whois.afilias.net.rb index f1618517..8c9c4c54 100644 --- a/lib/whois/parsers/whois.afilias.net.rb +++ b/lib/whois/parsers/whois.afilias.net.rb @@ -7,18 +7,17 @@ #++ -require_relative 'base_afilias2' +require_relative 'base_afilias' module Whois class Parsers # Parser for the whois.afilias.net server. - class WhoisAfiliasNet < BaseAfilias2 + class WhoisAfiliasNet < BaseAfilias self.scanner = Scanners::BaseAfilias, { - pattern_disclaimer: /^Access to/, - pattern_reserved: /^(Name is reserved by afilias\n)|(Reserved by Registry\n)/, + pattern_reserved: /^(Name is reserved by afilias\n)|(Reserved by the registry.\n)/, } diff --git a/lib/whois/parsers/whois.ati.tn.rb b/lib/whois/parsers/whois.ati.tn.rb index f6db89d6..0c72f5cc 100644 --- a/lib/whois/parsers/whois.ati.tn.rb +++ b/lib/whois/parsers/whois.ati.tn.rb @@ -65,10 +65,7 @@ class WhoisAtiTn < Base property_supported :registrar do node("Registrar") do |value| - Parser::Registrar.new( - :id => nil, - :name => value - ) + Parser::Registrar.new(name: value) end end @@ -86,7 +83,7 @@ class WhoisAtiTn < Base property_supported :nameservers do - Array.wrap(node("NameServers")).map do |line| + Array(node("NameServers")).map do |line| name, ipv4 = line.match(/(.+)\. \[(.+)\]/)[1, 2] Parser::Nameserver.new(:name => name, :ipv4 => ipv4) end diff --git a/lib/whois/parsers/whois.audns.net.au.rb b/lib/whois/parsers/whois.auda.org.au.rb similarity index 82% rename from lib/whois/parsers/whois.audns.net.au.rb rename to lib/whois/parsers/whois.auda.org.au.rb index fef9f922..6722f1f5 100644 --- a/lib/whois/parsers/whois.audns.net.au.rb +++ b/lib/whois/parsers/whois.auda.org.au.rb @@ -8,21 +8,21 @@ require_relative 'base' -require 'whois/scanners/whois.audns.net.au.rb' +require 'whois/scanners/whois.auda.org.au.rb' module Whois class Parsers - # Parser for the whois.audns.net.au server. + # Parser for the whois.auda.org.au server. # # @see Whois::Parsers::Example # The Example parser for the list of all available methods. # - class WhoisAudnsNetAu < Base + class WhoisAudaOrgAu < Base include Scanners::Scannable - self.scanner = Scanners::WhoisAudnsNetAu + self.scanner = Scanners::WhoisAudaOrgAu property_not_supported :disclaimer @@ -32,8 +32,13 @@ class WhoisAudnsNetAu < Base node("Domain Name") end - property_not_supported :domain_id + property_supported :domain_id do + node("Registry Domain ID") + end + property_supported :disclaimer do + node("field:disclaimer") + end # == Values for Status # @@ -41,7 +46,7 @@ class WhoisAudnsNetAu < Base # @see http://www.auda.org.au/policies/auda-2006-07/ # property_supported :status do - Array.wrap(node("Status")) + Array(node("Status")) end property_supported :available? do @@ -52,7 +57,6 @@ class WhoisAudnsNetAu < Base !available? end - property_not_supported :created_on property_supported :updated_on do @@ -61,16 +65,12 @@ class WhoisAudnsNetAu < Base property_not_supported :expires_on - property_supported :registrar do node("Registrar Name") do |str| - Parser::Registrar.new({ - name: str, - }) + Parser::Registrar.new(name: str) end end - property_supported :registrant_contacts do contact = build_contact("Registrant Contact", Parser::Contact::TYPE_REGISTRANT) contact.organization = node("Registrant") if contact @@ -83,14 +83,12 @@ class WhoisAudnsNetAu < Base build_contact("Tech Contact", Parser::Contact::TYPE_TECHNICAL) end - property_supported :nameservers do - Array.wrap(node("Name Server")).map do |name| + Array(node("Name Server")).map do |name| Parser::Nameserver.new(name: name) end end - private def build_contact(element, type) diff --git a/lib/whois/parsers/whois.biz.rb b/lib/whois/parsers/whois.biz.rb index df6bc304..61d43cde 100644 --- a/lib/whois/parsers/whois.biz.rb +++ b/lib/whois/parsers/whois.biz.rb @@ -19,15 +19,6 @@ class Parsers # The Example parser for the list of all available methods. # class WhoisBiz < BaseIcannCompliant - self.scanner = Scanners::BaseIcannCompliant, { - pattern_available: /^No Data Found\n/, - } - - property_supported :expires_on do - node("Registry Expiry Date") do |value| - parse_time(value) - end - end end end diff --git a/lib/whois/parsers/whois.cat.rb b/lib/whois/parsers/whois.cat.rb index a172c2d2..d358e927 100644 --- a/lib/whois/parsers/whois.cat.rb +++ b/lib/whois/parsers/whois.cat.rb @@ -26,7 +26,7 @@ class WhoisCat < Base property_supported :status do if content_for_scanner =~ /Status:\s+(.+?)\n/ - Array.wrap(::Regexp.last_match(1).split(", ")) + Array($1.split(", ")) end end diff --git a/lib/whois/parsers/whois.cctld.by.rb b/lib/whois/parsers/whois.cctld.by.rb index 130fd06d..dd537193 100644 --- a/lib/whois/parsers/whois.cctld.by.rb +++ b/lib/whois/parsers/whois.cctld.by.rb @@ -69,9 +69,8 @@ class WhoisCctldBy < Base property_supported :registrar do node("Registrar") do |registrar| Parser::Registrar.new( - :id => registrar, - :name => registrar, - :organization => registrar + id: registrar, + name: registrar ) end end @@ -84,7 +83,7 @@ class WhoisCctldBy < Base property_supported :nameservers do - Array.wrap(node("Name Server")).map do |name| + Array(node("Name Server")).map do |name| Parser::Nameserver.new(:name => name.downcase) end end diff --git a/lib/whois/parsers/whois.centralnic.com.rb b/lib/whois/parsers/whois.centralnic.com.rb deleted file mode 100644 index eba561b9..00000000 --- a/lib/whois/parsers/whois.centralnic.com.rb +++ /dev/null @@ -1,140 +0,0 @@ -#-- -# Ruby Whois -# -# An intelligent pure Ruby WHOIS client and parser. -# -# Copyright (c) 2009-2022 Simone Carletti -#++ - - -require_relative 'base' -require 'whois/scanners/whois.centralnic.com.rb' - - -module Whois - class Parsers - - # Parser for the whois.centralnic.com server. - class WhoisCentralnicCom < Base - include Scanners::Scannable - - self.scanner = Scanners::WhoisCentralnicCom - - - property_supported :disclaimer do - node("field:disclaimer") - end - - - property_supported :domain do - node("Domain Name") { |str| str.downcase } - end - - property_supported :domain_id do - node("Domain ID") - end - - - property_supported :status do - # OK, RENEW PERIOD, ... - Array.wrap( - node("Status") || - node("Domain Status") - ) - end - - property_supported :available? do - !!node("status:available") - end - - property_supported :registered? do - !available? - end - - - property_supported :created_on do - node("Created On") { |str| parse_time(str) } || - node("Creation Date") { |str| parse_time(str) } - end - - property_supported :updated_on do - node("Last Updated On") { |str| parse_time(str) } || - node("Updated Date") { |str| parse_time(str) } - end - - property_supported :expires_on do - node("Expiration Date") { |str| parse_time(str) } || - node("Registry Expiry Date") { |str| parse_time(str) } - end - - - property_supported :registrar do - node("Sponsoring Registrar ID") do - Parser::Registrar.new( - :id => node("Sponsoring Registrar ID"), - :name => nil, - :organization => node("Sponsoring Registrar Organization"), - :url => node("Sponsoring Registrar Website") - ) - end || - node("Sponsoring Registrar IANA ID") do - Parser::Registrar.new( - :id => node("Sponsoring Registrar IANA ID"), - :name => node("Sponsoring Registrar"), - :organization => nil, - :url => nil - ) - end - end - - property_supported :registrant_contacts do - build_contact("Registrant", Parser::Contact::TYPE_REGISTRANT) - end - - property_supported :admin_contacts do - build_contact("Admin", Parser::Contact::TYPE_ADMINISTRATIVE) - end - - property_supported :technical_contacts do - build_contact("Tech", Parser::Contact::TYPE_TECHNICAL) - end - - - property_supported :nameservers do - Array.wrap(node("Name Server")).map do |name| - Parser::Nameserver.new(:name => name.downcase.chomp(".")) - end - end - - - private - - def build_contact(element, type) - node("#{element} ID") do - address = [nil, 1, 2, 3] - .map { |i| node("#{element} Street#{i}") } - .delete_if { |i| i.nil? || i.empty? } - .join("\n") - address = nil if address.empty? - - Parser::Contact.new( - :type => type, - :id => node("#{element} ID"), - :name => node("#{element} Name"), - :organization => node("#{element} Organization"), - :address => address, - :city => node("#{element} City"), - :zip => node("#{element} Postal Code"), - :state => node("#{element} State/Province"), - :country_code => node("#{element} Country"), - :phone => node("#{element} Phone"), - :fax => node("#{element} FAX") || node("#{element} Fax"), - :email => node("#{element} Email") - ) - end - end - - end - - end -end diff --git a/lib/whois/parsers/whois.cira.ca.rb b/lib/whois/parsers/whois.cira.ca.rb index 631f0ccd..19f2ced2 100644 --- a/lib/whois/parsers/whois.cira.ca.rb +++ b/lib/whois/parsers/whois.cira.ca.rb @@ -7,8 +7,7 @@ #++ -require_relative 'base' -require 'whois/scanners/whois.cira.ca.rb' +require_relative 'base_icann_compliant' module Whois @@ -19,173 +18,16 @@ class Parsers # @see Whois::Parsers::Example # The Example parser for the list of all available methods. # - class WhoisCiraCa < Base - include Scanners::Scannable - - self.scanner = Scanners::WhoisCiraCa - + class WhoisCiraCa < BaseIcannCompliant + self.scanner = Scanners::BaseIcannCompliant, { + pattern_available: /^Not found: (.+)\n/, + pattern_reserved: /The domain name requested has usage restrictions applied to it.+\n/, + pattern_disclaimer: /^(%\n)*% Use of CIRA/ + } property_supported :disclaimer do - node("field:disclaimer") - end - - - property_supported :domain do - node("Domain name") - end - - property_not_supported :domain_id - - - property_supported :status do - if content_for_scanner =~ /Domain status:\s+(.+?)\n/ - case node("Domain status", &:downcase) - when "registered" - :registered - when "redemption" - :registered - when "auto-renew grace" - :registered - when "to be released" - :registered - when "pending delete" - :registered - when "available" - :available - when "unavailable" - :invalid - else - Whois::Parser.bug!(ParserError, "Unknown status `#{::Regexp.last_match(1)}'.") - end - else - Whois::Parser.bug!(ParserError, "Unable to parse status.") - end - end - - property_supported :available? do - status == :available - end - - property_supported :registered? do - !available? - end - - - property_supported :created_on do - node("Creation date") { |str| parse_time(str) } - end - - property_supported :updated_on do - node("Updated date") { |str| parse_time(str) } - end - - property_supported :expires_on do - node("Expiry date") { |str| parse_time(str) } - end - - - property_supported :registrar do - node("Registrar") do |hash| - Parser::Registrar.new( - id: hash["Number"], - name: hash["Name"], - organization: hash["Name"] - ) - end - end - - - property_supported :registrant_contacts do - build_contact("Registrant", Parser::Contact::TYPE_REGISTRANT) - end - - property_supported :admin_contacts do - build_contact("Administrative contact", Parser::Contact::TYPE_ADMINISTRATIVE) - end - - property_supported :technical_contacts do - build_contact("Technical contact", Parser::Contact::TYPE_TECHNICAL) - end - - - property_supported :nameservers do - Array.wrap(node("nserver")).map do |line| - name, ipv4 = line.split(/\s+/) - Parser::Nameserver.new(:name => name, :ipv4 => ipv4) - end - end - - - # Nameservers are listed in the following formats: - # - # ns1.google.com - # ns2.google.com - # - # ns1.google.com 216.239.32.10 - # ns2.google.com 216.239.34.10 - # - property_supported :nameservers do - Array.wrap(node("field:nameservers")).map do |line| - name, ipv4 = line.strip.split(/\s+/) - Parser::Nameserver.new(:name => name, :ipv4 => ipv4) - end + node("field:disclaimer").gsub(/%\s/, '') # remove the "% " prefix in the disclaimer end - - - # Attempts to detect and returns the version. - # - # TODO: This is very empiric. - # Use the available status in combination with the creation date label. - # - # NEWPROPERTY - def version - cached_properties_fetch :version do - version = if content_for_scanner =~ /^% \(c\) (.+?) Canadian Internet Registration Authority/ - case ::Regexp.last_match(1) - when "2007" then "1" - when "2010" then "2" - end - end - version || Whois::Parser.bug!(ParserError, "Unable to detect version.") - end - end - - # NEWPROPERTY - def valid? - cached_properties_fetch(:valid?) do - !invalid? - end - end - - # NEWPROPERTY - def invalid? - cached_properties_fetch(:invalid?) do - status == :invalid - end - end - - - private - - def build_contact(element, type) - node(element) do |hash| - Parser::Contact.new( - :type => type, - :id => nil, - :name => hash["Name"], - :organization => nil, - :address => hash["Postal address"], - :city => nil, - :zip => nil, - :state => nil, - :country => nil, - :phone => hash["Phone"], - :fax => hash["Fax"], - :email => hash["Email"] - ) - end - end - end end diff --git a/lib/whois/parsers/whois.cnnic.cn.rb b/lib/whois/parsers/whois.cnnic.cn.rb index b0d209c2..ed3d15a1 100644 --- a/lib/whois/parsers/whois.cnnic.cn.rb +++ b/lib/whois/parsers/whois.cnnic.cn.rb @@ -34,7 +34,7 @@ class WhoisCnnicCn < Base property_supported :status do - Array.wrap node("Domain Status") + Array node("Domain Status") end property_supported :available? do @@ -60,8 +60,8 @@ class WhoisCnnicCn < Base property_supported :registrar do node("Sponsoring Registrar") do |value| Parser::Registrar.new( - :id => value, - :name => value + id: value, + name: value ) end end @@ -78,7 +78,7 @@ class WhoisCnnicCn < Base property_supported :nameservers do - Array.wrap(node("Name Server")).map do |name| + Array(node("Name Server")).map do |name| Parser::Nameserver.new(name: name.downcase) end end diff --git a/lib/whois/parsers/whois.denic.de.rb b/lib/whois/parsers/whois.denic.de.rb index de7661f9..ce8c3f39 100644 --- a/lib/whois/parsers/whois.denic.de.rb +++ b/lib/whois/parsers/whois.denic.de.rb @@ -79,12 +79,7 @@ class WhoisDenicDe < Base property_supported :registrar do node("Zone-C") do |raw| - Parser::Registrar.new( - :id => nil, - :name => raw["name"], - :organization => raw["organization"], - :url => nil - ) + Parser::Registrar.new(name: raw["name"]) end end diff --git a/lib/whois/parsers/whois.dns.pl.rb b/lib/whois/parsers/whois.dns.pl.rb index abcea670..b42da8de 100644 --- a/lib/whois/parsers/whois.dns.pl.rb +++ b/lib/whois/parsers/whois.dns.pl.rb @@ -70,9 +70,7 @@ class WhoisDnsPl < Base return unless match lines = match.split("\n") - Parser::Registrar.new( - :name => lines[0] - ) + Parser::Registrar.new(name: lines[0]) end property_not_supported :registrant_contacts diff --git a/lib/whois/parsers/whois.dns.pt.rb b/lib/whois/parsers/whois.dns.pt.rb index bca5bd0d..bb139cbc 100644 --- a/lib/whois/parsers/whois.dns.pt.rb +++ b/lib/whois/parsers/whois.dns.pt.rb @@ -25,14 +25,12 @@ class Parsers class WhoisDnsPt < Base property_supported :status do - if content_for_scanner =~ %r{^Estado / Status:\s+(.+)\n} + if content_for_scanner =~ %r{^Domain Status:\s+(.+)\n} case ::Regexp.last_match(1).downcase - when "active" + when "registered" :registered when "reserved" :reserved - when "tech-pro" - :inactive else Whois::Parser.bug!(ParserError, "Unknown status `#{::Regexp.last_match(1)}'.") end @@ -42,32 +40,30 @@ class WhoisDnsPt < Base end property_supported :available? do - !!(content_for_scanner =~ /^.* no match$/) + !!(content_for_scanner =~ /^.* No Match$/) end property_supported :registered? do !available? end - property_supported :created_on do - if content_for_scanner =~ / Creation Date .+?:\s+(.+)\n/ - Time.utc(*::Regexp.last_match(1).split("/").reverse) + if content_for_scanner =~ /Creation Date:\s+(.+)\n/ + parse_time(*::Regexp.last_match(1)) end end property_not_supported :updated_on property_supported :expires_on do - if content_for_scanner =~ / Expiration Date .+?:\s+(.+)\n/ - Time.utc(*::Regexp.last_match(1).split("/").reverse) + if content_for_scanner =~ /Expiration Date:\s+(.+)\n/ + parse_time(*::Regexp.last_match(1)) end end - property_supported :nameservers do - content_for_scanner.scan(/Nameserver:\s+(?:.*)\s+NS\s+(.+?)\.\n/).flatten.map do |name| - Parser::Nameserver.new(:name => name) + content_for_scanner.scan(/Name Server:\s+([^\s]+)/).flatten.map do |name| + Parser::Nameserver.new(name: name) end end diff --git a/lib/whois/parsers/whois.domainregistry.ie.rb b/lib/whois/parsers/whois.domainregistry.ie.rb index 576c2336..afc8fdaf 100644 --- a/lib/whois/parsers/whois.domainregistry.ie.rb +++ b/lib/whois/parsers/whois.domainregistry.ie.rb @@ -95,7 +95,7 @@ class WhoisDomainregistryIe < Base property_supported :nameservers do - Array.wrap(node("nserver")).map do |line| + Array(node("nserver")).map do |line| name, ipv4 = line.split(/\s+/) Parser::Nameserver.new(:name => name, :ipv4 => ipv4) end @@ -105,7 +105,7 @@ class WhoisDomainregistryIe < Base private def build_contact(element, type) - Array.wrap(node(element)).map do |id| + Array(node(element)).map do |id| next unless (contact = node("field:#{id}")) Parser::Contact.new( diff --git a/lib/whois/parsers/whois.donuts.co.rb b/lib/whois/parsers/whois.donuts.co.rb deleted file mode 100644 index 0ab1fb48..00000000 --- a/lib/whois/parsers/whois.donuts.co.rb +++ /dev/null @@ -1,59 +0,0 @@ -#-- -# Ruby Whois -# -# An intelligent pure Ruby WHOIS client and parser. -# -# Copyright (c) 2009-2022 Simone Carletti -#++ - - -require_relative 'base_icann_compliant' - - -module Whois - class Parsers - - # Parser for the whois.donuts.com server. - # - # @see Whois::Parsers::Example - # The Example parser for the list of all available methods. - # - class WhoisDonutsCo < BaseIcannCompliant - - self.scanner = Scanners::BaseIcannCompliant, { - pattern_available: /^Domain not found\./, - } - - - property_supported :expires_on do - node("Registry Expiry Date") do |value| - parse_time(value) - end - end - - - property_supported :registrar do - return unless node("Registrar") - - Parser::Registrar.new({ - id: node("Registrar IANA ID"), - name: node("Registrar"), - organization: node("Registrar"), - url: node("Registrar URL"), - }) - end - - - - # - # def build_contact(element, type) - # if (contact = super) - # contact.id = node("#{element} ID") - # end - # contact - # end - - end - - end -end diff --git a/lib/whois/parsers/whois.dot.cf.rb b/lib/whois/parsers/whois.dot.cf.rb index 1529f87f..88e8fc5f 100644 --- a/lib/whois/parsers/whois.dot.cf.rb +++ b/lib/whois/parsers/whois.dot.cf.rb @@ -43,7 +43,7 @@ class WhoisDotCf < Base property_supported :created_on do if content_for_scanner =~ /Domain registered:\s(.+)\n/ - Time.strptime(::Regexp.last_match(1), "%m/%d/%Y") + DateTime.strptime($1, "%m/%d/%Y").to_time end end @@ -51,8 +51,8 @@ class WhoisDotCf < Base property_supported :expires_on do if content_for_scanner =~ /Record will expire on:\s(.+)\n/ - value = ::Regexp.last_match(1).strip - Time.strptime(value, "%m/%d/%Y") if value.present? + value = $1.strip + DateTime.strptime(value, "%m/%d/%Y").to_time if value.present? end end diff --git a/lib/whois/parsers/whois.dot.tk.rb b/lib/whois/parsers/whois.dot.tk.rb index 16e91506..27e7c5cf 100644 --- a/lib/whois/parsers/whois.dot.tk.rb +++ b/lib/whois/parsers/whois.dot.tk.rb @@ -43,7 +43,7 @@ class WhoisDotTk < Base property_supported :created_on do if content_for_scanner =~ /Domain registered:\s(.+)\n/ - Time.strptime(::Regexp.last_match(1), "%m/%d/%Y") + DateTime.strptime(::Regexp.last_match(1), "%m/%d/%Y").to_time end end @@ -51,7 +51,7 @@ class WhoisDotTk < Base property_supported :expires_on do if content_for_scanner =~ /Record will expire on:\s(.+)\n/ - Time.strptime(::Regexp.last_match(1), "%m/%d/%Y") + DateTime.strptime(::Regexp.last_match(1), "%m/%d/%Y").to_time end end diff --git a/lib/whois/parsers/whois.enom.com.rb b/lib/whois/parsers/whois.enom.com.rb index a7b68706..7c734ef0 100644 --- a/lib/whois/parsers/whois.enom.com.rb +++ b/lib/whois/parsers/whois.enom.com.rb @@ -22,12 +22,6 @@ class WhoisEnomCom < BaseIcannCompliant self.scanner = Scanners::BaseIcannCompliant, { pattern_available: /^Domain not found\.\n/, } - - property_supported :updated_on do - node('Updated Date') do |value| - parse_time(value) - end - end end end diff --git a/lib/whois/parsers/whois.fi.rb b/lib/whois/parsers/whois.fi.rb index 834f2ed6..46d0fd7f 100644 --- a/lib/whois/parsers/whois.fi.rb +++ b/lib/whois/parsers/whois.fi.rb @@ -42,6 +42,8 @@ class WhoisFi < Base :reserved elsif registered? case node("status", &:downcase) + when "registered" + :registered when "granted" :registered when "grace period" @@ -76,33 +78,50 @@ class WhoisFi < Base end - property_not_supported :registrar + property_supported :registrar do + node("Registrar") do |hash| + Parser::Registrar.new( + name: hash['registrar'], + url: hash['www'] + ) + end + end - property_supported :registrant_contacts do - node("descr") do |array| - address = node("address") + property_not_supported :registrant_contacts do + end + property_supported :admin_contacts do + node("Holder") do |hash| Parser::Contact.new( - type: Parser::Contact::TYPE_REGISTRANT, - id: array[1], - name: address[0], - organization: array[0], - address: address[1], - zip: address[2], - city: address[3], - phone: node("phone") + type: Parser::Contact::TYPE_ADMINISTRATIVE, + id: hash['register number'], + name: hash['name'], + address: hash['address'][0], + zip: hash['address'][1], + city: hash['address'][2], + country: hash['country'], + phone: hash['phone'], + email: hash['holder email'] ) end end - property_not_supported :admin_contacts - - property_not_supported :technical_contacts + property_supported :technical_contacts do + node("Tech") do |hash| + Parser::Contact.new( + type: Parser::Contact::TYPE_TECHNICAL, + name: hash['name'], + email: hash['email'] + ) + end + end property_supported :nameservers do - Array.wrap(node("nserver")).map do |line| - Parser::Nameserver.new(name: line.split(" ").first) + node('Nameservers') do |hash| + Array(hash['nserver']).map do |line| + Parser::Nameserver.new(name: line.split(" ").first) + end end end diff --git a/lib/whois/parsers/whois.gg.rb b/lib/whois/parsers/whois.gg.rb index f13fb813..4530f174 100644 --- a/lib/whois/parsers/whois.gg.rb +++ b/lib/whois/parsers/whois.gg.rb @@ -21,7 +21,7 @@ class Parsers class WhoisGg < BaseCocca2 property_supported :status do - list = Array.wrap(node("Domain Status")).map(&:downcase) + list = Array(node("Domain Status")).map(&:downcase) list.include?("available") ? :available : super() end diff --git a/lib/whois/parsers/whois.in.ua.rb b/lib/whois/parsers/whois.in.ua.rb index d974bee7..11e2f92e 100644 --- a/lib/whois/parsers/whois.in.ua.rb +++ b/lib/whois/parsers/whois.in.ua.rb @@ -38,7 +38,7 @@ class WhoisInUa < Base end property_supported :available? do - !!(content_for_scanner =~ /No records found for object/) + !!(content_for_scanner =~ /Domain name does not exist/) end property_supported :registered? do @@ -46,19 +46,21 @@ class WhoisInUa < Base end - property_not_supported :created_on + property_supported :created_on do + if content_for_scanner =~ /created:\s+(.*)\n/ + parse_time(::Regexp.last_match(1)) + end + end property_supported :updated_on do - if content_for_scanner =~ /changed:\s+(.*)\n/ - time = ::Regexp.last_match(1).split(" ").last - Time.strptime(time, "%Y%m%d%H%M%S") + if content_for_scanner =~ /modified:\s+(.*)\n/ + parse_time(::Regexp.last_match(1)) end end property_supported :expires_on do - if content_for_scanner =~ /status:\s+(.*)\n/ - time = ::Regexp.last_match(1).split(" ").last - Time.strptime(time, "%Y%m%d%H%M%S") + if content_for_scanner =~ /expires:\s+(.*)\n/ + parse_time(::Regexp.last_match(1)) end end diff --git a/lib/whois/parsers/whois.jprs.jp.rb b/lib/whois/parsers/whois.jprs.jp.rb index b0dfbd2f..c3f31aa7 100644 --- a/lib/whois/parsers/whois.jprs.jp.rb +++ b/lib/whois/parsers/whois.jprs.jp.rb @@ -63,27 +63,48 @@ class WhoisJprsJp < Base end - # TODO: timezone ('Asia/Tokyo') property_supported :created_on do if content_for_scanner =~ /\[(?:Created on|Registered Date)\][ \t]+(.*)\n/ - ::Regexp.last_match(1).empty? ? nil : parse_time(::Regexp.last_match(1)) + (::Regexp.last_match(1).empty?) ? nil : parse_time(::Regexp.last_match(1), timezone: 'Asia/Tokyo') end end - # TODO: timezone ('Asia/Tokyo') property_supported :updated_on do if content_for_scanner =~ /\[Last Updated?\][ \t]+(.*)\n/ - ::Regexp.last_match(1).empty? ? nil : parse_time(::Regexp.last_match(1)) + (::Regexp.last_match(1).empty?) ? nil : parse_time(::Regexp.last_match(1), timezone: 'Asia/Tokyo') end end - # TODO: timezone ('Asia/Tokyo') property_supported :expires_on do if content_for_scanner =~ /\[(?:Expires on|State)\][ \t]+(.*)\n/ - ::Regexp.last_match(1).empty? ? nil : parse_time(::Regexp.last_match(1)) + (::Regexp.last_match(1).empty?) ? nil : parse_time(::Regexp.last_match(1), timezone: 'Asia/Tokyo') end end + property_supported :registrar do + name = nil + organization = nil + url = nil + + if content_for_scanner =~ /\[Registrant\][ \t]+(.*)\n/ + name = ::Regexp.last_match(1) + end + + if content_for_scanner =~ /\[Name\][ \t]+(.*)\n/ + organization = ::Regexp.last_match(1) + end + + if content_for_scanner =~ /\[Web Page\][ \t]+(.*)\n/ && !::Regexp.last_match(1).strip.empty? + url = ::Regexp.last_match(1).strip + end + + Parser::Registrar.new( + id: nil, + name: name, + organization: organization, + url: url + ) + end property_supported :nameservers do content_for_scanner.scan(/\[Name Server\][\s\t]+([^\s\n]+?)\n/).flatten.map do |name| diff --git a/lib/whois/parsers/whois.markmonitor.com.rb b/lib/whois/parsers/whois.markmonitor.com.rb index bbae3ef8..e15f7ff9 100644 --- a/lib/whois/parsers/whois.markmonitor.com.rb +++ b/lib/whois/parsers/whois.markmonitor.com.rb @@ -25,11 +25,6 @@ class WhoisMarkmonitorCom < BaseIcannCompliant pattern_throttled: /^You have exceeded your quota of queries\./, } - - def response_throttled? - !!node("response:throttled") - end - end end diff --git a/lib/whois/parsers/whois.monic.mo.rb b/lib/whois/parsers/whois.monic.mo.rb index 642c53a9..9c1fd93c 100644 --- a/lib/whois/parsers/whois.monic.mo.rb +++ b/lib/whois/parsers/whois.monic.mo.rb @@ -58,9 +58,7 @@ class WhoisMonicMo < Base property_supported :registrar do if content_for_scanner =~ /Registrar:\s+(.+)\n/ - Parser::Registrar.new( - :name => ::Regexp.last_match(1) - ) + Parser::Registrar.new(name: ::Regexp.last_match(1)) end end diff --git a/lib/whois/parsers/whois.nic.mx.rb b/lib/whois/parsers/whois.mx.rb similarity index 98% rename from lib/whois/parsers/whois.nic.mx.rb rename to lib/whois/parsers/whois.mx.rb index 351d5f65..9db79e66 100644 --- a/lib/whois/parsers/whois.nic.mx.rb +++ b/lib/whois/parsers/whois.mx.rb @@ -24,7 +24,7 @@ class Parsers # See WhoisNicIt parser for an explanation of all available methods # and examples. # - class WhoisNicMx < Base + class WhoisMx < Base property_supported :status do if available? diff --git a/lib/whois/parsers/whois.nic.asia.rb b/lib/whois/parsers/whois.nic.asia.rb index 0e470ffc..489cde5f 100644 --- a/lib/whois/parsers/whois.nic.asia.rb +++ b/lib/whois/parsers/whois.nic.asia.rb @@ -24,83 +24,19 @@ class WhoisNicAsia < BaseAfilias pattern_reserved: /^Reserved by DotAsia\n/, } - property_supported :status do if reserved? :reserved else - Array.wrap(node("Domain Status")) - end - end - - - property_supported :created_on do - node("Domain Create Date") do |value| - parse_time(value) - end - end - - property_supported :updated_on do - node("Domain Last Updated Date") do |value| - parse_time(value) - end - end - - property_supported :expires_on do - node("Domain Expiration Date") do |value| - parse_time(value) + Array(node("Domain Status")) end end - - property_supported :admin_contacts do - build_contact("Administrative", Parser::Contact::TYPE_ADMINISTRATIVE) - end - - property_supported :technical_contacts do - build_contact("Technical", Parser::Contact::TYPE_TECHNICAL) - end - - - property_supported :nameservers do - Array.wrap(node("Nameservers")).reject(&:empty?).map do |name| - Parser::Nameserver.new(:name => name.downcase) - end - end - - # NEWPROPERTY def reserved? !!node("status:reserved") end - - private - - def build_contact(element, type) - node("#{element} ID") do - address = ["", "2", "3"] - .map { |i| node("#{element} Address#{i}") } - .delete_if(&:empty?) - .join("\n") - - Parser::Contact.new( - :type => type, - :id => node("#{element} ID"), - :name => node("#{element} Name"), - :organization => node("#{element} Organization"), - :address => address, - :city => node("#{element} City"), - :zip => node("#{element} Postal Code"), - :state => node("#{element} State/Province"), - :country_code => node("#{element} Country/Economy"), - :phone => node("#{element} Phone"), - :fax => node("#{element} FAX"), - :email => node("#{element} E-mail") - ) - end - end - end end diff --git a/lib/whois/parsers/whois.nic.cl.rb b/lib/whois/parsers/whois.nic.cl.rb index 28134bd9..334dbe2e 100644 --- a/lib/whois/parsers/whois.nic.cl.rb +++ b/lib/whois/parsers/whois.nic.cl.rb @@ -18,14 +18,12 @@ class Parsers # # Parser for the whois.nic.cl server. # - # NOTE: This parser is just a stub and provides only a few basic methods - # to check for domain availability and get domain status. - # Please consider to contribute implementing missing methods. - # See WhoisNicIt parser for an explanation of all available methods - # and examples. - # class WhoisNicCl < Base + property_supported :domain do + content_for_scanner.slice(/Domain name:\s+(.+?)$/, 1) + end + property_supported :status do if available? :available @@ -35,33 +33,40 @@ class WhoisNicCl < Base end property_supported :available? do - !!(content_for_scanner =~ /^(.+?): no existe$/) + !!(content_for_scanner =~ /^(.+?): no entries found.$/) end property_supported :registered? do !available? end + property_supported :registrant_contacts do + Parser::Contact.new(type: Parser::Contact::TYPE_REGISTRANT, + name: content_for_scanner[/Registrant name:\s+(.+?)$/, 1], + organization: content_for_scanner[/Registrant organisation:\s+(.+?)$/, 1]) + end - property_not_supported :created_on + property_supported :registrar do + Parser::Registrar.new(name: content_for_scanner[/Registrar name:\s+(.+?)$/, 1], + url: content_for_scanner[/Registrar URL:\s+(.+?)$/, 1]) + end - # TODO: custom date format with foreign month names - # property_supported :updated_on do - # if content_for_scanner =~ /changed:\s+(.*)\n/ - # parse_time($1.split(" ", 2).last) - # end - # end + property_supported :created_on do + if content_for_scanner =~ /Creation date:\s+(.*)\n/ + parse_time($1) + end + end - property_not_supported :expires_on + property_supported :expires_on do + if content_for_scanner =~ /Expiration date:\s+(.*)\n/ + parse_time($1) + end + end property_supported :nameservers do - if content_for_scanner =~ /Servidores de nombre \(Domain servers\):\n((.+\n)+)\n/ - ::Regexp.last_match(1).split("\n").map do |line| - line.strip! - line =~ /(.+) \((.+)\)/ - Parser::Nameserver.new(:name => ::Regexp.last_match(1), :ipv4 => ::Regexp.last_match(2)) - end + content_for_scanner.scan(/Name server:\s+(.+)\n/).flatten.map do |name| + Parser::Nameserver.new(name: name.downcase) end end diff --git a/lib/whois/parsers/whois.nic.space.rb b/lib/whois/parsers/whois.nic.cloud.rb similarity index 70% rename from lib/whois/parsers/whois.nic.space.rb rename to lib/whois/parsers/whois.nic.cloud.rb index 8cd8ea25..f5aa757a 100644 --- a/lib/whois/parsers/whois.nic.space.rb +++ b/lib/whois/parsers/whois.nic.cloud.rb @@ -7,18 +7,18 @@ #++ -require_relative 'whois.centralnic.com' +require_relative 'base_icann_compliant' module Whois class Parsers - # Parser for the whois.nic.space server. + # Parser for the whois.nic.cloud server. # # @see Whois::Parsers::Example # The Example parser for the list of all available methods. # - class WhoisNicSpace < WhoisCentralnicCom + class WhoisNicCloud < BaseIcannCompliant end end diff --git a/lib/whois/parsers/whois.nic.co.rb b/lib/whois/parsers/whois.nic.co.rb index 3d62ee9e..b1edfb24 100644 --- a/lib/whois/parsers/whois.nic.co.rb +++ b/lib/whois/parsers/whois.nic.co.rb @@ -7,7 +7,7 @@ #++ -require_relative 'base_shared2' +require_relative 'base_icann_compliant' module Whois @@ -18,7 +18,7 @@ class Parsers # @see Whois::Parsers::Example # The Example parser for the list of all available methods. # - class WhoisNicCo < BaseShared2 + class WhoisNicCo < BaseIcannCompliant end end diff --git a/lib/whois/parsers/whois.nic.college.rb b/lib/whois/parsers/whois.nic.college.rb deleted file mode 100644 index a3ac2593..00000000 --- a/lib/whois/parsers/whois.nic.college.rb +++ /dev/null @@ -1,25 +0,0 @@ -#-- -# Ruby Whois -# -# An intelligent pure Ruby WHOIS client and parser. -# -# Copyright (c) 2009-2022 Simone Carletti -#++ - - -require_relative 'whois.centralnic.com' - - -module Whois - class Parsers - - # Parser for the whois.nic.college server. - # - # @see Whois::Parsers::Example - # The Example parser for the list of all available methods. - # - class WhoisNicCollege < WhoisCentralnicCom - end - - end -end diff --git a/lib/whois/parsers/whois.nic.consulting.rb b/lib/whois/parsers/whois.nic.consulting.rb new file mode 100644 index 00000000..64c6de82 --- /dev/null +++ b/lib/whois/parsers/whois.nic.consulting.rb @@ -0,0 +1,73 @@ +#-- +# Ruby Whois +# +# An intelligent pure Ruby WHOIS client and parser. +# +# Copyright (c) 2009-2022 Simone Carletti +#++ + + +require_relative 'base' + + +module Whois + class Parsers + + # + # = whois.nic.consulting parser + # + # Parser for the whois.nic.consulting server. + # + # NOTE: This parser is just a stub and provides only a few basic methods + # to check for domain availability and get domain status. + # Please consider to contribute implementing missing methods. + # See WhoisNicIt parser for an explanation of all available methods + # and examples. + # + class WhoisNicConsulting < Base + + property_supported :status do + content_for_scanner.scan(/Status:\s+(.+?)\n/).flatten + end + + property_supported :available? do + !!(content_for_scanner =~ /Domain not found/) + end + + property_supported :registered? do + !available? + end + + property_supported :created_on do + if content_for_scanner =~ /Creation Date:\s+(.*)\n/ + parse_time(::Regexp.last_match(1)) + end + end + + property_supported :updated_on do + if content_for_scanner =~ /Updated Date:\s+(.*)\n/ + parse_time(::Regexp.last_match(1)) + end + end + + property_supported :expires_on do + if content_for_scanner =~ /Registry Expiry Date:\s+(.*)\n/ + parse_time(::Regexp.last_match(1)) + end + end + + property_supported :registrar do + Parser::Registrar.new(name: content_for_scanner[/Registrar:\s+(.+?)$/, 1], + url: content_for_scanner[/Registrar URL:\s+(.+?)$/, 1]) + end + + property_supported :nameservers do + content_for_scanner.scan(/Name Server:\s+(.+)\n/).flatten.map do |name| + Parser::Nameserver.new(:name => name) + end + end + + end + + end +end diff --git a/lib/whois/parsers/whois.nic.design.rb b/lib/whois/parsers/whois.nic.design.rb deleted file mode 100644 index b5de5c71..00000000 --- a/lib/whois/parsers/whois.nic.design.rb +++ /dev/null @@ -1,25 +0,0 @@ -#-- -# Ruby Whois -# -# An intelligent pure Ruby WHOIS client and parser. -# -# Copyright (c) 2009-2022 Simone Carletti -#++ - - -require_relative 'whois.centralnic.com' - - -module Whois - class Parsers - - # Parser for the whois.nic.design server. - # - # @see Whois::Parsers::Example - # The Example parser for the list of all available methods. - # - class WhoisNicDesign < WhoisCentralnicCom - end - - end -end diff --git a/lib/whois/parsers/whois.nic.es.rb b/lib/whois/parsers/whois.nic.es.rb index cfd6727c..4800da27 100644 --- a/lib/whois/parsers/whois.nic.es.rb +++ b/lib/whois/parsers/whois.nic.es.rb @@ -48,7 +48,7 @@ class WhoisNicEs < Base property_supported :created_on do if content_for_scanner =~ /Creation Date:\s+(.+)\n/ - parse_time(::Regexp.last_match(1)) + DateTime.strptime(::Regexp.last_match(1), "%d/%m/%y").to_time end end @@ -56,16 +56,13 @@ class WhoisNicEs < Base property_supported :expires_on do if content_for_scanner =~ /Expiration Date:\s+(.+)\n/ - parse_time(::Regexp.last_match(1)) + DateTime.strptime(::Regexp.last_match(1), "%d/%m/%y").to_time end end property_supported :registrar do - Parser::Registrar.new( - :name => 'ES-NIC', - :organization => 'ES-NIC Delegated Internet Registry for Spain' - ) + Parser::Registrar.new(name: 'ES-NIC') end @@ -73,17 +70,7 @@ class WhoisNicEs < Base if content_for_scanner =~ /Registrant Name:\s+(.+)\n/ Parser::Contact.new( type: Parser::Contact::TYPE_REGISTRANT, - id: nil, name: ::Regexp.last_match(1).to_s.strip, - organization: nil, - address: nil, - city: nil, - zip: nil, - state: nil, - country: nil, - phone: nil, - fax: nil, - email: nil ) end end diff --git a/lib/whois/parsers/whois.nic.fm.rb b/lib/whois/parsers/whois.nic.fm.rb index 777acbd5..89a055ad 100644 --- a/lib/whois/parsers/whois.nic.fm.rb +++ b/lib/whois/parsers/whois.nic.fm.rb @@ -7,12 +7,6 @@ class WhoisNicFm < BaseIcannCompliant self.scanner = Scanners::BaseIcannCompliant, { pattern_available: /DOMAIN NOT FOUND\n/, } - - property_supported :expires_on do - node("Registry Expiry Date") do |value| - parse_time(value) - end - end end end end diff --git a/lib/whois/parsers/whois.nic.fo.rb b/lib/whois/parsers/whois.nic.fo.rb index 7027e351..a8bbe8d3 100644 --- a/lib/whois/parsers/whois.nic.fo.rb +++ b/lib/whois/parsers/whois.nic.fo.rb @@ -32,7 +32,7 @@ class WhoisNicFo < BaseWhoisd # whois.nic.fo is using an old whoisd version. property_supported :nameservers do - Array.wrap(node('nserver')).map do |line| + Array(node('nserver')).map do |line| Parser::Nameserver.new(:name => line.strip) end end diff --git a/lib/whois/parsers/whois.nic.google.rb b/lib/whois/parsers/whois.nic.google.rb new file mode 100644 index 00000000..93871af2 --- /dev/null +++ b/lib/whois/parsers/whois.nic.google.rb @@ -0,0 +1,12 @@ +require_relative 'base_icann_compliant' + +module Whois + class Parsers + + class WhoisNicGoogle < BaseIcannCompliant + self.scanner = Scanners::BaseIcannCompliant, { + pattern_available: /Domain not found.\n/ + } + end + end +end diff --git a/lib/whois/parsers/whois.nic.gs.rb b/lib/whois/parsers/whois.nic.gs.rb index 5ea724d5..edbb7c9b 100644 --- a/lib/whois/parsers/whois.nic.gs.rb +++ b/lib/whois/parsers/whois.nic.gs.rb @@ -21,7 +21,7 @@ class Parsers class WhoisNicGs < BaseCocca2 property_supported :status do - list = Array.wrap(node("Domain Status")).map(&:downcase) + list = Array(node("Domain Status")).map(&:downcase) list.include?("available") ? :available : super() end diff --git a/lib/whois/parsers/whois.nic.it.rb b/lib/whois/parsers/whois.nic.it.rb index c7db6447..b92dbba0 100644 --- a/lib/whois/parsers/whois.nic.it.rb +++ b/lib/whois/parsers/whois.nic.it.rb @@ -116,7 +116,7 @@ def unavailable? property_supported :nameservers do - Array.wrap(node("Nameservers")).map do |name| + Array(node("Nameservers")).map do |name| Parser::Nameserver.new(:name => name) end end diff --git a/lib/whois/parsers/whois.nic.la.rb b/lib/whois/parsers/whois.nic.la.rb index 75548cfe..5442c936 100644 --- a/lib/whois/parsers/whois.nic.la.rb +++ b/lib/whois/parsers/whois.nic.la.rb @@ -6,19 +6,26 @@ # Copyright (c) 2009-2022 Simone Carletti #++ - -require_relative 'base' -require_relative 'whois.centralnic.com.rb' - +require_relative 'base_icann_compliant' module Whois class Parsers # Parser for the whois.nic.la server. - # - # It aliases the whois.centralnic.com parser because - # the .LA TLD is powered by Centralnic. - class WhoisNicLa < WhoisCentralnicCom + class WhoisNicLa < BaseIcannCompliant + self.scanner = Scanners::BaseIcannCompliant, { + pattern_available: /^The queried object does not exist:.+\(?DOMAIN NOT FOUND\)?/, + pattern_disclaimer: /^This whois service is provided by LANIC/ + } + + private + + def build_contact(element, type) + node("#{element} Email") do |email| + Parser::Contact.new(type: type, email: email) + end + end + end end diff --git a/lib/whois/parsers/whois.nic.me.rb b/lib/whois/parsers/whois.nic.me.rb index cc210aeb..8b63b588 100644 --- a/lib/whois/parsers/whois.nic.me.rb +++ b/lib/whois/parsers/whois.nic.me.rb @@ -15,70 +15,6 @@ class Parsers # Parser for the whois.nic.me server. class WhoisNicMe < BaseAfilias - - property_supported :status do - Array.wrap(node("Domain Status")) - end - - - property_supported :created_on do - node("Domain Create Date") do |value| - parse_time(value) - end - end - - property_supported :updated_on do - node("Domain Last Updated Date") do |value| - parse_time(value) - end - end - - property_supported :expires_on do - node("Domain Expiration Date") do |value| - parse_time(value) - end - end - - - property_supported :nameservers do - Array.wrap(node("Nameservers")).reject(&:empty?).map do |name| - Parser::Nameserver.new(name: name.downcase) - end - end - - - private - - def build_contact(element, type) - node("#{element} ID") do - address = ["", "2", "3"] - .map { |i| node("#{element} Address#{i}") } - .delete_if(&:empty?) - .join("\n") - - Parser::Contact.new( - type: type, - id: node("#{element} ID"), - name: node("#{element} Name"), - organization: node("#{element} Organization"), - address: address, - city: node("#{element} City"), - zip: node("#{element} Postal Code"), - state: node("#{element} State/Province"), - country_code: node("#{element} Country/Economy"), - phone: node("#{element} Phone"), - fax: node("#{element} FAX"), - email: node("#{element} E-mail") - ) - end - end - - def decompose_registrar(value) - if value =~ /^(.+?) ([^\s]+)$/ - [::Regexp.last_match(2), ::Regexp.last_match(1)] - end - end - end end diff --git a/lib/whois/parsers/whois.nic.mg.rb b/lib/whois/parsers/whois.nic.mg.rb index 6f69db8c..60fbb876 100644 --- a/lib/whois/parsers/whois.nic.mg.rb +++ b/lib/whois/parsers/whois.nic.mg.rb @@ -21,7 +21,7 @@ class Parsers class WhoisNicMg < BaseCocca2 property_supported :status do - list = Array.wrap(node("Domain Status")).map(&:downcase) + list = Array(node("Domain Status")).map(&:downcase) list.include?("available") ? :available : super() end diff --git a/lib/whois/parsers/whois.nic.net.ng.rb b/lib/whois/parsers/whois.nic.net.ng.rb index d3f5e10d..7fd5796f 100644 --- a/lib/whois/parsers/whois.nic.net.ng.rb +++ b/lib/whois/parsers/whois.nic.net.ng.rb @@ -17,7 +17,7 @@ class Parsers class WhoisNicNetNg < BaseCocca2 property_supported :status do - list = Array.wrap(node("Domain Status")).map(&:downcase) + list = Array(node("Domain Status")).map(&:downcase) list.include?("available") ? :available : super() end diff --git a/lib/whois/parsers/whois.nic.net.sb.rb b/lib/whois/parsers/whois.nic.net.sb.rb index 8854c82d..d9b6a8ea 100644 --- a/lib/whois/parsers/whois.nic.net.sb.rb +++ b/lib/whois/parsers/whois.nic.net.sb.rb @@ -21,7 +21,7 @@ class Parsers class WhoisNicNetSb < BaseCocca2 property_supported :status do - list = Array.wrap(node("Domain Status")).map(&:downcase) + list = Array(node("Domain Status")).map(&:downcase) list.include?("available") ? :available : super() end diff --git a/lib/whois/parsers/whois.nic.pw.rb b/lib/whois/parsers/whois.nic.pw.rb deleted file mode 100644 index 23c21b7f..00000000 --- a/lib/whois/parsers/whois.nic.pw.rb +++ /dev/null @@ -1,25 +0,0 @@ -#-- -# Ruby Whois -# -# An intelligent pure Ruby WHOIS client and parser. -# -# Copyright (c) 2009-2022 Simone Carletti -#++ - - -require_relative 'base' -require_relative 'whois.centralnic.com.rb' - - -module Whois - class Parsers - - # Parser for the whois.nic.pw server. - # - # It aliases the whois.centralnic.com parser because - # the .PW TLD is powered by Centralnic. - class WhoisNicPw < WhoisCentralnicCom - end - - end -end diff --git a/lib/whois/parsers/whois.nic.so.rb b/lib/whois/parsers/whois.nic.so.rb index efa1af97..1ac08a66 100644 --- a/lib/whois/parsers/whois.nic.so.rb +++ b/lib/whois/parsers/whois.nic.so.rb @@ -6,64 +6,22 @@ # Copyright (c) 2009-2022 Simone Carletti #++ - -require_relative 'base' - +require_relative 'base_icann_compliant' module Whois class Parsers - # # = whois.nic.so parser # # Parser for the whois.nic.so server. # - # NOTE: This parser is just a stub and provides only a few basic methods - # to check for domain availability and get domain status. - # Please consider to contribute implementing missing methods. - # See WhoisNicIt parser for an explanation of all available methods - # and examples. # - class WhoisNicSo < Base - - property_supported :status do - content_for_scanner.scan(/Status:\s+(.+?)\n/).flatten - end - - property_supported :available? do - !!(content_for_scanner =~ /^Not found: (.+?)$/) - end - - property_supported :registered? do - !available? - end - - - property_supported :created_on do - if content_for_scanner =~ /Creation Date:\s+(.+)\n/ - parse_time(::Regexp.last_match(1)) - end - end - - property_supported :updated_on do - if content_for_scanner =~ /Last Updated On:\s+(.+)\n/ - parse_time(::Regexp.last_match(1)) - end - end - - property_supported :expires_on do - if content_for_scanner =~ /Expiration Date:\s+(.+)\n/ - parse_time(::Regexp.last_match(1)) - end - end - - - property_supported :nameservers do - content_for_scanner.scan(/Name Server:\s+(.+)\n/).flatten.map do |name| - Parser::Nameserver.new(:name => name) - end - end + class WhoisNicSo < BaseIcannCompliant + include Scanners::Scannable + self.scanner = Scanners::BaseIcannCompliant, { + pattern_available: /^Domain Status: No Object Found$/ + } end end diff --git a/lib/whois/parsers/whois.nic.tech.rb b/lib/whois/parsers/whois.nic.tech.rb deleted file mode 100644 index 4ea19c35..00000000 --- a/lib/whois/parsers/whois.nic.tech.rb +++ /dev/null @@ -1,25 +0,0 @@ -#-- -# Ruby Whois -# -# An intelligent pure Ruby WHOIS client and parser. -# -# Copyright (c) 2009-2022 Simone Carletti -#++ - - -require_relative 'whois.centralnic.com' - - -module Whois - class Parsers - - # Parser for the whois.nic.tech server. - # - # @see Whois::Parsers::Example - # The Example parser for the list of all available methods. - # - class WhoisNicTech < WhoisCentralnicCom - end - - end -end diff --git a/lib/whois/parsers/whois.nic.uk.rb b/lib/whois/parsers/whois.nic.uk.rb index 4e6ce832..73d57463 100644 --- a/lib/whois/parsers/whois.nic.uk.rb +++ b/lib/whois/parsers/whois.nic.uk.rb @@ -149,7 +149,7 @@ class WhoisNicUk < Base # and will be replenished in 50 seconds. # def response_throttled? - !!(content_for_scanner =~ /The WHOIS query quota for .+ has been exceeded/) + !!(content_for_scanner =~ /the WHOIS query quota for .+ has been exceeded/i) end diff --git a/lib/whois/parsers/whois.nic.xxx.rb b/lib/whois/parsers/whois.nic.xxx.rb index cd52c8e5..a84c0eac 100644 --- a/lib/whois/parsers/whois.nic.xxx.rb +++ b/lib/whois/parsers/whois.nic.xxx.rb @@ -7,35 +7,20 @@ #++ -require_relative 'base_afilias2' +require_relative 'base_icann_compliant' module Whois class Parsers # Parser for the whois.nic.xxx server. - class WhoisNicXxx < BaseAfilias2 + class WhoisNicXxx < BaseIcannCompliant - self.scanner = Scanners::BaseAfilias, { - pattern_disclaimer: /^Access to/, - pattern_reserved: /^Reserved by ICM Registry\n/, + self.scanner = Scanners::BaseIcannCompliant, { + pattern_available: /^No Data Found/, + pattern_reserved: /^Reserved Domain Name\n/, # reserved: a.xxx } - - property_supported :status do - if reserved? - :reserved - else - super() - end - end - - - # NEWPROPERTY - def reserved? - !!node("status:reserved") - end - end end diff --git a/lib/whois/parsers/whois.nic.xyz.rb b/lib/whois/parsers/whois.nic.xyz.rb deleted file mode 100644 index a38e4117..00000000 --- a/lib/whois/parsers/whois.nic.xyz.rb +++ /dev/null @@ -1,25 +0,0 @@ -#-- -# Ruby Whois -# -# An intelligent pure Ruby WHOIS client and parser. -# -# Copyright (c) 2009-2022 Simone Carletti -#++ - - -require_relative 'whois.centralnic.com' - - -module Whois - class Parsers - - # Parser for the whois.nic.xyz server. - # - # @see Whois::Parsers::Example - # The Example parser for the list of all available methods. - # - class WhoisNicXyz < WhoisCentralnicCom - end - - end -end diff --git a/lib/whois/parsers/whois.nic.travel.rb b/lib/whois/parsers/whois.nic.yt.rb similarity index 72% rename from lib/whois/parsers/whois.nic.travel.rb rename to lib/whois/parsers/whois.nic.yt.rb index 4d17b8dd..8412254c 100644 --- a/lib/whois/parsers/whois.nic.travel.rb +++ b/lib/whois/parsers/whois.nic.yt.rb @@ -7,18 +7,18 @@ #++ -require_relative 'base_shared2' +require_relative 'base_nic_fr' module Whois class Parsers - # Parser for the whois.nic.travel server. + # Parser for the whois.nic.yt server. # # @see Whois::Parsers::Example # The Example parser for the list of all available methods. # - class WhoisNicTravel < BaseShared2 + class WhoisNicYt < BaseNicFr end end diff --git a/lib/whois/parsers/whois.pandi.or.id.rb b/lib/whois/parsers/whois.pandi.or.id.rb deleted file mode 100644 index 91da5a01..00000000 --- a/lib/whois/parsers/whois.pandi.or.id.rb +++ /dev/null @@ -1,25 +0,0 @@ -#-- -# Ruby Whois -# -# An intelligent pure Ruby WHOIS client and parser. -# -# Copyright (c) 2009-2022 Simone Carletti -#++ - - -require_relative 'base' -require_relative 'whois.centralnic.com.rb' - - -module Whois - class Parsers - - # Parser for the whois.pandi.or.id server. - # - # It aliases the whois.centralnic.com parser because - # it looks like the response is the same of Centralnic. - class WhoisPandiOrId < WhoisCentralnicCom - end - - end -end diff --git a/lib/whois/parsers/whois.pir.org.rb b/lib/whois/parsers/whois.pir.org.rb index fa3d3862..15b095d1 100644 --- a/lib/whois/parsers/whois.pir.org.rb +++ b/lib/whois/parsers/whois.pir.org.rb @@ -8,82 +8,12 @@ require_relative 'base_afilias' -require 'whois/scanners/whois.pir.org.rb' module Whois class Parsers # Parser for the whois.pir.org server. class WhoisPirOrg < BaseAfilias - - self.scanner = Scanners::WhoisPirOrg - - # Checks whether the response has been throttled. - # - # @return [Boolean] - # - # @example - # WHOIS LIMIT EXCEEDED - SEE WWW.PIR.ORG/WHOIS FOR DETAILS - # - def response_throttled? - !!node("response:throttled") - end - - property_supported :status do - Array.wrap(node("Domain Status")) - end - - property_supported :registrar do - node('Sponsoring Registrar') do |name| - Parser::Registrar.new( - id: node('Sponsoring Registrar IANA ID'), - name: node('Sponsoring Registrar') - ) - end - end - - property_supported :created_on do - node("Creation Date") do |value| - parse_time(value) - end - end - - property_supported :updated_on do - node("Updated Date") do |value| - parse_time(value) - end - end - - property_supported :expires_on do - node("Registry Expiry Date") do |value| - parse_time(value) - end - end - - def build_contact(element, type) - node("#{element} ID") do - address = [node("#{element} Street")] - address = (address + (1..3).map { |i| node("#{element} Street#{i}") }) - .delete_if { |i| i.nil? || i.empty? } - .join("\n") - - Parser::Contact.new( - :type => type, - :id => node("#{element} ID"), - :name => node("#{element} Name"), - :organization => node("#{element} Organization"), - :address => address, - :city => node("#{element} City"), - :zip => node("#{element} Postal Code"), - :state => node("#{element} State/Province"), - :country_code => node("#{element} Country"), - :phone => node("#{element} Phone"), - :fax => node("#{element} Fax"), - :email => node("#{element} Email") - ) - end - end - end end diff --git a/lib/whois/parsers/whois.pnina.ps.rb b/lib/whois/parsers/whois.pnina.ps.rb index fd9d291f..eb339dd2 100644 --- a/lib/whois/parsers/whois.pnina.ps.rb +++ b/lib/whois/parsers/whois.pnina.ps.rb @@ -21,7 +21,7 @@ class Parsers class WhoisPninaPs < BaseCocca2 property_supported :status do - list = Array.wrap(node("Domain Status")).map(&:downcase) + list = Array(node("Domain Status")).map(&:downcase) list.include?("available") ? :available : super() end diff --git a/lib/whois/parsers/whois.register.bg.rb b/lib/whois/parsers/whois.register.bg.rb index 5f8d0bdc..6dad5a28 100644 --- a/lib/whois/parsers/whois.register.bg.rb +++ b/lib/whois/parsers/whois.register.bg.rb @@ -48,9 +48,7 @@ class WhoisRegisterBg < Base property_supported :created_on do if content_for_scanner =~ /activated on:\s+(.*?)\n/ - # Time.parse("30/06/2003 00:00:00") - # => ArgumentError: argument out of range - parse_time(::Regexp.last_match(1).gsub("/", "-")) + parse_time(::Regexp.last_match(1)) end end @@ -58,9 +56,7 @@ class WhoisRegisterBg < Base property_supported :expires_on do if content_for_scanner =~ /expires at:\s+(.*?)\n/ - # Time.parse("30/06/2003 00:00:00") - # => ArgumentError: argument out of range - parse_time(::Regexp.last_match(1).gsub("/", "-")) + parse_time(::Regexp.last_match(1)) end end diff --git a/lib/whois/parsers/whois.inregistry.net.rb b/lib/whois/parsers/whois.registry.in.rb similarity index 57% rename from lib/whois/parsers/whois.inregistry.net.rb rename to lib/whois/parsers/whois.registry.in.rb index 542b2a66..8bb1f4ea 100644 --- a/lib/whois/parsers/whois.inregistry.net.rb +++ b/lib/whois/parsers/whois.registry.in.rb @@ -14,12 +14,9 @@ module Whois class Parsers # Parser for the whois.inregistry.net server. - class WhoisInregistryNet < BaseAfilias + class WhoisRegistryIn < BaseAfilias - self.scanner = Scanners::BaseAfilias, { - # Disclaimer starts with "Access to" in .in servers - pattern_disclaimer: /^Access to/, - } + self.scanner = Scanners::BaseAfilias end diff --git a/lib/whois/parsers/whois.rnids.rs.rb b/lib/whois/parsers/whois.rnids.rs.rb index cbb4077b..fd86f32c 100644 --- a/lib/whois/parsers/whois.rnids.rs.rb +++ b/lib/whois/parsers/whois.rnids.rs.rb @@ -98,7 +98,7 @@ class WhoisRnidsRs < Base property_supported :nameservers do - Array.wrap(node("DNS")).map do |line| + Array(node("DNS")).map do |line| name, ipv4 = line.split(/ - ?/).map(&:strip) name.chomp!(".") Parser::Nameserver.new(:name => name, :ipv4 => ipv4) diff --git a/lib/whois/parsers/whois.rotld.ro.rb b/lib/whois/parsers/whois.rotld.ro.rb index dd67724e..0c00c7ed 100644 --- a/lib/whois/parsers/whois.rotld.ro.rb +++ b/lib/whois/parsers/whois.rotld.ro.rb @@ -6,56 +6,40 @@ # Copyright (c) 2009-2022 Simone Carletti #++ - -require_relative 'base' - +require_relative 'base_icann_compliant' module Whois class Parsers # Parser for the whois.rotld.ro server. - # - # @note This parser is just a stub and provides only a few basic methods - # to check for domain availability and get domain status. - # Please consider to contribute implementing missing methods. - # - # @see Whois::Parsers::Example - # The Example parser for the list of all available methods. - # - class WhoisRotldRo < Base - - property_supported :status do - if content_for_scanner =~ /Domain Status:\s(.+?)\n/ - case ::Regexp.last_match(1).downcase - when "ok", "updateprohibited" - :registered - else - Whois::Parser.bug!(ParserError, "Unknown status `#{::Regexp.last_match(1)}'.") - end - else - :available - end - end + class WhoisRotldRo < BaseIcannCompliant - property_supported :available? do - !!(content_for_scanner =~ /^% No entries found/) - end + self.scanner = Scanners::BaseIcannCompliant, { + pattern_available: /^% No entries found/ + } - property_supported :registered? do - !available? + property_supported :created_on do + parse_time(node("Registered On")) end - - property_not_supported :created_on - property_not_supported :updated_on - property_not_supported :expires_on + property_supported :expires_on do + parse_time(node("Expires On")) + end + property_supported :registrar do + return unless node("Registrar") + + Parser::Registrar.new({ + name: node("Registrar"), + url: node("Referral URL"), + }) + end property_supported :nameservers do - content_for_scanner.scan(/Nameserver:\s+(.+)\n/).flatten.map do |name| - Parser::Nameserver.new(name: name) + Array(node("Nameserver")).reject(&:empty?).map do |name| + Parser::Nameserver.new(name: name.downcase) end end diff --git a/lib/whois/parsers/whois.schlund.info.rb b/lib/whois/parsers/whois.schlund.info.rb index ca51c0aa..d2946eae 100644 --- a/lib/whois/parsers/whois.schlund.info.rb +++ b/lib/whois/parsers/whois.schlund.info.rb @@ -22,12 +22,6 @@ class WhoisSchlundInfo < BaseIcannCompliant self.scanner = Scanners::BaseIcannCompliant, { pattern_available: /^Domain [\w.]+ is not registered here\.\n/, } - - property_supported :updated_on do - node('Updated Date') do |value| - parse_time(value) - end - end end end diff --git a/lib/whois/parsers/whois.smallregistry.net.rb b/lib/whois/parsers/whois.smallregistry.net.rb index 256c0396..2564942b 100644 --- a/lib/whois/parsers/whois.smallregistry.net.rb +++ b/lib/whois/parsers/whois.smallregistry.net.rb @@ -78,12 +78,9 @@ class WhoisSmallregistryNet < Base property_supported :registrar do node("registrar") do |hash| - v1, v2, v3, v4 = hash.values_at('nil', 'name', 'name', 'web') Parser::Registrar.new( - :id => v1, - :name => v2, - :organization => v3, - :url => v4 + :name => hash['name'], + :url => hash['web'] ) end end @@ -102,7 +99,7 @@ class WhoisSmallregistryNet < Base property_supported :nameservers do - Array.wrap(node("name_servers")).map do |hash| + Array(node("name_servers")).map do |hash| Parser::Nameserver.new(:name => hash) end end diff --git a/lib/whois/parsers/whois.srs.net.nz.rb b/lib/whois/parsers/whois.srs.net.nz.rb index 4bfcd9b6..10753e29 100644 --- a/lib/whois/parsers/whois.srs.net.nz.rb +++ b/lib/whois/parsers/whois.srs.net.nz.rb @@ -78,9 +78,7 @@ class WhoisSrsNetNz < Base property_supported :registrar do node("registrar_name") do |value| - Parser::Registrar.new( - name: value - ) + Parser::Registrar.new(name: value) end end diff --git a/lib/whois/parsers/whois.sx.rb b/lib/whois/parsers/whois.sx.rb index 24232e0c..805799d1 100644 --- a/lib/whois/parsers/whois.sx.rb +++ b/lib/whois/parsers/whois.sx.rb @@ -76,9 +76,7 @@ class WhoisSx < Base property_supported :registrar do node("Sponsoring Registrar") do |value| - Parser::Registrar.new( - :name => value - ) + Parser::Registrar.new(name: value) end end @@ -97,7 +95,7 @@ class WhoisSx < Base property_supported :nameservers do - Array.wrap(node("Name Server")).map do |name| + Array(node("Name Server")).map do |name| Parser::Nameserver.new(:name => name) end end diff --git a/lib/whois/parsers/whois.tcinet.ru.rb b/lib/whois/parsers/whois.tcinet.ru.rb index 8cacad5b..9b154dde 100644 --- a/lib/whois/parsers/whois.tcinet.ru.rb +++ b/lib/whois/parsers/whois.tcinet.ru.rb @@ -67,9 +67,7 @@ class WhoisTcinetRu < Base property_supported :registrar do if content_for_scanner =~ /registrar:\s+(.*)\n/ - Parser::Registrar.new( - :id => ::Regexp.last_match(1) - ) + Parser::Registrar.new(name: ::Regexp.last_match(1)) end end @@ -77,18 +75,17 @@ class WhoisTcinetRu < Base property_supported :admin_contacts do url = content_for_scanner[/admin-contact:\s+(.+)\n/, 1] email = content_for_scanner[/e-mail:\s+(.+)\n/, 1] - contact = if url or email - Parser::Contact.new( - :type => Parser::Contact::TYPE_ADMINISTRATIVE, - :url => url, - :email => email, - :name => content_for_scanner[/person:\s+(.+)\n/, 1], - :organization => content_for_scanner[/org:\s+(.+)\n/, 1], - :phone => content_for_scanner[/phone:\s+(.+)\n/, 1], - :fax => content_for_scanner[/fax-no:\s+(.+)\n/, 1] - ) - end - Array.wrap(contact) + if url or email + Parser::Contact.new( + :type => Parser::Contact::TYPE_ADMINISTRATIVE, + :url => url, + :email => email, + :name => content_for_scanner[/person:\s+(.+)\n/, 1], + :organization => content_for_scanner[/org:\s+(.+)\n/, 1], + :phone => content_for_scanner[/phone:\s+(.+)\n/, 1], + :fax => content_for_scanner[/fax-no:\s+(.+)\n/, 1] + ) + end end property_not_supported :registrant_contacts diff --git a/lib/whois/parsers/whois.tld.ee.rb b/lib/whois/parsers/whois.tld.ee.rb index ed2612aa..4075e074 100644 --- a/lib/whois/parsers/whois.tld.ee.rb +++ b/lib/whois/parsers/whois.tld.ee.rb @@ -84,7 +84,6 @@ class WhoisTldEe < Base node('Registrar') do |hash| Parser::Registrar.new( name: hash['name'], - organization: hash['name'], url: hash['url'] ) end @@ -105,7 +104,7 @@ class WhoisTldEe < Base property_supported :nameservers do node('Name servers') do |hash| - Array.wrap(hash['nserver']).map do |name| + Array(hash['nserver']).map do |name| Parser::Nameserver.new(name: name.downcase) end end @@ -116,14 +115,14 @@ class WhoisTldEe < Base def build_contact(element, type) node(element) do |hash| - el_size = Array.wrap(hash['name']).size + el_size = Array(hash['name']).size (0...el_size).map do |i| Parser::Contact.new( type: type, - name: Array.wrap(hash['name'])[i], - email: Array.wrap(hash['email'])[i], - updated_on: parse_time(Array.wrap(hash['changed'])[i]) + name: Array(hash['name'])[i], + email: Array(hash['email'])[i], + updated_on: parse_time(Array(hash['changed'])[i]) ) end end diff --git a/lib/whois/parsers/whois.tld.sy.rb b/lib/whois/parsers/whois.tld.sy.rb index d1d13952..fdc154eb 100644 --- a/lib/whois/parsers/whois.tld.sy.rb +++ b/lib/whois/parsers/whois.tld.sy.rb @@ -21,7 +21,7 @@ class Parsers class WhoisTldSy < BaseCocca2 property_supported :status do - list = Array.wrap(node("Domain Status")).map(&:downcase) + list = Array(node("Domain Status")).map(&:downcase) list.include?("available") ? :available : super() end diff --git a/lib/whois/parsers/whois.uniregistry.net.rb b/lib/whois/parsers/whois.uniregistry.net.rb index 8aaaf942..ee31f974 100644 --- a/lib/whois/parsers/whois.uniregistry.net.rb +++ b/lib/whois/parsers/whois.uniregistry.net.rb @@ -29,20 +29,12 @@ class WhoisUniregistryNet < BaseIcannCompliant end - property_supported :expires_on do - node('Registry Expiry Date') do |value| - parse_time(value) - end - end - - property_supported :registrar do return unless node('Sponsoring Registrar') Parser::Registrar.new( id: node('Sponsoring Registrar IANA ID'), - name: node('Sponsoring Registrar'), - organization: node('Sponsoring Registrar') + name: node('Sponsoring Registrar') ) end diff --git a/lib/whois/parsers/whois.yoursrs.com.rb b/lib/whois/parsers/whois.yoursrs.com.rb index 06d12aa9..0489700c 100644 --- a/lib/whois/parsers/whois.yoursrs.com.rb +++ b/lib/whois/parsers/whois.yoursrs.com.rb @@ -33,7 +33,7 @@ class WhoisYoursrsCom < Base property_supported :status do - Array.wrap(node("Status")) + Array(node("Status")) end property_supported :available? do @@ -66,9 +66,7 @@ class WhoisYoursrsCom < Base property_supported :registrar do node("Sponsoring Registrar") do |value| - Parser::Registrar.new( - name: value - ) + Parser::Registrar.new(name: value) end end @@ -87,7 +85,7 @@ class WhoisYoursrsCom < Base property_supported :nameservers do - Array.wrap(node("Name Server")).reject(&:empty?).map do |name| + Array(node("Name Server")).reject(&:empty?).map do |name| Parser::Nameserver.new(name: name.downcase) end end diff --git a/lib/whois/parsers/za_central_registry.rb b/lib/whois/parsers/za_central_registry.rb index a53c702a..cebd84ee 100644 --- a/lib/whois/parsers/za_central_registry.rb +++ b/lib/whois/parsers/za_central_registry.rb @@ -32,8 +32,7 @@ class ZaCentralRegistry < BaseIcannCompliant Parser::Registrar.new( id: node('Sponsoring Registrar IANA ID'), - name: node('Sponsoring Registrar'), - organization: node('Sponsoring Registrar') + name: node('Sponsoring Registrar') ) end diff --git a/lib/whois/scanners/base.rb b/lib/whois/scanners/base.rb index b85a3c09..7a5e91ad 100644 --- a/lib/whois/scanners/base.rb +++ b/lib/whois/scanners/base.rb @@ -54,7 +54,7 @@ def parse(content) if target[key].nil? target[key] = value else - target[key] = Array.wrap(target[key]) + target[key] = Array(target[key]) target[key] << value end end @@ -84,7 +84,7 @@ def _scan_keyvalues(pattern) if results[key].nil? results[key] = value else - results[key] = Array.wrap(results[key]) + results[key] = Array(results[key]) results[key] << value end end diff --git a/lib/whois/scanners/base_afilias.rb b/lib/whois/scanners/base_afilias.rb index ba686b53..f0827dc1 100644 --- a/lib/whois/scanners/base_afilias.rb +++ b/lib/whois/scanners/base_afilias.rb @@ -17,7 +17,7 @@ class BaseAfilias < Base tokenizer :scan_available do - if @input.scan(/^NOT FOUND\n/) + if @input.scan(/^(NOT FOUND|No Data Found)\n/) @ast["status:available"] = true end end @@ -30,19 +30,15 @@ class BaseAfilias < Base # .ORG tokenizer :scan_throttled do - if @input.match?(/^WHOIS LIMIT EXCEEDED/) + if @input.match?(/.*LIMIT EXCEEDED/) @ast["response:throttled"] = true @input.skip(/^.+\n/) end end tokenizer :scan_disclaimer do - if settings[:pattern_disclaimer] - if @input.match?(settings[:pattern_disclaimer]) - @ast["field:disclaimer"] = _scan_lines_to_array(/^(.+)\n/).join(" ") - end - elsif @input.pos == 0 && @input.match?(/^(.+\n){3,}\n/) - @ast["field:disclaimer"] = _scan_lines_to_array(/^(.+)\n/).join(" ") + if @input.match?(/^Access to/) + @ast["field:disclaimer"] = _scan_lines_to_array(/^(.+)\n+/).join(" ") end end end diff --git a/lib/whois/scanners/base_icann_compliant.rb b/lib/whois/scanners/base_icann_compliant.rb index 3fcdc608..5b3ce189 100644 --- a/lib/whois/scanners/base_icann_compliant.rb +++ b/lib/whois/scanners/base_icann_compliant.rb @@ -9,16 +9,18 @@ class BaseIcannCompliant < Base self.tokenizers += [ :skip_head, :scan_available, + :scan_reserved, :scan_throttled, - :skip_empty_line, - :skip_blank_line, :scan_keyvalue, + :skip_blank_line, + :scan_disclaimer, :skip_end, ] tokenizer :scan_available do if settings[:pattern_available] && @input.skip_until(settings[:pattern_available]) @ast['status:available'] = true + @ast["Domain Name"] ||= @input[1] # Regexp first capture group if any end end @@ -28,6 +30,12 @@ class BaseIcannCompliant < Base end end + tokenizer :scan_reserved do + if settings[:pattern_reserved] && @input.skip_until(settings[:pattern_reserved]) + @ast["status:reserved"] = true + end + end + tokenizer :skip_head do if @input.skip_until(/Domain Name:/) @input.scan(/\s?(.+)\n/) @@ -39,6 +47,12 @@ class BaseIcannCompliant < Base @input.terminate end + tokenizer :scan_disclaimer do + if @input.match?(settings[:pattern_disclaimer] || /^The Service is provided/) + @ast["field:disclaimer"] = _scan_lines_to_array(/^(.+)\n+/).join(" ") + end + end + end end diff --git a/lib/whois/scanners/whois.auda.org.au.rb b/lib/whois/scanners/whois.auda.org.au.rb new file mode 100644 index 00000000..13d7416c --- /dev/null +++ b/lib/whois/scanners/whois.auda.org.au.rb @@ -0,0 +1,35 @@ +require_relative 'base' + +module Whois + module Scanners + + # Scanner for the whois.auda.org.au record. + class WhoisAudaOrgAu < Base + + self.tokenizers += [ + :skip_empty_line, + :scan_available, + :skip_lastupdate, + :scan_disclaimer, + :scan_keyvalue, + ] + + tokenizer :scan_available do + if @input.skip(/^(No Data Found)|(NOT FOUND)\n/) + @ast["status:available"] = true + end + end + + tokenizer :skip_lastupdate do + @input.skip(/>>>(.+?)<<<\n/) + end + + tokenizer :scan_disclaimer do + if @input.match?(/^(Afilias Australia Pty Ltd)(.+)\n\n/) + @ast["field:disclaimer"] = _scan_lines_to_array(/(.+)(\n+)/).join("\n") + end + end + end + + end +end diff --git a/lib/whois/scanners/whois.audns.net.au.rb b/lib/whois/scanners/whois.audns.net.au.rb deleted file mode 100644 index b802b085..00000000 --- a/lib/whois/scanners/whois.audns.net.au.rb +++ /dev/null @@ -1,25 +0,0 @@ -require_relative 'base' - -module Whois - module Scanners - - # Scanner for the whois.audns.net.au record. - class WhoisAudnsNetAu < Base - - self.tokenizers += [ - :skip_empty_line, - :scan_available, - :scan_keyvalue, - ] - - - tokenizer :scan_available do - if @input.skip(/^No Data Found\n/) - @ast["status:available"] = true - end - end - - end - - end -end diff --git a/lib/whois/scanners/whois.centralnic.com.rb b/lib/whois/scanners/whois.centralnic.com.rb deleted file mode 100644 index 15825369..00000000 --- a/lib/whois/scanners/whois.centralnic.com.rb +++ /dev/null @@ -1,32 +0,0 @@ -require_relative 'base' - -module Whois - module Scanners - - # Scanner for the whois.centralnic.com record. - class WhoisCentralnicCom < Base - - self.tokenizers += [ - :skip_empty_line, - :scan_available, - :scan_disclaimer, - :scan_keyvalue, - ] - - - tokenizer :scan_available do - if @input.skip(/^DOMAIN NOT FOUND\n/) - @ast["status:available"] = true - end - end - - tokenizer :scan_disclaimer do - if @input.match?(/^\S([^:]+)\n/) - @ast["field:disclaimer"] = _scan_lines_to_array(/(.+)\n/).join(" ") - end - end - - end - - end -end diff --git a/lib/whois/scanners/whois.cira.ca.rb b/lib/whois/scanners/whois.cira.ca.rb deleted file mode 100644 index dd8931ab..00000000 --- a/lib/whois/scanners/whois.cira.ca.rb +++ /dev/null @@ -1,72 +0,0 @@ -require_relative 'base' - -module Whois - module Scanners - - # Scanner for the whois.cira.ca record. - class WhoisCiraCa < Base - - self.tokenizers += [ - :skip_empty_line, - :scan_disclaimer, - :skip_comment, - :scan_header, - :scan_keyvalue, - :scan_nameserver, - ] - - - tokenizer :scan_disclaimer do - if @input.match?(/^% Use of CIRA/) - @ast["field:disclaimer"] = _scan_lines_to_array(/^%(.*)\n/).join("\n") - end - end - - tokenizer :scan_header do - if !@input.match?(/^\s/) && @input.scan(/^(.+?):\n/) - @tmp["group"] = @input[1] - end - end - - tokenizer :scan_keyvalue do - if @input.scan(/^(.+?):(.*?)\n/) - start = @input[1] - key, value = start.strip, @input[2].strip - - # This is a nested key - target = if start.index(" ") == 0 - error!("Expected group.") if @tmp["group"].nil? - @ast[@tmp["group"]] ||= {} - @ast[@tmp["group"]] - else - @tmp.delete("group") - @ast - end - - more = _scan_lines_to_array(/^\s{#{start.size}}(.+)\n/) - value = more.unshift(value).join("\n") unless more.empty? - - if target[key].nil? - target[key] = value - else - target[key] = Array.wrap(target[key]) - target[key] << value - end - end - end - - tokenizer :scan_nameserver do - if @input.scan(/^\s+(.+?)\n/) && @tmp["group"] == "Name servers" - @ast["field:nameservers"] ||= [] - @ast["field:nameservers"] << @input[1].strip - end - end - - tokenizer :skip_comment do - @input.skip(/^%.*\n/) - end - - end - - end -end diff --git a/lib/whois/scanners/whois.fi.rb b/lib/whois/scanners/whois.fi.rb index 5a67f1be..a6cdec89 100644 --- a/lib/whois/scanners/whois.fi.rb +++ b/lib/whois/scanners/whois.fi.rb @@ -9,12 +9,14 @@ class WhoisFi < Base self.tokenizers += [ :skip_empty_line, :scan_available, - :scan_disclaimer, :scan_keyvalue, :scan_reserved, + :scan_section, + :scan_keyvalue, + :skip_last_update, + :scan_disclaimer ] - tokenizer :scan_available do if @input.skip(/^Domain not found/) @ast["status:available"] = true @@ -27,13 +29,40 @@ class WhoisFi < Base end end - tokenizer :scan_disclaimer do - if @input.match?(/^More information/) - @ast["field:disclaimer"] = @input.scan_until(/(.*)\n\n/).strip + tokenizer :scan_section do + if @input.scan(/^(Nameservers|DNSSEC|Holder|Registrar|Tech)\n\n/) + @tmp['_section'] = @input[1] + while scan_keyvalue + end + @tmp.delete('_section') end end - end + # Override scan_keyvalue to match the weird + # key.........: value -format + tokenizer :scan_keyvalue do + if @input.scan(/(.+?)(\.+):(.*?)(\n|\z)/) + key, value = @input[1].strip, @input[3].strip + target = @tmp['_section'] ? (@ast[@tmp['_section']] ||= {}) : @ast + + if target[key].nil? + target[key] = value + else + target[key] = Array(target[key]) + target[key] << value + end + end + end + tokenizer :skip_last_update do + @input.skip(/^>>> Last update.*<<<\n\n/) + end + + tokenizer :scan_disclaimer do + @input.skip_until(/^(Copyright \(c\) Finnish Transport and Communications Agency Traficom)/) + @ast["field:disclaimer"] = @input[1] + end + + end end end diff --git a/lib/whois/scanners/whois.pir.org.rb b/lib/whois/scanners/whois.pir.org.rb deleted file mode 100644 index 5863800b..00000000 --- a/lib/whois/scanners/whois.pir.org.rb +++ /dev/null @@ -1,17 +0,0 @@ -require_relative 'base' - -module Whois - module Scanners - - # Scanner for the Afilias-based records. - class WhoisPirOrg < BaseAfilias - - tokenizer :scan_disclaimer do - if @input.match?(/^Access to/) - @ast["field:disclaimer"] = _scan_lines_to_array(/^(.+)(\n+)/).join(" ") - end - end - end - - end -end diff --git a/spec/fixtures/responses/capetown-whois.registry.net.za/capetown/status_registered.expected b/spec/fixtures/responses/capetown-whois.registry.net.za/capetown/status_registered.expected index 49d34909..85f6394b 100644 --- a/spec/fixtures/responses/capetown-whois.registry.net.za/capetown/status_registered.expected +++ b/spec/fixtures/responses/capetown-whois.registry.net.za/capetown/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "1466" %s.name == "Lexsynergy" - %s.organization == "Lexsynergy" %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/ccwhois.ksregistry.net/vg/status_registered.expected b/spec/fixtures/responses/ccwhois.ksregistry.net/vg/status_registered.expected index 13c6893e..ef77364e 100644 --- a/spec/fixtures/responses/ccwhois.ksregistry.net/vg/status_registered.expected +++ b/spec/fixtures/responses/ccwhois.ksregistry.net/vg/status_registered.expected @@ -36,7 +36,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor Inc." - %s.organization == nil %s.url == "www.markmonitor.com" #registrant_contacts diff --git a/spec/fixtures/responses/ccwhois.verisign-grs.com/cc/status_registered.expected b/spec/fixtures/responses/ccwhois.verisign-grs.com/cc/status_registered.expected index d08724bd..2b7f20b3 100644 --- a/spec/fixtures/responses/ccwhois.verisign-grs.com/cc/status_registered.expected +++ b/spec/fixtures/responses/ccwhois.verisign-grs.com/cc/status_registered.expected @@ -36,7 +36,6 @@ %s %CLASS{registrar} %s.id == "292" %s.name == "MARKMONITOR INC." - %s.organization == nil %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/coza-whois.registry.net.za/co.za/status_registered.expected b/spec/fixtures/responses/coza-whois.registry.net.za/co.za/status_registered.expected index df4497ac..c28471a2 100644 --- a/spec/fixtures/responses/coza-whois.registry.net.za/co.za/status_registered.expected +++ b/spec/fixtures/responses/coza-whois.registry.net.za/co.za/status_registered.expected @@ -29,7 +29,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor" - %s.organization == "MarkMonitor" %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/durban-whois.registry.net.za/durban/status_registered.expected b/spec/fixtures/responses/durban-whois.registry.net.za/durban/status_registered.expected index 6324f38e..401cb4bc 100644 --- a/spec/fixtures/responses/durban-whois.registry.net.za/durban/status_registered.expected +++ b/spec/fixtures/responses/durban-whois.registry.net.za/durban/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "292" %s.name == "MarkMonitor" - %s.organization == "MarkMonitor" %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/joburg-whois.registry.net.za/joburg/status_registered.expected b/spec/fixtures/responses/joburg-whois.registry.net.za/joburg/status_registered.expected index 55b5c359..b5678c23 100644 --- a/spec/fixtures/responses/joburg-whois.registry.net.za/joburg/status_registered.expected +++ b/spec/fixtures/responses/joburg-whois.registry.net.za/joburg/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "1466" %s.name == "Lexsynergy" - %s.organization == "Lexsynergy" %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/org-whois.registry.net.za/org.za/status_registered.expected b/spec/fixtures/responses/org-whois.registry.net.za/org.za/status_registered.expected index 3c7cf021..0ddbba69 100644 --- a/spec/fixtures/responses/org-whois.registry.net.za/org.za/status_registered.expected +++ b/spec/fixtures/responses/org-whois.registry.net.za/org.za/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "9999" %s.name == "ZA Central Registry" - %s.organization == "ZA Central Registry" %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/tvwhois.verisign-grs.com/tv/status_registered.expected b/spec/fixtures/responses/tvwhois.verisign-grs.com/tv/status_registered.expected index d59a690c..53143484 100644 --- a/spec/fixtures/responses/tvwhois.verisign-grs.com/tv/status_registered.expected +++ b/spec/fixtures/responses/tvwhois.verisign-grs.com/tv/status_registered.expected @@ -35,7 +35,6 @@ %s %CLASS{registrar} %s.id == "292" %s.name == "MARKMONITOR INC." - %s.organization == nil %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.1und1.info/status_available.expected b/spec/fixtures/responses/whois.1und1.info/status_available.expected index 6bbcc28c..5202198d 100644 --- a/spec/fixtures/responses/whois.1und1.info/status_available.expected +++ b/spec/fixtures/responses/whois.1und1.info/status_available.expected @@ -1,5 +1,5 @@ #domain - %s == nil + %s == "u34jedzcq.com" #domain_id %s == nil diff --git a/spec/fixtures/responses/whois.1und1.info/status_registered.expected b/spec/fixtures/responses/whois.1und1.info/status_registered.expected index 68d71e1b..372046c1 100644 --- a/spec/fixtures/responses/whois.1und1.info/status_registered.expected +++ b/spec/fixtures/responses/whois.1und1.info/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "83" %s.name == "1&1 Internet AG" - %s.organization == "1&1 Internet AG" %s.url == "http://1and1.com" @@ -47,7 +46,7 @@ %s[0].address == "Elgendorfer Strasse 57" %s[0].city == "Montabaur" %s[0].zip == "56410" - %s[0].state == "" + %s[0].state == nil %s[0].country_code == "DE" %s[0].phone == "+49.2602960" %s[0].fax == "+49.72191374215" @@ -64,7 +63,7 @@ %s[0].address == "Elgendorfer Strasse 57" %s[0].city == "Montabaur" %s[0].zip == "56410" - %s[0].state == "" + %s[0].state == nil %s[0].country_code == "DE" %s[0].phone == "+49.2602960" %s[0].fax == "+49.72191374215" @@ -81,7 +80,7 @@ %s[0].address == "Elgendorfer Strasse 57" %s[0].city == "Montabaur" %s[0].zip == "56410" - %s[0].state == "" + %s[0].state == nil %s[0].country_code == "DE" %s[0].phone == "+49.2602960" %s[0].fax == "+49.72191374215" diff --git a/spec/fixtures/responses/whois.35.com/status_registered.expected b/spec/fixtures/responses/whois.35.com/status_registered.expected index e5d58f2f..5dbd9be3 100644 --- a/spec/fixtures/responses/whois.35.com/status_registered.expected +++ b/spec/fixtures/responses/whois.35.com/status_registered.expected @@ -25,7 +25,6 @@ %s %CLASS{registrar} %s.id == "1316" %s.name == "35 Technology Co., Ltd." - %s.organization == "35 Technology Co., Ltd." %s.url == "http://www.35.com" #registrant_contacts diff --git a/spec/fixtures/responses/whois.aero/status_available.expected b/spec/fixtures/responses/whois.aero/status_available.expected index 4c6f0cf2..06ca95bf 100644 --- a/spec/fixtures/responses/whois.aero/status_available.expected +++ b/spec/fixtures/responses/whois.aero/status_available.expected @@ -1,6 +1,5 @@ #disclaimer - %s == nil - + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == nil diff --git a/spec/fixtures/responses/whois.aero/status_available.txt b/spec/fixtures/responses/whois.aero/status_available.txt index 679aadb9..21e4ed69 100644 --- a/spec/fixtures/responses/whois.aero/status_available.txt +++ b/spec/fixtures/responses/whois.aero/status_available.txt @@ -1 +1,5 @@ NOT FOUND +>>> Last update of WHOIS database: 2021-11-09T15:45:24Z <<< + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.aero/status_registered.expected b/spec/fixtures/responses/whois.aero/status_registered.expected index d7b69111..3f8e5aae 100644 --- a/spec/fixtures/responses/whois.aero/status_registered.expected +++ b/spec/fixtures/responses/whois.aero/status_registered.expected @@ -1,16 +1,15 @@ #disclaimer - %s == "Access to .AERO WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to: (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy." - + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == "srilankan.aero" #domain_id - %s == "D246-AERO" + %s == "D108300000000000246-AGRS" #status - %s == ["OK"] + %s == ["clientTransferProhibited https://icann.org/epp#clientTransferProhibited"] #available? %s == false @@ -28,80 +27,52 @@ #updated_on %s %CLASS{time} - %s %TIME{2013-04-09 06:35:03 UTC} + %s %TIME{2021-01-08 12:04:52 UTC} #expires_on %s %CLASS{time} - %s %TIME{2014-03-26 06:48:27 UTC} + %s %TIME{2022-03-26 06:48:27 UTC} #registrar %s %CLASS{registrar} %s.id == "380" - %s.name == "Tuonome IT" - %s.organization == nil - %s.url == nil + %s.name == "Tuonome.it.srl d/b/a APIsrs.com" + %s.url == "" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "C4526901-AERO" - %s[0].name == "Domain Name Administrator" + %s[0].id == nil + %s[0].name == nil %s[0].organization == "SriLankan Airlines Ltd" - %s[0].address == "Admin Bldg" - %s[0].city == "Katunayaka" - %s[0].zip == "11450" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil %s[0].state == "WP" %s[0].country_code == "LK" - %s[0].phone == "+94.197331600" - %s[0].fax == "+94.197335160" - %s[0].email == "domregister@srilankan.aero" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == nil #admin_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "C4526901-AERO" - %s[0].name == "Domain Name Administrator" - %s[0].organization == "SriLankan Airlines Ltd" - %s[0].address == "Admin Bldg" - %s[0].city == "Katunayaka" - %s[0].zip == "11450" - %s[0].state == "WP" - %s[0].country_code == "LK" - %s[0].phone == "+94.197331600" - %s[0].fax == "+94.197335160" - %s[0].email == "domregister@srilankan.aero" + %s %SIZE{0} #technical_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "C4526901-AERO" - %s[0].name == "Domain Name Administrator" - %s[0].organization == "SriLankan Airlines Ltd" - %s[0].address == "Admin Bldg" - %s[0].city == "Katunayaka" - %s[0].zip == "11450" - %s[0].state == "WP" - %s[0].country_code == "LK" - %s[0].phone == "+94.197331600" - %s[0].fax == "+94.197335160" - %s[0].email == "domregister@srilankan.aero" - + %s %SIZE{0} #nameservers %s %CLASS{array} %s %SIZE{4} %s[0] %CLASS{nameserver} - %s[0].name == "dns1.srilankan.aero" + %s[0].name == "ns-1046.awsdns-02.org" %s[1] %CLASS{nameserver} - %s[1].name == "dns2.srilankan.aero" + %s[1].name == "ns-2011.awsdns-59.co.uk" %s[2] %CLASS{nameserver} - %s[2].name == "s2.ns.slt.lk" + %s[2].name == "ns-133.awsdns-16.com" %s[3] %CLASS{nameserver} - %s[3].name == "s1.ns.slt.lk" + %s[3].name == "ns-877.awsdns-45.net" diff --git a/spec/fixtures/responses/whois.aero/status_registered.txt b/spec/fixtures/responses/whois.aero/status_registered.txt index 30a727fd..a3cbb4ca 100644 --- a/spec/fixtures/responses/whois.aero/status_registered.txt +++ b/spec/fixtures/responses/whois.aero/status_registered.txt @@ -1,102 +1,29 @@ -Access to .AERO WHOIS information is provided to assist persons in -determining the contents of a domain name registration record in the -Afilias registry database. The data in this record is provided by -Afilias Limited for informational purposes only, and Afilias does not -guarantee its accuracy. This service is intended only for query-based -access. You agree that you will use this data only for lawful purposes -and that, under no circumstances will you use this data to: (a) allow, -enable, or otherwise support the transmission by e-mail, telephone, or -facsimile of mass unsolicited, commercial advertising or solicitations -to entities other than the data recipient's own existing customers; or -(b) enable high volume, automated, electronic processes that send -queries or data to the systems of Registry Operator, a Registrar, or -Afilias except as reasonably necessary to register domain names or -modify existing registrations. All rights reserved. Afilias reserves -the right to modify these terms at any time. By submitting this query, -you agree to abide by this policy. +Domain Name: SRILANKAN.AERO +Registry Domain ID: D108300000000000246-AGRS +Registrar WHOIS Server: +Registrar URL: +Updated Date: 2021-01-08T12:04:52Z +Creation Date: 2002-03-26T06:48:27Z +Registry Expiry Date: 2022-03-26T06:48:27Z +Registrar Registration Expiration Date: +Registrar: Tuonome.it.srl d/b/a APIsrs.com +Registrar IANA ID: 380 +Registrar Abuse Contact Email: +Registrar Abuse Contact Phone: +Reseller: +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Registrant Organization: SriLankan Airlines Ltd +Registrant State/Province: WP +Registrant Country: LK +Name Server: NS-1046.AWSDNS-02.ORG +Name Server: NS-2011.AWSDNS-59.CO.UK +Name Server: NS-133.AWSDNS-16.COM +Name Server: NS-877.AWSDNS-45.NET +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-09T15:49:32Z <<< -Domain ID:D246-AERO -Domain Name:SRILANKAN.AERO -ENS_AuthId:E0261-SITA -Created On:26-Mar-2002 06:48:27 UTC -Expires On:26-Mar-2014 06:48:27 UTC -Updated On:09-Apr-2013 06:35:03 UTC -Created By:Tuonome IT (380) -Updated By:Afilias Internal (984) -Sponsoring Registrar:Tuonome IT (380) -Domain Status:OK -Maintainer:http://www.tuonome.aero -Registrant ID:C4526901-AERO -Registrant Name:Domain Name Administrator -Registrant Organization:SriLankan Airlines Ltd -Registrant Street1:Admin Bldg -Registrant Street2: -Registrant Street3: -Registrant City:Katunayaka -Registrant State/Province:WP -Registrant Postal Code:11450 -Registrant Country:LK -Registrant Phone:+94.197331600 -Registrant Phone Ext.: -Registrant FAX:+94.197335160 -Registrant FAX Ext.: -Registrant Email:domregister@srilankan.aero -Admin ID:C4526901-AERO -Admin Name:Domain Name Administrator -Admin Organization:SriLankan Airlines Ltd -Admin Street1:Admin Bldg -Admin Street2: -Admin Street3: -Admin City:Katunayaka -Admin State/Province:WP -Admin Postal Code:11450 -Admin Country:LK -Admin Phone:+94.197331600 -Admin Phone Ext.: -Admin FAX:+94.197335160 -Admin FAX Ext.: -Admin Email:domregister@srilankan.aero -Billing ID:C4526901-AERO -Billing Name:Domain Name Administrator -Billing Organization:SriLankan Airlines Ltd -Billing Street1:Admin Bldg -Billing Street2: -Billing Street3: -Billing City:Katunayaka -Billing State/Province:WP -Billing Postal Code:11450 -Billing Country:LK -Billing Phone:+94.197331600 -Billing Phone Ext.: -Billing FAX:+94.197335160 -Billing FAX Ext.: -Billing Email:domregister@srilankan.aero -Tech ID:C4526901-AERO -Tech Name:Domain Name Administrator -Tech Organization:SriLankan Airlines Ltd -Tech Street1:Admin Bldg -Tech Street2: -Tech Street3: -Tech City:Katunayaka -Tech State/Province:WP -Tech Postal Code:11450 -Tech Country:LK -Tech Phone:+94.197331600 -Tech Phone Ext.: -Tech FAX:+94.197335160 -Tech FAX Ext.: -Tech Email:domregister@srilankan.aero -Name Server:DNS1.SRILANKAN.AERO -Name Server:DNS2.SRILANKAN.AERO -Name Server:S2.NS.SLT.LK -Name Server:S1.NS.SLT.LK -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: - +For more information on Whois status codes, please visit https://icann.org/epp + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.aero/status_reserved.expected b/spec/fixtures/responses/whois.aero/status_reserved.expected index 300219bf..95995f22 100644 --- a/spec/fixtures/responses/whois.aero/status_reserved.expected +++ b/spec/fixtures/responses/whois.aero/status_reserved.expected @@ -1,6 +1,5 @@ #disclaimer - %s == nil - + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == nil diff --git a/spec/fixtures/responses/whois.aero/status_reserved.txt b/spec/fixtures/responses/whois.aero/status_reserved.txt index a9938ff8..18d0f498 100644 --- a/spec/fixtures/responses/whois.aero/status_reserved.txt +++ b/spec/fixtures/responses/whois.aero/status_reserved.txt @@ -1 +1,5 @@ -Name is restricted from registration +This domain name has been reserved by SITA for exclusive use by holder of the corresponding industry designator. If you are the holder of this industry designator and would like to take active control of this domain name, then please visit our registration page [http://www.information.aero] or contact SITA at aero.enquiries@sita.aero. +>>> Last update of WHOIS database: 2021-11-09T15:47:38Z <<< + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.afilias-grs.info/bz/status_registered.expected b/spec/fixtures/responses/whois.afilias-grs.info/bz/status_registered.expected index 6427b58d..e4270d94 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/bz/status_registered.expected +++ b/spec/fixtures/responses/whois.afilias-grs.info/bz/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "Access to CCTLD WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to: (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy." + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == "google.bz" #domain_id - %s == "D354967-LRCC" + %s == "D105800000000354967-AGRS" #status - %s == ["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED", "RENEWPERIOD"] + %s == ["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"] #available? %s == false @@ -25,19 +25,18 @@ #updated_on %s %CLASS{time} - %s %TIME{2014-01-11 10:18:14 UTC} + %s %TIME{2021-01-11 10:34:48 UTC} #expires_on %s %CLASS{time} - %s %TIME{2015-02-12 18:08:52 UTC} + %s %TIME{2022-02-12 18:08:52 UTC} #registrar %s %CLASS{registrar} - %s.id == "R22-LRCC" - %s.name == "MarkMonitor, Inc." - %s.organization == nil - %s.url == nil + %s.id == "292" + %s.name == "MarkMonitor Inc." + %s.url == "http://www.markmonitor.com" #registrant_contacts %s %CLASS{array} @@ -60,6 +59,6 @@ %s[1] %CLASS{nameserver} %s[1].name == "ns2.google.com" %s[2] %CLASS{nameserver} - %s[2].name == "ns3.google.com" + %s[2].name == "ns4.google.com" %s[3] %CLASS{nameserver} - %s[3].name == "ns4.google.com" + %s[3].name == "ns3.google.com" diff --git a/spec/fixtures/responses/whois.afilias-grs.info/bz/status_registered.txt b/spec/fixtures/responses/whois.afilias-grs.info/bz/status_registered.txt index 32e738a8..213e8728 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/bz/status_registered.txt +++ b/spec/fixtures/responses/whois.afilias-grs.info/bz/status_registered.txt @@ -1,43 +1,28 @@ -Access to CCTLD WHOIS information is provided to assist persons in -determining the contents of a domain name registration record in the -Afilias registry database. The data in this record is provided by -Afilias Limited for informational purposes only, and Afilias does not -guarantee its accuracy. This service is intended only for query-based -access. You agree that you will use this data only for lawful purposes -and that, under no circumstances will you use this data to: (a) allow, -enable, or otherwise support the transmission by e-mail, telephone, or -facsimile of mass unsolicited, commercial advertising or solicitations -to entities other than the data recipient's own existing customers; or -(b) enable high volume, automated, electronic processes that send -queries or data to the systems of Registry Operator, a Registrar, or -Afilias except as reasonably necessary to register domain names or -modify existing registrations. All rights reserved. Afilias reserves -the right to modify these terms at any time. By submitting this query, -you agree to abide by this policy. +Domain Name: GOOGLE.BZ +Registry Domain ID: D105800000000354967-AGRS +Registrar WHOIS Server: +Registrar URL: http://www.markmonitor.com +Updated Date: 2021-01-11T10:34:48Z +Creation Date: 2006-02-12T18:08:52Z +Registry Expiry Date: 2022-02-12T18:08:52Z +Registrar Registration Expiration Date: +Registrar: MarkMonitor Inc. +Registrar IANA ID: 292 +Registrar Abuse Contact Email: abusecomplaints@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +Reseller: +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Name Server: NS1.GOOGLE.COM +Name Server: NS2.GOOGLE.COM +Name Server: NS4.GOOGLE.COM +Name Server: NS3.GOOGLE.COM +DNSSEC: unsigned -Domain ID:D354967-LRCC -Domain Name:GOOGLE.BZ -Created On:12-Feb-2006 18:08:52 UTC -Last Updated On:11-Jan-2014 10:18:14 UTC -Expiration Date:12-Feb-2015 18:08:52 UTC -Sponsoring Registrar:MarkMonitor, Inc. (R22-LRCC) -Whois Server:whois.markmonitor.com -Referral URL:http://www.markmonitor.com -Status:CLIENT DELETE PROHIBITED -Status:CLIENT TRANSFER PROHIBITED -Status:CLIENT UPDATE PROHIBITED -Status:RENEWPERIOD -Name Server:NS1.GOOGLE.COM -Name Server:NS2.GOOGLE.COM -Name Server:NS3.GOOGLE.COM -Name Server:NS4.GOOGLE.COM -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: - +>>> Last update of WHOIS database: 2021-11-09T14:45:14Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.afilias-grs.info/gi/status_available.expected b/spec/fixtures/responses/whois.afilias-grs.info/gi/status_available.expected index 2c3fe7a8..65f9ce91 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/gi/status_available.expected +++ b/spec/fixtures/responses/whois.afilias-grs.info/gi/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain diff --git a/spec/fixtures/responses/whois.afilias-grs.info/gi/status_available.txt b/spec/fixtures/responses/whois.afilias-grs.info/gi/status_available.txt index 679aadb9..f79d7cf9 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/gi/status_available.txt +++ b/spec/fixtures/responses/whois.afilias-grs.info/gi/status_available.txt @@ -1 +1,5 @@ NOT FOUND +>>> Last update of WHOIS database: 2021-11-09T15:11:56Z <<< + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.afilias-grs.info/gi/status_registered.expected b/spec/fixtures/responses/whois.afilias-grs.info/gi/status_registered.expected index e5c394f5..ae0635d9 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/gi/status_registered.expected +++ b/spec/fixtures/responses/whois.afilias-grs.info/gi/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "Access to CCTLD WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to: (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy." + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == "sapphire.gi" #domain_id - %s == "D68296-LRCC" + %s == "D105800000000068296-AGRS" #status - %s == ["OK"] + %s == ["ok https://icann.org/epp#ok"] #available? %s == false @@ -25,70 +25,43 @@ #updated_on %s %CLASS{time} - %s %TIME{2008-12-20 19:25:54 UTC} + %s %TIME{2017-12-05 13:07:12 UTC} #expires_on %s %CLASS{time} - %s %TIME{2009-12-20 13:34:34 UTC} + %s %TIME{2022-12-20 13:34:34 UTC} #registrar %s %CLASS{registrar} - %s.id == "R43-LRCC" + %s.id == "119" %s.name == "GibNet Registrar" - %s.organization == nil - %s.url == nil + %s.url == "" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "FR-1103549674779" - %s[0].name == "Jimmy Imossi" + %s[0].id == nil + %s[0].name == nil %s[0].organization == "Broadband Gibraltar Limited" - %s[0].address == "Suite 951\nEuroport" - %s[0].city == "Gibraltar" - %s[0].zip == "NA" - %s[0].state == "" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil + %s[0].state == "Not Available" %s[0].country_code == "GI" - %s[0].phone == "+350.47200" - %s[0].fax == "+350.47272" - %s[0].email == "jimossi@sapphire.gi" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == nil #admin_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "FR-1103549674779" - %s[0].name == "Jimmy Imossi" - %s[0].organization == "Broadband Gibraltar Limited" - %s[0].address == "Suite 951\nEuroport" - %s[0].city == "Gibraltar" - %s[0].zip == "NA" - %s[0].state == "" - %s[0].country_code == "GI" - %s[0].phone == "+350.47200" - %s[0].fax == "+350.47272" - %s[0].email == "jimossi@sapphire.gi" + %s %SIZE{0} #technical_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "FR-10a223e2e4cf0" - %s[0].name == "Tech Dept" - %s[0].organization == "Broadband Gibraltar Ltd" - %s[0].address == "Suite 9.5.1\nEuroport" - %s[0].city == "N/A" - %s[0].zip == "N/A" - %s[0].state == "" - %s[0].country_code == "GI" - %s[0].phone == "+350.47200" - %s[0].fax == "+350.47271" - %s[0].email == "tech@sapphire.gi" + %s %SIZE{0} #nameservers diff --git a/spec/fixtures/responses/whois.afilias-grs.info/gi/status_registered.txt b/spec/fixtures/responses/whois.afilias-grs.info/gi/status_registered.txt index 7ebfd1b1..aff37c18 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/gi/status_registered.txt +++ b/spec/fixtures/responses/whois.afilias-grs.info/gi/status_registered.txt @@ -1,98 +1,27 @@ -Access to CCTLD WHOIS information is provided to assist persons in -determining the contents of a domain name registration record in the -Afilias registry database. The data in this record is provided by -Afilias Limited for informational purposes only, and Afilias does not -guarantee its accuracy. This service is intended only for query-based -access. You agree that you will use this data only for lawful purposes -and that, under no circumstances will you use this data to: (a) allow, -enable, or otherwise support the transmission by e-mail, telephone, or -facsimile of mass unsolicited, commercial advertising or solicitations -to entities other than the data recipient's own existing customers; or -(b) enable high volume, automated, electronic processes that send -queries or data to the systems of Registry Operator, a Registrar, or -Afilias except as reasonably necessary to register domain names or -modify existing registrations. All rights reserved. Afilias reserves -the right to modify these terms at any time. By submitting this query, -you agree to abide by this policy. +Domain Name: SAPPHIRE.GI +Registry Domain ID: D105800000000068296-AGRS +Registrar WHOIS Server: +Registrar URL: +Updated Date: 2017-12-05T13:07:12Z +Creation Date: 2004-12-20T13:34:34Z +Registry Expiry Date: 2022-12-20T13:34:34Z +Registrar Registration Expiration Date: +Registrar: GibNet Registrar +Registrar IANA ID: 119 +Registrar Abuse Contact Email: +Registrar Abuse Contact Phone: +Reseller: +Domain Status: ok https://icann.org/epp#ok +Registrant Organization: Broadband Gibraltar Limited +Registrant State/Province: Not Available +Registrant Country: GI +Name Server: NS1-A.SAPPHIRE.GI +Name Server: NS2-A.SAPPHIRE.GI +DNSSEC: unsigned -Domain ID:D68296-LRCC -Domain Name:SAPPHIRE.GI -Created On:20-Dec-2004 13:34:34 UTC -Last Updated On:20-Dec-2008 19:25:54 UTC -Expiration Date:20-Dec-2009 13:34:34 UTC -Sponsoring Registrar:GibNet Registrar (R43-LRCC) -Status:OK -Registrant ID:FR-1103549674779 -Registrant Name:Jimmy Imossi -Registrant Organization:Broadband Gibraltar Limited -Registrant Street1:Suite 951 -Registrant Street2:Europort -Registrant Street3: -Registrant City:Gibraltar -Registrant State/Province: -Registrant Postal Code:NA -Registrant Country:GI -Registrant Phone:+350.47200 -Registrant Phone Ext.: -Registrant FAX:+350.47272 -Registrant FAX Ext.: -Registrant Email:jimossi@sapphire.gi -Admin ID:FR-1103549674779 -Admin Name:Jimmy Imossi -Admin Organization:Broadband Gibraltar Limited -Admin Street1:Suite 951 -Admin Street2:Europort -Admin Street3: -Admin City:Gibraltar -Admin State/Province: -Admin Postal Code:NA -Admin Country:GI -Admin Phone:+350.47200 -Admin Phone Ext.: -Admin FAX:+350.47272 -Admin FAX Ext.: -Admin Email:jimossi@sapphire.gi -Billing ID:FR-1103549674779 -Billing Name:Jimmy Imossi -Billing Organization:Broadband Gibraltar Limited -Billing Street1:Suite 951 -Billing Street2:Europort -Billing Street3: -Billing City:Gibraltar -Billing State/Province: -Billing Postal Code:NA -Billing Country:GI -Billing Phone:+350.47200 -Billing Phone Ext.: -Billing FAX:+350.47272 -Billing FAX Ext.: -Billing Email:jimossi@sapphire.gi -Tech ID:FR-10a223e2e4cf0 -Tech Name:Tech Dept -Tech Organization:Broadband Gibraltar Ltd -Tech Street1:Suite 9.5.1 -Tech Street2:Europort -Tech Street3: -Tech City:N/A -Tech State/Province: -Tech Postal Code:N/A -Tech Country:GI -Tech Phone:+350.47200 -Tech Phone Ext.: -Tech FAX:+350.47271 -Tech FAX Ext.: -Tech Email:tech@sapphire.gi -Name Server:NS1-A.SAPPHIRE.GI -Name Server:NS2-A.SAPPHIRE.GI -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: - +>>> Last update of WHOIS database: 2021-11-09T15:08:05Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.afilias-grs.info/lc/status_available.expected b/spec/fixtures/responses/whois.afilias-grs.info/lc/status_available.expected index 2c3fe7a8..65f9ce91 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/lc/status_available.expected +++ b/spec/fixtures/responses/whois.afilias-grs.info/lc/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain diff --git a/spec/fixtures/responses/whois.afilias-grs.info/lc/status_available.txt b/spec/fixtures/responses/whois.afilias-grs.info/lc/status_available.txt index 679aadb9..f79d7cf9 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/lc/status_available.txt +++ b/spec/fixtures/responses/whois.afilias-grs.info/lc/status_available.txt @@ -1 +1,5 @@ NOT FOUND +>>> Last update of WHOIS database: 2021-11-09T15:11:56Z <<< + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.afilias-grs.info/lc/status_registered.expected b/spec/fixtures/responses/whois.afilias-grs.info/lc/status_registered.expected index 57d50c29..4250666e 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/lc/status_registered.expected +++ b/spec/fixtures/responses/whois.afilias-grs.info/lc/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "Access to CCTLD WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to: (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy." + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == "nic.lc" #domain_id - %s == "D946482-LRCC" + %s == "D105800000000946482-AGRS" #status - %s == ["OK"] + %s == ["ok https://icann.org/epp#ok"] #available? %s == false @@ -25,71 +25,43 @@ #updated_on %s %CLASS{time} - %s %TIME{2008-12-08 19:25:09 UTC} + %s %TIME{2020-12-08 22:22:29 UTC} #expires_on %s %CLASS{time} - %s %TIME{2009-12-08 00:00:00 UTC} + %s %TIME{2021-12-08 00:00:00 UTC} #registrar %s %CLASS{registrar} - %s.id == "R144-LRCC" + %s.id == "119" %s.name == "NicLc Registrar" - %s.organization == nil - %s.url == nil + %s.url == "" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "LC-54921" - %s[0].name == "Nic LC Admin" + %s[0].id == nil + %s[0].name == nil %s[0].organization == "Nic LC" - %s[0].address == "#4 Colony House\nJohn Compton Hwy" - %s[0].city == "Castries" - %s[0].zip == "Not Provided" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil %s[0].state == "Not Provided" %s[0].country_code == "LC" - %s[0].phone == "+758.4520220" - %s[0].fax == "" - %s[0].email == "nic@nic.lc" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == nil #admin_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "LC-51893" - %s[0].name == "Nic LC Hostmaster" - %s[0].organization == "Nic LC" - %s[0].address == "#4 Colony House\nNot Provided" - %s[0].city == "Castries" - %s[0].zip == "Not Provided" - %s[0].state == "Not Provided" - %s[0].country_code == "LC" - %s[0].phone == "+758.4520220" - %s[0].fax == "" - %s[0].email == "hostmaster@nic.lc" + %s %SIZE{0} #technical_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "LC-53407" - %s[0].name == "Nic LC Technical" - %s[0].organization == "Nic LC" - %s[0].address == "#4 Colony House\nNot Provided" - %s[0].city == "Castries" - %s[0].zip == "Not Provided" - %s[0].state == "Not Provided" - %s[0].country_code == "LC" - %s[0].phone == "+758.4520220" - %s[0].fax == "" - %s[0].email == "technical@nic.lc" - + %s %SIZE{0} #nameservers %s %CLASS{array} diff --git a/spec/fixtures/responses/whois.afilias-grs.info/lc/status_registered.txt b/spec/fixtures/responses/whois.afilias-grs.info/lc/status_registered.txt index 7f419aa1..0a192d45 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/lc/status_registered.txt +++ b/spec/fixtures/responses/whois.afilias-grs.info/lc/status_registered.txt @@ -1,83 +1,27 @@ -Access to CCTLD WHOIS information is provided to assist persons in -determining the contents of a domain name registration record in the -Afilias registry database. The data in this record is provided by -Afilias Limited for informational purposes only, and Afilias does not -guarantee its accuracy. This service is intended only for query-based -access. You agree that you will use this data only for lawful purposes -and that, under no circumstances will you use this data to: (a) allow, -enable, or otherwise support the transmission by e-mail, telephone, or -facsimile of mass unsolicited, commercial advertising or solicitations -to entities other than the data recipient's own existing customers; or -(b) enable high volume, automated, electronic processes that send -queries or data to the systems of Registry Operator, a Registrar, or -Afilias except as reasonably necessary to register domain names or -modify existing registrations. All rights reserved. Afilias reserves -the right to modify these terms at any time. By submitting this query, -you agree to abide by this policy. +Domain Name: NIC.LC +Registry Domain ID: D105800000000946482-AGRS +Registrar WHOIS Server: +Registrar URL: +Updated Date: 2020-12-08T22:22:29Z +Creation Date: 2002-12-08T00:00:00Z +Registry Expiry Date: 2021-12-08T00:00:00Z +Registrar Registration Expiration Date: +Registrar: NicLc Registrar +Registrar IANA ID: 119 +Registrar Abuse Contact Email: +Registrar Abuse Contact Phone: +Reseller: +Domain Status: ok https://icann.org/epp#ok +Registrant Organization: Nic LC +Registrant State/Province: Not Provided +Registrant Country: LC +Name Server: NS1.NIC.AG +Name Server: NS.PATRICKLAY.COM +DNSSEC: unsigned -Domain ID:D946482-LRCC -Domain Name:NIC.LC -Created On:08-Dec-2002 00:00:00 UTC -Last Updated On:08-Dec-2008 19:25:09 UTC -Expiration Date:08-Dec-2009 00:00:00 UTC -Sponsoring Registrar:NicLc Registrar (R144-LRCC) -Status:OK -Registrant ID:LC-54921 -Registrant Name:Nic LC Admin -Registrant Organization:Nic LC -Registrant Street1:#4 Colony House -Registrant Street2:John Compton Hwy -Registrant Street3: -Registrant City:Castries -Registrant State/Province:Not Provided -Registrant Postal Code:Not Provided -Registrant Country:LC -Registrant Phone:+758.4520220 -Registrant Phone Ext.: -Registrant FAX: -Registrant FAX Ext.: -Registrant Email:nic@nic.lc -Admin ID:LC-51893 -Admin Name:Nic LC Hostmaster -Admin Organization:Nic LC -Admin Street1:#4 Colony House -Admin Street2:Not Provided -Admin Street3: -Admin City:Castries -Admin State/Province:Not Provided -Admin Postal Code:Not Provided -Admin Country:LC -Admin Phone:+758.4520220 -Admin Phone Ext.: -Admin FAX: -Admin FAX Ext.: -Admin Email:hostmaster@nic.lc -Tech ID:LC-53407 -Tech Name:Nic LC Technical -Tech Organization:Nic LC -Tech Street1:#4 Colony House -Tech Street2:Not Provided -Tech Street3: -Tech City:Castries -Tech State/Province:Not Provided -Tech Postal Code:Not Provided -Tech Country:LC -Tech Phone:+758.4520220 -Tech Phone Ext.: -Tech FAX: -Tech FAX Ext.: -Tech Email:technical@nic.lc -Name Server:NS1.NIC.AG -Name Server:NS.PATRICKLAY.COM -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: - +>>> Last update of WHOIS database: 2021-11-09T15:15:18Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.afilias-grs.info/mn/status_available.expected b/spec/fixtures/responses/whois.afilias-grs.info/mn/status_available.expected index 2c3fe7a8..65f9ce91 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/mn/status_available.expected +++ b/spec/fixtures/responses/whois.afilias-grs.info/mn/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain diff --git a/spec/fixtures/responses/whois.afilias-grs.info/mn/status_available.txt b/spec/fixtures/responses/whois.afilias-grs.info/mn/status_available.txt index 679aadb9..16a55376 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/mn/status_available.txt +++ b/spec/fixtures/responses/whois.afilias-grs.info/mn/status_available.txt @@ -1 +1,5 @@ NOT FOUND +>>> Last update of WHOIS database: 2021-11-09T15:20:13Z <<< + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.afilias-grs.info/mn/status_registered.expected b/spec/fixtures/responses/whois.afilias-grs.info/mn/status_registered.expected index 89b52747..4dddfef6 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/mn/status_registered.expected +++ b/spec/fixtures/responses/whois.afilias-grs.info/mn/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "Access to CCTLD WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to: (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy." + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == "google.mn" #domain_id - %s == "D444956-LRCC" + %s == "D105800000000444956-AGRS" #status - %s == ["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED"] + %s == ["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"] #available? %s == false @@ -25,26 +25,25 @@ #updated_on %s %CLASS{time} - %s %TIME{2013-03-06 10:21:48 UTC} + %s %TIME{2021-03-06 10:38:48 UTC} #expires_on %s %CLASS{time} - %s %TIME{2014-04-07 00:00:00 UTC} + %s %TIME{2022-04-07 00:00:00 UTC} #registrar %s %CLASS{registrar} - %s.id == "R22-LRCC" - %s.name == "MarkMonitor, Inc." - %s.organization == nil - %s.url == nil + %s.id == "292" + %s.name == "MarkMonitor Inc." + %s.url == "http://www.markmonitor.com" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "MNM-11332" + %s[0].id == "C40795-AGRS" %s[0].name == "DNS Admin" %s[0].organization == "Google Inc." %s[0].address == "1600 Amphitheatre Parkway" @@ -52,8 +51,8 @@ %s[0].zip == "94043" %s[0].state == "CA" %s[0].country_code == "US" - %s[0].phone == "+165.03300100" - %s[0].fax == "+165.06188571" + %s[0].phone == "+1.6502530000" + %s[0].fax == "+1.6502530001" %s[0].email == "dns-admin@google.com" #admin_contacts @@ -61,7 +60,7 @@ %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "MNM-11332" + %s[0].id == "C40795-AGRS" %s[0].name == "DNS Admin" %s[0].organization == "Google Inc." %s[0].address == "1600 Amphitheatre Parkway" @@ -69,8 +68,8 @@ %s[0].zip == "94043" %s[0].state == "CA" %s[0].country_code == "US" - %s[0].phone == "+165.03300100" - %s[0].fax == "+165.06188571" + %s[0].phone == "+1.6502530000" + %s[0].fax == "+1.6502530001" %s[0].email == "dns-admin@google.com" #technical_contacts @@ -78,17 +77,17 @@ %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "mmr-33293" - %s[0].name == "Domain Admin" - %s[0].organization == "MarkMonitor" - %s[0].address == "391 N. Ancestor Place\nSuite 150" - %s[0].city == "Boise" - %s[0].zip == "83704" + %s[0].id == "C40795-AGRS" + %s[0].name == "DNS Admin" + %s[0].organization == "Google Inc." + %s[0].address == "1600 Amphitheatre Parkway" + %s[0].city == "Mountain View" + %s[0].zip == "94043" %s[0].state == "CA" %s[0].country_code == "US" - %s[0].phone == "+1.2083895740" - %s[0].fax == "+1.2083895771" - %s[0].email == "ccops@markmonitor.com" + %s[0].phone == "+1.6502530000" + %s[0].fax == "+1.6502530001" + %s[0].email == "dns-admin@google.com" #nameservers @@ -99,6 +98,6 @@ %s[1] %CLASS{nameserver} %s[1].name == "ns2.google.com" %s[2] %CLASS{nameserver} - %s[2].name == "ns3.google.com" + %s[2].name == "ns4.google.com" %s[3] %CLASS{nameserver} - %s[3].name == "ns4.google.com" + %s[3].name == "ns3.google.com" diff --git a/spec/fixtures/responses/whois.afilias-grs.info/mn/status_registered.txt b/spec/fixtures/responses/whois.afilias-grs.info/mn/status_registered.txt index a78b4621..b19ca2c8 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/mn/status_registered.txt +++ b/spec/fixtures/responses/whois.afilias-grs.info/mn/status_registered.txt @@ -1,85 +1,67 @@ -Access to CCTLD WHOIS information is provided to assist persons in -determining the contents of a domain name registration record in the -Afilias registry database. The data in this record is provided by -Afilias Limited for informational purposes only, and Afilias does not -guarantee its accuracy. This service is intended only for query-based -access. You agree that you will use this data only for lawful purposes -and that, under no circumstances will you use this data to: (a) allow, -enable, or otherwise support the transmission by e-mail, telephone, or -facsimile of mass unsolicited, commercial advertising or solicitations -to entities other than the data recipient's own existing customers; or -(b) enable high volume, automated, electronic processes that send -queries or data to the systems of Registry Operator, a Registrar, or -Afilias except as reasonably necessary to register domain names or -modify existing registrations. All rights reserved. Afilias reserves -the right to modify these terms at any time. By submitting this query, -you agree to abide by this policy. +Domain Name: GOOGLE.MN +Registry Domain ID: D105800000000444956-AGRS +Registrar WHOIS Server: +Registrar URL: http://www.markmonitor.com +Updated Date: 2021-03-06T10:38:48Z +Creation Date: 2003-04-07T00:00:00Z +Registry Expiry Date: 2022-04-07T00:00:00Z +Registrar Registration Expiration Date: +Registrar: MarkMonitor Inc. +Registrar IANA ID: 292 +Registrar Abuse Contact Email: abusecomplaints@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +Reseller: +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Registry Registrant ID: C40795-AGRS +Registrant Name: DNS Admin +Registrant Organization: Google Inc. +Registrant Street: 1600 Amphitheatre Parkway +Registrant City: Mountain View +Registrant State/Province: CA +Registrant Postal Code: 94043 +Registrant Country: US +Registrant Phone: +1.6502530000 +Registrant Phone Ext: +Registrant Fax: +1.6502530001 +Registrant Fax Ext: +Registrant Email: dns-admin@google.com +Registry Admin ID: C40795-AGRS +Admin Name: DNS Admin +Admin Organization: Google Inc. +Admin Street: 1600 Amphitheatre Parkway +Admin City: Mountain View +Admin State/Province: CA +Admin Postal Code: 94043 +Admin Country: US +Admin Phone: +1.6502530000 +Admin Phone Ext: +Admin Fax: +1.6502530001 +Admin Fax Ext: +Admin Email: dns-admin@google.com +Registry Tech ID: C40795-AGRS +Tech Name: DNS Admin +Tech Organization: Google Inc. +Tech Street: 1600 Amphitheatre Parkway +Tech City: Mountain View +Tech State/Province: CA +Tech Postal Code: 94043 +Tech Country: US +Tech Phone: +1.6502530000 +Tech Phone Ext: +Tech Fax: +1.6502530001 +Tech Fax Ext: +Tech Email: dns-admin@google.com +Name Server: NS1.GOOGLE.COM +Name Server: NS2.GOOGLE.COM +Name Server: NS4.GOOGLE.COM +Name Server: NS3.GOOGLE.COM +DNSSEC: unsigned -Domain ID:D444956-LRCC -Domain Name:GOOGLE.MN -Created On:07-Apr-2003 00:00:00 UTC -Last Updated On:06-Mar-2013 10:21:48 UTC -Expiration Date:07-Apr-2014 00:00:00 UTC -Sponsoring Registrar:MarkMonitor, Inc. (R22-LRCC) -Status:CLIENT DELETE PROHIBITED -Status:CLIENT TRANSFER PROHIBITED -Status:CLIENT UPDATE PROHIBITED -Registrant ID:MNM-11332 -Registrant Name:DNS Admin -Registrant Organization:Google Inc. -Registrant Street1:1600 Amphitheatre Parkway -Registrant Street2: -Registrant Street3: -Registrant City:Mountain View -Registrant State/Province:CA -Registrant Postal Code:94043 -Registrant Country:US -Registrant Phone:+165.03300100 -Registrant Phone Ext.: -Registrant FAX:+165.06188571 -Registrant FAX Ext.: -Registrant Email:dns-admin@google.com -Admin ID:MNM-11332 -Admin Name:DNS Admin -Admin Organization:Google Inc. -Admin Street1:1600 Amphitheatre Parkway -Admin Street2: -Admin Street3: -Admin City:Mountain View -Admin State/Province:CA -Admin Postal Code:94043 -Admin Country:US -Admin Phone:+165.03300100 -Admin Phone Ext.: -Admin FAX:+165.06188571 -Admin FAX Ext.: -Admin Email:dns-admin@google.com -Tech ID:mmr-33293 -Tech Name:Domain Admin -Tech Organization:MarkMonitor -Tech Street1:391 N. Ancestor Place -Tech Street2:Suite 150 -Tech Street3: -Tech City:Boise -Tech State/Province:CA -Tech Postal Code:83704 -Tech Country:US -Tech Phone:+1.2083895740 -Tech Phone Ext.: -Tech FAX:+1.2083895771 -Tech FAX Ext.: -Tech Email:ccops@markmonitor.com -Name Server:NS1.GOOGLE.COM -Name Server:NS2.GOOGLE.COM -Name Server:NS3.GOOGLE.COM -Name Server:NS4.GOOGLE.COM -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: - +>>> Last update of WHOIS database: 2021-11-09T15:18:31Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.afilias-grs.info/sc/status_available.expected b/spec/fixtures/responses/whois.afilias-grs.info/sc/status_available.expected index d1670fe9..bfa9ac4f 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/sc/status_available.expected +++ b/spec/fixtures/responses/whois.afilias-grs.info/sc/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain diff --git a/spec/fixtures/responses/whois.afilias-grs.info/sc/status_available.txt b/spec/fixtures/responses/whois.afilias-grs.info/sc/status_available.txt index 679aadb9..2b356a3f 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/sc/status_available.txt +++ b/spec/fixtures/responses/whois.afilias-grs.info/sc/status_available.txt @@ -1 +1,5 @@ NOT FOUND +>>> Last update of WHOIS database: 2021-11-09T15:33:26Z <<< + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.afilias-grs.info/sc/status_registered.expected b/spec/fixtures/responses/whois.afilias-grs.info/sc/status_registered.expected index 6cf05612..0ea27487 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/sc/status_registered.expected +++ b/spec/fixtures/responses/whois.afilias-grs.info/sc/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "Access to CCTLD WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to: (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy." + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == "google.sc" #domain_id - %s == "D47234-LRCC" + %s == "D105800000000047234-AGRS" #status - %s == ["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED", "RENEWPERIOD"] + %s == ["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"] #available? %s == false @@ -25,73 +25,43 @@ #updated_on %s %CLASS{time} - %s %TIME{2014-01-02 10:20:29 UTC} + %s %TIME{2021-01-02 10:34:05 UTC} #expires_on %s %CLASS{time} - %s %TIME{2015-02-03 19:19:12 UTC} + %s %TIME{2022-02-03 19:19:12 UTC} #registrar %s %CLASS{registrar} - %s.id == "R22-LRCC" - %s.name == "MarkMonitor, Inc." - %s.organization == nil - %s.url == nil + %s.id == "292" + %s.name == "MarkMonitor Inc." + %s.url == "http://www.markmonitor.com" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "AGRS-129819" - %s[0].name == "DNS Admin" + %s[0].id == nil + %s[0].name == nil %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil %s[0].state == "CA" %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == nil #admin_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "AGRS-129293" - %s[0].name == "CCOPS" - %s[0].organization == "MarkMonitor" - %s[0].address == "PMB 155\n10400 Overland Rd." - %s[0].city == "Boise" - %s[0].zip == "83709-1433" - %s[0].state == "ID" - %s[0].country_code == "US" - %s[0].phone == "+1.20838957" - %s[0].fax == "+1.20838957" - %s[0].email == "ccops@markmonitor.com" + %s %SIZE{0} #technical_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "mmr-33293" - %s[0].name == "Domain Admin" - %s[0].organization == "MarkMonitor" - %s[0].address == "391 N. Ancestor Place\nSuite 150" - %s[0].city == "Boise" - %s[0].zip == "83704" - %s[0].state == "CA" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.2083895740" - %s[0].fax == "+1.2083895771" - %s[0].email == "ccops@markmonitor.com" - %s[0].created_on == nil - %s[0].updated_on == nil + %s %SIZE{0} #nameservers diff --git a/spec/fixtures/responses/whois.afilias-grs.info/sc/status_registered.txt b/spec/fixtures/responses/whois.afilias-grs.info/sc/status_registered.txt index 03e2de8e..2bb95102 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/sc/status_registered.txt +++ b/spec/fixtures/responses/whois.afilias-grs.info/sc/status_registered.txt @@ -1,86 +1,29 @@ -Access to CCTLD WHOIS information is provided to assist persons in -determining the contents of a domain name registration record in the -Afilias registry database. The data in this record is provided by -Afilias Limited for informational purposes only, and Afilias does not -guarantee its accuracy. This service is intended only for query-based -access. You agree that you will use this data only for lawful purposes -and that, under no circumstances will you use this data to: (a) allow, -enable, or otherwise support the transmission by e-mail, telephone, or -facsimile of mass unsolicited, commercial advertising or solicitations -to entities other than the data recipient's own existing customers; or -(b) enable high volume, automated, electronic processes that send -queries or data to the systems of Registry Operator, a Registrar, or -Afilias except as reasonably necessary to register domain names or -modify existing registrations. All rights reserved. Afilias reserves -the right to modify these terms at any time. By submitting this query, -you agree to abide by this policy. +Domain Name: GOOGLE.SC +Registry Domain ID: D105800000000047234-AGRS +Registrar WHOIS Server: +Registrar URL: http://www.markmonitor.com +Updated Date: 2021-01-02T10:34:05Z +Creation Date: 2004-02-03T19:19:12Z +Registry Expiry Date: 2022-02-03T19:19:12Z +Registrar Registration Expiration Date: +Registrar: MarkMonitor Inc. +Registrar IANA ID: 292 +Registrar Abuse Contact Email: abusecomplaints@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +Reseller: +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Registrant Organization: Google Inc. +Registrant State/Province: CA +Registrant Country: US +Name Server: NS1.GOOGLE.COM +Name Server: NS2.GOOGLE.COM +DNSSEC: unsigned -Domain ID:D47234-LRCC -Domain Name:GOOGLE.SC -Created On:03-Feb-2004 19:19:12 UTC -Last Updated On:02-Jan-2014 10:20:29 UTC -Expiration Date:03-Feb-2015 19:19:12 UTC -Sponsoring Registrar:MarkMonitor, Inc. (R22-LRCC) -Status:CLIENT DELETE PROHIBITED -Status:CLIENT TRANSFER PROHIBITED -Status:CLIENT UPDATE PROHIBITED -Status:RENEWPERIOD -Registrant ID:AGRS-129819 -Registrant Name:DNS Admin -Registrant Organization:Google Inc. -Registrant Street1:1600 Amphitheatre Parkway -Registrant Street2: -Registrant Street3: -Registrant City:Mountain View -Registrant State/Province:CA -Registrant Postal Code:94043 -Registrant Country:US -Registrant Phone:+1.6502530000 -Registrant Phone Ext.: -Registrant FAX:+1.6506188571 -Registrant FAX Ext.: -Registrant Email:dns-admin@google.com -Admin ID:AGRS-129293 -Admin Name:CCOPS -Admin Organization:MarkMonitor -Admin Street1:PMB 155 -Admin Street2:10400 Overland Rd. -Admin Street3: -Admin City:Boise -Admin State/Province:ID -Admin Postal Code:83709-1433 -Admin Country:US -Admin Phone:+1.20838957 -Admin Phone Ext.: -Admin FAX:+1.20838957 -Admin FAX Ext.: -Admin Email:ccops@markmonitor.com -Tech ID:mmr-33293 -Tech Name:Domain Admin -Tech Organization:MarkMonitor -Tech Street1:391 N. Ancestor Place -Tech Street2:Suite 150 -Tech Street3: -Tech City:Boise -Tech State/Province:CA -Tech Postal Code:83704 -Tech Country:US -Tech Phone:+1.2083895740 -Tech Phone Ext.: -Tech FAX:+1.2083895771 -Tech FAX Ext.: -Tech Email:ccops@markmonitor.com -Name Server:NS1.GOOGLE.COM -Name Server:NS2.GOOGLE.COM -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: - +>>> Last update of WHOIS database: 2021-11-09T15:33:25Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.afilias-grs.info/vc/status_available.expected b/spec/fixtures/responses/whois.afilias-grs.info/vc/status_available.expected index 2c3fe7a8..63337ef4 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/vc/status_available.expected +++ b/spec/fixtures/responses/whois.afilias-grs.info/vc/status_available.expected @@ -1,6 +1,5 @@ #disclaimer - %s == nil - + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == nil diff --git a/spec/fixtures/responses/whois.afilias-grs.info/vc/status_available.txt b/spec/fixtures/responses/whois.afilias-grs.info/vc/status_available.txt index 679aadb9..d68967fa 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/vc/status_available.txt +++ b/spec/fixtures/responses/whois.afilias-grs.info/vc/status_available.txt @@ -1 +1,5 @@ NOT FOUND +>>> Last update of WHOIS database: 2021-11-09T15:37:36Z <<< + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.afilias-grs.info/vc/status_registered.expected b/spec/fixtures/responses/whois.afilias-grs.info/vc/status_registered.expected index 39e29392..f45d2a16 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/vc/status_registered.expected +++ b/spec/fixtures/responses/whois.afilias-grs.info/vc/status_registered.expected @@ -1,16 +1,15 @@ #disclaimer - %s == "Access to CCTLD WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to: (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy." - + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == "google.vc" #domain_id - %s == "D133753-LRCC" + %s == "D105800000000133753-AGRS" #status - %s == ["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED"] + %s == ["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"] #available? %s == false @@ -25,70 +24,43 @@ #updated_on %s %CLASS{time} - %s %TIME{2009-02-17 17:43:40 UTC} + %s %TIME{2021-05-28 09:37:54 UTC} #expires_on %s %CLASS{time} - %s %TIME{2011-06-29 00:58:18 UTC} + %s %TIME{2022-06-29 00:58:18 UTC} #registrar %s %CLASS{registrar} - %s.id == "R22-LRCC" - %s.name == "MarkMonitor, Inc." - %s.organization == nil - %s.url == nil + %s.id == "292" + %s.name == "MarkMonitor Inc." + %s.url == "http://www.markmonitor.com" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "mmr-2383" - %s[0].name == "DNS Admin" + %s[0].id == nil + %s[0].name == nil %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil %s[0].state == "CA" %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == nil #admin_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "mmr-2383" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s %SIZE{0} #technical_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "mmr-2383" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s %SIZE{0} #nameservers @@ -99,6 +71,6 @@ %s[1] %CLASS{nameserver} %s[1].name == "ns2.google.com" %s[2] %CLASS{nameserver} - %s[2].name == "ns3.google.com" + %s[2].name == "ns4.google.com" %s[3] %CLASS{nameserver} - %s[3].name == "ns4.google.com" + %s[3].name == "ns3.google.com" diff --git a/spec/fixtures/responses/whois.afilias-grs.info/vc/status_registered.txt b/spec/fixtures/responses/whois.afilias-grs.info/vc/status_registered.txt index f4ca7e98..811a23cb 100644 --- a/spec/fixtures/responses/whois.afilias-grs.info/vc/status_registered.txt +++ b/spec/fixtures/responses/whois.afilias-grs.info/vc/status_registered.txt @@ -1,100 +1,31 @@ -Access to CCTLD WHOIS information is provided to assist persons in -determining the contents of a domain name registration record in the -Afilias registry database. The data in this record is provided by -Afilias Limited for informational purposes only, and Afilias does not -guarantee its accuracy. This service is intended only for query-based -access. You agree that you will use this data only for lawful purposes -and that, under no circumstances will you use this data to: (a) allow, -enable, or otherwise support the transmission by e-mail, telephone, or -facsimile of mass unsolicited, commercial advertising or solicitations -to entities other than the data recipient's own existing customers; or -(b) enable high volume, automated, electronic processes that send -queries or data to the systems of Registry Operator, a Registrar, or -Afilias except as reasonably necessary to register domain names or -modify existing registrations. All rights reserved. Afilias reserves -the right to modify these terms at any time. By submitting this query, -you agree to abide by this policy. +Domain Name: GOOGLE.VC +Registry Domain ID: D105800000000133753-AGRS +Registrar WHOIS Server: +Registrar URL: http://www.markmonitor.com +Updated Date: 2021-05-28T09:37:54Z +Creation Date: 2005-06-29T00:58:18Z +Registry Expiry Date: 2022-06-29T00:58:18Z +Registrar Registration Expiration Date: +Registrar: MarkMonitor Inc. +Registrar IANA ID: 292 +Registrar Abuse Contact Email: abusecomplaints@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +Reseller: +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Registrant Organization: Google Inc. +Registrant State/Province: CA +Registrant Country: US +Name Server: NS1.GOOGLE.COM +Name Server: NS2.GOOGLE.COM +Name Server: NS4.GOOGLE.COM +Name Server: NS3.GOOGLE.COM +DNSSEC: unsigned -Domain ID:D133753-LRCC -Domain Name:GOOGLE.VC -Created On:29-Jun-2005 00:58:18 UTC -Last Updated On:17-Feb-2009 17:43:40 UTC -Expiration Date:29-Jun-2011 00:58:18 UTC -Sponsoring Registrar:MarkMonitor, Inc. (R22-LRCC) -Status:CLIENT DELETE PROHIBITED -Status:CLIENT TRANSFER PROHIBITED -Status:CLIENT UPDATE PROHIBITED -Registrant ID:mmr-2383 -Registrant Name:DNS Admin -Registrant Organization:Google Inc. -Registrant Street1:1600 Amphitheatre Parkway -Registrant Street2: -Registrant Street3: -Registrant City:Mountain View -Registrant State/Province:CA -Registrant Postal Code:94043 -Registrant Country:US -Registrant Phone:+1.6502530000 -Registrant Phone Ext.: -Registrant FAX:+1.6506188571 -Registrant FAX Ext.: -Registrant Email:dns-admin@google.com -Admin ID:mmr-2383 -Admin Name:DNS Admin -Admin Organization:Google Inc. -Admin Street1:1600 Amphitheatre Parkway -Admin Street2: -Admin Street3: -Admin City:Mountain View -Admin State/Province:CA -Admin Postal Code:94043 -Admin Country:US -Admin Phone:+1.6502530000 -Admin Phone Ext.: -Admin FAX:+1.6506188571 -Admin FAX Ext.: -Admin Email:dns-admin@google.com -Billing ID:mmr-32102 -Billing Name:domain admin -Billing Organization:DNStination, Inc. -Billing Street1:303 Second Street -Billing Street2:Suite 800N -Billing Street3: -Billing City:San Francisco -Billing State/Province:CA -Billing Postal Code:94107 -Billing Country:US -Billing Phone:+1.4155319335 -Billing Phone Ext.: -Billing FAX:+1.2083895740 -Billing FAX Ext.: -Billing Email:admin@dnstinations.com -Tech ID:mmr-2383 -Tech Name:DNS Admin -Tech Organization:Google Inc. -Tech Street1:1600 Amphitheatre Parkway -Tech Street2: -Tech Street3: -Tech City:Mountain View -Tech State/Province:CA -Tech Postal Code:94043 -Tech Country:US -Tech Phone:+1.6502530000 -Tech Phone Ext.: -Tech FAX:+1.6506188571 -Tech FAX Ext.: -Tech Email:dns-admin@google.com -Name Server:NS1.GOOGLE.COM -Name Server:NS2.GOOGLE.COM -Name Server:NS3.GOOGLE.COM -Name Server:NS4.GOOGLE.COM -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: - +>>> Last update of WHOIS database: 2021-11-09T15:37:35Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.nic.fr/yt/response_throttled.expected b/spec/fixtures/responses/whois.afilias.net/info/response_throttled.expected similarity index 100% rename from spec/fixtures/responses/whois.nic.fr/yt/response_throttled.expected rename to spec/fixtures/responses/whois.afilias.net/info/response_throttled.expected diff --git a/spec/fixtures/responses/whois.afilias.net/info/response_throttled.txt b/spec/fixtures/responses/whois.afilias.net/info/response_throttled.txt new file mode 100644 index 00000000..4cad7291 --- /dev/null +++ b/spec/fixtures/responses/whois.afilias.net/info/response_throttled.txt @@ -0,0 +1 @@ +LIMIT EXCEEDED diff --git a/spec/fixtures/responses/whois.afilias.net/info/status_available.expected b/spec/fixtures/responses/whois.afilias.net/info/status_available.expected index 2c3fe7a8..8f020a7a 100644 --- a/spec/fixtures/responses/whois.afilias.net/info/status_available.expected +++ b/spec/fixtures/responses/whois.afilias.net/info/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain diff --git a/spec/fixtures/responses/whois.afilias.net/info/status_available.txt b/spec/fixtures/responses/whois.afilias.net/info/status_available.txt index 679aadb9..060f0952 100644 --- a/spec/fixtures/responses/whois.afilias.net/info/status_available.txt +++ b/spec/fixtures/responses/whois.afilias.net/info/status_available.txt @@ -1 +1,7 @@ NOT FOUND +>>> Last update of WHOIS database: 2021-11-09T17:06:24Z <<< + +Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. + +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. + diff --git a/spec/fixtures/responses/whois.afilias.net/info/status_registered.expected b/spec/fixtures/responses/whois.afilias.net/info/status_registered.expected index dbf40910..1e637bc2 100644 --- a/spec/fixtures/responses/whois.afilias.net/info/status_registered.expected +++ b/spec/fixtures/responses/whois.afilias.net/info/status_registered.expected @@ -1,5 +1,5 @@ #disclaimer - %s == "Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy." + %s == "Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain @@ -10,7 +10,7 @@ #status - %s == ["clientDeleteProhibited", "clientTransferProhibited", "clientUpdateProhibited"] + %s == ["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited", "serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited", "serverTransferProhibited https://icann.org/epp#serverTransferProhibited", "serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited"] #available? %s == false @@ -25,70 +25,43 @@ #updated_on %s %CLASS{time} - %s %TIME{2013-06-29 09:26:18 UTC} + %s %TIME{2021-06-29 09:31:10 UTC} #expires_on %s %CLASS{time} - %s %TIME{2014-07-31 23:57:50 UTC} + %s %TIME{2022-07-31 23:57:50 UTC} #registrar %s %CLASS{registrar} - %s.id == "R151-LRMS" + %s.id == "292" %s.name == "MarkMonitor Inc." - %s.organization == nil - %s.url == nil + %s.url == "http://www.markmonitor.com" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "mmr-32097" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" + %s[0].id == nil + %s[0].name == nil + %s[0].organization == "Google LLC" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil %s[0].state == "CA" %s[0].country_code == "US" - %s[0].phone == "+1.6506234000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == nil #admin_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "mmr-32097" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country_code == "US" - %s[0].phone == "+1.6506234000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s %SIZE{0} #technical_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "mmr-32097" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country_code == "US" - %s[0].phone == "+1.6506234000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s %SIZE{0} #nameservers diff --git a/spec/fixtures/responses/whois.afilias.net/info/status_registered.txt b/spec/fixtures/responses/whois.afilias.net/info/status_registered.txt index 876791ad..0cae9dad 100644 --- a/spec/fixtures/responses/whois.afilias.net/info/status_registered.txt +++ b/spec/fixtures/responses/whois.afilias.net/info/status_registered.txt @@ -1,86 +1,35 @@ -Domain Name:GOOGLE.INFO -Domain ID: D37288-LRMS +Domain Name: GOOGLE.INFO +Registry Domain ID: D37288-LRMS +Registrar WHOIS Server: whois.markmonitor.com +Registrar URL: http://www.markmonitor.com +Updated Date: 2021-06-29T09:31:10Z Creation Date: 2001-07-31T23:57:50Z -Updated Date: 2013-06-29T09:26:18Z -Registry Expiry Date: 2014-07-31T23:57:50Z -Trademark Name:GOOGLE -Trademark Date:1999-09-17 -Trademark Country:Mexico -Trademark Number:622722 -Sponsoring Registrar:MarkMonitor Inc. (R151-LRMS) -Sponsoring Registrar IANA ID: 292 -WHOIS Server: -Referral URL: -Domain Status: clientDeleteProhibited -Domain Status: clientTransferProhibited -Domain Status: clientUpdateProhibited -Registrant ID:mmr-32097 -Registrant Name:DNS Admin -Registrant Organization:Google Inc. -Registrant Street: 1600 Amphitheatre Parkway -Registrant City:Mountain View -Registrant State/Province:CA -Registrant Postal Code:94043 -Registrant Country:US -Registrant Phone:+1.6506234000 -Registrant Phone Ext: -Registrant Fax: +1.6506188571 -Registrant Fax Ext: -Registrant Email:dns-admin@google.com -Admin ID:mmr-32097 -Admin Name:DNS Admin -Admin Organization:Google Inc. -Admin Street: 1600 Amphitheatre Parkway -Admin City:Mountain View -Admin State/Province:CA -Admin Postal Code:94043 -Admin Country:US -Admin Phone:+1.6506234000 -Admin Phone Ext: -Admin Fax: +1.6506188571 -Admin Fax Ext: -Admin Email:dns-admin@google.com -Billing ID:mmr-32097 -Billing Name:DNS Admin -Billing Organization:Google Inc. -Billing Street: 1600 Amphitheatre Parkway -Billing City:Mountain View -Billing State/Province:CA -Billing Postal Code:94043 -Billing Country:US -Billing Phone:+1.6506234000 -Billing Phone Ext: -Billing Fax: +1.6506188571 -Billing Fax Ext: -Billing Email:dns-admin@google.com -Tech ID:mmr-32097 -Tech Name:DNS Admin -Tech Organization:Google Inc. -Tech Street: 1600 Amphitheatre Parkway -Tech City:Mountain View -Tech State/Province:CA -Tech Postal Code:94043 -Tech Country:US -Tech Phone:+1.6506234000 -Tech Phone Ext: -Tech Fax: +1.6506188571 -Tech Fax Ext: -Tech Email:dns-admin@google.com -Name Server:NS1.GOOGLE.COM -Name Server:NS2.GOOGLE.COM -Name Server:NS3.GOOGLE.COM -Name Server:NS4.GOOGLE.COM -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -DNSSEC:Unsigned +Registry Expiry Date: 2022-07-31T23:57:50Z +Registrar Registration Expiration Date: +Registrar: MarkMonitor Inc. +Registrar IANA ID: 292 +Registrar Abuse Contact Email: abusecomplaints@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +Reseller: +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Domain Status: serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited +Domain Status: serverTransferProhibited https://icann.org/epp#serverTransferProhibited +Domain Status: serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited +Registrant Organization: Google LLC +Registrant State/Province: CA +Registrant Country: US +Name Server: NS1.GOOGLE.COM +Name Server: NS2.GOOGLE.COM +Name Server: NS3.GOOGLE.COM +Name Server: NS4.GOOGLE.COM +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-09T17:05:05Z <<< -Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +For more information on Whois status codes, please visit https://icann.org/epp +Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.afilias.net/info/status_reserved.txt b/spec/fixtures/responses/whois.afilias.net/info/status_reserved.txt index a6531fef..26f93ce3 100644 --- a/spec/fixtures/responses/whois.afilias.net/info/status_reserved.txt +++ b/spec/fixtures/responses/whois.afilias.net/info/status_reserved.txt @@ -1,4 +1,6 @@ -Name is reserved by afilias ->>> Last update of WHOIS database: 2016-02-21T09:56:17Z <<< +Reserved by the registry. +>>> Last update of WHOIS database: 2021-11-09T17:09:19Z <<< Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. + +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.afilias.net/pro/status_available.expected b/spec/fixtures/responses/whois.afilias.net/pro/status_available.expected index f535421b..8f020a7a 100644 --- a/spec/fixtures/responses/whois.afilias.net/pro/status_available.expected +++ b/spec/fixtures/responses/whois.afilias.net/pro/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == "Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy." + %s == "Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain diff --git a/spec/fixtures/responses/whois.afilias.net/pro/status_available.txt b/spec/fixtures/responses/whois.afilias.net/pro/status_available.txt index 937adc6c..c95f18a2 100644 --- a/spec/fixtures/responses/whois.afilias.net/pro/status_available.txt +++ b/spec/fixtures/responses/whois.afilias.net/pro/status_available.txt @@ -1,4 +1,6 @@ NOT FOUND ->>> Last update of WHOIS database: 2016-02-21T09:33:12Z <<< +>>> Last update of WHOIS database: 2021-11-09T21:36:02Z <<< Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. + +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.afilias.net/pro/status_registered.expected b/spec/fixtures/responses/whois.afilias.net/pro/status_registered.expected index 277d87bd..6cfb2c67 100644 --- a/spec/fixtures/responses/whois.afilias.net/pro/status_registered.expected +++ b/spec/fixtures/responses/whois.afilias.net/pro/status_registered.expected @@ -1,6 +1,5 @@ #disclaimer - %s == "Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy." - + %s == "Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == "google.pro" @@ -25,70 +24,43 @@ #updated_on %s %CLASS{time} - %s %TIME{2016-02-01 15:44:03 UTC} + %s %TIME{2021-08-07 09:34:10 UTC} #expires_on %s %CLASS{time} - %s %TIME{2016-09-08 00:00:00 UTC} + %s %TIME{2022-09-08 00:00:00 UTC} #registrar %s %CLASS{registrar} - %s.id == nil + %s.id == "292" %s.name == "MarkMonitor Inc." - %s.organization == nil - %s.url == nil + %s.url == "http://www.markmonitor.com" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "mmr-2383" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT + %s[0].id == nil + %s[0].name == nil + %s[0].organization == "Google Inc." + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil + %s[0].state == "CA" + %s[0].country_code == "US" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == nil #admin_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "mmr-2383" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s %SIZE{0} #technical_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "mmr-2383" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s %SIZE{0} #nameservers diff --git a/spec/fixtures/responses/whois.afilias.net/pro/status_registered.txt b/spec/fixtures/responses/whois.afilias.net/pro/status_registered.txt index 7c7c584e..0b1aa02b 100644 --- a/spec/fixtures/responses/whois.afilias.net/pro/status_registered.txt +++ b/spec/fixtures/responses/whois.afilias.net/pro/status_registered.txt @@ -1,72 +1,30 @@ Domain Name: GOOGLE.PRO -Domain ID: D107300000000011545-LRMS -WHOIS Server: -Referral URL: http://www.markmonitor.com -Updated Date: 2016-02-01T15:44:03Z +Registry Domain ID: D107300000000011545-LRMS +Registrar WHOIS Server: whois.markmonitor.com +Registrar URL: http://www.markmonitor.com +Updated Date: 2021-08-07T09:34:10Z Creation Date: 2008-07-22T00:00:00Z -Registry Expiry Date: 2016-09-08T00:00:00Z -Sponsoring Registrar: MarkMonitor Inc. -Sponsoring Registrar IANA ID: 292 +Registry Expiry Date: 2022-09-08T00:00:00Z +Registrar Registration Expiration Date: +Registrar: MarkMonitor Inc. +Registrar IANA ID: 292 +Registrar Abuse Contact Email: abusecomplaints@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +Reseller: Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited -Registrant ID: mmr-2383 -Registrant Name: DNS Admin Registrant Organization: Google Inc. -Registrant Street: 1600 Amphitheatre Parkway -Registrant City: Mountain View Registrant State/Province: CA -Registrant Postal Code: 94043 Registrant Country: US -Registrant Phone: +1.6502530000 -Registrant Phone Ext: -Registrant Fax: +1.6506188571 -Registrant Fax Ext: -Registrant Email: dns-admin@google.com -Admin ID: mmr-2383 -Admin Name: DNS Admin -Admin Organization: Google Inc. -Admin Street: 1600 Amphitheatre Parkway -Admin City: Mountain View -Admin State/Province: CA -Admin Postal Code: 94043 -Admin Country: US -Admin Phone: +1.6502530000 -Admin Phone Ext: -Admin Fax: +1.6506188571 -Admin Fax Ext: -Admin Email: dns-admin@google.com -Tech ID: mmr-2383 -Tech Name: DNS Admin -Tech Organization: Google Inc. -Tech Street: 1600 Amphitheatre Parkway -Tech City: Mountain View -Tech State/Province: CA -Tech Postal Code: 94043 -Tech Country: US -Tech Phone: +1.6502530000 -Tech Phone Ext: -Tech Fax: +1.6506188571 -Tech Fax Ext: -Tech Email: dns-admin@google.com -Billing ID: mmr-132627 -Billing Name: CCOPS Billing -Billing Organization: MarkMonitor, Inc. -Billing Street: 391 N. Ancestor Place -Billing City: Boise -Billing State/Province: ID -Billing Postal Code: 83704 -Billing Country: US -Billing Phone: +1.2083895740 -Billing Phone Ext: -Billing Fax: +1.2083895771 -Billing Fax Ext: -Billing Email: ccopsbilling@markmonitor.com Name Server: NS1.GOOGLE.COM Name Server: NS2.GOOGLE.COM DNSSEC: unsigned ->>> Last update of WHOIS database: 2016-02-19T15:43:18Z <<< +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-09T21:35:44Z <<< -"For more information on Whois status codes, please visit https://icann.org/epp" +For more information on Whois status codes, please visit https://icann.org/epp Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. + +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.afilias.net/pro/status_reserved.txt b/spec/fixtures/responses/whois.afilias.net/pro/status_reserved.txt index f5a90ff3..329aafa4 100644 --- a/spec/fixtures/responses/whois.afilias.net/pro/status_reserved.txt +++ b/spec/fixtures/responses/whois.afilias.net/pro/status_reserved.txt @@ -1,4 +1,6 @@ -Reserved by Registry ->>> Last update of WHOIS database: 2016-02-21T09:40:08Z <<< +Reserved by the registry. +>>> Last update of WHOIS database: 2021-11-09T21:36:44Z <<< Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. + +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.ascio.com/status_registered.expected b/spec/fixtures/responses/whois.ascio.com/status_registered.expected index 2b69f7d1..56ceb2ba 100644 --- a/spec/fixtures/responses/whois.ascio.com/status_registered.expected +++ b/spec/fixtures/responses/whois.ascio.com/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "106" %s.name == "Ascio Technologies, Inc" - %s.organization == "Ascio Technologies, Inc" %s.url == "http://www.ascio.com" diff --git a/spec/fixtures/responses/whois.ati.tn/tn/status_registered.expected b/spec/fixtures/responses/whois.ati.tn/tn/status_registered.expected index 6a3fe768..bff95c53 100644 --- a/spec/fixtures/responses/whois.ati.tn/tn/status_registered.expected +++ b/spec/fixtures/responses/whois.ati.tn/tn/status_registered.expected @@ -34,7 +34,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "3S Global Net" - %s.organization == nil %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/whois.auda.org.au/au/property_status_with_multiple.expected b/spec/fixtures/responses/whois.auda.org.au/au/property_status_with_multiple.expected new file mode 100644 index 00000000..e9eba17e --- /dev/null +++ b/spec/fixtures/responses/whois.auda.org.au/au/property_status_with_multiple.expected @@ -0,0 +1,2 @@ +#status + %s == ["serverRenewProhibited https://afilias.com.au/get-au/whois-status-codes#serverRenewProhibited"] diff --git a/spec/fixtures/responses/whois.auda.org.au/au/property_status_with_multiple.txt b/spec/fixtures/responses/whois.auda.org.au/au/property_status_with_multiple.txt new file mode 100644 index 00000000..0daac17c --- /dev/null +++ b/spec/fixtures/responses/whois.auda.org.au/au/property_status_with_multiple.txt @@ -0,0 +1,44 @@ +Domain Name: PINEWOOD.COM.AU +Registry Domain ID: D407400000001847702-AU +Registrar WHOIS Server: whois.synergywholesale.com +Registrar URL: whois.synergywholesale.com +Last Modified: +Registrar Name: Synergy Wholesale Pty Ltd +Registrar Abuse Contact Email: abuse@synergywholesale.com +Registrar Abuse Contact Phone: +61.383999483 +Reseller Name: +Status: serverRenewProhibited https://afilias.com.au/get-au/whois-status-codes#serverRenewProhibited +Registrant Contact ID: NFVKTQY4FP7TA0W +Registrant Contact Name: EMIL ANDONOV +Tech Contact ID: NFSTGFPPDC0HFZ1Q +Tech Contact Name: EMIL ANDONOV +Name Server: DNS1.NETFLEET.COM.AU +Name Server IP: 202.191.63.6 +Name Server: DNS2.NETFLEET.COM.AU +Name Server IP: 180.235.131.172 +DNSSEC: unsigned +Registrant: Pacific Fund Pty Ltd +Registrant ID: ABN 75143185406 +Eligibility Type: Company + +>>> Last update of WHOIS database: 2018-08-07T21:25:00Z <<< + + + +Afilias Australia Pty Ltd (Afilias), for itself and on behalf of .au Domain Administration Limited (auDA), makes the WHOIS registration data directory service (WHOIS Service) available solely for the purposes of: + +(a) querying the availability of a domain name licence; + +(b) identifying the holder of a domain name licence; and/or + +(c) contacting the holder of a domain name licence in relation to that domain name and its use. + +The WHOIS Service must not be used for any other purpose (even if that purpose is lawful), including: + +(a) aggregating, collecting or compiling information from the WHOIS database, whether for personal or commercial purposes; + +(b) enabling the sending of unsolicited electronic communications; and / or + +(c) enabling high volume, automated, electronic processes that send queries or data to the systems of Afilias, any registrar, any domain name licence holder, or auDA. + +The WHOIS Service is provided for information purposes only. By using the WHOIS Service, you agree to be bound by these terms and conditions. The WHOIS Service is operated in accordance with the auDA WHOIS Policy (available at https://www.auda.org.au/policies/index-of-published-policies/2014/2014-07/ ). diff --git a/spec/fixtures/responses/whois.auda.org.au/au/status_available.expected b/spec/fixtures/responses/whois.auda.org.au/au/status_available.expected new file mode 100644 index 00000000..688a1f40 --- /dev/null +++ b/spec/fixtures/responses/whois.auda.org.au/au/status_available.expected @@ -0,0 +1,49 @@ +#disclaimer + %s == "Afilias Australia Pty Ltd (Afilias), for itself and on behalf of .au Domain Administration Limited (auDA), makes the WHOIS registration data directory service (WHOIS Service) available solely for the purposes of:\n(a) querying the availability of a domain name licence;\n(b) identifying the holder of a domain name licence; and/or\n(c) contacting the holder of a domain name licence in relation to that domain name and its use.\nThe WHOIS Service must not be used for any other purpose (even if that purpose is lawful), including:\n(a) aggregating, collecting or compiling information from the WHOIS database, whether for personal or commercial purposes;\n(b) enabling the sending of unsolicited electronic communications; and / or\n(c) enabling high volume, automated, electronic processes that send queries or data to the systems of Afilias, any registrar, any domain name licence holder, or auDA.\nThe WHOIS Service is provided for information purposes only. By using the WHOIS Service, you agree to be bound by these terms and conditions. The WHOIS Service is operated in accordance with the auDA WHOIS Policy (available at https://www.auda.org.au/policies/index-of-published-policies/2014/2014-07/ )." + + +#domain + %s == nil + +#domain_id + %s == nil + + +#status + %s == [] + +#available? + %s == true + +#registered? + %s == false + + +#created_on + %s %ERROR{AttributeNotSupported} + +#updated_on + %s == nil + +#expires_on + %s %ERROR{AttributeNotSupported} + + +#registrar + %s == nil + +#registrant_contacts + %s %CLASS{array} + %s == [] + +#admin_contacts + %s %ERROR{AttributeNotSupported} + +#technical_contacts + %s %CLASS{array} + %s == [] + + +#nameservers + %s %CLASS{array} + %s == [] diff --git a/spec/fixtures/responses/whois.auda.org.au/au/status_available.txt b/spec/fixtures/responses/whois.auda.org.au/au/status_available.txt new file mode 100644 index 00000000..1fc21585 --- /dev/null +++ b/spec/fixtures/responses/whois.auda.org.au/au/status_available.txt @@ -0,0 +1,20 @@ +NOT FOUND +>>> Last update of WHOIS database: 2018-08-07T19:35:44Z <<< + +Afilias Australia Pty Ltd (Afilias), for itself and on behalf of .au Domain Administration Limited (auDA), makes the WHOIS registration data directory service (WHOIS Service) available solely for the purposes of: + +(a) querying the availability of a domain name licence; + +(b) identifying the holder of a domain name licence; and/or + +(c) contacting the holder of a domain name licence in relation to that domain name and its use. + +The WHOIS Service must not be used for any other purpose (even if that purpose is lawful), including: + +(a) aggregating, collecting or compiling information from the WHOIS database, whether for personal or commercial purposes; + +(b) enabling the sending of unsolicited electronic communications; and / or + +(c) enabling high volume, automated, electronic processes that send queries or data to the systems of Afilias, any registrar, any domain name licence holder, or auDA. + +The WHOIS Service is provided for information purposes only. By using the WHOIS Service, you agree to be bound by these terms and conditions. The WHOIS Service is operated in accordance with the auDA WHOIS Policy (available at https://www.auda.org.au/policies/index-of-published-policies/2014/2014-07/ ). diff --git a/spec/fixtures/responses/whois.auda.org.au/au/status_registered.expected b/spec/fixtures/responses/whois.auda.org.au/au/status_registered.expected new file mode 100644 index 00000000..b5e67648 --- /dev/null +++ b/spec/fixtures/responses/whois.auda.org.au/au/status_registered.expected @@ -0,0 +1,92 @@ +#disclaimer + %s == "Afilias Australia Pty Ltd (Afilias), for itself and on behalf of .au Domain Administration Limited (auDA), makes the WHOIS registration data directory service (WHOIS Service) available solely for the purposes of:\n(a) querying the availability of a domain name licence;\n(b) identifying the holder of a domain name licence; and/or\n(c) contacting the holder of a domain name licence in relation to that domain name and its use.\nThe WHOIS Service must not be used for any other purpose (even if that purpose is lawful), including:\n(a) aggregating, collecting or compiling information from the WHOIS database, whether for personal or commercial purposes;\n(b) enabling the sending of unsolicited electronic communications; and / or\n(c) enabling high volume, automated, electronic processes that send queries or data to the systems of Afilias, any registrar, any domain name licence holder, or auDA.\nThe WHOIS Service is provided for information purposes only. By using the WHOIS Service, you agree to be bound by these terms and conditions. The WHOIS Service is operated in accordance with the auDA WHOIS Policy (available at https://www.auda.org.au/policies/index-of-published-policies/2014/2014-07/ )." + + +#domain + %s == "GOOGLE.COM.AU" + +#domain_id + %s == "D407400000001774763-AU" + + +#status + %s == ["clientDeleteProhibited https://afilias.com.au/get-au/whois-status-codes#clientDeleteProhibited", "clientUpdateProhibited https://afilias.com.au/get-au/whois-status-codes#clientUpdateProhibited", "serverDeleteProhibited https://afilias.com.au/get-au/whois-status-codes#serverDeleteProhibited", "serverRenewProhibited https://afilias.com.au/get-au/whois-status-codes#serverRenewProhibited", "serverTransferProhibited https://afilias.com.au/get-au/whois-status-codes#serverTransferProhibited", "serverUpdateProhibited https://afilias.com.au/get-au/whois-status-codes#serverUpdateProhibited"] + +#available? + %s == false + +#registered? + %s == true + + +#created_on + %s %ERROR{AttributeNotSupported} + +#updated_on + %s %CLASS{time} + %s %TIME{2021-08-05 15:18:41 UTC} + +#expires_on + %s %ERROR{AttributeNotSupported} + + +#registrar + %s %CLASS{registrar} + %s.name == "MarkMonitor Corporate Services Inc" + %s.url == nil + +#registrant_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT + %s[0].id == "MMR-174095" + %s[0].name == "Domain Admin" + %s[0].organization == "Google LLC" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil + %s[0].state == nil + %s[0].country == nil + %s[0].country_code == nil + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == nil + %s[0].created_on == nil + %s[0].updated_on == nil + +#admin_contacts + %s %ERROR{AttributeNotSupported} + +#technical_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL + %s[0].id == "MMR-171195" + %s[0].name == "Domain Administrator" + %s[0].organization == nil + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil + %s[0].state == nil + %s[0].country == nil + %s[0].country_code == nil + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == nil + %s[0].created_on == nil + %s[0].updated_on == nil + + +#nameservers + %s %CLASS{array} + %s %SIZE{4} + %s[0] %CLASS{nameserver} + %s[0].name == "NS1.GOOGLE.COM" + %s[1] %CLASS{nameserver} + %s[1].name == "NS2.GOOGLE.COM" + %s[2] %CLASS{nameserver} + %s[2].name == "NS3.GOOGLE.COM" + %s[3] %CLASS{nameserver} + %s[3].name == "NS4.GOOGLE.COM" diff --git a/spec/fixtures/responses/whois.auda.org.au/au/status_registered.txt b/spec/fixtures/responses/whois.auda.org.au/au/status_registered.txt new file mode 100644 index 00000000..3ddaa508 --- /dev/null +++ b/spec/fixtures/responses/whois.auda.org.au/au/status_registered.txt @@ -0,0 +1,54 @@ +Domain Name: GOOGLE.COM.AU +Registry Domain ID: D407400000001774763-AU +Registrar WHOIS Server: whois.auda.org.au +Registrar URL: +Last Modified: 2021-08-05T15:18:41Z +Registrar Name: MarkMonitor Corporate Services Inc +Registrar Abuse Contact Email: +Registrar Abuse Contact Phone: +Reseller Name: +Status: clientDeleteProhibited https://afilias.com.au/get-au/whois-status-codes#clientDeleteProhibited +Status: clientUpdateProhibited https://afilias.com.au/get-au/whois-status-codes#clientUpdateProhibited +Status: serverDeleteProhibited https://afilias.com.au/get-au/whois-status-codes#serverDeleteProhibited +Status Reason: Registry Lock +Status: serverRenewProhibited https://afilias.com.au/get-au/whois-status-codes#serverRenewProhibited +Status Reason: Not Currently Eligible For Renewal +Status: serverTransferProhibited https://afilias.com.au/get-au/whois-status-codes#serverTransferProhibited +Status Reason: Registry Lock +Status: serverUpdateProhibited https://afilias.com.au/get-au/whois-status-codes#serverUpdateProhibited +Status Reason: Registry Lock +Registrant Contact ID: MMR-174095 +Registrant Contact Name: Domain Admin +Tech Contact ID: MMR-171195 +Tech Contact Name: Domain Administrator +Name Server: NS1.GOOGLE.COM +Name Server: NS2.GOOGLE.COM +Name Server: NS3.GOOGLE.COM +Name Server: NS4.GOOGLE.COM +DNSSEC: unsigned +Registrant: Google LLC +Eligibility Type: Trademark Owner +Eligibility Name: GOOGLE +Eligibility ID: TM 788234 + +>>> Last update of WHOIS database: 2021-12-14T11:04:43Z <<< + + + +Afilias Australia Pty Ltd (Afilias), for itself and on behalf of .au Domain Administration Limited (auDA), makes the WHOIS registration data directory service (WHOIS Service) available solely for the purposes of: + +(a) querying the availability of a domain name licence; + +(b) identifying the holder of a domain name licence; and/or + +(c) contacting the holder of a domain name licence in relation to that domain name and its use. + +The WHOIS Service must not be used for any other purpose (even if that purpose is lawful), including: + +(a) aggregating, collecting or compiling information from the WHOIS database, whether for personal or commercial purposes; + +(b) enabling the sending of unsolicited electronic communications; and / or + +(c) enabling high volume, automated, electronic processes that send queries or data to the systems of Afilias, any registrar, any domain name licence holder, or auDA. + +The WHOIS Service is provided for information purposes only. By using the WHOIS Service, you agree to be bound by these terms and conditions. The WHOIS Service is operated in accordance with the auDA WHOIS Policy (available at https://www.auda.org.au/policies/index-of-published-policies/2014/2014-07/ ). diff --git a/spec/fixtures/responses/whois.audns.net.au/au/property_status_with_multiple.expected b/spec/fixtures/responses/whois.audns.net.au/au/property_status_with_multiple.expected deleted file mode 100644 index e91d39c1..00000000 --- a/spec/fixtures/responses/whois.audns.net.au/au/property_status_with_multiple.expected +++ /dev/null @@ -1,2 +0,0 @@ -#status - %s == ["serverHold (Expired)", "serverUpdateProhibited (Expired)"] diff --git a/spec/fixtures/responses/whois.audns.net.au/au/property_status_with_multiple.txt b/spec/fixtures/responses/whois.audns.net.au/au/property_status_with_multiple.txt deleted file mode 100644 index 028d12db..00000000 --- a/spec/fixtures/responses/whois.audns.net.au/au/property_status_with_multiple.txt +++ /dev/null @@ -1,22 +0,0 @@ -Domain Name: pinewood.com.au -Last Modified: 11-Oct-2010 00:00:33 UTC -Registrar ID: Melbourne IT -Registrar Name: Melbourne IT -Status: serverHold (Expired) -Status: serverUpdateProhibited (Expired) - -Registrant: PINEWOOD PROLAB PTY LTD -Registrant ID: ACN 120 562 905 -Eligibility Type: Company - -Registrant Contact ID: Z116060879386417 -Registrant Contact Name: PETER TONOLI -Registrant Contact Email: Visit whois.ausregistry.com.au for Web based WhoIs - -Tech Contact ID: Z116060879386417 -Tech Contact Name: PETER TONOLI -Tech Contact Email: Visit whois.ausregistry.com.au for Web based WhoIs - -Name Server: ns1.dreamhost.com -Name Server: ns2.dreamhost.com -Name Server: ns3.dreamhost.com diff --git a/spec/fixtures/responses/whois.audns.net.au/au/status_available.expected b/spec/fixtures/responses/whois.audns.net.au/au/status_available.expected deleted file mode 100644 index 25693bde..00000000 --- a/spec/fixtures/responses/whois.audns.net.au/au/status_available.expected +++ /dev/null @@ -1,49 +0,0 @@ -#disclaimer - %s %ERROR{AttributeNotSupported} - - -#domain - %s == nil - -#domain_id - %s %ERROR{AttributeNotSupported} - - -#status - %s == [] - -#available? - %s == true - -#registered? - %s == false - - -#created_on - %s %ERROR{AttributeNotSupported} - -#updated_on - %s == nil - -#expires_on - %s %ERROR{AttributeNotSupported} - - -#registrar - %s == nil - -#registrant_contacts - %s %CLASS{array} - %s == [] - -#admin_contacts - %s %ERROR{AttributeNotSupported} - -#technical_contacts - %s %CLASS{array} - %s == [] - - -#nameservers - %s %CLASS{array} - %s == [] diff --git a/spec/fixtures/responses/whois.audns.net.au/au/status_available.txt b/spec/fixtures/responses/whois.audns.net.au/au/status_available.txt deleted file mode 100644 index 3831b4b5..00000000 --- a/spec/fixtures/responses/whois.audns.net.au/au/status_available.txt +++ /dev/null @@ -1 +0,0 @@ -No Data Found diff --git a/spec/fixtures/responses/whois.audns.net.au/au/status_registered.expected b/spec/fixtures/responses/whois.audns.net.au/au/status_registered.expected deleted file mode 100644 index f5e03bba..00000000 --- a/spec/fixtures/responses/whois.audns.net.au/au/status_registered.expected +++ /dev/null @@ -1,93 +0,0 @@ -#disclaimer - %s %ERROR{AttributeNotSupported} - - -#domain - %s == "google.com.au" - -#domain_id - %s %ERROR{AttributeNotSupported} - - -#status - %s == ["clientDeleteProhibited", "clientUpdateProhibited", "serverDeleteProhibited (Protected by .auLOCKDOWN)", "serverUpdateProhibited (Protected by .auLOCKDOWN)"] - -#available? - %s == false - -#registered? - %s == true - - -#created_on - %s %ERROR{AttributeNotSupported} - -#updated_on - %s %CLASS{time} - %s %TIME{2014-11-05 10:35:59 UTC} - -#expires_on - %s %ERROR{AttributeNotSupported} - - -#registrar - %s %CLASS{registrar} - %s.name == "MarkMonitor Inc." - %s.organization == nil - %s.url == nil - -#registrant_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "MMR-122026" - %s[0].name == "Domain Administrator" - %s[0].organization == "Google INC" - %s[0].address == nil - %s[0].city == nil - %s[0].zip == nil - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == nil - %s[0].phone == nil - %s[0].fax == nil - %s[0].email == "Visit whois.ausregistry.com.au for Web based WhoIs" - %s[0].created_on == nil - %s[0].updated_on == nil - -#admin_contacts - %s %ERROR{AttributeNotSupported} - -#technical_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "MMR-87489" - %s[0].name == "DNS Admin" - %s[0].organization == nil - %s[0].address == nil - %s[0].city == nil - %s[0].zip == nil - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == nil - %s[0].phone == nil - %s[0].fax == nil - %s[0].email == "Visit whois.ausregistry.com.au for Web based WhoIs" - %s[0].created_on == nil - %s[0].updated_on == nil - - -#nameservers - %s %CLASS{array} - %s %SIZE{4} - %s[0] %CLASS{nameserver} - %s[0].name == "ns1.google.com" - %s[1] %CLASS{nameserver} - %s[1].name == "ns2.google.com" - %s[2] %CLASS{nameserver} - %s[2].name == "ns3.google.com" - %s[3] %CLASS{nameserver} - %s[3].name == "ns4.google.com" diff --git a/spec/fixtures/responses/whois.audns.net.au/au/status_registered.txt b/spec/fixtures/responses/whois.audns.net.au/au/status_registered.txt deleted file mode 100644 index c7b111e7..00000000 --- a/spec/fixtures/responses/whois.audns.net.au/au/status_registered.txt +++ /dev/null @@ -1,26 +0,0 @@ -Domain Name: google.com.au -Last Modified: 05-Nov-2014 10:35:59 UTC -Status: clientDeleteProhibited -Status: clientUpdateProhibited -Status: serverDeleteProhibited (Protected by .auLOCKDOWN) -Status: serverUpdateProhibited (Protected by .auLOCKDOWN) -Registrar Name: MarkMonitor Inc. - -Registrant: Google INC -Eligibility Type: Trademark Owner -Eligibility Name: GOOGLE -Eligibility ID: TM 788234 - -Registrant Contact ID: MMR-122026 -Registrant Contact Name: Domain Administrator -Registrant Contact Email: Visit whois.ausregistry.com.au for Web based WhoIs - -Tech Contact ID: MMR-87489 -Tech Contact Name: DNS Admin -Tech Contact Email: Visit whois.ausregistry.com.au for Web based WhoIs - -Name Server: ns1.google.com -Name Server: ns2.google.com -Name Server: ns3.google.com -Name Server: ns4.google.com -DNSSEC: unsigned \ No newline at end of file diff --git a/spec/fixtures/responses/whois.cctld.by/by/status_registered.expected b/spec/fixtures/responses/whois.cctld.by/by/status_registered.expected index 4e6b544e..58d49724 100644 --- a/spec/fixtures/responses/whois.cctld.by/by/status_registered.expected +++ b/spec/fixtures/responses/whois.cctld.by/by/status_registered.expected @@ -36,7 +36,6 @@ %s %CLASS{registrar} %s.id == "Active Technologies LLC" %s.name == "Active Technologies LLC" - %s.organization == "Active Technologies LLC" #registrant_contacts %s %ERROR{AttributeNotSupported} diff --git a/spec/fixtures/responses/whois.cdmon.com/com/status_registered.expected b/spec/fixtures/responses/whois.cdmon.com/com/status_registered.expected index ba7f9b6c..5b045878 100644 --- a/spec/fixtures/responses/whois.cdmon.com/com/status_registered.expected +++ b/spec/fixtures/responses/whois.cdmon.com/com/status_registered.expected @@ -25,7 +25,6 @@ %s %CLASS{registrar} %s.id == "1403" %s.name == "10DENCEHISPAHARD, S.L" - %s.organization == "10DENCEHISPAHARD, S.L" %s.url == "https://www.cdmon.com" #registrant_contacts diff --git a/spec/fixtures/responses/whois.centralnic.com/ae.org/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/ae.org/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.centralnic.com/ae.org/status_available.expected +++ b/spec/fixtures/responses/whois.centralnic.com/ae.org/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.centralnic.com/ae.org/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/ae.org/status_available.txt index 09cc0f7e..8c0bc9f0 100644 --- a/spec/fixtures/responses/whois.centralnic.com/ae.org/status_available.txt +++ b/spec/fixtures/responses/whois.centralnic.com/ae.org/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-15T16:08:28.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/ae.org/status_purged.expected b/spec/fixtures/responses/whois.centralnic.com/ae.org/status_purged.expected new file mode 100644 index 00000000..64c3bae5 --- /dev/null +++ b/spec/fixtures/responses/whois.centralnic.com/ae.org/status_purged.expected @@ -0,0 +1,50 @@ +#disclaimer + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." + + +#domain + %s == nil + +#domain_id + %s == nil + + +#status + %s == :available + +#available? + %s == true + +#registered? + %s == false + + +#created_on + %s == nil + +#updated_on + %s == nil + +#expires_on + %s == nil + + +#registrar + %s == nil + +#registrant_contacts + %s %CLASS{array} + %s == [] + +#admin_contacts + %s %CLASS{array} + %s == [] + +#technical_contacts + %s %CLASS{array} + %s == [] + + +#nameservers + %s %CLASS{array} + %s == [] diff --git a/spec/fixtures/responses/whois.centralnic.com/ae.org/status_purged.txt b/spec/fixtures/responses/whois.centralnic.com/ae.org/status_purged.txt new file mode 100644 index 00000000..30fa22c4 --- /dev/null +++ b/spec/fixtures/responses/whois.centralnic.com/ae.org/status_purged.txt @@ -0,0 +1,21 @@ +The queried object does not exist: previous registration D887354-CNIC was purged on 2020-10-18T01:03:34.0Z (DOMAIN NOT FOUND) + +>>> Last update of WHOIS database: 2021-12-15T16:06:58.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/ae.org/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/ae.org/status_registered.expected index 4f0593fa..45976578 100644 --- a/spec/fixtures/responses/whois.centralnic.com/ae.org/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/ae.org/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain - %s == "kidzlink.ae.org" + %s == "greenflame.ae.org" #domain_id - %s == "CNIC-DO887354" + %s == "D220363148-CNIC" #status - %s == ["clientTransferProhibited", "serverTransferProhibited"] + %s == :registered #available? %s == false @@ -21,87 +21,82 @@ #created_on %s %CLASS{time} - %s %TIME{2012-08-03 15:37:33 UTC} + %s %TIME{2021-02-04 08:51:08 UTC} #updated_on %s %CLASS{time} - %s %TIME{2013-06-09 00:12:37 UTC} + %s %TIME{2021-03-24 15:08:42 UTC} #expires_on %s %CLASS{time} - %s %TIME{2014-08-03 23:59:59 UTC} + %s %TIME{2022-02-04 23:59:59 UTC} #registrar %s %CLASS{registrar} - %s.id == "H65658" - %s.name == nil - %s.organization == "101Domain, Inc." - %s.url == "http://www.101domain.com" + %s.id == "1647" + %s.name == "Hosting Concepts B.V. d/b/a Registrar.eu" + %s.url == "https://www.openprovider.com/" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "RWG000000003DA24" - %s[0].name == "IPC C/O Clarenter" - %s[0].organization == "Clarenter" - %s[0].address == "110 E Broward Blvd\nSte. 1720" - %s[0].city == "Fort Lauderdale" - %s[0].zip == "33301" - %s[0].state == "FL" + %s[0].id == nil + %s[0].name == nil + %s[0].organization == nil + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil + %s[0].state == nil %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.18888443911" + %s[0].country_code == nil + %s[0].phone == nil %s[0].fax == nil - %s[0].email == "patricia@internationalpreschoolcurriculum.com" + %s[0].email == "https://whois.centralnic.com/contact/greenflame.ae.org/registrant" #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "RWG000000003DA24" - %s[0].name == "IPC C/O Clarenter" - %s[0].organization == "Clarenter" - %s[0].address == "110 E Broward Blvd\nSte. 1720" - %s[0].city == "Fort Lauderdale" - %s[0].zip == "33301" - %s[0].state == "FL" + %s[0].id == nil + %s[0].name == nil + %s[0].organization == nil + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil + %s[0].state == nil %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.18888443911" + %s[0].country_code == nil + %s[0].phone == nil %s[0].fax == nil - %s[0].email == "patricia@internationalpreschoolcurriculum.com" + %s[0].email == "https://whois.centralnic.com/contact/greenflame.ae.org/admin" #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "RWG000000003DA24" - %s[0].name == "IPC C/O Clarenter" - %s[0].organization == "Clarenter" - %s[0].address == "110 E Broward Blvd\nSte. 1720" - %s[0].city == "Fort Lauderdale" - %s[0].zip == "33301" - %s[0].state == "FL" + %s[0].id == nil + %s[0].name == nil + %s[0].organization == nil + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil + %s[0].state == nil %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.18888443911" + %s[0].country_code == nil + %s[0].phone == nil %s[0].fax == nil - %s[0].email == "patricia@internationalpreschoolcurriculum.com" + %s[0].email == "https://whois.centralnic.com/contact/greenflame.ae.org/tech" #nameservers %s %CLASS{array} %s %SIZE{2} %s[0] %CLASS{nameserver} - %s[0].name == "ns37.domaincontrol.com" - %s[0].ipv4 == nil - %s[0].ipv6 == nil + %s[0].name == "ns1.dns-parking.com" %s[1] %CLASS{nameserver} - %s[1].name == "ns38.domaincontrol.com" - %s[1].ipv4 == nil - %s[1].ipv6 == nil + %s[1].name == "ns2.dns-parking.com" diff --git a/spec/fixtures/responses/whois.centralnic.com/ae.org/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/ae.org/status_registered.txt index 44484924..70e5d6bf 100644 --- a/spec/fixtures/responses/whois.centralnic.com/ae.org/status_registered.txt +++ b/spec/fixtures/responses/whois.centralnic.com/ae.org/status_registered.txt @@ -1,76 +1,39 @@ -Domain ID:CNIC-DO887354 -Domain Name:KIDZLINK.AE.ORG -Created On:2012-08-03T15:37:33.0Z -Last Updated On:2013-06-09T00:12:37.0Z -Expiration Date:2014-08-03T23:59:59.0Z -Status:clientTransferProhibited -Status:serverTransferProhibited -Registrant ID:RWG000000003DA24 -Registrant Name:IPC C/O Clarenter -Registrant Organization:Clarenter -Registrant Street1:110 E Broward Blvd -Registrant Street2:Ste. 1720 -Registrant City:Fort Lauderdale -Registrant State/Province:FL -Registrant Postal Code:33301 -Registrant Country:US -Registrant Phone:+1.18888443911 -Registrant Email:patricia@internationalpreschoolcurriculum.com -Admin ID:RWG000000003DA24 -Admin Name:IPC C/O Clarenter -Admin Organization:Clarenter -Admin Street1:110 E Broward Blvd -Admin Street2:Ste. 1720 -Admin City:Fort Lauderdale -Admin State/Province:FL -Admin Postal Code:33301 -Admin Country:US -Admin Phone:+1.18888443911 -Admin Email:patricia@internationalpreschoolcurriculum.com -Tech ID:RWG000000003DA24 -Tech Name:IPC C/O Clarenter -Tech Organization:Clarenter -Tech Street1:110 E Broward Blvd -Tech Street2:Ste. 1720 -Tech City:Fort Lauderdale -Tech State/Province:FL -Tech Postal Code:33301 -Tech Country:US -Tech Phone:+1.18888443911 -Tech Email:patricia@internationalpreschoolcurriculum.com -Billing ID:RWG000000003DA25 -Billing Name:Billing Department -Billing Organization:101Domain, Inc. -Billing Street1:5858 Edison Pl. -Billing City:Carlsbad -Billing State/Province:CA -Billing Postal Code:92008 -Billing Country:US -Billing Phone:+1.7604448674 -Billing FAX:+1.7605794996 -Billing Email:tech1@101domain.com -Sponsoring Registrar ID:H65658 -Sponsoring Registrar IANA ID:1011 -Sponsoring Registrar Organization:101Domain, Inc. -Sponsoring Registrar Street1:5858 Edison Pl. -Sponsoring Registrar City:Carlsbad -Sponsoring Registrar State/Province:CA -Sponsoring Registrar Postal Code:92008 -Sponsoring Registrar Country:US -Sponsoring Registrar Phone:+1.7604448674 -Sponsoring Registrar FAX:+1.7605794996 -Sponsoring Registrar Website:http://www.101domain.com -Name Server:NS37.DOMAINCONTROL.COM -Name Server:NS38.DOMAINCONTROL.COM -DNSSEC:Unsigned +Domain Name: GREENFLAME.AE.ORG +Registry Domain ID: D220363148-CNIC +Registrar WHOIS Server: whois.registrar.eu +Registrar URL: https://www.openprovider.com/ +Updated Date: 2021-03-24T15:08:42.0Z +Creation Date: 2021-02-04T08:51:08.0Z +Registry Expiry Date: 2022-02-04T23:59:59.0Z +Registrar: Hosting Concepts B.V. d/b/a Registrar.eu +Registrar IANA ID: 1647 +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Registrant Email: https://whois.centralnic.com/contact/greenflame.ae.org/registrant +Admin Email: https://whois.centralnic.com/contact/greenflame.ae.org/admin +Tech Email: https://whois.centralnic.com/contact/greenflame.ae.org/tech +Name Server: NS1.DNS-PARKING.COM +Name Server: NS2.DNS-PARKING.COM +DNSSEC: unsigned +Billing Email: https://whois.centralnic.com/contact/greenflame.ae.org/billing +Registrar Abuse Contact Email: abuse@registrar.eu +Registrar Abuse Contact Phone: +31.104482297 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-15T16:06:55.0Z <<< -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ +For more information on Whois status codes, please visit https://icann.org/epp +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/ar.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/ar.com/status_available.txt deleted file mode 100644 index 09cc0f7e..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/ar.com/status_available.txt +++ /dev/null @@ -1 +0,0 @@ -DOMAIN NOT FOUND diff --git a/spec/fixtures/responses/whois.centralnic.com/ar.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/ar.com/status_registered.expected deleted file mode 100644 index 6ab12b0b..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/ar.com/status_registered.expected +++ /dev/null @@ -1,111 +0,0 @@ -#disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" - - -#domain - %s == "hotel.ar.com" - -#domain_id - %s == "CNIC-DO557730" - - -#status - %s == ["ok"] - -#available? - %s == false - -#registered? - %s == true - - -#created_on - %s %CLASS{time} - %s %TIME{2008-04-25 16:22:13 UTC} - -#updated_on - %s %CLASS{time} - %s %TIME{2013-04-26 00:15:40 UTC} - -#expires_on - %s %CLASS{time} - %s %TIME{2014-04-25 23:59:59 UTC} - - -#registrar - %s %CLASS{registrar} - %s.id == "H1323241" - %s.name == nil - %s.organization == "CentralNic Ltd" - %s.url == nil - -#registrant_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "H1323241" - %s[0].name == "Reserved Domains" - %s[0].organization == "CentralNic Ltd" - %s[0].address == "35-39 Moorgate" - %s[0].city == "London" - %s[0].zip == "EC2R 6AR" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.8700170900" - %s[0].fax == "+44.8700170901" - %s[0].email == "domains@centralnic.com" - -#admin_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "H1323241" - %s[0].name == "Reserved Domains" - %s[0].organization == "CentralNic Ltd" - %s[0].address == "35-39 Moorgate" - %s[0].city == "London" - %s[0].zip == "EC2R 6AR" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.8700170900" - %s[0].fax == "+44.8700170901" - %s[0].email == "domains@centralnic.com" - -#technical_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "H1323241" - %s[0].name == "Reserved Domains" - %s[0].organization == "CentralNic Ltd" - %s[0].address == "35-39 Moorgate" - %s[0].city == "London" - %s[0].zip == "EC2R 6AR" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.8700170900" - %s[0].fax == "+44.8700170901" - %s[0].email == "domains@centralnic.com" - - -#nameservers - %s %CLASS{array} - %s %SIZE{6} - %s[0] %CLASS{nameserver} - %s[0].name == "ns0.centralnic-dns.com" - %s[1] %CLASS{nameserver} - %s[1].name == "ns1.centralnic-dns.com" - %s[2] %CLASS{nameserver} - %s[2].name == "ns2.centralnic-dns.com" - %s[3] %CLASS{nameserver} - %s[3].name == "ns3.centralnic-dns.com" - %s[4] %CLASS{nameserver} - %s[4].name == "ns4.centralnic-dns.com" - %s[5] %CLASS{nameserver} - %s[5].name == "ns5.centralnic-dns.com" diff --git a/spec/fixtures/responses/whois.centralnic.com/ar.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/ar.com/status_registered.txt deleted file mode 100644 index 221124ce..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/ar.com/status_registered.txt +++ /dev/null @@ -1,62 +0,0 @@ -Domain ID:CNIC-DO557730 -Domain Name:HOTEL.AR.COM -Created On:2008-04-25T16:22:13.0Z -Last Updated On:2013-04-26T00:15:40.0Z -Expiration Date:2014-04-25T23:59:59.0Z -Status:ok -Registrant ID:H1323241 -Registrant Name:Reserved Domains -Registrant Organization:CentralNic Ltd -Registrant Street1:35-39 Moorgate -Registrant City:London -Registrant Postal Code:EC2R 6AR -Registrant Country:GB -Registrant Phone:+44.8700170900 -Registrant FAX:+44.8700170901 -Registrant Email:domains@centralnic.com -Admin ID:H1323241 -Admin Name:Reserved Domains -Admin Organization:CentralNic Ltd -Admin Street1:35-39 Moorgate -Admin City:London -Admin Postal Code:EC2R 6AR -Admin Country:GB -Admin Phone:+44.8700170900 -Admin FAX:+44.8700170901 -Admin Email:domains@centralnic.com -Tech ID:H1323241 -Tech Name:Reserved Domains -Tech Organization:CentralNic Ltd -Tech Street1:35-39 Moorgate -Tech City:London -Tech Postal Code:EC2R 6AR -Tech Country:GB -Tech Phone:+44.8700170900 -Tech FAX:+44.8700170901 -Tech Email:domains@centralnic.com -Sponsoring Registrar ID:H1323241 -Sponsoring Registrar Organization:CentralNic Ltd -Sponsoring Registrar Street1:35-39 Moorgate -Sponsoring Registrar City:London -Sponsoring Registrar Postal Code:EC2R 6AR -Sponsoring Registrar Country:GB -Sponsoring Registrar Phone:+44.8700170900 -Sponsoring Registrar FAX:+44.8700170901 -Name Server:NS0.CENTRALNIC-DNS.COM -Name Server:NS1.CENTRALNIC-DNS.COM -Name Server:NS2.CENTRALNIC-DNS.COM -Name Server:NS3.CENTRALNIC-DNS.COM -Name Server:NS4.CENTRALNIC-DNS.COM -Name Server:NS5.CENTRALNIC-DNS.COM -DNSSEC:Unsigned - -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - diff --git a/spec/fixtures/responses/whois.centralnic.com/br.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/br.com/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.centralnic.com/br.com/status_available.expected +++ b/spec/fixtures/responses/whois.centralnic.com/br.com/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.centralnic.com/br.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/br.com/status_available.txt index 09cc0f7e..7bac09b5 100644 --- a/spec/fixtures/responses/whois.centralnic.com/br.com/status_available.txt +++ b/spec/fixtures/responses/whois.centralnic.com/br.com/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-15T16:23:06.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/br.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/br.com/status_registered.expected index 9ffff327..093ca9ac 100644 --- a/spec/fixtures/responses/whois.centralnic.com/br.com/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/br.com/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain - %s == "billboard.br.com" + %s == "linet.br.com" #domain_id - %s == "CNIC-DO624205" + %s == "D1656506-CNIC" #status - %s == ["clientTransferProhibited", "serverTransferProhibited", "renewPeriod"] + %s == :registered #available? %s == false @@ -21,87 +21,53 @@ #created_on %s %CLASS{time} - %s %TIME{2009-04-17 12:22:49 UTC} + %s %TIME{2013-11-28 13:16:50 UTC} #updated_on %s %CLASS{time} - %s %TIME{2012-01-16 16:23:18 UTC} + %s %TIME{2021-03-11 11:49:22 UTC} #expires_on %s %CLASS{time} - %s %TIME{2017-04-17 23:59:59 UTC} + %s %TIME{2022-11-28 23:59:59 UTC} #registrar %s %CLASS{registrar} - %s.id == "H292913" - %s.name == nil - %s.organization == "Network Solutions LLC" - %s.url == "http://www.networksolutions.com/" + %s.id == "1387" + %s.name == "1API GmbH" + %s.url == "http://www.1api.net" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "36542943" - %s[0].name == "Antonio Camarotti Pinto" - %s[0].organization == nil - %s[0].address == "Rua Urussui, 238\n#22" - %s[0].city == "Sao Paulo" - %s[0].zip == "04542-050" - %s[0].state == "Sao Paulo" - %s[0].country == nil - %s[0].country_code == "BR" - %s[0].phone == "+1.551130787711" - %s[0].fax == nil - %s[0].email == "ac@bpp.bz" + %s[0].email == "https://whois.centralnic.com/contact/linet.br.com/registrant" #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "36542943" - %s[0].name == "Antonio Camarotti Pinto" - %s[0].organization == nil - %s[0].address == "Rua Urussui, 238\n#22" - %s[0].city == "Sao Paulo" - %s[0].zip == "04542-050" - %s[0].state == "Sao Paulo" - %s[0].country == nil - %s[0].country_code == "BR" - %s[0].phone == "+1.551130787711" - %s[0].fax == nil - %s[0].email == "ac@bpp.bz" + %s[0].email == "https://whois.centralnic.com/contact/linet.br.com/admin" #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "36542943" - %s[0].name == "Antonio Camarotti Pinto" - %s[0].organization == nil - %s[0].address == "Rua Urussui, 238\n#22" - %s[0].city == "Sao Paulo" - %s[0].zip == "04542-050" - %s[0].state == "Sao Paulo" - %s[0].country == nil - %s[0].country_code == "BR" - %s[0].phone == "+1.551130787711" - %s[0].fax == nil - %s[0].email == "ac@bpp.bz" + %s[0].email == "https://whois.centralnic.com/contact/linet.br.com/tech" #nameservers %s %CLASS{array} - %s %SIZE{2} + %s %SIZE{4} %s[0] %CLASS{nameserver} - %s[0].name == "ns1.locaweb.com.br" - %s[0].ipv4 == nil - %s[0].ipv6 == nil + %s[0].name == "ns1.iwantmyname.net" %s[1] %CLASS{nameserver} - %s[1].name == "ns2.locaweb.com.br" - %s[1].ipv4 == nil - %s[1].ipv6 == nil + %s[1].name == "ns2.iwantmyname.net" + %s[2] %CLASS{nameserver} + %s[2].name == "ns3.iwantmyname.net" + %s[3] %CLASS{nameserver} + %s[3].name == "ns4.iwantmyname.net" diff --git a/spec/fixtures/responses/whois.centralnic.com/br.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/br.com/status_registered.txt index 283c691d..bd862ccb 100644 --- a/spec/fixtures/responses/whois.centralnic.com/br.com/status_registered.txt +++ b/spec/fixtures/responses/whois.centralnic.com/br.com/status_registered.txt @@ -1,73 +1,42 @@ -Domain ID:CNIC-DO624205 -Domain Name:BILLBOARD.BR.COM -Created On:2009-04-17T12:22:49.0Z -Last Updated On:2012-01-16T16:23:18.0Z -Expiration Date:2017-04-17T23:59:59.0Z -Status:clientTransferProhibited -Status:serverTransferProhibited -Status:renewPeriod -Registrant ID:36542943 -Registrant Name:Antonio Camarotti Pinto -Registrant Street1:Rua Urussui, 238 -Registrant Street2:#22 -Registrant City:Sao Paulo -Registrant State/Province:Sao Paulo -Registrant Postal Code:04542-050 -Registrant Country:BR -Registrant Phone:+1.551130787711 -Registrant Email:ac@bpp.bz -Admin ID:36542943 -Admin Name:Antonio Camarotti Pinto -Admin Street1:Rua Urussui, 238 -Admin Street2:#22 -Admin City:Sao Paulo -Admin State/Province:Sao Paulo -Admin Postal Code:04542-050 -Admin Country:BR -Admin Phone:+1.551130787711 -Admin Email:ac@bpp.bz -Tech ID:36542943 -Tech Name:Antonio Camarotti Pinto -Tech Street1:Rua Urussui, 238 -Tech Street2:#22 -Tech City:Sao Paulo -Tech State/Province:Sao Paulo -Tech Postal Code:04542-050 -Tech Country:BR -Tech Phone:+1.551130787711 -Tech Email:ac@bpp.bz -Billing ID:36542943 -Billing Name:Antonio Camarotti Pinto -Billing Street1:Rua Urussui, 238 -Billing Street2:#22 -Billing City:Sao Paulo -Billing State/Province:Sao Paulo -Billing Postal Code:04542-050 -Billing Country:BR -Billing Phone:+1.551130787711 -Billing Email:ac@bpp.bz -Sponsoring Registrar ID:H292913 -Sponsoring Registrar IANA ID:2 -Sponsoring Registrar Organization:Network Solutions LLC -Sponsoring Registrar Street1:12808 Gran Bay Parkway West -Sponsoring Registrar City:Jacksonville -Sponsoring Registrar State/Province:FL -Sponsoring Registrar Postal Code:32258 -Sponsoring Registrar Country:US -Sponsoring Registrar Phone:+1.9046806600 -Sponsoring Registrar FAX:+1.9048800350 -Sponsoring Registrar Website:http://www.networksolutions.com/ -Name Server:NS1.LOCAWEB.COM.BR -Name Server:NS2.LOCAWEB.COM.BR -DNSSEC:Unsigned +Domain Name: LINET.BR.COM +Registry Domain ID: D1656506-CNIC +Registrar WHOIS Server: whois.1api.net +Registrar URL: http://www.1api.net +Updated Date: 2021-03-11T11:49:22.0Z +Creation Date: 2013-11-28T13:16:50.0Z +Registry Expiry Date: 2022-11-28T23:59:59.0Z +Registrar: 1API GmbH +Registrar IANA ID: 1387 +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: autoRenewPeriod https://icann.org/epp#autoRenewPeriod +Registrant Email: https://whois.centralnic.com/contact/linet.br.com/registrant +Admin Email: https://whois.centralnic.com/contact/linet.br.com/admin +Tech Email: https://whois.centralnic.com/contact/linet.br.com/tech +Name Server: NS1.IWANTMYNAME.NET +Name Server: NS2.IWANTMYNAME.NET +Name Server: NS3.IWANTMYNAME.NET +Name Server: NS4.IWANTMYNAME.NET +DNSSEC: unsigned +Billing Email: https://whois.centralnic.com/contact/linet.br.com/billing +Registrar Abuse Contact Email: abuse@1api.net +Registrar Abuse Contact Phone: +49.68949396850 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-15T16:22:50.0Z <<< -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ +For more information on Whois status codes, please visit https://icann.org/epp +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/cn.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/cn.com/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.centralnic.com/cn.com/status_available.expected +++ b/spec/fixtures/responses/whois.centralnic.com/cn.com/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.centralnic.com/cn.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/cn.com/status_available.txt index 09cc0f7e..7a3afe82 100644 --- a/spec/fixtures/responses/whois.centralnic.com/cn.com/status_available.txt +++ b/spec/fixtures/responses/whois.centralnic.com/cn.com/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-15T16:26:54.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/cn.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/cn.com/status_registered.expected index b990b82a..efd3711b 100644 --- a/spec/fixtures/responses/whois.centralnic.com/cn.com/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/cn.com/status_registered.expected @@ -1,16 +1,15 @@ #disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" - + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain %s == "gsn.cn.com" #domain_id - %s == "CNIC-DO323367" + %s == "D323367-CNIC" #status - %s == ["clientTransferProhibited", "serverTransferProhibited"] + %s == :registered #available? %s == false @@ -25,79 +24,49 @@ #updated_on %s %CLASS{time} - %s %TIME{2013-11-26 12:16:45 UTC} + %s %TIME{2021-11-11 02:14:17 UTC} #expires_on %s %CLASS{time} - %s %TIME{2014-11-23 23:59:59 UTC} + %s %TIME{2022-11-23 23:59:59 UTC} #registrar %s %CLASS{registrar} - %s.id == "H67436" - %s.name == nil - %s.organization == "united-domains AG" - %s.url == "http://www.united-domains.de" + %s.id == "1408" + %s.name == "united-domains AG" + %s.url == "https://www.united-domains.de/" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "H1062079" - %s[0].name == "GSN Electronics Incorporation Pte Ltd" - %s[0].organization == nil - %s[0].address == "Straits Trading Building 9 Battery Road 16-08\nSingapore" - %s[0].city == nil - %s[0].zip == "049910" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "SG" - %s[0].phone == "+65.62336919" - %s[0].fax == nil - %s[0].email == "abuse@gsn.in" + %s[0].email == "https://whois.centralnic.com/contact/gsn.cn.com/registrant" #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "AUTO-DRZK-SNVHSY" - %s[0].name == "Pauline Ang" - %s[0].organization == "GSN Electronics Incorporation Pte Ltd" - %s[0].address == "Straits Trading Building 9 Battery Road 16-08" - %s[0].city == "Singapore" - %s[0].zip == "049910" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "SG" - %s[0].phone == "+65.62336919" - %s[0].fax == nil - %s[0].email == "abuse@gsn.in" + %s[0].email == "https://whois.centralnic.com/contact/gsn.cn.com/admin" #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "C-UHM65D7-TJGULR" - %s[0].name == "Host Master" - %s[0].organization == "united-domains AG" - %s[0].address == "Gautinger Str. 10" - %s[0].city == "Starnberg" - %s[0].zip == "82319" - %s[0].state == "Bayern" - %s[0].country == nil - %s[0].country_code == "DE" - %s[0].phone == "+49.8151368670" - %s[0].fax == "+49.81513686777" - %s[0].email == "hostmaster@united-domains.de" + %s[0].email == "https://whois.centralnic.com/contact/gsn.cn.com/tech" #nameservers %s %CLASS{array} - %s %SIZE{2} + %s %SIZE{4} %s[0] %CLASS{nameserver} - %s[0].name == "ns1.meteos.it" + %s[0].name == "ns1045.ui-dns.biz" %s[1] %CLASS{nameserver} - %s[1].name == "ns2.meteos.it" + %s[1].name == "ns1045.ui-dns.de" + %s[2] %CLASS{nameserver} + %s[2].name == "ns1045.ui-dns.org" + %s[3] %CLASS{nameserver} + %s[3].name == "ns1045.ui-dns.com" diff --git a/spec/fixtures/responses/whois.centralnic.com/cn.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/cn.com/status_registered.txt index db3ae57d..2a2d1f85 100644 --- a/spec/fixtures/responses/whois.centralnic.com/cn.com/status_registered.txt +++ b/spec/fixtures/responses/whois.centralnic.com/cn.com/status_registered.txt @@ -1,70 +1,41 @@ -Domain ID:CNIC-DO323367 -Domain Name:GSN.CN.COM -Created On:2005-11-23T15:44:03.0Z -Last Updated On:2013-11-26T12:16:45.0Z -Expiration Date:2014-11-23T23:59:59.0Z -Status:clientTransferProhibited -Status:serverTransferProhibited -Registrant ID:H1062079 -Registrant Name:GSN Electronics Incorporation Pte Ltd -Registrant Street1:Straits Trading Building 9 Battery Road 16-08 -Registrant Street2:Singapore -Registrant Postal Code:049910 -Registrant Country:SG -Registrant Phone:+65.62336919 -Registrant Email:abuse@gsn.in -Admin ID:AUTO-DRZK-SNVHSY -Admin Name:Pauline Ang -Admin Organization:GSN Electronics Incorporation Pte Ltd -Admin Street1:Straits Trading Building 9 Battery Road 16-08 -Admin City:Singapore -Admin Postal Code:049910 -Admin Country:SG -Admin Phone:+65.62336919 -Admin Email:abuse@gsn.in -Tech ID:C-UHM65D7-TJGULR -Tech Name:Host Master -Tech Organization:united-domains AG -Tech Street1:Gautinger Str. 10 -Tech City:Starnberg -Tech State/Province:Bayern -Tech Postal Code:82319 -Tech Country:DE -Tech Phone:+49.8151368670 -Tech FAX:+49.81513686777 -Tech Email:hostmaster@united-domains.de -Billing ID:C-UHM65D7-TJGULR -Billing Name:Host Master -Billing Organization:united-domains AG -Billing Street1:Gautinger Str. 10 -Billing City:Starnberg -Billing State/Province:Bayern -Billing Postal Code:82319 -Billing Country:DE -Billing Phone:+49.8151368670 -Billing FAX:+49.81513686777 -Billing Email:hostmaster@united-domains.de -Sponsoring Registrar ID:H67436 -Sponsoring Registrar IANA ID:1408 -Sponsoring Registrar Organization:united-domains AG -Sponsoring Registrar Street1:Gautinger Str. 10 -Sponsoring Registrar City:Starnberg -Sponsoring Registrar Postal Code:82319 -Sponsoring Registrar Country:DE -Sponsoring Registrar Phone:+498151368670 -Sponsoring Registrar FAX:+4981513686777 -Sponsoring Registrar Website:http://www.united-domains.de -Name Server:NS1.METEOS.IT -Name Server:NS2.METEOS.IT -DNSSEC:Unsigned +Domain Name: GSN.CN.COM +Registry Domain ID: D323367-CNIC +Registrar WHOIS Server: whois.udag.net +Registrar URL: https://www.united-domains.de/ +Updated Date: 2021-11-11T02:14:17.0Z +Creation Date: 2005-11-23T15:44:03.0Z +Registry Expiry Date: 2022-11-23T23:59:59.0Z +Registrar: united-domains AG +Registrar IANA ID: 1408 +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: autoRenewPeriod https://icann.org/epp#autoRenewPeriod +Registrant Email: https://whois.centralnic.com/contact/gsn.cn.com/registrant +Admin Email: https://whois.centralnic.com/contact/gsn.cn.com/admin +Tech Email: https://whois.centralnic.com/contact/gsn.cn.com/tech +Name Server: NS1045.UI-DNS.BIZ +Name Server: NS1045.UI-DNS.DE +Name Server: NS1045.UI-DNS.ORG +Name Server: NS1045.UI-DNS.COM +DNSSEC: unsigned +Registrar Abuse Contact Email: abuse@united-domains.de +Registrar Abuse Contact Phone: +49.8151368670 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-15T16:26:25.0Z <<< -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ +For more information on Whois status codes, please visit https://icann.org/epp +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/de.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/de.com/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.centralnic.com/de.com/status_available.expected +++ b/spec/fixtures/responses/whois.centralnic.com/de.com/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.centralnic.com/de.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/de.com/status_available.txt index 09cc0f7e..dd74e799 100644 --- a/spec/fixtures/responses/whois.centralnic.com/de.com/status_available.txt +++ b/spec/fixtures/responses/whois.centralnic.com/de.com/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-15T16:32:21.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/de.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/de.com/status_registered.expected index be1da3ee..cc063e7c 100644 --- a/spec/fixtures/responses/whois.centralnic.com/de.com/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/de.com/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain %s == "autopoint.de.com" #domain_id - %s == "CNIC-DO578833" + %s == "D578833-CNIC" #status - %s == ["clientTransferProhibited", "serverTransferProhibited"] + %s == :registered #available? %s == false @@ -25,83 +25,47 @@ #updated_on %s %CLASS{time} - %s %TIME{2013-07-12 10:03:56 UTC} + %s %TIME{2021-11-11 15:12:54 UTC} #expires_on %s %CLASS{time} - %s %TIME{2014-07-04 23:59:59 UTC} + %s %TIME{2022-07-04 23:59:59 UTC} #registrar %s %CLASS{registrar} - %s.id == "H67436" - %s.name == nil - %s.organization == "united-domains AG" - %s.url == "http://www.united-domains.de" + %s.id == "1408" + %s.name == "united-domains AG" + %s.url == "https://www.united-domains.de/" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "H1102323" - %s[0].name == "Stefan Von Gehlen" - %s[0].organization == nil - %s[0].address == "Muelgaustr. 292-294, Moenchengladbach" - %s[0].city == nil - %s[0].zip == "41238" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "DE" - %s[0].phone == "+49.2166120626" - %s[0].fax == nil - %s[0].email == "s.vongehlen@arcor.de" + %s[0].email == "https://whois.centralnic.com/contact/autopoint.de.com/registrant" #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "H402505" - %s[0].name == "Stefan Von Gehlen" - %s[0].organization == nil - %s[0].address == "Muelgaustr. 292-294, Moenchengladbach" - %s[0].city == nil - %s[0].zip == "41238" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "DE" - %s[0].phone == "+49.2166120626" - %s[0].fax == nil - %s[0].email == "s.vongehlen@arcor.de" + %s[0].email == "https://whois.centralnic.com/contact/autopoint.de.com/admin" #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "C-UHM65D7-TJGULR" - %s[0].name == "Host Master" - %s[0].organization == "united-domains AG" - %s[0].address == "Gautinger Str. 10" - %s[0].city == "Starnberg" - %s[0].zip == "82319" - %s[0].state == "Bayern" - %s[0].country == nil - %s[0].country_code == "DE" - %s[0].phone == "+49.8151368670" - %s[0].fax == "+49.81513686777" - %s[0].email == "hostmaster@united-domains.de" + %s[0].email == "https://whois.centralnic.com/contact/autopoint.de.com/tech" #nameservers %s %CLASS{array} - %s %SIZE{2} + %s %SIZE{3} %s[0] %CLASS{nameserver} - %s[0].name == "ns.udagdns.net" - %s[0].ipv4 == nil - %s[0].ipv6 == nil + %s[0].name == "ns.udag.org" %s[1] %CLASS{nameserver} - %s[1].name == "ns.udagdns.de" - %s[1].ipv4 == nil - %s[1].ipv6 == nil + %s[1].name == "ns.udag.de" + %s[2] %CLASS{nameserver} + %s[2].name == "ns.udag.net" diff --git a/spec/fixtures/responses/whois.centralnic.com/de.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/de.com/status_registered.txt index c85fb5aa..3f54f634 100644 --- a/spec/fixtures/responses/whois.centralnic.com/de.com/status_registered.txt +++ b/spec/fixtures/responses/whois.centralnic.com/de.com/status_registered.txt @@ -1,67 +1,39 @@ -Domain ID:CNIC-DO578833 -Domain Name:AUTOPOINT.DE.COM -Created On:2008-07-04T20:30:08.0Z -Last Updated On:2013-07-12T10:03:56.0Z -Expiration Date:2014-07-04T23:59:59.0Z -Status:clientTransferProhibited -Status:serverTransferProhibited -Registrant ID:H1102323 -Registrant Name:Stefan Von Gehlen -Registrant Street1:Muelgaustr. 292-294, Moenchengladbach -Registrant Postal Code:41238 -Registrant Country:DE -Registrant Phone:+49.2166120626 -Registrant Email:s.vongehlen@arcor.de -Admin ID:H402505 -Admin Name:Stefan Von Gehlen -Admin Street1:Muelgaustr. 292-294, Moenchengladbach -Admin Postal Code:41238 -Admin Country:DE -Admin Phone:+49.2166120626 -Admin Email:s.vongehlen@arcor.de -Tech ID:C-UHM65D7-TJGULR -Tech Name:Host Master -Tech Organization:united-domains AG -Tech Street1:Gautinger Str. 10 -Tech City:Starnberg -Tech State/Province:Bayern -Tech Postal Code:82319 -Tech Country:DE -Tech Phone:+49.8151368670 -Tech FAX:+49.81513686777 -Tech Email:hostmaster@united-domains.de -Billing ID:C-UHM65D7-TJGULR -Billing Name:Host Master -Billing Organization:united-domains AG -Billing Street1:Gautinger Str. 10 -Billing City:Starnberg -Billing State/Province:Bayern -Billing Postal Code:82319 -Billing Country:DE -Billing Phone:+49.8151368670 -Billing FAX:+49.81513686777 -Billing Email:hostmaster@united-domains.de -Sponsoring Registrar ID:H67436 -Sponsoring Registrar IANA ID:1408 -Sponsoring Registrar Organization:united-domains AG -Sponsoring Registrar Street1:Gautinger Str. 10 -Sponsoring Registrar City:Starnberg -Sponsoring Registrar Postal Code:82319 -Sponsoring Registrar Country:DE -Sponsoring Registrar Phone:+498151368670 -Sponsoring Registrar FAX:+4981513686777 -Sponsoring Registrar Website:http://www.united-domains.de -Name Server:NS.UDAGDNS.NET -Name Server:NS.UDAGDNS.DE -DNSSEC:Unsigned +Domain Name: AUTOPOINT.DE.COM +Registry Domain ID: D578833-CNIC +Registrar WHOIS Server: whois.udag.net +Registrar URL: https://www.united-domains.de/ +Updated Date: 2021-11-11T15:12:54.0Z +Creation Date: 2008-07-04T20:30:08.0Z +Registry Expiry Date: 2022-07-04T23:59:59.0Z +Registrar: united-domains AG +Registrar IANA ID: 1408 +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Registrant Email: https://whois.centralnic.com/contact/autopoint.de.com/registrant +Admin Email: https://whois.centralnic.com/contact/autopoint.de.com/admin +Tech Email: https://whois.centralnic.com/contact/autopoint.de.com/tech +Name Server: NS.UDAG.ORG +Name Server: NS.UDAG.DE +Name Server: NS.UDAG.NET +DNSSEC: unsigned +Registrar Abuse Contact Email: abuse@united-domains.de +Registrar Abuse Contact Phone: +49.8151368670 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-15T16:32:19.0Z <<< -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ +For more information on Whois status codes, please visit https://icann.org/epp +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/eu.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/eu.com/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.centralnic.com/eu.com/status_available.expected +++ b/spec/fixtures/responses/whois.centralnic.com/eu.com/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.centralnic.com/eu.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/eu.com/status_available.txt index 09cc0f7e..80c8c433 100644 --- a/spec/fixtures/responses/whois.centralnic.com/eu.com/status_available.txt +++ b/spec/fixtures/responses/whois.centralnic.com/eu.com/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-15T16:35:09.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/eu.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/eu.com/status_registered.expected index ffa57182..d9979bf2 100644 --- a/spec/fixtures/responses/whois.centralnic.com/eu.com/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/eu.com/status_registered.expected @@ -1,16 +1,15 @@ #disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" - + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain %s == "walkabout.eu.com" #domain_id - %s == "CNIC-DO85080" + %s == "D93652968-CNIC" #status - %s == ["ok"] + %s == :registered #available? %s == false @@ -21,93 +20,59 @@ #created_on %s %CLASS{time} - %s %TIME{2001-08-14 10:14:41 UTC} + %s %TIME{2019-02-14 09:07:09 UTC} #updated_on %s %CLASS{time} - %s %TIME{2013-08-15 11:25:43 UTC} + %s %TIME{2021-08-11 10:15:35 UTC} #expires_on %s %CLASS{time} - %s %TIME{2015-08-14 23:59:59 UTC} + %s %TIME{2022-02-14 23:59:59 UTC} #registrar %s %CLASS{registrar} - %s.id == "H126914" - %s.name == nil - %s.organization == "iTransact Ltd" - %s.url == "www.itransact.ltd.uk" + %s.id == "470" + %s.name == "Nom-iq Ltd. dba Com Laude" + %s.url == "http://www.comlaude.com" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "H1045382" - %s[0].name == "Regent Inns Plc" - %s[0].organization == nil - %s[0].address == "77 Muswell Hill\nLondon" - %s[0].city == nil - %s[0].zip == "N10 3PJ" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.2083753155" - %s[0].fax == "+44.2083753001" - %s[0].email == "john.boyle@regent-inns.plc.uk" + %s[0].email == "https://whois.centralnic.com/contact/walkabout.eu.com/registrant" #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "H64717" - %s[0].name == "John Boyle" - %s[0].organization == "Regent Inns Plc" - %s[0].address == "77 Muswell Hill\nLondon" - %s[0].city == nil - %s[0].zip == "N10 3PJ" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.2083753155" - %s[0].fax == "+44.2083753001" - %s[0].email == "john.boyle@regent-inns.plc.uk" + %s[0].email == "https://whois.centralnic.com/contact/walkabout.eu.com/admin" #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "H126914" - %s[0].name == "Constantine Pagonis" - %s[0].organization == "iTransact Ltd" - %s[0].address == "PO Box 430\nCambridge\nCambs" - %s[0].city == nil - %s[0].zip == "CB1 2WE" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.1223700322" - %s[0].fax == nil - %s[0].email == "constantine@itransact.ltd.uk" + %s[0].email == "https://whois.centralnic.com/contact/walkabout.eu.com/tech" #nameservers %s %CLASS{array} - %s %SIZE{4} + %s %SIZE{7} %s[0] %CLASS{nameserver} - %s[0].name == "ns-1146.awsdns-15.org" - %s[0].ipv4 == nil - %s[0].ipv6 == nil + %s[0].name == "ns0.demysdns.net" %s[1] %CLASS{nameserver} - %s[1].name == "ns-1741.awsdns-25.co.uk" - %s[1].ipv4 == nil - %s[1].ipv6 == nil - %s[2].name == "ns-374.awsdns-46.com" - %s[2].ipv4 == nil - %s[2].ipv6 == nil - %s[3].name == "ns-914.awsdns-50.net" - %s[3].ipv4 == nil - %s[3].ipv6 == nil + %s[1].name == "ns1.demysdns.net" + %s[2] %CLASS{nameserver} + %s[2].name == "ns2.demysdns.net" + %s[3] %CLASS{nameserver} + %s[3].name == "ns3.demysdns.net" + %s[4] %CLASS{nameserver} + %s[4].name == "ns4.demysdns.co.uk" + %s[5] %CLASS{nameserver} + %s[5].name == "ns5.demysdns.co.uk" + %s[6] %CLASS{nameserver} + %s[6].name == "ns6.demysdns.co.uk" diff --git a/spec/fixtures/responses/whois.centralnic.com/eu.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/eu.com/status_registered.txt index 17d0d3ed..ed182137 100644 --- a/spec/fixtures/responses/whois.centralnic.com/eu.com/status_registered.txt +++ b/spec/fixtures/responses/whois.centralnic.com/eu.com/status_registered.txt @@ -1,60 +1,46 @@ -Domain ID:CNIC-DO85080 -Domain Name:WALKABOUT.EU.COM -Created On:2001-08-14T10:14:41.0Z -Last Updated On:2013-08-15T11:25:43.0Z -Expiration Date:2015-08-14T23:59:59.0Z -Status:ok -Registrant ID:H1045382 -Registrant Name:Regent Inns Plc -Registrant Street1:77 Muswell Hill -Registrant Street2:London -Registrant Postal Code:N10 3PJ -Registrant Country:GB -Registrant Phone:+44.2083753155 -Registrant FAX:+44.2083753001 -Registrant Email:john.boyle@regent-inns.plc.uk -Admin ID:H64717 -Admin Name:John Boyle -Admin Organization:Regent Inns Plc -Admin Street1:77 Muswell Hill -Admin Street2:London -Admin Postal Code:N10 3PJ -Admin Country:GB -Admin Phone:+44.2083753155 -Admin FAX:+44.2083753001 -Admin Email:john.boyle@regent-inns.plc.uk -Tech ID:H126914 -Tech Name:Constantine Pagonis -Tech Organization:iTransact Ltd -Tech Street1:PO Box 430 -Tech Street2:Cambridge -Tech Street3:Cambs -Tech Postal Code:CB1 2WE -Tech Country:GB -Tech Phone:+44.1223700322 -Tech Email:constantine@itransact.ltd.uk -Sponsoring Registrar ID:H126914 -Sponsoring Registrar Organization:iTransact Ltd -Sponsoring Registrar Street1:PO Box 430 -Sponsoring Registrar Street2:Cambridge -Sponsoring Registrar Street3:Cambs -Sponsoring Registrar Postal Code:CB1 2WE -Sponsoring Registrar Country:GB -Sponsoring Registrar Phone:01223 700322 -Sponsoring Registrar Website:www.itransact.ltd.uk -Name Server:NS-1146.AWSDNS-15.ORG -Name Server:NS-1741.AWSDNS-25.CO.UK -Name Server:NS-374.AWSDNS-46.COM -Name Server:NS-914.AWSDNS-50.NET -DNSSEC:Unsigned +Domain Name: WALKABOUT.EU.COM +Registry Domain ID: D93652968-CNIC +Registrar WHOIS Server: whois.comlaude.com +Registrar URL: http://www.comlaude.com +Updated Date: 2021-08-11T10:15:35.0Z +Creation Date: 2019-02-14T09:07:09.0Z +Registry Expiry Date: 2022-02-14T23:59:59.0Z +Registrar: Nom-iq Ltd. dba Com Laude +Registrar IANA ID: 470 +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Registrant Email: https://whois.centralnic.com/contact/walkabout.eu.com/registrant +Admin Email: https://whois.centralnic.com/contact/walkabout.eu.com/admin +Tech Email: https://whois.centralnic.com/contact/walkabout.eu.com/tech +Name Server: NS0.DEMYSDNS.NET +Name Server: NS1.DEMYSDNS.NET +Name Server: NS2.DEMYSDNS.NET +Name Server: NS3.DEMYSDNS.NET +Name Server: NS4.DEMYSDNS.CO.UK +Name Server: NS5.DEMYSDNS.CO.UK +Name Server: NS6.DEMYSDNS.CO.UK +DNSSEC: unsigned +Billing Email: https://whois.centralnic.com/contact/walkabout.eu.com/billing +Registrar Abuse Contact Email: abuse@comlaude.com +Registrar Abuse Contact Phone: +44.2074218250 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-15T16:35:00.0Z <<< -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ +For more information on Whois status codes, please visit https://icann.org/epp +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/gb.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/gb.com/status_available.txt deleted file mode 100644 index 09cc0f7e..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/gb.com/status_available.txt +++ /dev/null @@ -1 +0,0 @@ -DOMAIN NOT FOUND diff --git a/spec/fixtures/responses/whois.centralnic.com/gb.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/gb.com/status_registered.expected deleted file mode 100644 index cbe5a9fd..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/gb.com/status_registered.expected +++ /dev/null @@ -1,111 +0,0 @@ -#disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" - - -#domain - %s == "hotel.gb.com" - -#domain_id - %s == "CNIC-DO403461" - - -#status - %s == ["serverTransferProhibited"] - -#available? - %s == false - -#registered? - %s == true - - -#created_on - %s %CLASS{time} - %s %TIME{2006-04-23 06:26:11 UTC} - -#updated_on - %s %CLASS{time} - %s %TIME{2014-02-12 09:45:17 UTC} - -#expires_on - %s %CLASS{time} - %s %TIME{2016-04-23 23:59:59 UTC} - - -#registrar - %s %CLASS{registrar} - %s.id == "H386560" - %s.name == nil - %s.organization == "Wind Internethaus GMBH" - %s.url == "www.windinternethaus.de" - -#registrant_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "H1049605" - %s[0].name == "Robert Ragge, Hotel Reservation Service Robert Ragge GmbH" - %s[0].organization == nil - %s[0].address == "Blaubach 32" - %s[0].city == "Koeln" - %s[0].zip == "50676" - %s[0].state == "NRW" - %s[0].country == nil - %s[0].country_code == "DE" - %s[0].phone == "+49.2212077222" - %s[0].fax == "+49.2212077394" - %s[0].email == "domains@hrs.de" - -#admin_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "H393781" - %s[0].name == "Robert Ragge" - %s[0].organization == "Hotel Reservation Service Robert Ragge GmbH" - %s[0].address == "Blaubach 32" - %s[0].city == "Koeln" - %s[0].zip == "50676" - %s[0].state == "NRW" - %s[0].country == nil - %s[0].country_code == "DE" - %s[0].phone == "+49.2212077222" - %s[0].fax == "+49.2212077394" - %s[0].email == "domains@hrs.de" - -#technical_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "H1103064" - %s[0].name == "Uwe Watzek, Wind Internethaus GMBH" - %s[0].organization == nil - %s[0].address == "Am Krebsgraben 15\nHaus 2" - %s[0].city == "Villingen-Schwenningen" - %s[0].zip == "78048" - %s[0].state == "Baden-Wuerttemberg" - %s[0].country == nil - %s[0].country_code == "DE" - %s[0].phone == "+49.77214070740" - %s[0].fax == "+49.77214070741" - %s[0].email == "info@windinternethaus.de" - - -#nameservers - %s %CLASS{array} - %s %SIZE{3} - %s[0] %CLASS{nameserver} - %s[0].name == "ns1.hrs.de" - %s[0].ipv4 == nil - %s[0].ipv6 == nil - %s[1] %CLASS{nameserver} - %s[1].name == "ns2.hrs.de" - %s[1].ipv4 == nil - %s[1].ipv6 == nil - %s[2] %CLASS{nameserver} - %s[2].name == "ns2.surfbrett.de" - %s[2].ipv4 == nil - %s[2].ipv6 == nil diff --git a/spec/fixtures/responses/whois.centralnic.com/gb.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/gb.com/status_registered.txt deleted file mode 100644 index 471a63ca..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/gb.com/status_registered.txt +++ /dev/null @@ -1,75 +0,0 @@ -Domain ID:CNIC-DO403461 -Domain Name:HOTEL.GB.COM -Created On:2006-04-23T06:26:11.0Z -Last Updated On:2014-02-12T09:45:17.0Z -Expiration Date:2016-04-23T23:59:59.0Z -Status:serverTransferProhibited -Registrant ID:H1049605 -Registrant Name:Robert Ragge, Hotel Reservation Service Robert Ragge GmbH -Registrant Street1:Blaubach 32 -Registrant City:Koeln -Registrant State/Province:NRW -Registrant Postal Code:50676 -Registrant Country:DE -Registrant Phone:+49.2212077222 -Registrant FAX:+49.2212077394 -Registrant Email:domains@hrs.de -Admin ID:H393781 -Admin Name:Robert Ragge -Admin Organization:Hotel Reservation Service Robert Ragge GmbH -Admin Street1:Blaubach 32 -Admin City:Koeln -Admin State/Province:NRW -Admin Postal Code:50676 -Admin Country:DE -Admin Phone:+49.2212077222 -Admin FAX:+49.2212077394 -Admin Email:domains@hrs.de -Tech ID:H1103064 -Tech Name:Uwe Watzek, Wind Internethaus GMBH -Tech Street1:Am Krebsgraben 15 -Tech Street2:Haus 2 -Tech City:Villingen-Schwenningen -Tech State/Province:Baden-Wuerttemberg -Tech Postal Code:78048 -Tech Country:DE -Tech Phone:+49.77214070740 -Tech FAX:+49.77214070741 -Tech Email:info@windinternethaus.de -Billing ID:H1103064 -Billing Name:Uwe Watzek, Wind Internethaus GMBH -Billing Street1:Am Krebsgraben 15 -Billing Street2:Haus 2 -Billing City:Villingen-Schwenningen -Billing State/Province:Baden-Wuerttemberg -Billing Postal Code:78048 -Billing Country:DE -Billing Phone:+49.77214070740 -Billing FAX:+49.77214070741 -Billing Email:info@windinternethaus.de -Sponsoring Registrar ID:H386560 -Sponsoring Registrar Organization:Wind Internethaus GMBH -Sponsoring Registrar Street1:Am Krebsgraben 15 -Sponsoring Registrar Street2:Haus 2 -Sponsoring Registrar City:Villingen-Schwenningen -Sponsoring Registrar State/Province:Baden-Wuerttemberg -Sponsoring Registrar Postal Code:78048 -Sponsoring Registrar Country:DE -Sponsoring Registrar Phone:+49.77214070740 -Sponsoring Registrar FAX:+49.77214070741 -Sponsoring Registrar Website:www.windinternethaus.de -Name Server:NS1.HRS.DE -Name Server:NS2.HRS.DE -Name Server:NS2.SURFBRETT.DE -DNSSEC:Unsigned - -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - diff --git a/spec/fixtures/responses/whois.centralnic.com/gb.net/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/gb.net/status_available.txt deleted file mode 100644 index 09cc0f7e..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/gb.net/status_available.txt +++ /dev/null @@ -1 +0,0 @@ -DOMAIN NOT FOUND diff --git a/spec/fixtures/responses/whois.centralnic.com/gb.net/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/gb.net/status_registered.expected deleted file mode 100644 index c6971d8a..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/gb.net/status_registered.expected +++ /dev/null @@ -1,117 +0,0 @@ -#disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" - - -#domain - %s == "hotel.gb.net" - -#domain_id - %s == "CNIC-DO1423750" - - -#status - %s == ["clientTransferProhibited", "serverTransferProhibited"] - -#available? - %s == false - -#registered? - %s == true - - -#created_on - %s %CLASS{time} - %s %TIME{2013-08-25 12:36:24 UTC} - -#updated_on - %s %CLASS{time} - %s %TIME{2013-08-30 12:42:09 UTC} - -#expires_on - %s %CLASS{time} - %s %TIME{2014-08-25 23:59:59 UTC} - - -#registrar - %s %CLASS{registrar} - %s.id == "H1167922" - %s.name == nil - %s.organization == "Gandi SAS" - %s.url == "http://www.gandi.net/" - -#registrant_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "R1149-GANDI-PRYP" - %s[0].name == "Heinz Pierre Roeser" - %s[0].organization == "Roevertrieb" - %s[0].address == "Friedensstr. 77" - %s[0].city == "Grevenbroich" - %s[0].zip == "41517" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "DE" - %s[0].phone == "+49.218145077" - %s[0].fax == nil - %s[0].email == "roevertrieb@aol.com" - %s[0].created_on == nil - %s[0].updated_on == nil - -#admin_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "R1149-GANDI-PRYP" - %s[0].name == "Heinz Pierre Roeser" - %s[0].organization == "Roevertrieb" - %s[0].address == "Friedensstr. 77" - %s[0].city == "Grevenbroich" - %s[0].zip == "41517" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "DE" - %s[0].phone == "+49.218145077" - %s[0].fax == nil - %s[0].email == "roevertrieb@aol.com" - %s[0].created_on == nil - %s[0].updated_on == nil - -#technical_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "R1149-GANDI-PRYP" - %s[0].name == "Heinz Pierre Roeser" - %s[0].organization == "Roevertrieb" - %s[0].address == "Friedensstr. 77" - %s[0].city == "Grevenbroich" - %s[0].zip == "41517" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "DE" - %s[0].phone == "+49.218145077" - %s[0].fax == nil - %s[0].email == "roevertrieb@aol.com" - %s[0].created_on == nil - %s[0].updated_on == nil - - -#nameservers - %s %CLASS{array} - %s %SIZE{3} - %s[0] %CLASS{nameserver} - %s[0].name == "b.dns.gandi.net" - %s[0].ipv4 == nil - %s[0].ipv6 == nil - %s[1] %CLASS{nameserver} - %s[1].name == "c.dns.gandi.net" - %s[1].ipv4 == nil - %s[1].ipv6 == nil - %s[2] %CLASS{nameserver} - %s[2].name == "a.dns.gandi.net" - %s[2].ipv4 == nil - %s[2].ipv6 == nil diff --git a/spec/fixtures/responses/whois.centralnic.com/gb.net/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/gb.net/status_registered.txt deleted file mode 100644 index 24dadee7..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/gb.net/status_registered.txt +++ /dev/null @@ -1,68 +0,0 @@ -Domain ID:CNIC-DO1423750 -Domain Name:HOTEL.GB.NET -Created On:2013-08-25T12:36:24.0Z -Last Updated On:2013-08-30T12:42:09.0Z -Expiration Date:2014-08-25T23:59:59.0Z -Status:clientTransferProhibited -Status:serverTransferProhibited -Registrant ID:R1149-GANDI-PRYP -Registrant Name:Heinz Pierre Roeser -Registrant Organization:Roevertrieb -Registrant Street1:Friedensstr. 77 -Registrant City:Grevenbroich -Registrant Postal Code:41517 -Registrant Country:DE -Registrant Phone:+49.218145077 -Registrant Email:roevertrieb@aol.com -Admin ID:R1149-GANDI-PRYP -Admin Name:Heinz Pierre Roeser -Admin Organization:Roevertrieb -Admin Street1:Friedensstr. 77 -Admin City:Grevenbroich -Admin Postal Code:41517 -Admin Country:DE -Admin Phone:+49.218145077 -Admin Email:roevertrieb@aol.com -Tech ID:R1149-GANDI-PRYP -Tech Name:Heinz Pierre Roeser -Tech Organization:Roevertrieb -Tech Street1:Friedensstr. 77 -Tech City:Grevenbroich -Tech Postal Code:41517 -Tech Country:DE -Tech Phone:+49.218145077 -Tech Email:roevertrieb@aol.com -Billing ID:R1149-GANDI-PRYP -Billing Name:Heinz Pierre Roeser -Billing Organization:Roevertrieb -Billing Street1:Friedensstr. 77 -Billing City:Grevenbroich -Billing Postal Code:41517 -Billing Country:DE -Billing Phone:+49.218145077 -Billing Email:roevertrieb@aol.com -Sponsoring Registrar ID:H1167922 -Sponsoring Registrar IANA ID:81 -Sponsoring Registrar Organization:Gandi SAS -Sponsoring Registrar Street1:63-65 bd. Massena -Sponsoring Registrar City:Paris -Sponsoring Registrar Postal Code:75013 -Sponsoring Registrar Country:FR -Sponsoring Registrar Phone:+33 1 7039 3740 -Sponsoring Registrar FAX:+33 1 4373 1851 -Sponsoring Registrar Website:http://www.gandi.net/ -Name Server:B.DNS.GANDI.NET -Name Server:C.DNS.GANDI.NET -Name Server:A.DNS.GANDI.NET -DNSSEC:Unsigned - -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - diff --git a/spec/fixtures/responses/whois.centralnic.com/gr.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/gr.com/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.centralnic.com/gr.com/status_available.expected +++ b/spec/fixtures/responses/whois.centralnic.com/gr.com/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.centralnic.com/gr.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/gr.com/status_available.txt index 09cc0f7e..84bab4e3 100644 --- a/spec/fixtures/responses/whois.centralnic.com/gr.com/status_available.txt +++ b/spec/fixtures/responses/whois.centralnic.com/gr.com/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-15T16:42:52.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/gr.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/gr.com/status_registered.expected index 661ce11f..0f32f3fb 100644 --- a/spec/fixtures/responses/whois.centralnic.com/gr.com/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/gr.com/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain %s == "google.gr.com" #domain_id - %s == "CNIC-DO735168" + %s == "D67028804-CNIC" #status - %s == ["ok"] + %s == :registered #available? %s == false @@ -21,65 +21,49 @@ #created_on %s %CLASS{time} - %s %TIME{2011-02-07 13:10:14 UTC} + %s %TIME{2018-05-07 07:21:24 UTC} #updated_on %s %CLASS{time} - %s %TIME{2012-06-23 10:38:02 UTC} + %s %TIME{2021-06-05 01:20:51 UTC} #expires_on %s %CLASS{time} - %s %TIME{2015-02-07 23:59:59 UTC} + %s %TIME{2022-05-07 23:59:59 UTC} #registrar - %s == nil + %s %CLASS{registrar} + %s.id == "1861" + %s.name == "Porkbun, LLC" + %s.url == "https://porkbun.com/" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "H1346485" - %s[0].name == nil - %s[0].organization == nil - %s[0].address == nil - %s[0].city == nil - %s[0].zip == nil - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == nil - %s[0].phone == nil - %s[0].fax == nil - %s[0].email == nil + %s[0].email == "https://whois.centralnic.com/contact/google.gr.com/registrant" #admin_contacts %s %CLASS{array} - %s %SIZE{0} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE + %s[0].email == "https://whois.centralnic.com/contact/google.gr.com/admin" #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "H1346485" - %s[0].name == nil - %s[0].organization == nil - %s[0].address == nil - %s[0].city == nil - %s[0].zip == nil - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == nil - %s[0].phone == nil - %s[0].fax == nil - %s[0].email == nil + %s[0].email == "https://whois.centralnic.com/contact/google.gr.com/tech" #nameservers %s %CLASS{array} %s %SIZE{2} %s[0] %CLASS{nameserver} - %s[0].name == "f1g1ns1.dnspod.net" + %s[0].name == "ns1.67hosting.com" %s[1] %CLASS{nameserver} - %s[1].name == "f1g1ns2.dnspod.net" + %s[1].name == "ns2.67hosting.com" diff --git a/spec/fixtures/responses/whois.centralnic.com/gr.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/gr.com/status_registered.txt index d3480f1a..b0dac3db 100644 --- a/spec/fixtures/responses/whois.centralnic.com/gr.com/status_registered.txt +++ b/spec/fixtures/responses/whois.centralnic.com/gr.com/status_registered.txt @@ -1,23 +1,40 @@ -Domain ID:CNIC-DO735168 -Domain Name:GOOGLE.GR.COM -Created On:2011-02-07T13:10:14.0Z -Last Updated On:2012-06-23T10:38:02.0Z -Expiration Date:2015-02-07T23:59:59.0Z -Status:ok -Registrant ID:H1346485 -Tech ID:H1346485 -Billing ID:H1346485 -Name Server:F1G1NS1.DNSPOD.NET -Name Server:F1G1NS2.DNSPOD.NET -DNSSEC:Unsigned +Domain Name: GOOGLE.GR.COM +Registry Domain ID: D67028804-CNIC +Registrar WHOIS Server: whois.porkbun.com +Registrar URL: https://porkbun.com/ +Updated Date: 2021-06-05T01:20:51.0Z +Creation Date: 2018-05-07T07:21:24.0Z +Registry Expiry Date: 2022-05-07T23:59:59.0Z +Registrar: Porkbun, LLC +Registrar IANA ID: 1861 +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Registrant Email: https://whois.centralnic.com/contact/google.gr.com/registrant +Admin Email: https://whois.centralnic.com/contact/google.gr.com/admin +Tech Email: https://whois.centralnic.com/contact/google.gr.com/tech +Name Server: NS1.67HOSTING.COM +Name Server: NS2.67HOSTING.COM +DNSSEC: unsigned +Billing Email: https://whois.centralnic.com/contact/google.gr.com/billing +Registrar Abuse Contact Email: abuse@porkbun.com +Registrar Abuse Contact Phone: +1.5038508351 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-15T16:41:46.0Z <<< -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ +For more information on Whois status codes, please visit https://icann.org/epp +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/hu.com/property_contacts_omitted.txt b/spec/fixtures/responses/whois.centralnic.com/hu.com/property_contacts_omitted.txt deleted file mode 100644 index 42e4c86c..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/hu.com/property_contacts_omitted.txt +++ /dev/null @@ -1,32 +0,0 @@ -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - -Domain ID:CNIC-DO482594 -Domain Name:HOTEL.HU.COM -Created On:12-Mar-2007 10:50:10 UTC -Last Updated On:13-Mar-2011 00:15:10 UTC -Expiration Date:12-Mar-2012 23:59:59 UTC -Status:OK -Registrant ID:H1088667 -Admin ID:H122681 -Tech ID:H122681 -Billing ID:H1088667 -Sponsoring Registrar ID:H122681 -Sponsoring Registrar Organization:Domain Exploitation International -Sponsoring Registrar City:Santa Monica -Sponsoring Registrar State/Province:CA -Sponsoring Registrar Postal Code:90401 -Sponsoring Registrar Country:US -Sponsoring Registrar Phone: -Name Server:NS1.DOMAIN-EXPLOITATION.US.COM -Name Server:NS2.DOMAIN-EXPLOITATION.US.COM -DNSSEC:Unsigned - - diff --git a/spec/fixtures/responses/whois.centralnic.com/hu.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/hu.com/status_available.txt deleted file mode 100644 index 09cc0f7e..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/hu.com/status_available.txt +++ /dev/null @@ -1 +0,0 @@ -DOMAIN NOT FOUND diff --git a/spec/fixtures/responses/whois.centralnic.com/hu.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/hu.com/status_registered.expected deleted file mode 100644 index 9fb04d65..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/hu.com/status_registered.expected +++ /dev/null @@ -1,103 +0,0 @@ -#disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" - - -#domain - %s == "porn.hu.com" - -#domain_id - %s == "CNIC-DO970405" - - -#status - %s == ["pendingDelete", "pendingDelete"] - -#available? - %s == false - -#registered? - %s == true - - -#created_on - %s %CLASS{time} - %s %TIME{2012-11-28 17:46:03 UTC} - -#updated_on - %s %CLASS{time} - %s %TIME{2014-02-11 00:16:13 UTC} - -#expires_on - %s %CLASS{time} - %s %TIME{2013-11-28 23:59:59 UTC} - - -#registrar - %s %CLASS{registrar} - %s.id == "H65658" - %s.name == nil - %s.organization == "101Domain, Inc." - %s.url == "http://www.101domain.com" - -#registrant_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "RWG000000004273D" - %s[0].name == "Gintautas Liaskus" - %s[0].organization == "G.Liaskaus firma INFOMEGA" - %s[0].address == "Kapsu 32-53" - %s[0].city == "Vilnius" - %s[0].zip == "02167" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "LT" - %s[0].phone == "+370.52711457" - %s[0].fax == "+370.52784278" - %s[0].email == "infotau@infotau.lt" - -#admin_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "RWG000000004273D" - %s[0].name == "Gintautas Liaskus" - %s[0].organization == "G.Liaskaus firma INFOMEGA" - %s[0].address == "Kapsu 32-53" - %s[0].city == "Vilnius" - %s[0].zip == "02167" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "LT" - %s[0].phone == "+370.52711457" - %s[0].fax == "+370.52784278" - %s[0].email == "infotau@infotau.lt" - -#technical_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "RWG000000004273D" - %s[0].name == "Gintautas Liaskus" - %s[0].organization == "G.Liaskaus firma INFOMEGA" - %s[0].address == "Kapsu 32-53" - %s[0].city == "Vilnius" - %s[0].zip == "02167" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "LT" - %s[0].phone == "+370.52711457" - %s[0].fax == "+370.52784278" - %s[0].email == "infotau@infotau.lt" - - -#nameservers - %s %CLASS{array} - %s %SIZE{2} - %s[0] %CLASS{nameserver} - %s[0].name == "ns1.sedoparking.com" - %s[1] %CLASS{nameserver} - %s[1].name == "ns2.sedoparking.com" diff --git a/spec/fixtures/responses/whois.centralnic.com/hu.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/hu.com/status_registered.txt deleted file mode 100644 index fc0634ee..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/hu.com/status_registered.txt +++ /dev/null @@ -1,73 +0,0 @@ -Domain ID:CNIC-DO970405 -Domain Name:PORN.HU.COM -Created On:2012-11-28T17:46:03.0Z -Last Updated On:2014-02-11T00:16:13.0Z -Expiration Date:2013-11-28T23:59:59.0Z -Status:pendingDelete -Status:pendingDelete -Registrant ID:RWG000000004273D -Registrant Name:Gintautas Liaskus -Registrant Organization:G.Liaskaus firma INFOMEGA -Registrant Street1:Kapsu 32-53 -Registrant City:Vilnius -Registrant Postal Code:02167 -Registrant Country:LT -Registrant Phone:+370.52711457 -Registrant FAX:+370.52784278 -Registrant Email:infotau@infotau.lt -Admin ID:RWG000000004273D -Admin Name:Gintautas Liaskus -Admin Organization:G.Liaskaus firma INFOMEGA -Admin Street1:Kapsu 32-53 -Admin City:Vilnius -Admin Postal Code:02167 -Admin Country:LT -Admin Phone:+370.52711457 -Admin FAX:+370.52784278 -Admin Email:infotau@infotau.lt -Tech ID:RWG000000004273D -Tech Name:Gintautas Liaskus -Tech Organization:G.Liaskaus firma INFOMEGA -Tech Street1:Kapsu 32-53 -Tech City:Vilnius -Tech Postal Code:02167 -Tech Country:LT -Tech Phone:+370.52711457 -Tech FAX:+370.52784278 -Tech Email:infotau@infotau.lt -Billing ID:RWG000000004273E -Billing Name:Billing Department -Billing Organization:101Domain, Inc. -Billing Street1:5858 Edison Pl. -Billing City:Carlsbad -Billing State/Province:CA -Billing Postal Code:92008 -Billing Country:US -Billing Phone:+1.7604448674 -Billing FAX:+1.7605794996 -Billing Email:tech1@101domain.com -Sponsoring Registrar ID:H65658 -Sponsoring Registrar IANA ID:1011 -Sponsoring Registrar Organization:101Domain, Inc. -Sponsoring Registrar Street1:5858 Edison Pl. -Sponsoring Registrar City:Carlsbad -Sponsoring Registrar State/Province:CA -Sponsoring Registrar Postal Code:92008 -Sponsoring Registrar Country:US -Sponsoring Registrar Phone:+1.7604448674 -Sponsoring Registrar FAX:+1.7605794996 -Sponsoring Registrar Website:http://www.101domain.com -Name Server:NS1.SEDOPARKING.COM -Name Server:NS2.SEDOPARKING.COM -DNSSEC:Unsigned - -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - diff --git a/spec/fixtures/responses/whois.centralnic.com/jp.net/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/jp.net/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.centralnic.com/jp.net/status_available.expected +++ b/spec/fixtures/responses/whois.centralnic.com/jp.net/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.centralnic.com/jp.net/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/jp.net/status_available.txt index 09cc0f7e..0c5f68ab 100644 --- a/spec/fixtures/responses/whois.centralnic.com/jp.net/status_available.txt +++ b/spec/fixtures/responses/whois.centralnic.com/jp.net/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-15T16:49:45.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/jp.net/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/jp.net/status_registered.expected index b74b2cbd..3a5b97b5 100644 --- a/spec/fixtures/responses/whois.centralnic.com/jp.net/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/jp.net/status_registered.expected @@ -1,16 +1,17 @@ #disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." + #domain %s == "ntt.jp.net" #domain_id - %s == "CNIC-DO846061" + %s == "D195732259-CNIC" #status - %s == ["ok"] + %s == :registered #available? %s == false @@ -20,84 +21,49 @@ #created_on %s %CLASS{time} - %s %TIME{2012-03-16 11:47:23 UTC} + %s %TIME{2020-08-06 08:41:29 UTC} #updated_on %s %CLASS{time} - %s %TIME{2013-01-24 16:57:19 UTC} + %s %TIME{2020-09-04 04:22:52 UTC} #expires_on %s %CLASS{time} - %s %TIME{2018-03-16 23:59:59 UTC} + %s %TIME{2022-08-06 23:59:59 UTC} #registrar %s %CLASS{registrar} - %s.id == "H1605993" - %s.name == nil - %s.organization == "GMO" - %s.url == "http://www.onamae.com" + %s.id == "1387" + %s.name == "1API GmbH" + %s.url == "http://www.1api.net" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "136151BCEFE" - %s[0].name == "zhijian xia" - %s[0].organization == "zhijian xia" - %s[0].address == "Chuo\n3-23-20" - %s[0].city == "Warabi-shi" - %s[0].zip == "335-0004" - %s[0].state == "Saitama" - %s[0].country == nil - %s[0].country_code == "JP" - %s[0].phone == "+81.08037215656" - %s[0].fax == nil - %s[0].email == "xia@ingame.jp" + %s[0].email == "https://whois.centralnic.com/contact/ntt.jp.net/registrant" #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "136151BD1A1" - %s[0].name == "zhijian xia" - %s[0].organization == "zhijian xia" - %s[0].address == "Chuo\n3-23-20" - %s[0].city == "Warabi-shi" - %s[0].zip == "335-0004" - %s[0].state == "Saitama" - %s[0].country == nil - %s[0].country_code == "JP" - %s[0].phone == "+81.08037215656" - %s[0].fax == nil - %s[0].email == "xia@ingame.jp" + %s[0].email == "https://whois.centralnic.com/contact/ntt.jp.net/admin" #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "136151BD459" - %s[0].name == "Technical Contact" - %s[0].organization == "GMO Internet Inc." - %s[0].address == "26-1 Sakuragaoka-cho\nCerulean Tower 11F" - %s[0].city == "Shibuya-ku" - %s[0].zip == "150-8512" - %s[0].state == "Tokyo" - %s[0].country == nil - %s[0].country_code == "JP" - %s[0].phone == "+81.0354562555" - %s[0].fax == "+81.0354562556" - %s[0].email == "admin@onamae.com" - + %s[0].email == "https://whois.centralnic.com/contact/ntt.jp.net/tech" #nameservers %s %CLASS{array} %s %SIZE{2} %s[0] %CLASS{nameserver} - %s[0].name == "dns1.onamae.com" + %s[0].name == "f1g1ns1.dnspod.net" %s[1] %CLASS{nameserver} - %s[1].name == "dns2.onamae.com" + %s[1].name == "f1g1ns2.dnspod.net" diff --git a/spec/fixtures/responses/whois.centralnic.com/jp.net/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/jp.net/status_registered.txt index 892c1b9b..b6868900 100644 --- a/spec/fixtures/responses/whois.centralnic.com/jp.net/status_registered.txt +++ b/spec/fixtures/responses/whois.centralnic.com/jp.net/status_registered.txt @@ -1,77 +1,39 @@ -Domain ID:CNIC-DO846061 -Domain Name:NTT.JP.NET -Created On:2012-03-16T11:47:23.0Z -Last Updated On:2013-01-24T16:57:19.0Z -Expiration Date:2018-03-16T23:59:59.0Z -Status:ok -Registrant ID:136151BCEFE -Registrant Name:zhijian xia -Registrant Organization:zhijian xia -Registrant Street1:Chuo -Registrant Street2:3-23-20 -Registrant City:Warabi-shi -Registrant State/Province:Saitama -Registrant Postal Code:335-0004 -Registrant Country:JP -Registrant Phone:+81.08037215656 -Registrant Email:xia@ingame.jp -Admin ID:136151BD1A1 -Admin Name:zhijian xia -Admin Organization:zhijian xia -Admin Street1:Chuo -Admin Street2:3-23-20 -Admin City:Warabi-shi -Admin State/Province:Saitama -Admin Postal Code:335-0004 -Admin Country:JP -Admin Phone:+81.08037215656 -Admin Email:xia@ingame.jp -Tech ID:136151BD459 -Tech Name:Technical Contact -Tech Organization:GMO Internet Inc. -Tech Street1:26-1 Sakuragaoka-cho -Tech Street2:Cerulean Tower 11F -Tech City:Shibuya-ku -Tech State/Province:Tokyo -Tech Postal Code:150-8512 -Tech Country:JP -Tech Phone:+81.0354562555 -Tech FAX:+81.0354562556 -Tech Email:admin@onamae.com -Billing ID:136151BD74A -Billing Name:zhijian xia -Billing Organization:zhijian xia -Billing Street1:Chuo -Billing Street2:3-23-20 -Billing City:Warabi-shi -Billing State/Province:Saitama -Billing Postal Code:335-0004 -Billing Country:JP -Billing Phone:+81.08037215656 -Billing Email:xia@ingame.jp -Sponsoring Registrar ID:H1605993 -Sponsoring Registrar IANA ID:49 -Sponsoring Registrar Organization:GMO -Sponsoring Registrar Street1:Cerulean Tower, -Sponsoring Registrar Street2:26-1 Sakuragaoka-cho -Sponsoring Registrar City:Shibuya-ku -Sponsoring Registrar State/Province:Tokyo -Sponsoring Registrar Postal Code:150-8512 -Sponsoring Registrar Country:JP -Sponsoring Registrar Phone:+81 3 5456 1120 -Sponsoring Registrar FAX:+81 3 3489 1038 -Sponsoring Registrar Website:http://www.onamae.com -Name Server:DNS1.ONAMAE.COM -Name Server:DNS2.ONAMAE.COM -DNSSEC:Unsigned +Domain Name: NTT.JP.NET +Registry Domain ID: D195732259-CNIC +Registrar WHOIS Server: whois.1api.net +Registrar URL: http://www.1api.net +Updated Date: 2020-09-04T04:22:52.0Z +Creation Date: 2020-08-06T08:41:29.0Z +Registry Expiry Date: 2022-08-06T23:59:59.0Z +Registrar: 1API GmbH +Registrar IANA ID: 1387 +Domain Status: ok https://icann.org/epp#ok +Registrant Email: https://whois.centralnic.com/contact/ntt.jp.net/registrant +Admin Email: https://whois.centralnic.com/contact/ntt.jp.net/admin +Tech Email: https://whois.centralnic.com/contact/ntt.jp.net/tech +Name Server: F1G1NS1.DNSPOD.NET +Name Server: F1G1NS2.DNSPOD.NET +DNSSEC: unsigned +Billing Email: https://whois.centralnic.com/contact/ntt.jp.net/billing +Registrar Abuse Contact Email: abuse@1api.net +Registrar Abuse Contact Phone: +49.68949396850 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-15T16:49:27.0Z <<< -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ +For more information on Whois status codes, please visit https://icann.org/epp +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/jpn.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/jpn.com/status_available.expected deleted file mode 100644 index 2c3fe7a8..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/jpn.com/status_available.expected +++ /dev/null @@ -1,50 +0,0 @@ -#disclaimer - %s == nil - - -#domain - %s == nil - -#domain_id - %s == nil - - -#status - %s == [] - -#available? - %s == true - -#registered? - %s == false - - -#created_on - %s == nil - -#updated_on - %s == nil - -#expires_on - %s == nil - - -#registrar - %s == nil - -#registrant_contacts - %s %CLASS{array} - %s == [] - -#admin_contacts - %s %CLASS{array} - %s == [] - -#technical_contacts - %s %CLASS{array} - %s == [] - - -#nameservers - %s %CLASS{array} - %s == [] diff --git a/spec/fixtures/responses/whois.centralnic.com/jpn.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/jpn.com/status_available.txt deleted file mode 100644 index 09cc0f7e..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/jpn.com/status_available.txt +++ /dev/null @@ -1 +0,0 @@ -DOMAIN NOT FOUND diff --git a/spec/fixtures/responses/whois.centralnic.com/jpn.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/jpn.com/status_registered.expected deleted file mode 100644 index 66c17bab..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/jpn.com/status_registered.expected +++ /dev/null @@ -1,107 +0,0 @@ -#disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" - - -#domain - %s == "koi.jpn.com" - -#domain_id - %s == "CNIC-DO492866" - - -#status - %s == ["ok"] - -#available? - %s == false - -#registered? - %s == true - - -#created_on - %s %CLASS{time} - %s %TIME{2007-06-29 13:42:35 UTC} - -#updated_on - %s %CLASS{time} - %s %TIME{2013-07-01 00:18:14 UTC} - -#expires_on - %s %CLASS{time} - %s %TIME{2015-06-29 23:59:59 UTC} - - -#registrar - %s %CLASS{registrar} - %s.id == "I6467" - %s.name == nil - %s.organization == "Webfusion" - %s.url == "http://www.123-reg.co.uk/domain-names/" - -#registrant_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "MNT78E22765897" - %s[0].name == "Identity Protection Service" - %s[0].organization == "Identity Protect Limited" - %s[0].address == "PO Box 795" - %s[0].city == "Godalming" - %s[0].zip == "GU7 9GA" - %s[0].state == "Surrey" - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.1483307527" - %s[0].fax == "+44.1483304031" - %s[0].email == "koi.jpn.com@identity-protect.org" - -#admin_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "MNT78E22765897" - %s[0].name == "Identity Protection Service" - %s[0].organization == "Identity Protect Limited" - %s[0].address == "PO Box 795" - %s[0].city == "Godalming" - %s[0].zip == "GU7 9GA" - %s[0].state == "Surrey" - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.1483307527" - %s[0].fax == "+44.1483304031" - %s[0].email == "koi.jpn.com@identity-protect.org" - -#technical_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "MNT78E22765897" - %s[0].name == "Identity Protection Service" - %s[0].organization == "Identity Protect Limited" - %s[0].address == "PO Box 795" - %s[0].city == "Godalming" - %s[0].zip == "GU7 9GA" - %s[0].state == "Surrey" - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.1483307527" - %s[0].fax == "+44.1483304031" - %s[0].email == "koi.jpn.com@identity-protect.org" - - -#nameservers - %s %CLASS{array} - %s %SIZE{2} - %s[0] %CLASS{nameserver} - %s[0].name == "ns1.chaoshosting.co.uk" - %s[0].ipv4 == nil - %s[0].ipv6 == nil - %s[1] %CLASS{nameserver} - %s[1].name == "ns2.chaoshosting.co.uk" - %s[1].ipv4 == nil - %s[1].ipv6 == nil diff --git a/spec/fixtures/responses/whois.centralnic.com/jpn.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/jpn.com/status_registered.txt deleted file mode 100644 index 0744d035..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/jpn.com/status_registered.txt +++ /dev/null @@ -1,76 +0,0 @@ -Domain ID:CNIC-DO492866 -Domain Name:KOI.JPN.COM -Created On:2007-06-29T13:42:35.0Z -Last Updated On:2013-07-01T00:18:14.0Z -Expiration Date:2015-06-29T23:59:59.0Z -Status:ok -Registrant ID:MNT78E22765897 -Registrant Name:Identity Protection Service -Registrant Organization:Identity Protect Limited -Registrant Street1:PO Box 795 -Registrant City:Godalming -Registrant State/Province:Surrey -Registrant Postal Code:GU7 9GA -Registrant Country:GB -Registrant Phone:+44.1483307527 -Registrant FAX:+44.1483304031 -Registrant Email:koi.jpn.com@identity-protect.org -Admin ID:MNT78E22765897 -Admin Name:Identity Protection Service -Admin Organization:Identity Protect Limited -Admin Street1:PO Box 795 -Admin City:Godalming -Admin State/Province:Surrey -Admin Postal Code:GU7 9GA -Admin Country:GB -Admin Phone:+44.1483307527 -Admin FAX:+44.1483304031 -Admin Email:koi.jpn.com@identity-protect.org -Tech ID:MNT78E22765897 -Tech Name:Identity Protection Service -Tech Organization:Identity Protect Limited -Tech Street1:PO Box 795 -Tech City:Godalming -Tech State/Province:Surrey -Tech Postal Code:GU7 9GA -Tech Country:GB -Tech Phone:+44.1483307527 -Tech FAX:+44.1483304031 -Tech Email:koi.jpn.com@identity-protect.org -Billing ID:MNT78E22765897 -Billing Name:Identity Protection Service -Billing Organization:Identity Protect Limited -Billing Street1:PO Box 795 -Billing City:Godalming -Billing State/Province:Surrey -Billing Postal Code:GU7 9GA -Billing Country:GB -Billing Phone:+44.1483307527 -Billing FAX:+44.1483304031 -Billing Email:koi.jpn.com@identity-protect.org -Sponsoring Registrar ID:I6467 -Sponsoring Registrar IANA ID:1515 -Sponsoring Registrar Organization:Webfusion -Sponsoring Registrar Street1:5 Roundwood Avenue -Sponsoring Registrar Street2:Stockley Park -Sponsoring Registrar City:Uxbridge -Sponsoring Registrar State/Province:Middlesex -Sponsoring Registrar Postal Code:UB11 1FF -Sponsoring Registrar Country:GB -Sponsoring Registrar Phone:0845 859 0018 -Sponsoring Registrar FAX:08701 650437 -Sponsoring Registrar Website:http://www.123-reg.co.uk/domain-names/ -Name Server:NS1.CHAOSHOSTING.CO.UK -Name Server:NS2.CHAOSHOSTING.CO.UK -DNSSEC:Unsigned - -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - diff --git a/spec/fixtures/responses/whois.centralnic.com/kr.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/kr.com/status_available.expected deleted file mode 100644 index 2c3fe7a8..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/kr.com/status_available.expected +++ /dev/null @@ -1,50 +0,0 @@ -#disclaimer - %s == nil - - -#domain - %s == nil - -#domain_id - %s == nil - - -#status - %s == [] - -#available? - %s == true - -#registered? - %s == false - - -#created_on - %s == nil - -#updated_on - %s == nil - -#expires_on - %s == nil - - -#registrar - %s == nil - -#registrant_contacts - %s %CLASS{array} - %s == [] - -#admin_contacts - %s %CLASS{array} - %s == [] - -#technical_contacts - %s %CLASS{array} - %s == [] - - -#nameservers - %s %CLASS{array} - %s == [] diff --git a/spec/fixtures/responses/whois.centralnic.com/kr.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/kr.com/status_available.txt deleted file mode 100644 index 09cc0f7e..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/kr.com/status_available.txt +++ /dev/null @@ -1 +0,0 @@ -DOMAIN NOT FOUND diff --git a/spec/fixtures/responses/whois.centralnic.com/kr.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/kr.com/status_registered.expected deleted file mode 100644 index bfc2182f..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/kr.com/status_registered.expected +++ /dev/null @@ -1,119 +0,0 @@ -#disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" - - -#domain - %s == "academyart.kr.com" - -#domain_id - %s == "CNIC-DO569707" - - -#status - %s == ["clientTransferProhibited", "serverTransferProhibited"] - -#available? - %s == false - -#registered? - %s == true - - -#created_on - %s %CLASS{time} - %s %TIME{2008-06-11 21:25:43 UTC} - -#updated_on - %s %CLASS{time} - %s %TIME{2012-01-16 16:25:41 UTC} - -#expires_on - %s %CLASS{time} - %s %TIME{2014-06-11 23:59:59 UTC} - - -#registrar - %s %CLASS{registrar} - %s.id == "H292913" - %s.name == nil - %s.organization == "Network Solutions LLC" - %s.url == "http://www.networksolutions.com/" - -#registrant_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "41619876" - %s[0].name == "Academy of Art College" - %s[0].organization == "Academy of Art College" - %s[0].address == "79 NEW MONTGOMERY ST" - %s[0].city == "SAN FRANCISCO" - %s[0].zip == "94105" - %s[0].state == "CA" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.415618350" - %s[0].fax == nil - %s[0].email == "clefferts@academyart.edu" - -#admin_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "41619876" - %s[0].name == "Academy of Art College" - %s[0].organization == "Academy of Art College" - %s[0].address == "79 NEW MONTGOMERY ST" - %s[0].city == "SAN FRANCISCO" - %s[0].zip == "94105" - %s[0].state == "CA" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.415618350" - %s[0].fax == nil - %s[0].email == "clefferts@academyart.edu" - -#technical_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "41619876" - %s[0].name == "Academy of Art College" - %s[0].organization == "Academy of Art College" - %s[0].address == "79 NEW MONTGOMERY ST" - %s[0].city == "SAN FRANCISCO" - %s[0].zip == "94105" - %s[0].state == "CA" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.415618350" - %s[0].fax == nil - %s[0].email == "clefferts@academyart.edu" - - -#nameservers - %s %CLASS{array} - %s %SIZE{5} - %s[0] %CLASS{nameserver} - %s[0].name == "ns1.academyart.edu" - %s[0].ipv4 == nil - %s[0].ipv6 == nil - %s[1] %CLASS{nameserver} - %s[1].name == "dbru.br.ns.els-gms.att.net" - %s[1].ipv4 == nil - %s[1].ipv6 == nil - %s[2] %CLASS{nameserver} - %s[2].name == "dmtu.mt.ns.els-gms.att.net" - %s[2].ipv4 == nil - %s[2].ipv6 == nil - %s[3] %CLASS{nameserver} - %s[3].name == "cbru.br.ns.els-gms.att.net" - %s[3].ipv4 == nil - %s[3].ipv6 == nil - %s[4] %CLASS{nameserver} - %s[4].name == "cmtu.mt.ns.els-gms.att.net" - %s[4].ipv4 == nil - %s[4].ipv6 == nil diff --git a/spec/fixtures/responses/whois.centralnic.com/kr.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/kr.com/status_registered.txt deleted file mode 100644 index 27bef55c..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/kr.com/status_registered.txt +++ /dev/null @@ -1,77 +0,0 @@ -Domain ID:CNIC-DO569707 -Domain Name:ACADEMYART.KR.COM -Created On:2008-06-11T21:25:43.0Z -Last Updated On:2012-01-16T16:25:41.0Z -Expiration Date:2014-06-11T23:59:59.0Z -Status:clientTransferProhibited -Status:serverTransferProhibited -Registrant ID:41619876 -Registrant Name:Academy of Art College -Registrant Organization:Academy of Art College -Registrant Street1:79 NEW MONTGOMERY ST -Registrant City:SAN FRANCISCO -Registrant State/Province:CA -Registrant Postal Code:94105 -Registrant Country:US -Registrant Phone:+1.415618350 -Registrant Email:clefferts@academyart.edu -Admin ID:41619876 -Admin Name:Academy of Art College -Admin Organization:Academy of Art College -Admin Street1:79 NEW MONTGOMERY ST -Admin City:SAN FRANCISCO -Admin State/Province:CA -Admin Postal Code:94105 -Admin Country:US -Admin Phone:+1.415618350 -Admin Email:clefferts@academyart.edu -Tech ID:41619876 -Tech Name:Academy of Art College -Tech Organization:Academy of Art College -Tech Street1:79 NEW MONTGOMERY ST -Tech City:SAN FRANCISCO -Tech State/Province:CA -Tech Postal Code:94105 -Tech Country:US -Tech Phone:+1.415618350 -Tech Email:clefferts@academyart.edu -Billing ID:41619877 -Billing Name:Academy of Art University -Billing Organization:Academy of Art -Billing Street1:79 New Montgomery, 3rd Floor -Billing Street2:IT Department -Billing City:SAN FRANCISCO -Billing State/Province:CA -Billing Postal Code:94105 -Billing Country:US -Billing Phone:+1.4156188582 -Billing FAX:+1.4156186279 -Billing Email:Padsuar@academyart.edu -Sponsoring Registrar ID:H292913 -Sponsoring Registrar IANA ID:2 -Sponsoring Registrar Organization:Network Solutions LLC -Sponsoring Registrar Street1:12808 Gran Bay Parkway West -Sponsoring Registrar City:Jacksonville -Sponsoring Registrar State/Province:FL -Sponsoring Registrar Postal Code:32258 -Sponsoring Registrar Country:US -Sponsoring Registrar Phone:+1.9046806600 -Sponsoring Registrar FAX:+1.9048800350 -Sponsoring Registrar Website:http://www.networksolutions.com/ -Name Server:NS1.ACADEMYART.EDU -Name Server:DBRU.BR.NS.ELS-GMS.ATT.NET -Name Server:DMTU.MT.NS.ELS-GMS.ATT.NET -Name Server:CBRU.BR.NS.ELS-GMS.ATT.NET -Name Server:CMTU.MT.NS.ELS-GMS.ATT.NET -DNSSEC:Unsigned - -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - diff --git a/spec/fixtures/responses/whois.centralnic.com/no.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/no.com/status_available.expected deleted file mode 100644 index 2c3fe7a8..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/no.com/status_available.expected +++ /dev/null @@ -1,50 +0,0 @@ -#disclaimer - %s == nil - - -#domain - %s == nil - -#domain_id - %s == nil - - -#status - %s == [] - -#available? - %s == true - -#registered? - %s == false - - -#created_on - %s == nil - -#updated_on - %s == nil - -#expires_on - %s == nil - - -#registrar - %s == nil - -#registrant_contacts - %s %CLASS{array} - %s == [] - -#admin_contacts - %s %CLASS{array} - %s == [] - -#technical_contacts - %s %CLASS{array} - %s == [] - - -#nameservers - %s %CLASS{array} - %s == [] diff --git a/spec/fixtures/responses/whois.centralnic.com/no.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/no.com/status_available.txt deleted file mode 100644 index 09cc0f7e..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/no.com/status_available.txt +++ /dev/null @@ -1 +0,0 @@ -DOMAIN NOT FOUND diff --git a/spec/fixtures/responses/whois.centralnic.com/qc.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/qc.com/status_available.expected deleted file mode 100644 index 2c3fe7a8..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/qc.com/status_available.expected +++ /dev/null @@ -1,50 +0,0 @@ -#disclaimer - %s == nil - - -#domain - %s == nil - -#domain_id - %s == nil - - -#status - %s == [] - -#available? - %s == true - -#registered? - %s == false - - -#created_on - %s == nil - -#updated_on - %s == nil - -#expires_on - %s == nil - - -#registrar - %s == nil - -#registrant_contacts - %s %CLASS{array} - %s == [] - -#admin_contacts - %s %CLASS{array} - %s == [] - -#technical_contacts - %s %CLASS{array} - %s == [] - - -#nameservers - %s %CLASS{array} - %s == [] diff --git a/spec/fixtures/responses/whois.centralnic.com/qc.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/qc.com/status_available.txt deleted file mode 100644 index 09cc0f7e..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/qc.com/status_available.txt +++ /dev/null @@ -1 +0,0 @@ -DOMAIN NOT FOUND diff --git a/spec/fixtures/responses/whois.centralnic.com/qc.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/qc.com/status_registered.expected deleted file mode 100644 index 954a7c91..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/qc.com/status_registered.expected +++ /dev/null @@ -1,107 +0,0 @@ -#disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" - - -#domain - %s == "ceo.qc.com" - -#domain_id - %s == "CNIC-DO327026" - - -#status - %s == ["ok"] - -#available? - %s == false - -#registered? - %s == true - - -#created_on - %s %CLASS{time} - %s %TIME{2004-10-08 02:12:49 UTC} - -#updated_on - %s %CLASS{time} - %s %TIME{2012-11-23 18:03:55 UTC} - -#expires_on - %s %CLASS{time} - %s %TIME{2014-10-08 23:59:59 UTC} - - -#registrar - %s %CLASS{registrar} - %s.id == "7065-EN" - %s.name == nil - %s.organization == "eNom, Inc." - %s.url == "http://www.enom.com/" - -#registrant_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "H1062277" - %s[0].name == "helene" - %s[0].organization == nil - %s[0].address == "309 Laurendeau, Magog Qc" - %s[0].city == nil - %s[0].zip == "J1X 3W4" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "CA" - %s[0].phone == "+1.8198438380" - %s[0].fax == nil - %s[0].email == "docjgs@videotron.ca" - -#admin_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "H114589" - %s[0].name == "helene viens" - %s[0].organization == nil - %s[0].address == "309 Laurendeau, Magog Qc" - %s[0].city == nil - %s[0].zip == "J1X 3W4" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "CA" - %s[0].phone == "+1.8198438380" - %s[0].fax == nil - %s[0].email == "docjgs@videotron.ca" - -#technical_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "H114590" - %s[0].name == "helene viens" - %s[0].organization == nil - %s[0].address == "309 Laurendeau, Magog Qc" - %s[0].city == nil - %s[0].zip == "J1X 3W4" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "CA" - %s[0].phone == "+1.8198438380" - %s[0].fax == nil - %s[0].email == "docjgs@videotron.ca" - - -#nameservers - %s %CLASS{array} - %s %SIZE{2} - %s[0] %CLASS{nameserver} - %s[0].name == "ns12.zoneedit.com" - %s[0].ipv4 == nil - %s[0].ipv6 == nil - %s[1] %CLASS{nameserver} - %s[1].name == "t1.zoneedit.com" - %s[1].ipv4 == nil - %s[1].ipv6 == nil diff --git a/spec/fixtures/responses/whois.centralnic.com/qc.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/qc.com/status_registered.txt deleted file mode 100644 index e1806faa..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/qc.com/status_registered.txt +++ /dev/null @@ -1,52 +0,0 @@ -Domain ID:CNIC-DO327026 -Domain Name:CEO.QC.COM -Created On:2004-10-08T02:12:49.0Z -Last Updated On:2012-11-23T18:03:55.0Z -Expiration Date:2014-10-08T23:59:59.0Z -Status:ok -Registrant ID:H1062277 -Registrant Name:helene -Registrant Street1:309 Laurendeau, Magog Qc -Registrant Postal Code:J1X 3W4 -Registrant Country:CA -Registrant Phone:+1.8198438380 -Registrant Email:docjgs@videotron.ca -Admin ID:H114589 -Admin Name:helene viens -Admin Street1:309 Laurendeau, Magog Qc -Admin Postal Code:J1X 3W4 -Admin Country:CA -Admin Phone:+1.8198438380 -Admin Email:docjgs@videotron.ca -Tech ID:H114590 -Tech Name:helene viens -Tech Street1:309 Laurendeau, Magog Qc -Tech Postal Code:J1X 3W4 -Tech Country:CA -Tech Phone:+1.8198438380 -Tech Email:docjgs@videotron.ca -Sponsoring Registrar ID:7065-EN -Sponsoring Registrar IANA ID:48 -Sponsoring Registrar Organization:eNom, Inc. -Sponsoring Registrar Street1:5808 Lake Washington Boulevard -Sponsoring Registrar City:Kirkland -Sponsoring Registrar State/Province:WA -Sponsoring Registrar Postal Code:98034 -Sponsoring Registrar Country:US -Sponsoring Registrar Phone:425-274-4500 -Sponsoring Registrar FAX:425-974-4796 -Sponsoring Registrar Website:http://www.enom.com/ -Name Server:NS12.ZONEEDIT.COM -Name Server:T1.ZONEEDIT.COM -DNSSEC:Unsigned - -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - diff --git a/spec/fixtures/responses/whois.centralnic.com/ru.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/ru.com/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.centralnic.com/ru.com/status_available.expected +++ b/spec/fixtures/responses/whois.centralnic.com/ru.com/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.centralnic.com/ru.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/ru.com/status_available.txt index 09cc0f7e..c89b6ee7 100644 --- a/spec/fixtures/responses/whois.centralnic.com/ru.com/status_available.txt +++ b/spec/fixtures/responses/whois.centralnic.com/ru.com/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-15T16:58:37.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/ru.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/ru.com/status_registered.expected index bebda246..20e91679 100644 --- a/spec/fixtures/responses/whois.centralnic.com/ru.com/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/ru.com/status_registered.expected @@ -1,16 +1,15 @@ #disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" - + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain %s == "srk.ru.com" #domain_id - %s == "CNIC-DO450826" + %s == "D450826-CNIC" #status - %s == ["ok"] + %s == :registered #available? %s == false @@ -25,69 +24,39 @@ #updated_on %s %CLASS{time} - %s %TIME{2012-07-10 08:16:19 UTC} + %s %TIME{2021-04-19 15:40:48 UTC} #expires_on %s %CLASS{time} - %s %TIME{2014-07-31 23:59:59 UTC} + %s %TIME{2025-07-31 23:59:59 UTC} #registrar - %s == nil + %s %CLASS{registrar} + %s.id == "1376" + %s.name == "Instra Corporation Pty Ltd" + %s.url == "https://instra.com/" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "H1037013" - %s[0].name == "Anthony Lloyd, SRK Consulting (UK) Limited" - %s[0].organization == nil - %s[0].address == "5th Floor\nChurchill House\n17 Churchill Way" - %s[0].city == "Cardiff" - %s[0].zip == "CF10 2HH" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.2920348150" - %s[0].fax == nil - %s[0].email == "alloyd@srk.co.uk" + %s[0].email == "https://whois.centralnic.com/contact/srk.ru.com/registrant" #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "H265405" - %s[0].name == "Anthony Lloyd" - %s[0].organization == "SRK Consulting (UK) Limited" - %s[0].address == "5th Floor\nChurchill House\n17 Churchill Way" - %s[0].city == "Cardiff" - %s[0].zip == "CF10 2HH" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.2920348150" - %s[0].fax == nil - %s[0].email == "alloyd@srk.co.uk" + %s[0].email == "https://whois.centralnic.com/contact/srk.ru.com/admin" #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "H265405" - %s[0].name == "Anthony Lloyd" - %s[0].organization == "SRK Consulting (UK) Limited" - %s[0].address == "5th Floor\nChurchill House\n17 Churchill Way" - %s[0].city == "Cardiff" - %s[0].zip == "CF10 2HH" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.2920348150" - %s[0].fax == nil - %s[0].email == "alloyd@srk.co.uk" + %s[0].email == "https://whois.centralnic.com/contact/srk.ru.com/tech" #nameservers @@ -96,4 +65,4 @@ %s[0] %CLASS{nameserver} %s[0].name == "ns7.zoneedit.com" %s[1] %CLASS{nameserver} - %s[1].name == "ns12.zoneedit.com" + %s[1].name == "ns11.zoneedit.com" diff --git a/spec/fixtures/responses/whois.centralnic.com/ru.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/ru.com/status_registered.txt index 71a4491a..945360e2 100644 --- a/spec/fixtures/responses/whois.centralnic.com/ru.com/status_registered.txt +++ b/spec/fixtures/responses/whois.centralnic.com/ru.com/status_registered.txt @@ -1,62 +1,39 @@ -Domain ID:CNIC-DO450826 -Domain Name:SRK.RU.COM -Created On:2006-07-31T10:06:04.0Z -Last Updated On:2012-07-10T08:16:19.0Z -Expiration Date:2014-07-31T23:59:59.0Z -Status:ok -Registrant ID:H1037013 -Registrant Name:Anthony Lloyd, SRK Consulting (UK) Limited -Registrant Street1:5th Floor -Registrant Street2:Churchill House -Registrant Street3:17 Churchill Way -Registrant City:Cardiff -Registrant Postal Code:CF10 2HH -Registrant Country:GB -Registrant Phone:+44.2920348150 -Registrant Email:alloyd@srk.co.uk -Admin ID:H265405 -Admin Name:Anthony Lloyd -Admin Organization:SRK Consulting (UK) Limited -Admin Street1:5th Floor -Admin Street2:Churchill House -Admin Street3:17 Churchill Way -Admin City:Cardiff -Admin Postal Code:CF10 2HH -Admin Country:GB -Admin Phone:+44.2920348150 -Admin Email:alloyd@srk.co.uk -Tech ID:H265405 -Tech Name:Anthony Lloyd -Tech Organization:SRK Consulting (UK) Limited -Tech Street1:5th Floor -Tech Street2:Churchill House -Tech Street3:17 Churchill Way -Tech City:Cardiff -Tech Postal Code:CF10 2HH -Tech Country:GB -Tech Phone:+44.2920348150 -Tech Email:alloyd@srk.co.uk -Billing ID:H265406 -Billing Name:A R Lloyd -Billing Organization:SRK Consulting (UK) Limited -Billing Street1:Windsor Court -Billing Street2:1-3 Windsor Place -Billing Street3:Cardiff -Billing Postal Code:CF10 3BX -Billing Country:GB -Billing Phone:+44.2920348150 -Billing Email:alloyd@srk.co.uk -Name Server:NS7.ZONEEDIT.COM -Name Server:NS12.ZONEEDIT.COM -DNSSEC:Unsigned +Domain Name: SRK.RU.COM +Registry Domain ID: D450826-CNIC +Registrar WHOIS Server: whois.instra.net +Registrar URL: https://instra.com/ +Updated Date: 2021-04-19T15:40:48.0Z +Creation Date: 2006-07-31T10:06:04.0Z +Registry Expiry Date: 2025-07-31T23:59:59.0Z +Registrar: Instra Corporation Pty Ltd +Registrar IANA ID: 1376 +Domain Status: ok https://icann.org/epp#ok +Registrant Email: https://whois.centralnic.com/contact/srk.ru.com/registrant +Admin Email: https://whois.centralnic.com/contact/srk.ru.com/admin +Tech Email: https://whois.centralnic.com/contact/srk.ru.com/tech +Name Server: NS7.ZONEEDIT.COM +Name Server: NS11.ZONEEDIT.COM +DNSSEC: unsigned +Billing Email: https://whois.centralnic.com/contact/srk.ru.com/billing +Registrar Abuse Contact Email: compliance@instra.com +Registrar Abuse Contact Phone: +61.397831800 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-15T16:58:26.0Z <<< -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ +For more information on Whois status codes, please visit https://icann.org/epp +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/sa.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/sa.com/status_available.expected deleted file mode 100644 index 2c3fe7a8..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/sa.com/status_available.expected +++ /dev/null @@ -1,50 +0,0 @@ -#disclaimer - %s == nil - - -#domain - %s == nil - -#domain_id - %s == nil - - -#status - %s == [] - -#available? - %s == true - -#registered? - %s == false - - -#created_on - %s == nil - -#updated_on - %s == nil - -#expires_on - %s == nil - - -#registrar - %s == nil - -#registrant_contacts - %s %CLASS{array} - %s == [] - -#admin_contacts - %s %CLASS{array} - %s == [] - -#technical_contacts - %s %CLASS{array} - %s == [] - - -#nameservers - %s %CLASS{array} - %s == [] diff --git a/spec/fixtures/responses/whois.centralnic.com/sa.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/sa.com/status_available.txt deleted file mode 100644 index 09cc0f7e..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/sa.com/status_available.txt +++ /dev/null @@ -1 +0,0 @@ -DOMAIN NOT FOUND diff --git a/spec/fixtures/responses/whois.centralnic.com/sa.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/sa.com/status_registered.expected deleted file mode 100644 index af495cab..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/sa.com/status_registered.expected +++ /dev/null @@ -1,103 +0,0 @@ -#disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" - - -#domain - %s == "fynbos.sa.com" - -#domain_id - %s == "CNIC-DO501005" - - -#status - %s == ["ok"] - -#available? - %s == false - -#registered? - %s == true - - -#created_on - %s %CLASS{time} - %s %TIME{2007-09-27 18:14:53 UTC} - -#updated_on - %s %CLASS{time} - %s %TIME{2013-11-02 13:42:11 UTC} - -#expires_on - %s %CLASS{time} - %s %TIME{2014-09-27 23:59:59 UTC} - - -#registrar - %s %CLASS{registrar} - %s.id == "C30342" - %s.name == nil - %s.organization == "Paragon Internet Group" - %s.url == "http://www.paragon.net.uk" - -#registrant_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "H323273" - %s[0].name == "Maarten Groos" - %s[0].organization == nil - %s[0].address == "farm 215 fynbos reserve\nPO Box 1314" - %s[0].city == "Gansbaai" - %s[0].zip == "7220" - %s[0].state == "Western Cape" - %s[0].country == nil - %s[0].country_code == "ZA" - %s[0].phone == "+27.283880920" - %s[0].fax == nil - %s[0].email == "maarten@farm215.co.za" - -#admin_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "H323273" - %s[0].name == "Maarten Groos" - %s[0].organization == nil - %s[0].address == "farm 215 fynbos reserve\nPO Box 1314" - %s[0].city == "Gansbaai" - %s[0].zip == "7220" - %s[0].state == "Western Cape" - %s[0].country == nil - %s[0].country_code == "ZA" - %s[0].phone == "+27.283880920" - %s[0].fax == nil - %s[0].email == "maarten@farm215.co.za" - -#technical_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "C30342" - %s[0].name == "Seb de Lemos" - %s[0].organization == "Paragon Internet Group" - %s[0].address == "St Andrew's House\nSt Mary's Walk" - %s[0].city == "Maidenhead" - %s[0].zip == "SL6 1QZ" - %s[0].state == "Berkshire" - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.2031377651" - %s[0].fax == nil - %s[0].email == "domains@paragon.net.uk" - - -#nameservers - %s %CLASS{array} - %s %SIZE{2} - %s[0] %CLASS{nameserver} - %s[0].name == "ns1191.websitewelcome.com" - %s[1] %CLASS{nameserver} - %s[1].name == "ns1192.websitewelcome.com" diff --git a/spec/fixtures/responses/whois.centralnic.com/sa.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/sa.com/status_registered.txt deleted file mode 100644 index 296b6af3..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/sa.com/status_registered.txt +++ /dev/null @@ -1,61 +0,0 @@ -Domain ID:CNIC-DO501005 -Domain Name:FYNBOS.SA.COM -Created On:2007-09-27T18:14:53.0Z -Last Updated On:2013-11-02T13:42:11.0Z -Expiration Date:2014-09-27T23:59:59.0Z -Status:ok -Registrant ID:H323273 -Registrant Name:Maarten Groos -Registrant Street1:farm 215 fynbos reserve -Registrant Street2:PO Box 1314 -Registrant City:Gansbaai -Registrant State/Province:Western Cape -Registrant Postal Code:7220 -Registrant Country:ZA -Registrant Phone:+27.283880920 -Registrant Email:maarten@farm215.co.za -Admin ID:H323273 -Admin Name:Maarten Groos -Admin Street1:farm 215 fynbos reserve -Admin Street2:PO Box 1314 -Admin City:Gansbaai -Admin State/Province:Western Cape -Admin Postal Code:7220 -Admin Country:ZA -Admin Phone:+27.283880920 -Admin Email:maarten@farm215.co.za -Tech ID:C30342 -Tech Name:Seb de Lemos -Tech Organization:Paragon Internet Group -Tech Street1:St Andrew's House -Tech Street2:St Mary's Walk -Tech City:Maidenhead -Tech State/Province:Berkshire -Tech Postal Code:SL6 1QZ -Tech Country:GB -Tech Phone:+44.2031377651 -Tech Email:domains@paragon.net.uk -Sponsoring Registrar ID:C30342 -Sponsoring Registrar Organization:Paragon Internet Group -Sponsoring Registrar Street1:St Andrew's House -Sponsoring Registrar Street2:St Mary's Walk -Sponsoring Registrar City:Maidenhead -Sponsoring Registrar State/Province:Berkshire -Sponsoring Registrar Postal Code:SL6 1QZ -Sponsoring Registrar Country:GB -Sponsoring Registrar Phone:020 3137 7651 -Sponsoring Registrar Website:http://www.paragon.net.uk -Name Server:NS1191.WEBSITEWELCOME.COM -Name Server:NS1192.WEBSITEWELCOME.COM -DNSSEC:Unsigned - -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - diff --git a/spec/fixtures/responses/whois.centralnic.com/se.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/se.com/status_available.expected deleted file mode 100644 index 2c3fe7a8..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/se.com/status_available.expected +++ /dev/null @@ -1,50 +0,0 @@ -#disclaimer - %s == nil - - -#domain - %s == nil - -#domain_id - %s == nil - - -#status - %s == [] - -#available? - %s == true - -#registered? - %s == false - - -#created_on - %s == nil - -#updated_on - %s == nil - -#expires_on - %s == nil - - -#registrar - %s == nil - -#registrant_contacts - %s %CLASS{array} - %s == [] - -#admin_contacts - %s %CLASS{array} - %s == [] - -#technical_contacts - %s %CLASS{array} - %s == [] - - -#nameservers - %s %CLASS{array} - %s == [] diff --git a/spec/fixtures/responses/whois.centralnic.com/se.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/se.com/status_available.txt deleted file mode 100644 index 09cc0f7e..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/se.com/status_available.txt +++ /dev/null @@ -1 +0,0 @@ -DOMAIN NOT FOUND diff --git a/spec/fixtures/responses/whois.centralnic.com/se.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/se.com/status_registered.expected deleted file mode 100644 index fe401d13..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/se.com/status_registered.expected +++ /dev/null @@ -1,111 +0,0 @@ -#disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" - - -#domain - %s == "hotel.se.com" - -#domain_id - %s == "CNIC-DO561053" - - -#status - %s == ["ok"] - -#available? - %s == false - -#registered? - %s == true - - -#created_on - %s %CLASS{time} - %s %TIME{2008-05-10 05:17:32 UTC} - -#updated_on - %s %CLASS{time} - %s %TIME{2013-06-03 10:33:46 UTC} - -#expires_on - %s %CLASS{time} - %s %TIME{2014-05-10 23:59:59 UTC} - - -#registrar - %s %CLASS{registrar} - %s.id == "7145-IX" - %s.name == nil - %s.organization == "InternetX GmbH" - %s.url == "http://www.internetx.de/" - -#registrant_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "INX-10599082com" - %s[0].name == "Hotel Reservation Service Robert Ragge GmbH" - %s[0].organization == "Hotel Reservation Service Robert Ragge GmbH" - %s[0].address == "Blaubach 32" - %s[0].city == "Koeln" - %s[0].zip == "50676" - %s[0].state == "NRW" - %s[0].country == nil - %s[0].country_code == "DE" - %s[0].phone == "+49.2212077222" - %s[0].fax == "+49.2212077394" - %s[0].email == "domains@hrs.de" - -#admin_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "INX-201727com" - %s[0].name == "Robert Ragge" - %s[0].organization == "Hotel Reservation Service Robert Ragge GmbH" - %s[0].address == "Blaubach 32" - %s[0].city == "Koeln" - %s[0].zip == "50676" - %s[0].state == "DE" - %s[0].country == nil - %s[0].country_code == "DE" - %s[0].phone == "+49.2212077222" - %s[0].fax == "+49.2212077394" - %s[0].email == "domains@hrs.de" - -#technical_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "INX-201728com" - %s[0].name == "Uwe Watzek" - %s[0].organization == "Wind Internethaus GmbH" - %s[0].address == "Am Krebsgraben 15\nHaus 2" - %s[0].city == "Villingen-Schwenningen" - %s[0].zip == "78048" - %s[0].state == "Baden-Wuerttemberg" - %s[0].country == nil - %s[0].country_code == "DE" - %s[0].phone == "+49.77214070740" - %s[0].fax == "+49.77214070741" - %s[0].email == "info@windinternethaus.de" - - -#nameservers - %s %CLASS{array} - %s %SIZE{3} - %s[0] %CLASS{nameserver} - %s[0].name == "ns1.hrs.de" - %s[0].ipv4 == nil - %s[0].ipv6 == nil - %s[1] %CLASS{nameserver} - %s[1].name == "ns2.hrs.de" - %s[1].ipv4 == nil - %s[1].ipv6 == nil - %s[2] %CLASS{nameserver} - %s[2].name == "ns2.surfbrett.de" - %s[2].ipv4 == nil - %s[2].ipv6 == nil diff --git a/spec/fixtures/responses/whois.centralnic.com/se.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/se.com/status_registered.txt deleted file mode 100644 index 3fb163bb..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/se.com/status_registered.txt +++ /dev/null @@ -1,75 +0,0 @@ -Domain ID:CNIC-DO561053 -Domain Name:HOTEL.SE.COM -Created On:2008-05-10T05:17:32.0Z -Last Updated On:2013-06-03T10:33:46.0Z -Expiration Date:2014-05-10T23:59:59.0Z -Status:ok -Registrant ID:INX-10599082com -Registrant Name:Hotel Reservation Service Robert Ragge GmbH -Registrant Organization:Hotel Reservation Service Robert Ragge GmbH -Registrant Street1:Blaubach 32 -Registrant City:Koeln -Registrant State/Province:NRW -Registrant Postal Code:50676 -Registrant Country:DE -Registrant Phone:+49.2212077222 -Registrant FAX:+49.2212077394 -Registrant Email:domains@hrs.de -Admin ID:INX-201727com -Admin Name:Robert Ragge -Admin Organization:Hotel Reservation Service Robert Ragge GmbH -Admin Street1:Blaubach 32 -Admin City:Koeln -Admin State/Province:DE -Admin Postal Code:50676 -Admin Country:DE -Admin Phone:+49.2212077222 -Admin FAX:+49.2212077394 -Admin Email:domains@hrs.de -Tech ID:INX-201728com -Tech Name:Uwe Watzek -Tech Organization:Wind Internethaus GmbH -Tech Street1:Am Krebsgraben 15 -Tech Street2:Haus 2 -Tech City:Villingen-Schwenningen -Tech State/Province:Baden-Wuerttemberg -Tech Postal Code:78048 -Tech Country:DE -Tech Phone:+49.77214070740 -Tech FAX:+49.77214070741 -Tech Email:info@windinternethaus.de -Billing ID:INX-10599082com -Billing Name:Hotel Reservation Service Robert Ragge GmbH -Billing Organization:Hotel Reservation Service Robert Ragge GmbH -Billing Street1:Blaubach 32 -Billing City:Koeln -Billing State/Province:NRW -Billing Postal Code:50676 -Billing Country:DE -Billing Phone:+49.2212077222 -Billing FAX:+49.2212077394 -Billing Email:domains@hrs.de -Sponsoring Registrar ID:7145-IX -Sponsoring Registrar Organization:InternetX GmbH -Sponsoring Registrar Street1:Maximilianstr. 6 -Sponsoring Registrar City:Regensburg -Sponsoring Registrar Postal Code:93047 -Sponsoring Registrar Country:DE -Sponsoring Registrar Phone:+49-941-595590 -Sponsoring Registrar FAX:+49-941-59579054 -Sponsoring Registrar Website:http://www.internetx.de/ -Name Server:NS1.HRS.DE -Name Server:NS2.HRS.DE -Name Server:NS2.SURFBRETT.DE -DNSSEC:Unsigned - -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - diff --git a/spec/fixtures/responses/whois.centralnic.com/se.net/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/se.net/status_available.expected deleted file mode 100644 index 2c3fe7a8..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/se.net/status_available.expected +++ /dev/null @@ -1,50 +0,0 @@ -#disclaimer - %s == nil - - -#domain - %s == nil - -#domain_id - %s == nil - - -#status - %s == [] - -#available? - %s == true - -#registered? - %s == false - - -#created_on - %s == nil - -#updated_on - %s == nil - -#expires_on - %s == nil - - -#registrar - %s == nil - -#registrant_contacts - %s %CLASS{array} - %s == [] - -#admin_contacts - %s %CLASS{array} - %s == [] - -#technical_contacts - %s %CLASS{array} - %s == [] - - -#nameservers - %s %CLASS{array} - %s == [] diff --git a/spec/fixtures/responses/whois.centralnic.com/se.net/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/se.net/status_available.txt deleted file mode 100644 index 09cc0f7e..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/se.net/status_available.txt +++ /dev/null @@ -1 +0,0 @@ -DOMAIN NOT FOUND diff --git a/spec/fixtures/responses/whois.centralnic.com/se.net/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/se.net/status_registered.expected deleted file mode 100644 index bcdd13b9..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/se.net/status_registered.expected +++ /dev/null @@ -1,113 +0,0 @@ -#disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" - - -#domain - %s == "hotel.se.net" - -#domain_id - %s == "CNIC-DO1617446" - - -#status - %s == ["ok"] - -#available? - %s == false - -#registered? - %s == true - - -#created_on - %s %CLASS{time} - %s %TIME{2013-11-13 10:35:03 UTC} - -#updated_on - %s %CLASS{time} - %s %TIME{2013-11-28 11:49:39 UTC} - -#expires_on - %s %CLASS{time} - %s %TIME{2014-11-13 23:59:59 UTC} - - -#registrar - %s %CLASS{registrar} - %s.id == "H2307235" - %s.name == nil - %s.organization == "Soluciones Corporativas IP, S.L.U." - %s.url == "www.scip.es" - -#registrant_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "scipr000323588" - %s[0].name == "Christoph Donath" - %s[0].organization == "Christoph Donath" - %s[0].address == "C. Tijarafe 24, 2c" - %s[0].city == "Cruce de Arinaga" - %s[0].zip == "35118" - %s[0].state == "Palmas (Las)" - %s[0].country == nil - %s[0].country_code == "ES" - %s[0].phone == "+34.667889082" - %s[0].fax == nil - %s[0].email == "info@christophdonath.com" - %s[0].created_on == nil - %s[0].updated_on == nil - -#admin_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "scipa000323588" - %s[0].name == "Christoph Donath" - %s[0].organization == "Christoph Donath" - %s[0].address == "C. Tijarafe 24, 2c" - %s[0].city == "Cruce de Arinaga" - %s[0].zip == "35118" - %s[0].state == "Palmas (Las)" - %s[0].country == nil - %s[0].country_code == "ES" - %s[0].phone == "+34.667889082" - %s[0].fax == nil - %s[0].email == "info@christophdonath.com" - %s[0].created_on == nil - %s[0].updated_on == nil - -#technical_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "scipt000323588" - %s[0].name == "Christoph Donath" - %s[0].organization == "Christoph Donath" - %s[0].address == "C. Tijarafe 24, 2c" - %s[0].city == "Cruce de Arinaga" - %s[0].zip == "35118" - %s[0].state == "Palmas (Las)" - %s[0].country == nil - %s[0].country_code == "ES" - %s[0].phone == "+34.667889082" - %s[0].fax == nil - %s[0].email == "info@christophdonath.com" - %s[0].created_on == nil - %s[0].updated_on == nil - - -#nameservers - %s %CLASS{array} - %s %SIZE{2} - %s[0] %CLASS{nameserver} - %s[0].name == "ns8261.hostgator.com" - %s[0].ipv4 == nil - %s[0].ipv6 == nil - %s[1] %CLASS{nameserver} - %s[1].name == "ns8262.hostgator.com" - %s[1].ipv4 == nil - %s[1].ipv6 == nil diff --git a/spec/fixtures/responses/whois.centralnic.com/se.net/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/se.net/status_registered.txt deleted file mode 100644 index d21f8dea..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/se.net/status_registered.txt +++ /dev/null @@ -1,71 +0,0 @@ -Domain ID:CNIC-DO1617446 -Domain Name:HOTEL.SE.NET -Created On:2013-11-13T10:35:03.0Z -Last Updated On:2013-11-28T11:49:39.0Z -Expiration Date:2014-11-13T23:59:59.0Z -Status:ok -Registrant ID:scipr000323588 -Registrant Name:Christoph Donath -Registrant Organization:Christoph Donath -Registrant Street1:C. Tijarafe 24, 2c -Registrant City:Cruce de Arinaga -Registrant State/Province:Palmas (Las) -Registrant Postal Code:35118 -Registrant Country:ES -Registrant Phone:+34.667889082 -Registrant Email:info@christophdonath.com -Admin ID:scipa000323588 -Admin Name:Christoph Donath -Admin Organization:Christoph Donath -Admin Street1:C. Tijarafe 24, 2c -Admin City:Cruce de Arinaga -Admin State/Province:Palmas (Las) -Admin Postal Code:35118 -Admin Country:ES -Admin Phone:+34.667889082 -Admin Email:info@christophdonath.com -Tech ID:scipt000323588 -Tech Name:Christoph Donath -Tech Organization:Christoph Donath -Tech Street1:C. Tijarafe 24, 2c -Tech City:Cruce de Arinaga -Tech State/Province:Palmas (Las) -Tech Postal Code:35118 -Tech Country:ES -Tech Phone:+34.667889082 -Tech Email:info@christophdonath.com -Billing ID:scipb000323588 -Billing Name:Christoph Donath -Billing Organization:Christoph Donath -Billing Street1:C. Tijarafe 24, 2c -Billing City:Cruce de Arinaga -Billing State/Province:Palmas (Las) -Billing Postal Code:35118 -Billing Country:ES -Billing Phone:+34.667889082 -Billing Email:info@christophdonath.com -Sponsoring Registrar ID:H2307235 -Sponsoring Registrar IANA ID:1383 -Sponsoring Registrar Organization:Soluciones Corporativas IP, S.L.U. -Sponsoring Registrar Street1:C/ Ses Parres esq. Brunete, 21 1º -Sponsoring Registrar City:Manacor -Sponsoring Registrar State/Province:Illes Balears -Sponsoring Registrar Postal Code:07500 -Sponsoring Registrar Country:ES -Sponsoring Registrar Phone:+34.871986600 -Sponsoring Registrar FAX:+34.871986601 -Sponsoring Registrar Website:www.scip.es -Name Server:NS8261.HOSTGATOR.COM -Name Server:NS8262.HOSTGATOR.COM -DNSSEC:Unsigned - -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - diff --git a/spec/fixtures/responses/whois.centralnic.com/uk.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/uk.com/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.centralnic.com/uk.com/status_available.expected +++ b/spec/fixtures/responses/whois.centralnic.com/uk.com/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.centralnic.com/uk.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/uk.com/status_available.txt index 09cc0f7e..d9fc564f 100644 --- a/spec/fixtures/responses/whois.centralnic.com/uk.com/status_available.txt +++ b/spec/fixtures/responses/whois.centralnic.com/uk.com/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-15T17:03:44.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/uk.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/uk.com/status_registered.expected index a8f0dbe6..e198201e 100644 --- a/spec/fixtures/responses/whois.centralnic.com/uk.com/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/uk.com/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain %s == "history.uk.com" #domain_id - %s == "CNIC-DO86293" + %s == "D64550744-CNIC" #status - %s == ["ok"] + %s == :registered #available? %s == false @@ -21,87 +21,49 @@ #created_on %s %CLASS{time} - %s %TIME{2001-08-31 11:50:57 UTC} + %s %TIME{2018-03-27 13:46:06 UTC} #updated_on %s %CLASS{time} - %s %TIME{2013-09-03 10:36:47 UTC} + %s %TIME{2021-06-29 01:17:20 UTC} #expires_on %s %CLASS{time} - %s %TIME{2015-08-31 23:59:59 UTC} + %s %TIME{2022-03-27 23:59:59 UTC} #registrar %s %CLASS{registrar} - %s.id == "H78362" - %s.name == nil - %s.organization == "E-VELOCITY LTD" - %s.url == "http://www.e-velocity.co.uk/" + %s.id == "1861" + %s.name == "Porkbun, LLC" + %s.url == "https://porkbun.com/" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "H1045821" - %s[0].name == "Mr. Ray Hatley" - %s[0].organization == nil - %s[0].address == "Tallow House\n65-66 Lower Galdeford" - %s[0].city == "Ludlow" - %s[0].zip == "SY8 1RU" - %s[0].state == "Shropshire" - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.1584873633" - %s[0].fax == nil - %s[0].email == "ray@hatley.co.uk" + %s[0].email == "https://whois.centralnic.com/contact/history.uk.com/registrant" #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "H305798" - %s[0].name == "Mr. Ray Hatley" - %s[0].organization == nil - %s[0].address == "Tallow House\n65-66 Lower Galdeford" - %s[0].city == "Ludlow" - %s[0].zip == "SY8 1RU" - %s[0].state == "Shropshire" - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.1584873633" - %s[0].fax == nil - %s[0].email == "ray@hatley.co.uk" + %s[0].email == "https://whois.centralnic.com/contact/history.uk.com/admin" #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "H78362" - %s[0].name == "Mr Simon Williams" - %s[0].organization == "E-VELOCITY LTD" - %s[0].address == "P.O Box 3295\nBrighton" - %s[0].city == nil - %s[0].zip == "BN50 9EY" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.1273684969" - %s[0].fax == nil - %s[0].email == "simon@e-velocity.co.uk" + %s[0].email == "https://whois.centralnic.com/contact/history.uk.com/tech" #nameservers %s %CLASS{array} %s %SIZE{2} %s[0] %CLASS{nameserver} - %s[0].name == "ns37.eukdns.com" - %s[0].ipv4 == nil - %s[0].ipv6 == nil + %s[0].name == "ns15.stlbg.net" %s[1] %CLASS{nameserver} - %s[1].name == "ns38.eukdns.com" - %s[1].ipv4 == nil - %s[1].ipv6 == nil + %s[1].name == "ns16.stlbg.net" diff --git a/spec/fixtures/responses/whois.centralnic.com/uk.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/uk.com/status_registered.txt index d26fbf34..4e412547 100644 --- a/spec/fixtures/responses/whois.centralnic.com/uk.com/status_registered.txt +++ b/spec/fixtures/responses/whois.centralnic.com/uk.com/status_registered.txt @@ -1,57 +1,40 @@ -Domain ID:CNIC-DO86293 -Domain Name:HISTORY.UK.COM -Created On:2001-08-31T11:50:57.0Z -Last Updated On:2013-09-03T10:36:47.0Z -Expiration Date:2015-08-31T23:59:59.0Z -Status:ok -Registrant ID:H1045821 -Registrant Name:Mr. Ray Hatley -Registrant Street1:Tallow House -Registrant Street2:65-66 Lower Galdeford -Registrant City:Ludlow -Registrant State/Province:Shropshire -Registrant Postal Code:SY8 1RU -Registrant Country:GB -Registrant Phone:+44.1584873633 -Registrant Email:ray@hatley.co.uk -Admin ID:H305798 -Admin Name:Mr. Ray Hatley -Admin Street1:Tallow House -Admin Street2:65-66 Lower Galdeford -Admin City:Ludlow -Admin State/Province:Shropshire -Admin Postal Code:SY8 1RU -Admin Country:GB -Admin Phone:+44.1584873633 -Admin Email:ray@hatley.co.uk -Tech ID:H78362 -Tech Name:Mr Simon Williams -Tech Organization:E-VELOCITY LTD -Tech Street1:P.O Box 3295 -Tech Street2:Brighton -Tech Postal Code:BN50 9EY -Tech Country:GB -Tech Phone:+44.1273684969 -Tech Email:simon@e-velocity.co.uk -Sponsoring Registrar ID:H78362 -Sponsoring Registrar Organization:E-VELOCITY LTD -Sponsoring Registrar Street1:P.O Box 3295 -Sponsoring Registrar Street2:Brighton -Sponsoring Registrar Postal Code:BN50 9EY -Sponsoring Registrar Country:GB -Sponsoring Registrar Phone:01273 684969 -Sponsoring Registrar Website:http://www.e-velocity.co.uk/ -Name Server:NS37.EUKDNS.COM -Name Server:NS38.EUKDNS.COM -DNSSEC:Unsigned +Domain Name: HISTORY.UK.COM +Registry Domain ID: D64550744-CNIC +Registrar WHOIS Server: whois.porkbun.com +Registrar URL: https://porkbun.com/ +Updated Date: 2021-06-29T01:17:20.0Z +Creation Date: 2018-03-27T13:46:06.0Z +Registry Expiry Date: 2022-03-27T23:59:59.0Z +Registrar: Porkbun, LLC +Registrar IANA ID: 1861 +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Registrant Email: https://whois.centralnic.com/contact/history.uk.com/registrant +Admin Email: https://whois.centralnic.com/contact/history.uk.com/admin +Tech Email: https://whois.centralnic.com/contact/history.uk.com/tech +Name Server: NS15.STLBG.NET +Name Server: NS16.STLBG.NET +DNSSEC: unsigned +Billing Email: https://whois.centralnic.com/contact/history.uk.com/billing +Registrar Abuse Contact Email: abuse@porkbun.com +Registrar Abuse Contact Phone: +1.5038508351 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-15T17:03:35.0Z <<< -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ +For more information on Whois status codes, please visit https://icann.org/epp +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/uk.net/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/uk.net/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.centralnic.com/uk.net/status_available.expected +++ b/spec/fixtures/responses/whois.centralnic.com/uk.net/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.centralnic.com/uk.net/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/uk.net/status_available.txt index 09cc0f7e..29754cfd 100644 --- a/spec/fixtures/responses/whois.centralnic.com/uk.net/status_available.txt +++ b/spec/fixtures/responses/whois.centralnic.com/uk.net/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-15T17:13:52.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/uk.net/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/uk.net/status_registered.expected index 27ab1ad1..cc4b1d59 100644 --- a/spec/fixtures/responses/whois.centralnic.com/uk.net/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/uk.net/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain %s == "paramount.uk.net" #domain_id - %s == "CNIC-DO393884" + %s == "D123061216-CNIC" #status - %s == ["ok"] + %s == :registered #available? %s == false @@ -21,87 +21,49 @@ #created_on %s %CLASS{time} - %s %TIME{2006-02-28 12:17:01 UTC} + %s %TIME{2019-09-03 15:47:37 UTC} #updated_on %s %CLASS{time} - %s %TIME{2013-04-03 12:59:45 UTC} + %s %TIME{2021-08-12 04:46:26 UTC} #expires_on %s %CLASS{time} - %s %TIME{2014-02-28 23:59:59 UTC} + %s %TIME{2022-09-03 23:59:59 UTC} #registrar %s %CLASS{registrar} - %s.id == "I6467" - %s.name == nil - %s.organization == "Webfusion" - %s.url == "http://www.123-reg.co.uk/domain-names/" + %s.id == "1564" + %s.name == "TLD Registrar Solutions Ltd" + %s.url == "http://www.tldregistrarsolutions.com" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "MNT60424953041" - %s[0].name == "Identity Protection Service" - %s[0].organization == "Identity Protect Limited" - %s[0].address == "PO Box 795" - %s[0].city == "Godalming" - %s[0].zip == "GU7 9GA" - %s[0].state == "Surrey" - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.1483307527" - %s[0].fax == "+44.1483304031" - %s[0].email == "paramount.uk.net@identity-protect.org" + %s[0].email == "https://whois.centralnic.com/contact/paramount.uk.net/registrant" #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "MNT60424953041" - %s[0].name == "Identity Protection Service" - %s[0].organization == "Identity Protect Limited" - %s[0].address == "PO Box 795" - %s[0].city == "Godalming" - %s[0].zip == "GU7 9GA" - %s[0].state == "Surrey" - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.1483307527" - %s[0].fax == "+44.1483304031" - %s[0].email == "paramount.uk.net@identity-protect.org" + %s[0].email == "https://whois.centralnic.com/contact/paramount.uk.net/admin" #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "MNT60424953041" - %s[0].name == "Identity Protection Service" - %s[0].organization == "Identity Protect Limited" - %s[0].address == "PO Box 795" - %s[0].city == "Godalming" - %s[0].zip == "GU7 9GA" - %s[0].state == "Surrey" - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.1483307527" - %s[0].fax == "+44.1483304031" - %s[0].email == "paramount.uk.net@identity-protect.org" + %s[0].email == "https://whois.centralnic.com/contact/paramount.uk.net/tech" #nameservers %s %CLASS{array} %s %SIZE{2} %s[0] %CLASS{nameserver} - %s[0].name == "ns1.myhostcp.com" - %s[0].ipv4 == nil - %s[0].ipv6 == nil + %s[0].name == "ns1.gsgp1001.siteground.asia" %s[1] %CLASS{nameserver} - %s[1].name == "ns2.myhostcp.com" - %s[1].ipv4 == nil - %s[1].ipv6 == nil + %s[1].name == "ns2.gsgp1001.siteground.asia" diff --git a/spec/fixtures/responses/whois.centralnic.com/uk.net/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/uk.net/status_registered.txt index 5f246e70..6e56d80b 100644 --- a/spec/fixtures/responses/whois.centralnic.com/uk.net/status_registered.txt +++ b/spec/fixtures/responses/whois.centralnic.com/uk.net/status_registered.txt @@ -1,76 +1,39 @@ -Domain ID:CNIC-DO393884 -Domain Name:PARAMOUNT.UK.NET -Created On:2006-02-28T12:17:01.0Z -Last Updated On:2013-04-03T12:59:45.0Z -Expiration Date:2014-02-28T23:59:59.0Z -Status:ok -Registrant ID:MNT60424953041 -Registrant Name:Identity Protection Service -Registrant Organization:Identity Protect Limited -Registrant Street1:PO Box 795 -Registrant City:Godalming -Registrant State/Province:Surrey -Registrant Postal Code:GU7 9GA -Registrant Country:GB -Registrant Phone:+44.1483307527 -Registrant FAX:+44.1483304031 -Registrant Email:paramount.uk.net@identity-protect.org -Admin ID:MNT60424953041 -Admin Name:Identity Protection Service -Admin Organization:Identity Protect Limited -Admin Street1:PO Box 795 -Admin City:Godalming -Admin State/Province:Surrey -Admin Postal Code:GU7 9GA -Admin Country:GB -Admin Phone:+44.1483307527 -Admin FAX:+44.1483304031 -Admin Email:paramount.uk.net@identity-protect.org -Tech ID:MNT60424953041 -Tech Name:Identity Protection Service -Tech Organization:Identity Protect Limited -Tech Street1:PO Box 795 -Tech City:Godalming -Tech State/Province:Surrey -Tech Postal Code:GU7 9GA -Tech Country:GB -Tech Phone:+44.1483307527 -Tech FAX:+44.1483304031 -Tech Email:paramount.uk.net@identity-protect.org -Billing ID:MNT60424953041 -Billing Name:Identity Protection Service -Billing Organization:Identity Protect Limited -Billing Street1:PO Box 795 -Billing City:Godalming -Billing State/Province:Surrey -Billing Postal Code:GU7 9GA -Billing Country:GB -Billing Phone:+44.1483307527 -Billing FAX:+44.1483304031 -Billing Email:paramount.uk.net@identity-protect.org -Sponsoring Registrar ID:I6467 -Sponsoring Registrar IANA ID:1515 -Sponsoring Registrar Organization:Webfusion -Sponsoring Registrar Street1:5 Roundwood Avenue -Sponsoring Registrar Street2:Stockley Park -Sponsoring Registrar City:Uxbridge -Sponsoring Registrar State/Province:Middlesex -Sponsoring Registrar Postal Code:UB11 1FF -Sponsoring Registrar Country:GB -Sponsoring Registrar Phone:0845 859 0018 -Sponsoring Registrar FAX:08701 650437 -Sponsoring Registrar Website:http://www.123-reg.co.uk/domain-names/ -Name Server:NS1.MYHOSTCP.COM -Name Server:NS2.MYHOSTCP.COM -DNSSEC:Unsigned +Domain Name: PARAMOUNT.UK.NET +Registry Domain ID: D123061216-CNIC +Registrar WHOIS Server: whois.tldregistrarsolutions.com +Registrar URL: http://www.tldregistrarsolutions.com +Updated Date: 2021-08-12T04:46:26.0Z +Creation Date: 2019-09-03T15:47:37.0Z +Registry Expiry Date: 2022-09-03T23:59:59.0Z +Registrar: TLD Registrar Solutions Ltd +Registrar IANA ID: 1564 +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Registrant Email: https://whois.centralnic.com/contact/paramount.uk.net/registrant +Admin Email: https://whois.centralnic.com/contact/paramount.uk.net/admin +Tech Email: https://whois.centralnic.com/contact/paramount.uk.net/tech +Name Server: NS1.GSGP1001.SITEGROUND.ASIA +Name Server: NS2.GSGP1001.SITEGROUND.ASIA +DNSSEC: unsigned +Billing Email: https://whois.centralnic.com/contact/paramount.uk.net/billing +Registrar Abuse Contact Email: abuse@tldregistrarsolutions.com +Registrar Abuse Contact Phone: +1.5167401179 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-15T17:11:16.0Z <<< -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ +For more information on Whois status codes, please visit https://icann.org/epp +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/us.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/us.com/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.centralnic.com/us.com/status_available.expected +++ b/spec/fixtures/responses/whois.centralnic.com/us.com/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.centralnic.com/us.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/us.com/status_available.txt index 09cc0f7e..88a130e8 100644 --- a/spec/fixtures/responses/whois.centralnic.com/us.com/status_available.txt +++ b/spec/fixtures/responses/whois.centralnic.com/us.com/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-15T17:18:01.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/us.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/us.com/status_registered.expected index 6da8d515..d6c78711 100644 --- a/spec/fixtures/responses/whois.centralnic.com/us.com/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/us.com/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain %s == "college.us.com" #domain_id - %s == "CNIC-DO275307" + %s == "D189945299-CNIC" #status - %s == ["ok"] + %s == :registered #available? %s == false @@ -21,91 +21,48 @@ #created_on %s %CLASS{time} - %s %TIME{2003-10-20 10:03:28 UTC} + %s %TIME{2020-06-17 23:31:11 UTC} #updated_on %s %CLASS{time} - %s %TIME{2012-01-16 16:27:26 UTC} + %s %TIME{2021-07-27 13:34:05 UTC} #expires_on %s %CLASS{time} - %s %TIME{2014-10-20 23:59:59 UTC} + %s %TIME{2022-06-17 23:59:59 UTC} #registrar - %s == nil + %s %CLASS{registrar} + %s.id == "1564" + %s.name == "TLD Registrar Solutions Ltd" + %s.url == "http://www.tldregistrarsolutions.com" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "H1044037" - %s[0].name == "Vantage Media Corporation" - %s[0].organization == nil - %s[0].address == "2101 Rosecrans Ave.\nSuite 2000" - %s[0].city == nil - %s[0].zip == "90245" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.3102196200" - %s[0].fax == "+1.8665897214" - %s[0].email == "domainadmin@vantagemedia.com" + %s[0].email == "https://whois.centralnic.com/contact/college.us.com/registrant" #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "H143205" - %s[0].name == "Domain Administrator" - %s[0].organization == "Vantage Media LLC" - %s[0].address == "2101 Rosecrans Ave.\nSuite 2000" - %s[0].city == nil - %s[0].zip == "90245" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.3102196200" - %s[0].fax == "+1.8665897214" - %s[0].email == "domainadmin@vantagemedia.com" + %s[0].email == "https://whois.centralnic.com/contact/college.us.com/admin" #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "H143205" - %s[0].name == "Domain Administrator" - %s[0].organization == "Vantage Media LLC" - %s[0].address == "2101 Rosecrans Ave.\nSuite 2000" - %s[0].city == nil - %s[0].zip == "90245" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.3102196200" - %s[0].fax == "+1.8665897214" - %s[0].email == "domainadmin@vantagemedia.com" - + %s[0].email == "https://whois.centralnic.com/contact/college.us.com/tech" #nameservers %s %CLASS{array} - %s %SIZE{4} + %s %SIZE{2} %s[0] %CLASS{nameserver} - %s[0].name == "ns1.p17.dynect.net" - %s[0].ipv4 == nil - %s[0].ipv6 == nil + %s[0].name == "elinore.ns.cloudflare.com" %s[1] %CLASS{nameserver} - %s[1].name == "ns2.p17.dynect.net" - %s[1].ipv4 == nil - %s[1].ipv6 == nil - %s[2] %CLASS{nameserver} - %s[2].name == "ns3.p17.dynect.net" - %s[2].ipv4 == nil - %s[2].ipv6 == nil - %s[3] %CLASS{nameserver} - %s[3].name == "ns4.p17.dynect.net" - %s[3].ipv4 == nil - %s[3].ipv6 == nil + %s[1].name == "frank.ns.cloudflare.com" diff --git a/spec/fixtures/responses/whois.centralnic.com/us.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/us.com/status_registered.txt index 87e65356..a1f6a83c 100644 --- a/spec/fixtures/responses/whois.centralnic.com/us.com/status_registered.txt +++ b/spec/fixtures/responses/whois.centralnic.com/us.com/status_registered.txt @@ -1,61 +1,39 @@ -Domain ID:CNIC-DO275307 -Domain Name:COLLEGE.US.COM -Created On:2003-10-20T10:03:28.0Z -Last Updated On:2012-01-16T16:27:26.0Z -Expiration Date:2014-10-20T23:59:59.0Z -Status:ok -Registrant ID:H1044037 -Registrant Name:Vantage Media Corporation -Registrant Street1:2101 Rosecrans Ave. -Registrant Street2:Suite 2000 -Registrant Postal Code:90245 -Registrant Country:US -Registrant Phone:+1.3102196200 -Registrant FAX:+1.8665897214 -Registrant Email:domainadmin@vantagemedia.com -Admin ID:H143205 -Admin Name:Domain Administrator -Admin Organization:Vantage Media LLC -Admin Street1:2101 Rosecrans Ave. -Admin Street2:Suite 2000 -Admin Postal Code:90245 -Admin Country:US -Admin Phone:+1.3102196200 -Admin FAX:+1.8665897214 -Admin Email:domainadmin@vantagemedia.com -Tech ID:H143205 -Tech Name:Domain Administrator -Tech Organization:Vantage Media LLC -Tech Street1:2101 Rosecrans Ave. -Tech Street2:Suite 2000 -Tech Postal Code:90245 -Tech Country:US -Tech Phone:+1.3102196200 -Tech FAX:+1.8665897214 -Tech Email:domainadmin@vantagemedia.com -Billing ID:H143205 -Billing Name:Domain Administrator -Billing Organization:Vantage Media LLC -Billing Street1:2101 Rosecrans Ave. -Billing Street2:Suite 2000 -Billing Postal Code:90245 -Billing Country:US -Billing Phone:+1.3102196200 -Billing FAX:+1.8665897214 -Billing Email:domainadmin@vantagemedia.com -Name Server:NS1.P17.DYNECT.NET -Name Server:NS2.P17.DYNECT.NET -Name Server:NS3.P17.DYNECT.NET -Name Server:NS4.P17.DYNECT.NET -DNSSEC:Unsigned +Domain Name: COLLEGE.US.COM +Registry Domain ID: D189945299-CNIC +Registrar WHOIS Server: whois.tldregistrarsolutions.com +Registrar URL: http://www.tldregistrarsolutions.com +Updated Date: 2021-07-27T13:34:05.0Z +Creation Date: 2020-06-17T23:31:11.0Z +Registry Expiry Date: 2022-06-17T23:59:59.0Z +Registrar: TLD Registrar Solutions Ltd +Registrar IANA ID: 1564 +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Registrant Email: https://whois.centralnic.com/contact/college.us.com/registrant +Admin Email: https://whois.centralnic.com/contact/college.us.com/admin +Tech Email: https://whois.centralnic.com/contact/college.us.com/tech +Name Server: ELINORE.NS.CLOUDFLARE.COM +Name Server: FRANK.NS.CLOUDFLARE.COM +DNSSEC: unsigned +Billing Email: https://whois.centralnic.com/contact/college.us.com/billing +Registrar Abuse Contact Email: abuse@tldregistrarsolutions.com +Registrar Abuse Contact Phone: +1.5167401179 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-15T17:17:58.0Z <<< -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ +For more information on Whois status codes, please visit https://icann.org/epp +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/us.org/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/us.org/status_available.expected deleted file mode 100644 index 2c3fe7a8..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/us.org/status_available.expected +++ /dev/null @@ -1,50 +0,0 @@ -#disclaimer - %s == nil - - -#domain - %s == nil - -#domain_id - %s == nil - - -#status - %s == [] - -#available? - %s == true - -#registered? - %s == false - - -#created_on - %s == nil - -#updated_on - %s == nil - -#expires_on - %s == nil - - -#registrar - %s == nil - -#registrant_contacts - %s %CLASS{array} - %s == [] - -#admin_contacts - %s %CLASS{array} - %s == [] - -#technical_contacts - %s %CLASS{array} - %s == [] - - -#nameservers - %s %CLASS{array} - %s == [] diff --git a/spec/fixtures/responses/whois.centralnic.com/us.org/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/us.org/status_available.txt deleted file mode 100644 index 09cc0f7e..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/us.org/status_available.txt +++ /dev/null @@ -1 +0,0 @@ -DOMAIN NOT FOUND diff --git a/spec/fixtures/responses/whois.centralnic.com/uy.com/property_contacts_omitted.txt b/spec/fixtures/responses/whois.centralnic.com/uy.com/property_contacts_omitted.txt deleted file mode 100644 index 224a5bc2..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/uy.com/property_contacts_omitted.txt +++ /dev/null @@ -1,32 +0,0 @@ -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - -Domain ID:CNIC-DO705337 -Domain Name:BINGO.UY.COM -Created On:02-Aug-2010 09:47:07 UTC -Last Updated On:03-Aug-2011 00:15:14 UTC -Expiration Date:02-Aug-2012 23:59:59 UTC -Status:OK -Registrant ID:H122681 -Admin ID:H122681 -Tech ID:H122681 -Billing ID:H122681 -Sponsoring Registrar ID:H122681 -Sponsoring Registrar Organization:Domain Exploitation International -Sponsoring Registrar City:Santa Monica -Sponsoring Registrar State/Province:CA -Sponsoring Registrar Postal Code:90401 -Sponsoring Registrar Country:US -Sponsoring Registrar Phone: -Name Server:NS2.DOMAIN-EXPLOITATION.US.COM -Name Server:NS1.DOMAIN-EXPLOITATION.US.COM -DNSSEC:Unsigned - - diff --git a/spec/fixtures/responses/whois.centralnic.com/uy.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/uy.com/status_available.expected deleted file mode 100644 index 2c3fe7a8..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/uy.com/status_available.expected +++ /dev/null @@ -1,50 +0,0 @@ -#disclaimer - %s == nil - - -#domain - %s == nil - -#domain_id - %s == nil - - -#status - %s == [] - -#available? - %s == true - -#registered? - %s == false - - -#created_on - %s == nil - -#updated_on - %s == nil - -#expires_on - %s == nil - - -#registrar - %s == nil - -#registrant_contacts - %s %CLASS{array} - %s == [] - -#admin_contacts - %s %CLASS{array} - %s == [] - -#technical_contacts - %s %CLASS{array} - %s == [] - - -#nameservers - %s %CLASS{array} - %s == [] diff --git a/spec/fixtures/responses/whois.centralnic.com/uy.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/uy.com/status_available.txt deleted file mode 100644 index 09cc0f7e..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/uy.com/status_available.txt +++ /dev/null @@ -1 +0,0 @@ -DOMAIN NOT FOUND diff --git a/spec/fixtures/responses/whois.centralnic.com/uy.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/uy.com/status_registered.expected deleted file mode 100644 index 4f827c3d..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/uy.com/status_registered.expected +++ /dev/null @@ -1,103 +0,0 @@ -#disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" - - -#domain - %s == "bestb.uy.com" - -#domain_id - %s == "CNIC-DO493832" - - -#status - %s == ["ok"] - -#available? - %s == false - -#registered? - %s == true - - -#created_on - %s %CLASS{time} - %s %TIME{2007-07-12 13:49:25 UTC} - -#updated_on - %s %CLASS{time} - %s %TIME{2013-07-10 00:27:20 UTC} - -#expires_on - %s %CLASS{time} - %s %TIME{2015-07-12 23:59:59 UTC} - - -#registrar - %s %CLASS{registrar} - %s.id == "I6467" - %s.name == nil - %s.organization == "Webfusion" - %s.url == "http://www.123-reg.co.uk/domain-names/" - -#registrant_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "MNT32524959440" - %s[0].name == "Identity Protection Service" - %s[0].organization == "Identity Protect Limited" - %s[0].address == "PO Box 795" - %s[0].city == "Godalming" - %s[0].zip == "GU7 9GA" - %s[0].state == "Surrey" - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.1483307527" - %s[0].fax == "+44.1483304031" - %s[0].email == "bestb.uy.com@identity-protect.org" - -#admin_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "MNT32524959440" - %s[0].name == "Identity Protection Service" - %s[0].organization == "Identity Protect Limited" - %s[0].address == "PO Box 795" - %s[0].city == "Godalming" - %s[0].zip == "GU7 9GA" - %s[0].state == "Surrey" - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.1483307527" - %s[0].fax == "+44.1483304031" - %s[0].email == "bestb.uy.com@identity-protect.org" - -#technical_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "MNT32524959440" - %s[0].name == "Identity Protection Service" - %s[0].organization == "Identity Protect Limited" - %s[0].address == "PO Box 795" - %s[0].city == "Godalming" - %s[0].zip == "GU7 9GA" - %s[0].state == "Surrey" - %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.1483307527" - %s[0].fax == "+44.1483304031" - %s[0].email == "bestb.uy.com@identity-protect.org" - - -#nameservers - %s %CLASS{array} - %s %SIZE{2} - %s[0] %CLASS{nameserver} - %s[0].name == "ns2.123-reg.co.uk" - %s[1] %CLASS{nameserver} - %s[1].name == "ns.123-reg.co.uk" diff --git a/spec/fixtures/responses/whois.centralnic.com/uy.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/uy.com/status_registered.txt deleted file mode 100644 index 0ae493b7..00000000 --- a/spec/fixtures/responses/whois.centralnic.com/uy.com/status_registered.txt +++ /dev/null @@ -1,76 +0,0 @@ -Domain ID:CNIC-DO493832 -Domain Name:BESTB.UY.COM -Created On:2007-07-12T13:49:25.0Z -Last Updated On:2013-07-10T00:27:20.0Z -Expiration Date:2015-07-12T23:59:59.0Z -Status:ok -Registrant ID:MNT32524959440 -Registrant Name:Identity Protection Service -Registrant Organization:Identity Protect Limited -Registrant Street1:PO Box 795 -Registrant City:Godalming -Registrant State/Province:Surrey -Registrant Postal Code:GU7 9GA -Registrant Country:GB -Registrant Phone:+44.1483307527 -Registrant FAX:+44.1483304031 -Registrant Email:bestb.uy.com@identity-protect.org -Admin ID:MNT32524959440 -Admin Name:Identity Protection Service -Admin Organization:Identity Protect Limited -Admin Street1:PO Box 795 -Admin City:Godalming -Admin State/Province:Surrey -Admin Postal Code:GU7 9GA -Admin Country:GB -Admin Phone:+44.1483307527 -Admin FAX:+44.1483304031 -Admin Email:bestb.uy.com@identity-protect.org -Tech ID:MNT32524959440 -Tech Name:Identity Protection Service -Tech Organization:Identity Protect Limited -Tech Street1:PO Box 795 -Tech City:Godalming -Tech State/Province:Surrey -Tech Postal Code:GU7 9GA -Tech Country:GB -Tech Phone:+44.1483307527 -Tech FAX:+44.1483304031 -Tech Email:bestb.uy.com@identity-protect.org -Billing ID:MNT32524959440 -Billing Name:Identity Protection Service -Billing Organization:Identity Protect Limited -Billing Street1:PO Box 795 -Billing City:Godalming -Billing State/Province:Surrey -Billing Postal Code:GU7 9GA -Billing Country:GB -Billing Phone:+44.1483307527 -Billing FAX:+44.1483304031 -Billing Email:bestb.uy.com@identity-protect.org -Sponsoring Registrar ID:I6467 -Sponsoring Registrar IANA ID:1515 -Sponsoring Registrar Organization:Webfusion -Sponsoring Registrar Street1:5 Roundwood Avenue -Sponsoring Registrar Street2:Stockley Park -Sponsoring Registrar City:Uxbridge -Sponsoring Registrar State/Province:Middlesex -Sponsoring Registrar Postal Code:UB11 1FF -Sponsoring Registrar Country:GB -Sponsoring Registrar Phone:0845 859 0018 -Sponsoring Registrar FAX:08701 650437 -Sponsoring Registrar Website:http://www.123-reg.co.uk/domain-names/ -Name Server:NS2.123-REG.CO.UK -Name Server:NS.123-REG.CO.UK -DNSSEC:Unsigned - -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - diff --git a/spec/fixtures/responses/whois.centralnic.com/za.com/status_available.expected b/spec/fixtures/responses/whois.centralnic.com/za.com/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.centralnic.com/za.com/status_available.expected +++ b/spec/fixtures/responses/whois.centralnic.com/za.com/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.centralnic.com/za.com/status_available.txt b/spec/fixtures/responses/whois.centralnic.com/za.com/status_available.txt index 09cc0f7e..a876e6ce 100644 --- a/spec/fixtures/responses/whois.centralnic.com/za.com/status_available.txt +++ b/spec/fixtures/responses/whois.centralnic.com/za.com/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-15T17:21:44.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.centralnic.com/za.com/status_registered.expected b/spec/fixtures/responses/whois.centralnic.com/za.com/status_registered.expected index 58d2f287..51e028ec 100644 --- a/spec/fixtures/responses/whois.centralnic.com/za.com/status_registered.expected +++ b/spec/fixtures/responses/whois.centralnic.com/za.com/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain %s == "siyenza.za.com" #domain_id - %s == "CNIC-DO333077" + %s == "D333077-CNIC" #status - %s == ["ok"] + %s == :registered #available? %s == false @@ -25,18 +25,17 @@ #updated_on %s %CLASS{time} - %s %TIME{2013-12-03 12:33:13 UTC} + %s %TIME{2019-01-30 08:43:57 UTC} #expires_on %s %CLASS{time} - %s %TIME{2014-11-17 23:59:59 UTC} + %s %TIME{2022-11-17 23:59:59 UTC} #registrar %s %CLASS{registrar} - %s.id == "C12112" - %s.name == nil - %s.organization == "Megaweb Internet Services" + %s.id == "" + %s.name == "Megaweb Internet Services" %s.url == "http://www.megaweb.co.za/" #registrant_contacts @@ -44,54 +43,21 @@ %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "H1063006" - %s[0].name == "MegaWeb Internet Services cc" - %s[0].organization == nil - %s[0].address == "PO Box 3738\nCramerview" - %s[0].city == nil - %s[0].zip == "2060" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "ZA" - %s[0].phone == "+27.0114851984" - %s[0].fax == "+27.0114855999" - %s[0].email == "dns-admin@megaweb.co.za" + %s[0].email == "https://whois.centralnic.com/contact/siyenza.za.com/registrant" #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "H119106" - %s[0].name == "Liz Hart" - %s[0].organization == "Siyenza Management" - %s[0].address == "PO Box 3738\nCramerview" - %s[0].city == nil - %s[0].zip == "2060" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "ZA" - %s[0].phone == "+27.0114851984" - %s[0].fax == "+27.0114855999" - %s[0].email == "dns-admin@megaweb.co.za" + %s[0].email == "https://whois.centralnic.com/contact/siyenza.za.com/admin" #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "C12112" - %s[0].name == "Laida Peters" - %s[0].organization == "Megaweb Internet Services" - %s[0].address == nil - %s[0].city == "Gauteng" - %s[0].zip == "2192" - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == "ZA" - %s[0].phone == "+27.027114851984" - %s[0].fax == "+27.027114851986" - %s[0].email == "dns-admin@megaweb.co.za" + %s[0].email == "https://whois.centralnic.com/contact/siyenza.za.com/tech" #nameservers diff --git a/spec/fixtures/responses/whois.centralnic.com/za.com/status_registered.txt b/spec/fixtures/responses/whois.centralnic.com/za.com/status_registered.txt index 27cebec3..a2dd5f38 100644 --- a/spec/fixtures/responses/whois.centralnic.com/za.com/status_registered.txt +++ b/spec/fixtures/responses/whois.centralnic.com/za.com/status_registered.txt @@ -1,56 +1,39 @@ -Domain ID:CNIC-DO333077 -Domain Name:SIYENZA.ZA.COM -Created On:2004-11-17T11:47:29.0Z -Last Updated On:2013-12-03T12:33:13.0Z -Expiration Date:2014-11-17T23:59:59.0Z -Status:ok -Registrant ID:H1063006 -Registrant Name:MegaWeb Internet Services cc -Registrant Street1:PO Box 3738 -Registrant Street2:Cramerview -Registrant Postal Code:2060 -Registrant Country:ZA -Registrant Phone:+27.0114851984 -Registrant FAX:+27.0114855999 -Registrant Email:dns-admin@megaweb.co.za -Admin ID:H119106 -Admin Name:Liz Hart -Admin Organization:Siyenza Management -Admin Street1:PO Box 3738 -Admin Street2:Cramerview -Admin Postal Code:2060 -Admin Country:ZA -Admin Phone:+27.0114851984 -Admin FAX:+27.0114855999 -Admin Email:dns-admin@megaweb.co.za -Tech ID:C12112 -Tech Name:Laida Peters -Tech Organization:Megaweb Internet Services -Tech City:Gauteng -Tech Postal Code:2192 -Tech Country:ZA -Tech Phone:+27.027114851984 -Tech FAX:+27.027114851986 -Tech Email:dns-admin@megaweb.co.za -Sponsoring Registrar ID:C12112 -Sponsoring Registrar Organization:Megaweb Internet Services -Sponsoring Registrar City:Gauteng -Sponsoring Registrar Postal Code:2192 -Sponsoring Registrar Country:ZA -Sponsoring Registrar Phone:02711 485 1984 -Sponsoring Registrar FAX:02711 485 1986 -Sponsoring Registrar Website:http://www.megaweb.co.za/ -Name Server:NS1A.YOUR-SERVER.CO.ZA -Name Server:NSA.SECOND-NS.CO.ZA -DNSSEC:Unsigned +Domain Name: SIYENZA.ZA.COM +Registry Domain ID: D333077-CNIC +Registrar WHOIS Server: whois.megaweb.co.za +Registrar URL: http://www.megaweb.co.za/ +Updated Date: 2019-01-30T08:43:57.0Z +Creation Date: 2004-11-17T11:47:29.0Z +Registry Expiry Date: 2022-11-17T23:59:59.0Z +Registrar: Megaweb Internet Services +Registrar IANA ID: +Domain Status: ok https://icann.org/epp#ok +Domain Status: autoRenewPeriod https://icann.org/epp#autoRenewPeriod +Registrant Email: https://whois.centralnic.com/contact/siyenza.za.com/registrant +Admin Email: https://whois.centralnic.com/contact/siyenza.za.com/admin +Tech Email: https://whois.centralnic.com/contact/siyenza.za.com/tech +Name Server: NS1A.YOUR-SERVER.CO.ZA +Name Server: NSA.SECOND-NS.CO.ZA +DNSSEC: unsigned +Registrar Abuse Contact Email: dns-admin@megaweb.co.za +Registrar Abuse Contact Phone: +27.27114851984 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-15T17:21:34.0Z <<< -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ +For more information on Whois status codes, please visit https://icann.org/epp +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.cira.ca/ca/field_without_value.expected b/spec/fixtures/responses/whois.cira.ca/ca/field_without_value.expected deleted file mode 100644 index b65d0629..00000000 --- a/spec/fixtures/responses/whois.cira.ca/ca/field_without_value.expected +++ /dev/null @@ -1,16 +0,0 @@ -#technical_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == nil - %s[0].name == "Ross Vito" - %s[0].organization == nil - %s[0].address == "405 Queen Street South, P.O. Box 75004\nBolton ON L7E2B5 Canada" - %s[0].city == nil - %s[0].zip == nil - %s[0].state == nil - %s[0].country_code == nil - %s[0].phone == "1 (647) 964-4544" - %s[0].fax == "" - %s[0].email == "mail@sanamato.com" diff --git a/spec/fixtures/responses/whois.cira.ca/ca/field_without_value.txt b/spec/fixtures/responses/whois.cira.ca/ca/field_without_value.txt deleted file mode 100644 index 5b4ace4b..00000000 --- a/spec/fixtures/responses/whois.cira.ca/ca/field_without_value.txt +++ /dev/null @@ -1,40 +0,0 @@ -Domain name: glu.ca -Domain status: redemption -Creation date: 2004/10/30 -Expiry date: 2010/10/29 -Updated date: 2010/12/04 - -Registrar: - Name: Webnames.ca Inc. - Number: 70 - -Registrant: - Name: Sanamato Inc. - -Administrative contact: - Name: Ross Vito - Postal address: 405 Queen Street South, P.O. Box 75004 - Bolton ON L7E2B5 Canada - Phone: 1 (647) 964-4544 - Fax: - Email: mail@sanamato.com - -Technical contact: - Name: Ross Vito - Postal address: 405 Queen Street South, P.O. Box 75004 - Bolton ON L7E2B5 Canada - Phone: 1 (647) 964-4544 - Fax: - Email: mail@sanamato.com - -Name servers: - ns1.webnames.ca 65.39.140.92 - ns2.webnames.ca 64.85.60.137 - ns3.webnames.ca 64.34.130.218 - -% WHOIS look-up made at 2010-12-07 21:24:18 (GMT) -% -% Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal -% Notice, available at http://www.cira.ca/legal-notice/?lang=en -% -% (c) 2010 Canadian Internet Registration Authority, (http://www.cira.ca/) diff --git a/spec/fixtures/responses/whois.cira.ca/ca/property_status_autorenew_grace.expected b/spec/fixtures/responses/whois.cira.ca/ca/property_status_autorenew_grace.expected deleted file mode 100644 index 3f198701..00000000 --- a/spec/fixtures/responses/whois.cira.ca/ca/property_status_autorenew_grace.expected +++ /dev/null @@ -1,8 +0,0 @@ -#status - %s == :registered - -#available? - %s == false - -#registered? - %s == true diff --git a/spec/fixtures/responses/whois.cira.ca/ca/property_status_autorenew_grace.txt b/spec/fixtures/responses/whois.cira.ca/ca/property_status_autorenew_grace.txt deleted file mode 100644 index 33b79391..00000000 --- a/spec/fixtures/responses/whois.cira.ca/ca/property_status_autorenew_grace.txt +++ /dev/null @@ -1,43 +0,0 @@ -Domain name: abbylane.pe.ca -Domain status: auto-renew grace -Creation date: 2000/10/26 -Expiry date: 2011/11/30 - -Registrar: - Name: easyDNS Technologies Inc. - Number: 88 - -Registrant: - Name: Abbylane Summer Homes - -Administrative contact: - Name: Jeff Carmody - Postal address: Abbylane Summer Homes - 8 Birchill Drive - Ch-town PE C1A 6W5 Canada - Phone: +1 902-621-0244 - Fax: +1 902-566-0823 - Email: jeff@abbylane.pe.ca - -Technical contact: - Name: Jeff Carmody - Postal address: 550 University Ave - Charlottetown PE C1A4p3 Canada - Phone: +1 902 566 0829 - Fax: +1 902-628-4355 - Email: jeff@abbylane.pe.ca - -Name servers: - ns1.easydns.com - ns2.easydns.com - ns3.easydns.org - ns6.easydns.net - remote1.easydns.com - remote2.easydns.com - -% WHOIS look-up made at 2010-12-10 22:01:40 (GMT) -% -% Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal -% Notice, available at http://www.cira.ca/legal-notice/?lang=en -% -% (c) 2010 Canadian Internet Registration Authority, (http://www.cira.ca/) diff --git a/spec/fixtures/responses/whois.cira.ca/ca/property_status_available.expected b/spec/fixtures/responses/whois.cira.ca/ca/property_status_available.expected deleted file mode 100644 index 0a5c9d4a..00000000 --- a/spec/fixtures/responses/whois.cira.ca/ca/property_status_available.expected +++ /dev/null @@ -1,8 +0,0 @@ -#status - %s == :available - -#available? - %s == true - -#registered? - %s == false diff --git a/spec/fixtures/responses/whois.cira.ca/ca/property_status_available.txt b/spec/fixtures/responses/whois.cira.ca/ca/property_status_available.txt deleted file mode 100644 index 2cdde6b0..00000000 --- a/spec/fixtures/responses/whois.cira.ca/ca/property_status_available.txt +++ /dev/null @@ -1,9 +0,0 @@ -Domain name: u34jedzcq.ca -Domain status: available - -% WHOIS look-up made at 2010-10-13 18:32:55 (GMT) -% -% Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal -% Notice, available at http://www.cira.ca/legal-notice/?lang=en -% -% (c) 2010 Canadian Internet Registration Authority, (http://www.cira.ca/) diff --git a/spec/fixtures/responses/whois.cira.ca/ca/property_status_pendingdelete.expected b/spec/fixtures/responses/whois.cira.ca/ca/property_status_pendingdelete.expected deleted file mode 100644 index 3f198701..00000000 --- a/spec/fixtures/responses/whois.cira.ca/ca/property_status_pendingdelete.expected +++ /dev/null @@ -1,8 +0,0 @@ -#status - %s == :registered - -#available? - %s == false - -#registered? - %s == true diff --git a/spec/fixtures/responses/whois.cira.ca/ca/property_status_pendingdelete.txt b/spec/fixtures/responses/whois.cira.ca/ca/property_status_pendingdelete.txt deleted file mode 100644 index df1632ac..00000000 --- a/spec/fixtures/responses/whois.cira.ca/ca/property_status_pendingdelete.txt +++ /dev/null @@ -1,20 +0,0 @@ -Domain name: sagespa.ca -Domain status: pending delete -Creation date: 2011/05/12 -Expiry date: 2013/05/12 -Updated date: 2013/07/31 - -Registrar: - Name: Go Daddy Domains Canada, Inc - Number: 2316042 - -Name servers: - ns75.domaincontrol.com - ns76.domaincontrol.com - -% WHOIS look-up made at 2013-08-01 17:51:03 (GMT) -% -% Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal -% Notice, available at http://www.cira.ca/legal-notice/?lang=en -% -% (c) 2013 Canadian Internet Registration Authority, (http://www.cira.ca/) diff --git a/spec/fixtures/responses/whois.cira.ca/ca/property_status_redemption.expected b/spec/fixtures/responses/whois.cira.ca/ca/property_status_redemption.expected deleted file mode 100644 index 3f198701..00000000 --- a/spec/fixtures/responses/whois.cira.ca/ca/property_status_redemption.expected +++ /dev/null @@ -1,8 +0,0 @@ -#status - %s == :registered - -#available? - %s == false - -#registered? - %s == true diff --git a/spec/fixtures/responses/whois.cira.ca/ca/property_status_redemption.txt b/spec/fixtures/responses/whois.cira.ca/ca/property_status_redemption.txt deleted file mode 100644 index 5b4ace4b..00000000 --- a/spec/fixtures/responses/whois.cira.ca/ca/property_status_redemption.txt +++ /dev/null @@ -1,40 +0,0 @@ -Domain name: glu.ca -Domain status: redemption -Creation date: 2004/10/30 -Expiry date: 2010/10/29 -Updated date: 2010/12/04 - -Registrar: - Name: Webnames.ca Inc. - Number: 70 - -Registrant: - Name: Sanamato Inc. - -Administrative contact: - Name: Ross Vito - Postal address: 405 Queen Street South, P.O. Box 75004 - Bolton ON L7E2B5 Canada - Phone: 1 (647) 964-4544 - Fax: - Email: mail@sanamato.com - -Technical contact: - Name: Ross Vito - Postal address: 405 Queen Street South, P.O. Box 75004 - Bolton ON L7E2B5 Canada - Phone: 1 (647) 964-4544 - Fax: - Email: mail@sanamato.com - -Name servers: - ns1.webnames.ca 65.39.140.92 - ns2.webnames.ca 64.85.60.137 - ns3.webnames.ca 64.34.130.218 - -% WHOIS look-up made at 2010-12-07 21:24:18 (GMT) -% -% Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal -% Notice, available at http://www.cira.ca/legal-notice/?lang=en -% -% (c) 2010 Canadian Internet Registration Authority, (http://www.cira.ca/) diff --git a/spec/fixtures/responses/whois.cira.ca/ca/property_status_registered.expected b/spec/fixtures/responses/whois.cira.ca/ca/property_status_registered.expected deleted file mode 100644 index 3f198701..00000000 --- a/spec/fixtures/responses/whois.cira.ca/ca/property_status_registered.expected +++ /dev/null @@ -1,8 +0,0 @@ -#status - %s == :registered - -#available? - %s == false - -#registered? - %s == true diff --git a/spec/fixtures/responses/whois.cira.ca/ca/property_status_registered.txt b/spec/fixtures/responses/whois.cira.ca/ca/property_status_registered.txt deleted file mode 100644 index dd1e7e02..00000000 --- a/spec/fixtures/responses/whois.cira.ca/ca/property_status_registered.txt +++ /dev/null @@ -1,40 +0,0 @@ -Domain name: google.ca -Domain status: registered -Creation date: 2000/10/03 -Expiry date: 2011/04/28 - -Registrar: - Name: Webnames.ca Inc. - Number: 70 - -Registrant: - Name: Google Inc. - -Administrative contact: - Name: Rose Hagan - Postal address: 130 King St. W., Suite 1800 - Toronto ON M5X 1E3 Canada - Phone: 1 416 8653361 - Fax: 1 416 9456616 - Email: dns-admin@google.com - -Technical contact: - Name: Matt Serlin - Postal address: Domain Provisioning,10400 Overland Rd. PMB 155 - Boise ID 83709 United States - Phone: 1.2083895740 - Fax: 1.2083895771 - Email: ccops@markmonitor.com - -Name servers: - ns1.google.com - ns2.google.com - ns3.google.com - ns4.google.com - -% WHOIS look-up made at 2010-10-13 18:32:42 (GMT) -% -% Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal -% Notice, available at http://www.cira.ca/legal-notice/?lang=en -% -% (c) 2010 Canadian Internet Registration Authority, (http://www.cira.ca/) diff --git a/spec/fixtures/responses/whois.cira.ca/ca/property_status_tobereleased.expected b/spec/fixtures/responses/whois.cira.ca/ca/property_status_tobereleased.expected deleted file mode 100644 index 3f198701..00000000 --- a/spec/fixtures/responses/whois.cira.ca/ca/property_status_tobereleased.expected +++ /dev/null @@ -1,8 +0,0 @@ -#status - %s == :registered - -#available? - %s == false - -#registered? - %s == true diff --git a/spec/fixtures/responses/whois.cira.ca/ca/property_status_tobereleased.txt b/spec/fixtures/responses/whois.cira.ca/ca/property_status_tobereleased.txt deleted file mode 100644 index bd4199d1..00000000 --- a/spec/fixtures/responses/whois.cira.ca/ca/property_status_tobereleased.txt +++ /dev/null @@ -1,10 +0,0 @@ -Domain name: thomascraft.ca -Domain status: to be released -TBR Release date: 2011/03/02 - -% WHOIS look-up made at 2011-03-01 21:56:25 (GMT) -% -% Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal -% Notice, available at http://www.cira.ca/legal-notice/?lang=en -% -% (c) 2010 Canadian Internet Registration Authority, (http://www.cira.ca/) diff --git a/spec/fixtures/responses/whois.cira.ca/ca/property_status_unavailable.txt b/spec/fixtures/responses/whois.cira.ca/ca/property_status_unavailable.txt deleted file mode 100644 index 91345419..00000000 --- a/spec/fixtures/responses/whois.cira.ca/ca/property_status_unavailable.txt +++ /dev/null @@ -1,11 +0,0 @@ -Domain name: mediom.ca -Domain status: unavailable -Error code: 01114 -Error message: The domain name provided conflicts with at least one other registered domain name and as a result is not available for registration (e.g. xyz.ca conflicts with xyz.on.ca). - -% WHOIS look-up made at 2011-08-04 16:46:53 (GMT) -% -% Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal -% Notice, available at http://www.cira.ca/legal-notice/?lang=en -% -% (c) 2010 Canadian Internet Registration Authority, (http://www.cira.ca/) diff --git a/spec/fixtures/responses/whois.cira.ca/ca/status_available.expected b/spec/fixtures/responses/whois.cira.ca/ca/status_available.expected index 0f63c05a..5972cfeb 100644 --- a/spec/fixtures/responses/whois.cira.ca/ca/status_available.expected +++ b/spec/fixtures/responses/whois.cira.ca/ca/status_available.expected @@ -1,12 +1,12 @@ #disclaimer - %s == "Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal\nNotice, available at http://www.cira.ca/legal-notice/?lang=en\n\n(c) 2014 Canadian Internet Registration Authority, (http://www.cira.ca/)" + %s == "Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal Notice, available at http://www.cira.ca/legal-notice/?lang=en (c) 2021 Canadian Internet Registration Authority, (http://www.cira.ca/)" #domain %s == "u34jedzcq.ca" #domain_id - %s %ERROR{AttributeNotSupported} + %s == nil #status @@ -48,10 +48,3 @@ #nameservers %s %CLASS{array} %s == [] - - -#valid? - %s == true - -#invalid? - %s == false diff --git a/spec/fixtures/responses/whois.cira.ca/ca/status_available.txt b/spec/fixtures/responses/whois.cira.ca/ca/status_available.txt index 00690e0e..1b560eab 100644 --- a/spec/fixtures/responses/whois.cira.ca/ca/status_available.txt +++ b/spec/fixtures/responses/whois.cira.ca/ca/status_available.txt @@ -1,9 +1,7 @@ -Domain name: u34jedzcq.ca -Domain status: available - -% WHOIS look-up made at 2014-01-22 22:10:48 (GMT) -% -% Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal -% Notice, available at http://www.cira.ca/legal-notice/?lang=en -% -% (c) 2014 Canadian Internet Registration Authority, (http://www.cira.ca/) +Not found: u34jedzcq.ca + +% +% Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal +% Notice, available at http://www.cira.ca/legal-notice/?lang=en +% +% (c) 2021 Canadian Internet Registration Authority, (http://www.cira.ca/) diff --git a/spec/fixtures/responses/whois.cira.ca/ca/status_invalid.expected b/spec/fixtures/responses/whois.cira.ca/ca/status_invalid.expected deleted file mode 100644 index 9acbbaea..00000000 --- a/spec/fixtures/responses/whois.cira.ca/ca/status_invalid.expected +++ /dev/null @@ -1,9 +0,0 @@ -#status - %s == :invalid - - -#valid? - %s == false - -#invalid? - %s == true diff --git a/spec/fixtures/responses/whois.cira.ca/ca/status_invalid.txt b/spec/fixtures/responses/whois.cira.ca/ca/status_invalid.txt deleted file mode 100644 index 91345419..00000000 --- a/spec/fixtures/responses/whois.cira.ca/ca/status_invalid.txt +++ /dev/null @@ -1,11 +0,0 @@ -Domain name: mediom.ca -Domain status: unavailable -Error code: 01114 -Error message: The domain name provided conflicts with at least one other registered domain name and as a result is not available for registration (e.g. xyz.ca conflicts with xyz.on.ca). - -% WHOIS look-up made at 2011-08-04 16:46:53 (GMT) -% -% Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal -% Notice, available at http://www.cira.ca/legal-notice/?lang=en -% -% (c) 2010 Canadian Internet Registration Authority, (http://www.cira.ca/) diff --git a/spec/fixtures/responses/whois.cira.ca/ca/status_registered.expected b/spec/fixtures/responses/whois.cira.ca/ca/status_registered.expected index 52309b6e..048f3d3c 100644 --- a/spec/fixtures/responses/whois.cira.ca/ca/status_registered.expected +++ b/spec/fixtures/responses/whois.cira.ca/ca/status_registered.expected @@ -1,13 +1,11 @@ #disclaimer - %s == "Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal\nNotice, available at http://www.cira.ca/legal-notice/?lang=en\n\n(c) 2014 Canadian Internet Registration Authority, (http://www.cira.ca/)" - + %s == "Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal Notice, available at http://www.cira.ca/legal-notice/?lang=en (c) 2021 Canadian Internet Registration Authority, (http://www.cira.ca/)" #domain %s == "google.ca" #domain_id - %s %ERROR{AttributeNotSupported} - + %s == "D73081-CIRA" #status %s == :registered @@ -21,56 +19,55 @@ #created_on %s %CLASS{time} - %s %TIME{2000-10-03 00:00:00} + %s %TIME{2000-10-04 02:21:23 UTC} #updated_on %s %CLASS{time} - %s %TIME{2014-02-13 00:00:00} + %s %TIME{2021-04-28 04:04:12 UTC} #expires_on %s %CLASS{time} - %s %TIME{2015-04-28 00:00:00} + %s %TIME{2022-04-28 04:00:00 UTC} #registrar %s %CLASS{registrar} - %s.id == "5000040" + %s.id == "not applicable" %s.name == "MarkMonitor International Canada Ltd." - %s.organization == "MarkMonitor International Canada Ltd." - %s.url == nil + %s.url == "Markmonitor.com" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == nil - %s[0].name == "Google Inc." - %s[0].organization == nil - %s[0].address == nil - %s[0].city == nil - %s[0].zip == nil - %s[0].state == nil - %s[0].country_code == nil - %s[0].phone == nil - %s[0].fax == nil - %s[0].email == nil + %s[0].id == "59969059-CIRA" + %s[0].name == "Google LLC - TMA868122" + %s[0].organization == "" + %s[0].address == "1600 Amphitheatre Parkway" + %s[0].city == "Mountain View" + %s[0].zip == "94043" + %s[0].state == "CA" + %s[0].country_code == "US" + %s[0].phone == "+1.6502530000" + %s[0].fax == "" + %s[0].email == "dns-admin@google.com" #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == nil - %s[0].name == "Christina Chiou" - %s[0].organization == nil - %s[0].address == "130 King St. W., Suite 1800,\nToronto ON M5X1E3 Canada" - %s[0].city == nil - %s[0].zip == nil - %s[0].state == nil - %s[0].country_code == nil - %s[0].phone == "+1.4168653361x" - %s[0].fax == "+1.4169456616" + %s[0].id == "59969161-CIRA" + %s[0].name == "Lauren Johnston" + %s[0].organization == "Google LLC" + %s[0].address == "1600 Amphitheatre Parkway" + %s[0].city == "Mountain View" + %s[0].zip == "94043" + %s[0].state == "CA" + %s[0].country_code == "US" + %s[0].phone == "+1.6502530000" + %s[0].fax == "" %s[0].email == "dns-admin@google.com" #technical_contacts @@ -78,17 +75,17 @@ %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == nil - %s[0].name == "Matt Serlin" - %s[0].organization == nil - %s[0].address == "Domain Provisioning,10400 Overland Rd. PMB 155\nBoise ID 83709 United States" - %s[0].city == nil - %s[0].zip == nil - %s[0].state == nil - %s[0].country_code == nil - %s[0].phone == "+1.2083895740x" - %s[0].fax == "+1.2083895771" - %s[0].email == "ccops@markmonitor.com" + %s[0].id == "59969161-CIRA" + %s[0].name == "Lauren Johnston" + %s[0].organization == "Google LLC" + %s[0].address == "1600 Amphitheatre Parkway" + %s[0].city == "Mountain View" + %s[0].zip == "94043" + %s[0].state == "CA" + %s[0].country_code == "US" + %s[0].phone == "+1.6502530000" + %s[0].fax == "" + %s[0].email == "dns-admin@google.com" #nameservers @@ -102,10 +99,3 @@ %s[2].name == "ns3.google.com" %s[3] %CLASS{nameserver} %s[3].name == "ns4.google.com" - - -#valid? - %s == true - -#invalid? - %s == false diff --git a/spec/fixtures/responses/whois.cira.ca/ca/status_registered.txt b/spec/fixtures/responses/whois.cira.ca/ca/status_registered.txt index 4ba8e306..2dcf6e92 100644 --- a/spec/fixtures/responses/whois.cira.ca/ca/status_registered.txt +++ b/spec/fixtures/responses/whois.cira.ca/ca/status_registered.txt @@ -1,41 +1,84 @@ -Domain name: google.ca -Domain status: registered -Creation date: 2000/10/03 -Expiry date: 2015/04/28 -Updated date: 2014/02/13 - -Registrar: - Name: MarkMonitor International Canada Ltd. - Number: 5000040 - -Registrant: - Name: Google Inc. - -Administrative contact: - Name: Christina Chiou - Postal address: 130 King St. W., Suite 1800, - Toronto ON M5X1E3 Canada - Phone: +1.4168653361x - Fax: +1.4169456616 - Email: dns-admin@google.com - -Technical contact: - Name: Matt Serlin - Postal address: Domain Provisioning,10400 Overland Rd. PMB 155 - Boise ID 83709 United States - Phone: +1.2083895740x - Fax: +1.2083895771 - Email: ccops@markmonitor.com - -Name servers: - ns1.google.com - ns2.google.com - ns3.google.com - ns4.google.com - -% WHOIS look-up made at 2014-02-18 20:39:15 (GMT) -% -% Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal -% Notice, available at http://www.cira.ca/legal-notice/?lang=en -% -% (c) 2014 Canadian Internet Registration Authority, (http://www.cira.ca/) +Domain Name: google.ca +Registry Domain ID: D73081-CIRA +Registrar WHOIS Server: whois.ca.fury.ca +Registrar URL: Markmonitor.com +Updated Date: 2021-04-28T04:04:12Z +Creation Date: 2000-10-04T02:21:23Z +Registry Expiry Date: 2022-04-28T04:00:00Z +Registrar: MarkMonitor International Canada Ltd. +Registrar IANA ID: not applicable +Registrar Abuse Contact Email: +Registrar Abuse Contact Phone: +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Domain Status: serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited +Domain Status: serverTransferProhibited https://icann.org/epp#serverTransferProhibited +Domain Status: serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited +Registry Registrant ID: 59969059-CIRA +Registrant Name: Google LLC - TMA868122 +Registrant Organization: +Registrant Street: 1600 Amphitheatre Parkway +Registrant City: Mountain View +Registrant State/Province: CA +Registrant Postal Code: 94043 +Registrant Country: US +Registrant Phone: +1.6502530000 +Registrant Phone Ext: +Registrant Fax: +Registrant Fax Ext: +Registrant Email: dns-admin@google.com +Registry Admin ID: 59969161-CIRA +Admin Name: Lauren Johnston +Admin Organization: Google LLC +Admin Street: 1600 Amphitheatre Parkway +Admin City: Mountain View +Admin State/Province: CA +Admin Postal Code: 94043 +Admin Country: US +Admin Phone: +1.6502530000 +Admin Phone Ext: +Admin Fax: +Admin Fax Ext: +Admin Email: dns-admin@google.com +Registry Tech ID: 59969161-CIRA +Tech Name: Lauren Johnston +Tech Organization: Google LLC +Tech Street: 1600 Amphitheatre Parkway +Tech City: Mountain View +Tech State/Province: CA +Tech Postal Code: 94043 +Tech Country: US +Tech Phone: +1.6502530000 +Tech Phone Ext: +Tech Fax: +Tech Fax Ext: +Tech Email: dns-admin@google.com +Registry Billing ID: +Billing Name: +Billing Organization: +Billing Street: +Billing City: +Billing State/Province: +Billing Postal Code: +Billing Country: +Billing Phone: +Billing Phone Ext: +Billing Fax: +Billing Fax Ext: +Billing Email: +Name Server: ns1.google.com +Name Server: ns2.google.com +Name Server: ns3.google.com +Name Server: ns4.google.com +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-25T11:24:22Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +% +% Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal +% Notice, available at http://www.cira.ca/legal-notice/?lang=en +% +% (c) 2021 Canadian Internet Registration Authority, (http://www.cira.ca/) diff --git a/spec/fixtures/responses/whois.cira.ca/ca/status_reserved.expected b/spec/fixtures/responses/whois.cira.ca/ca/status_reserved.expected new file mode 100644 index 00000000..3f9fdb58 --- /dev/null +++ b/spec/fixtures/responses/whois.cira.ca/ca/status_reserved.expected @@ -0,0 +1,49 @@ +#disclaimer + %s == "Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal Notice, available at http://www.cira.ca/legal-notice/?lang=en (c) 2021 Canadian Internet Registration Authority, (http://www.cira.ca/)" + +#domain + %s == nil + +#domain_id + %s == nil + + +#status + %s == :reserved + +#available? + %s == false + +#registered? + %s == true + + +#created_on + %s == nil + +#updated_on + %s == nil + +#expires_on + %s == nil + + +#registrar + %s == nil + +#registrant_contacts + %s %CLASS{array} + %s == [] + +#admin_contacts + %s %CLASS{array} + %s == [] + +#technical_contacts + %s %CLASS{array} + %s == [] + + +#nameservers + %s %CLASS{array} + %s == [] diff --git a/spec/fixtures/responses/whois.cira.ca/ca/status_reserved.txt b/spec/fixtures/responses/whois.cira.ca/ca/status_reserved.txt new file mode 100644 index 00000000..e90e450b --- /dev/null +++ b/spec/fixtures/responses/whois.cira.ca/ca/status_reserved.txt @@ -0,0 +1,8 @@ +Error code: 01044 +Error message: The domain name requested has usage restrictions applied to it. Please see your Registrar for more details. + +% +% Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal +% Notice, available at http://www.cira.ca/legal-notice/?lang=en +% +% (c) 2021 Canadian Internet Registration Authority, (http://www.cira.ca/) diff --git a/spec/fixtures/responses/whois.cmc.iq/iq/status_registered.expected b/spec/fixtures/responses/whois.cmc.iq/iq/status_registered.expected index 9208196f..39ada13e 100644 --- a/spec/fixtures/responses/whois.cmc.iq/iq/status_registered.expected +++ b/spec/fixtures/responses/whois.cmc.iq/iq/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "CMC Registrar" - %s.organization == nil %s.url == nil diff --git a/spec/fixtures/responses/whois.cnnic.cn/cn/status_registered.expected b/spec/fixtures/responses/whois.cnnic.cn/cn/status_registered.expected index 55875d06..d7542821 100644 --- a/spec/fixtures/responses/whois.cnnic.cn/cn/status_registered.expected +++ b/spec/fixtures/responses/whois.cnnic.cn/cn/status_registered.expected @@ -35,7 +35,6 @@ %s %CLASS{registrar} %s.id == "MarkMonitor Inc." %s.name == "MarkMonitor Inc." - %s.organization == nil #registrant_contacts %s %CLASS{array} diff --git a/spec/fixtures/responses/whois.corporatedomains.com/status_registered.expected b/spec/fixtures/responses/whois.corporatedomains.com/status_registered.expected index 9983b7e7..421ab16b 100644 --- a/spec/fixtures/responses/whois.corporatedomains.com/status_registered.expected +++ b/spec/fixtures/responses/whois.corporatedomains.com/status_registered.expected @@ -18,7 +18,7 @@ #created_on %s %CLASS{time} %s %TIME{1992-11-24 00:00:00 -0500} - + #updated_on %s %CLASS{time} @@ -33,7 +33,6 @@ %s %CLASS{registrar} %s.id == "299" %s.name == "CORPORATE DOMAINS, INC." - %s.organization == "CORPORATE DOMAINS, INC." %s.url == "www.cscprotectsbrands.com" diff --git a/spec/fixtures/responses/whois.denic.de/de/status_registered.expected b/spec/fixtures/responses/whois.denic.de/de/status_registered.expected index a9efa8a2..a7e91c88 100644 --- a/spec/fixtures/responses/whois.denic.de/de/status_registered.expected +++ b/spec/fixtures/responses/whois.denic.de/de/status_registered.expected @@ -34,7 +34,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "Domain Admin" - %s.organization == "MarkMonitor Inc" %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/whois.dns.pl/pl/status_registered.expected b/spec/fixtures/responses/whois.dns.pl/pl/status_registered.expected index d8473f29..6586c200 100644 --- a/spec/fixtures/responses/whois.dns.pl/pl/status_registered.expected +++ b/spec/fixtures/responses/whois.dns.pl/pl/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "Markmonitor, Inc." - %s.organization == nil %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/whois.dns.pt/pt/property_nameservers.expected b/spec/fixtures/responses/whois.dns.pt/pt/property_nameservers.expected deleted file mode 100644 index 8cef83e4..00000000 --- a/spec/fixtures/responses/whois.dns.pt/pt/property_nameservers.expected +++ /dev/null @@ -1,11 +0,0 @@ -#nameservers - %s %CLASS{array} - %s %SIZE{4} - %s[0] %CLASS{nameserver} - %s[0].name == "ns4.google.com" - %s[1] %CLASS{nameserver} - %s[1].name == "ns2.google.com" - %s[2] %CLASS{nameserver} - %s[2].name == "ns1.google.com" - %s[3] %CLASS{nameserver} - %s[3].name == "ns3.google.com" diff --git a/spec/fixtures/responses/whois.dns.pt/pt/property_nameservers.txt b/spec/fixtures/responses/whois.dns.pt/pt/property_nameservers.txt deleted file mode 100644 index 69be6012..00000000 --- a/spec/fixtures/responses/whois.dns.pt/pt/property_nameservers.txt +++ /dev/null @@ -1,25 +0,0 @@ -Nome de domínio / Domain Name: google.pt -Data de registo / Creation Date (dd/mm/yyyy): 09/01/2003 -Data de expiração / Expiration Date (dd/mm/yyyy): 29/02/2012 -Estado / Status: ACTIVE - -Titular / Registrant - Google, Inc. - 1600 Amphitheatre Parkway - Mountain View, CA - 94043 null - Email: dns-admin@google.com - -Entidade Gestora / Billing Contact - Markmonitor - CCOPS - Email: ccops@markmonitor.com - -Responsável Técnico / Tech Contact - Markmonitor - CCOPS - Email: ccops@markmonitor.com - -Nameserver Information - Nameserver: google.pt NS ns4.google.com. - Nameserver: google.pt NS ns2.google.com. - Nameserver: google.pt NS ns1.google.com. - Nameserver: google.pt NS ns3.google.com. diff --git a/spec/fixtures/responses/whois.dns.pt/pt/property_status_techpro.expected b/spec/fixtures/responses/whois.dns.pt/pt/property_status_techpro.expected deleted file mode 100644 index 8592c316..00000000 --- a/spec/fixtures/responses/whois.dns.pt/pt/property_status_techpro.expected +++ /dev/null @@ -1,8 +0,0 @@ -#status - %s == :inactive - -#available? - %s == false - -#registered? - %s == true diff --git a/spec/fixtures/responses/whois.dns.pt/pt/property_status_techpro.txt b/spec/fixtures/responses/whois.dns.pt/pt/property_status_techpro.txt deleted file mode 100644 index 70fa020f..00000000 --- a/spec/fixtures/responses/whois.dns.pt/pt/property_status_techpro.txt +++ /dev/null @@ -1,21 +0,0 @@ -Nome de domínio / Domain Name: wiki.pt -Data de registo / Creation Date (dd/mm/yyyy): 09/02/2009 -Data de expiração / Expiration Date (dd/mm/yyyy): 01/03/2014 -Estado / Status: TECH-PRO - -Titular / Registrant - Portugalmail - Comunicações S.A. - Rua Ricardo Severo, Nº 3 - 5º Dto. - Porto - 4050-515 Porto - Email: registrars@ping.pt - -Entidade Gestora / Billing Contact - Portugalmail - Comunicações S.A. - Email: registrars@ping.pt - -Responsável Técnico / Tech Contact - Portugalmail - Comunicações S.A. - Email: registrars@ping.pt - -Nameserver Information diff --git a/spec/fixtures/responses/whois.dns.pt/pt/status_available.txt b/spec/fixtures/responses/whois.dns.pt/pt/status_available.txt index c18ae524..441ea1a5 100644 --- a/spec/fixtures/responses/whois.dns.pt/pt/status_available.txt +++ b/spec/fixtures/responses/whois.dns.pt/pt/status_available.txt @@ -1 +1 @@ -u34jedzcq.pt no match \ No newline at end of file +u34jedzcq.pt - No Match diff --git a/spec/fixtures/responses/whois.dns.pt/pt/status_inactive.expected b/spec/fixtures/responses/whois.dns.pt/pt/status_inactive.expected deleted file mode 100644 index 2f2febdc..00000000 --- a/spec/fixtures/responses/whois.dns.pt/pt/status_inactive.expected +++ /dev/null @@ -1,25 +0,0 @@ -#status - %s == :inactive - -#available? - %s == false - -#registered? - %s == true - - -#created_on - %s %CLASS{time} - %s %TIME{2009-02-09 00:00:00 UTC} - -#updated_on - %s %ERROR{AttributeNotSupported} - -#expires_on - %s %CLASS{time} - %s %TIME{2014-03-01 00:00:00 UTC} - - -#nameservers - %s %CLASS{array} - %s %SIZE{0} diff --git a/spec/fixtures/responses/whois.dns.pt/pt/status_inactive.txt b/spec/fixtures/responses/whois.dns.pt/pt/status_inactive.txt deleted file mode 100644 index 70fa020f..00000000 --- a/spec/fixtures/responses/whois.dns.pt/pt/status_inactive.txt +++ /dev/null @@ -1,21 +0,0 @@ -Nome de domínio / Domain Name: wiki.pt -Data de registo / Creation Date (dd/mm/yyyy): 09/02/2009 -Data de expiração / Expiration Date (dd/mm/yyyy): 01/03/2014 -Estado / Status: TECH-PRO - -Titular / Registrant - Portugalmail - Comunicações S.A. - Rua Ricardo Severo, Nº 3 - 5º Dto. - Porto - 4050-515 Porto - Email: registrars@ping.pt - -Entidade Gestora / Billing Contact - Portugalmail - Comunicações S.A. - Email: registrars@ping.pt - -Responsável Técnico / Tech Contact - Portugalmail - Comunicações S.A. - Email: registrars@ping.pt - -Nameserver Information diff --git a/spec/fixtures/responses/whois.dns.pt/pt/status_registered.expected b/spec/fixtures/responses/whois.dns.pt/pt/status_registered.expected index b934b98b..03f1ed5f 100644 --- a/spec/fixtures/responses/whois.dns.pt/pt/status_registered.expected +++ b/spec/fixtures/responses/whois.dns.pt/pt/status_registered.expected @@ -17,17 +17,17 @@ #expires_on %s %CLASS{time} - %s %TIME{2015-02-28 00:00:00 UTC} + %s %TIME{2023-02-28 23:59:00 UTC} #nameservers %s %CLASS{array} %s %SIZE{4} %s[0] %CLASS{nameserver} - %s[0].name == "ns4.google.com" + %s[0].name == "ns3.google.com" %s[1] %CLASS{nameserver} - %s[1].name == "ns2.google.com" + %s[1].name == "ns4.google.com" %s[2] %CLASS{nameserver} %s[2].name == "ns1.google.com" %s[3] %CLASS{nameserver} - %s[3].name == "ns3.google.com" + %s[3].name == "ns2.google.com" diff --git a/spec/fixtures/responses/whois.dns.pt/pt/status_registered.txt b/spec/fixtures/responses/whois.dns.pt/pt/status_registered.txt index 5fa8f0cd..21d231ab 100644 --- a/spec/fixtures/responses/whois.dns.pt/pt/status_registered.txt +++ b/spec/fixtures/responses/whois.dns.pt/pt/status_registered.txt @@ -1,25 +1,22 @@ -Nome de domínio / Domain Name: google.pt -Data de registo / Creation Date (dd/mm/yyyy): 09/01/2003 -Data de expiração / Expiration Date (dd/mm/yyyy): 28/02/2015 -Estado / Status: ACTIVE - -Titular / Registrant - Google, Inc. - 1600 Amphitheatre Parkway - Mountain View, CA - 94043 null - Email: dns-admin@google.com - -Entidade Gestora / Billing Contact - Markmonitor - CCOPS - Email: ccops@markmonitor.com - -Responsável Técnico / Tech Contact - Markmonitor - CCOPS - Email: ccops@markmonitor.com - -Nameserver Information - Nameserver: google.pt NS ns4.google.com. - Nameserver: google.pt NS ns2.google.com. - Nameserver: google.pt NS ns1.google.com. - Nameserver: google.pt NS ns3.google.com. +Domain: google.pt +Domain Status: Registered +Creation Date: 09/01/2003 00:00:00 +Expiration Date: 28/02/2023 23:59:00 +Owner Name: +Owner Address: +Owner Locality: +Owner ZipCode: +Owner Locality ZipCode: +Owner Country Code: +Owner Email: +Admin Name: MarkMonitor Inc. +Admin Address: 2150 S Bonito Way Suite 150 +Admin Locality: Meridian +Admin ZipCode: 83642 +Admin Locality ZipCode: ID +Admin Country Code: US +Admin Email: ccops@markmonitor.com +Name Server: ns3.google.com | IPv4: and IPv6: +Name Server: ns4.google.com | IPv4: and IPv6: +Name Server: ns1.google.com | IPv4: and IPv6: +Name Server: ns2.google.com | IPv4: and IPv6: diff --git a/spec/fixtures/responses/whois.dns.pt/pt/status_reserved.expected b/spec/fixtures/responses/whois.dns.pt/pt/status_reserved.expected index 08230654..380892b2 100644 --- a/spec/fixtures/responses/whois.dns.pt/pt/status_reserved.expected +++ b/spec/fixtures/responses/whois.dns.pt/pt/status_reserved.expected @@ -10,14 +10,14 @@ #created_on %s %CLASS{time} - %s %TIME{2009-02-09 00:00:00 UTC} + %s %TIME{2015-05-07 23:40:09 UTC} #updated_on %s %ERROR{AttributeNotSupported} #expires_on - %s == nil - + %s %CLASS{time} + %s %TIME{2026-05-06 23:59:09 UTC} #nameservers %s %CLASS{array} diff --git a/spec/fixtures/responses/whois.dns.pt/pt/status_reserved.txt b/spec/fixtures/responses/whois.dns.pt/pt/status_reserved.txt index d57b65e8..561d97c9 100644 --- a/spec/fixtures/responses/whois.dns.pt/pt/status_reserved.txt +++ b/spec/fixtures/responses/whois.dns.pt/pt/status_reserved.txt @@ -1,24 +1,18 @@ -Nome de domínio / Domain Name: wiki.pt -Data de registo / Creation Date (dd/mm/yyyy): 09/02/2009 -Estado / Status: RESERVED - -Titular / Registrant - Portugalmail - Comunicações S.A. - Rua Ricardo Severo, Nº 3 - 5º Dto. - - 4050-515 Porto - PT - Email: registos@portugalmail.pt - -Entidade Gestora / Billing Contact - Portugalmail - Comunicações S.A. - Email: registos@portugalmail.pt - -Responsável Técnico / Tech Contact - Portugalmail - Comunicações S.A. - Email: registos@portugalmail.pt - -Nameserver Information - - - +Domain: wiki.pt +Domain Status: Reserved +Creation Date: 07/05/2015 23:40:09 +Expiration Date: 06/05/2026 23:59:09 +Owner Name: +Owner Address: +Owner Locality: +Owner ZipCode: +Owner Locality ZipCode: +Owner Country Code: +Owner Email: +Admin Name: SOOMA.COM - WEB SERVICES, LDA +Admin Address: Rua Dom João I 99 +Admin Locality: Porto +Admin ZipCode: 4450-164 +Admin Locality ZipCode: Matosinhos +Admin Country Code: PT +Admin Email: gestao.dominios@sooma.com,daf@sooma.com diff --git a/spec/fixtures/responses/whois.donuts.co/bike/status_available.txt b/spec/fixtures/responses/whois.donuts.co/bike/status_available.txt deleted file mode 100644 index b7682e13..00000000 --- a/spec/fixtures/responses/whois.donuts.co/bike/status_available.txt +++ /dev/null @@ -1,3 +0,0 @@ -Domain not found. - -Terms of Use: Users accessing the Donuts WHOIS service must agree to use the data only for lawful purposes, and under under no circumstances use the data to: Allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the registrar's own existing customers. Enable high volume, automated, electronic processes that send queries or data to the systems of Donuts or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Donuts Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. diff --git a/spec/fixtures/responses/whois.donuts.co/bike/status_registered.expected b/spec/fixtures/responses/whois.donuts.co/bike/status_registered.expected deleted file mode 100644 index 5a83ba4c..00000000 --- a/spec/fixtures/responses/whois.donuts.co/bike/status_registered.expected +++ /dev/null @@ -1,110 +0,0 @@ -#domain - %s == "whereismy.bike" - -#domain_id - %s == "e25432d5c94440c4a8ca0e5ecbc13904-DONUTS" - - -#status - %s == :registered - -#available? - %s == false - -#registered? - %s == true - - -#created_on - %s %CLASS{time} - %s %TIME{2016-02-26 16:49:10 UTC} - -#updated_on - %s %CLASS{time} - %s %TIME{2017-04-12 16:49:41 UTC} - -#expires_on - %s %CLASS{time} - %s %TIME{2018-02-26 16:49:10 UTC} - - -#registrar - %s %CLASS{registrar} - %s.id == "146" - %s.name == "GoDaddy.com, LLC" - %s.organization == "GoDaddy.com, LLC" - %s.url == "http://www.godaddy.com/domains/search.aspx?ci=8990" - - -#registrant_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "2a94fd50b2ca42c685828dfa8c07e23d-DONUTS" - %s[0].name == "Marko Matenda" - %s[0].organization == "" - %s[0].address == "Ante Starcevica 9." - %s[0].city == "Bjelovar" - %s[0].zip == "43000" - %s[0].state == "Croatia" - %s[0].country == nil - %s[0].country_code == "HR" - %s[0].phone == "+385.916283632" - %s[0].fax == "" - %s[0].email == "marko.matenda@gmail.com" - %s[0].created_on == nil - %s[0].updated_on == nil - -#admin_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "a627ad7dc57343858c4397b9e3f9a530-DONUTS" - %s[0].name == "Marko Matenda" - %s[0].organization == "" - %s[0].address == "Ante Starcevica 9." - %s[0].city == "Bjelovar" - %s[0].zip == "43000" - %s[0].state == "Croatia" - %s[0].country == nil - %s[0].country_code == "HR" - %s[0].phone == "+385.916283632" - %s[0].fax == "" - %s[0].email == "marko.matenda@gmail.com" - %s[0].created_on == nil - %s[0].updated_on == nil - -#technical_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "08094e7dd78143d6b83338c5c59a8160-DONUTS" - %s[0].name == "Marko Matenda" - %s[0].organization == "" - %s[0].address == "Ante Starcevica 9." - %s[0].city == "Bjelovar" - %s[0].zip == "43000" - %s[0].state == "Croatia" - %s[0].country == nil - %s[0].country_code == "HR" - %s[0].phone == "+385.916283632" - %s[0].fax == "" - %s[0].email == "marko.matenda@gmail.com" - %s[0].created_on == nil - %s[0].updated_on == nil - - -#nameservers - %s %CLASS{array} - %s %SIZE{2} - %s[0] %CLASS{nameserver} - %s[0].name == "ns68.domaincontrol.com" - %s[0].ipv4 == nil - %s[0].ipv6 == nil - %s[1] %CLASS{nameserver} - %s[1].name == "ns67.domaincontrol.com" - %s[1].ipv4 == nil - %s[1].ipv6 == nil diff --git a/spec/fixtures/responses/whois.donuts.co/bike/status_registered.txt b/spec/fixtures/responses/whois.donuts.co/bike/status_registered.txt deleted file mode 100644 index 2609c9e4..00000000 --- a/spec/fixtures/responses/whois.donuts.co/bike/status_registered.txt +++ /dev/null @@ -1,63 +0,0 @@ -Domain Name: whereismy.bike -Registry Domain ID: e25432d5c94440c4a8ca0e5ecbc13904-DONUTS -Registrar WHOIS Server: who.godaddy.com/ -Registrar URL: http://www.godaddy.com/domains/search.aspx?ci=8990 -Updated Date: 2017-04-12T16:49:41Z -Creation Date: 2016-02-26T16:49:10Z -Registry Expiry Date: 2018-02-26T16:49:10Z -Registrar: GoDaddy.com, LLC -Registrar IANA ID: 146 -Registrar Abuse Contact Email: abuse@godaddy.com -Registrar Abuse Contact Phone: +1.4806242505 -Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited -Domain Status: clientRenewProhibited https://icann.org/epp#clientRenewProhibited -Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited -Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited -Registry Registrant ID: 2a94fd50b2ca42c685828dfa8c07e23d-DONUTS -Registrant Name: Marko Matenda -Registrant Organization: -Registrant Street: Ante Starcevica 9. -Registrant City: Bjelovar -Registrant State/Province: Croatia -Registrant Postal Code: 43000 -Registrant Country: HR -Registrant Phone: +385.916283632 -Registrant Phone Ext: -Registrant Fax: -Registrant Fax Ext: -Registrant Email: marko.matenda@gmail.com -Registry Admin ID: a627ad7dc57343858c4397b9e3f9a530-DONUTS -Admin Name: Marko Matenda -Admin Organization: -Admin Street: Ante Starcevica 9. -Admin City: Bjelovar -Admin State/Province: Croatia -Admin Postal Code: 43000 -Admin Country: HR -Admin Phone: +385.916283632 -Admin Phone Ext: -Admin Fax: -Admin Fax Ext: -Admin Email: marko.matenda@gmail.com -Registry Tech ID: 08094e7dd78143d6b83338c5c59a8160-DONUTS -Tech Name: Marko Matenda -Tech Organization: -Tech Street: Ante Starcevica 9. -Tech City: Bjelovar -Tech State/Province: Croatia -Tech Postal Code: 43000 -Tech Country: HR -Tech Phone: +385.916283632 -Tech Phone Ext: -Tech Fax: -Tech Fax Ext: -Tech Email: marko.matenda@gmail.com -Name Server: ns68.domaincontrol.com -Name Server: ns67.domaincontrol.com -DNSSEC: unsigned -URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ ->>> Last update of WHOIS database: 2017-08-03T10:21:19Z <<< - -For more information on Whois status codes, please visit https://icann.org/epp - -Terms of Use: Users accessing the Donuts WHOIS service must agree to use the data only for lawful purposes, and under under no circumstances use the data to: Allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the registrar's own existing customers. Enable high volume, automated, electronic processes that send queries or data to the systems of Donuts or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Donuts Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. diff --git a/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/response_throttled.expected b/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/response_throttled.expected new file mode 100644 index 00000000..4302c673 --- /dev/null +++ b/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/response_throttled.expected @@ -0,0 +1,2 @@ +#response_throttled? + %s == true diff --git a/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/response_throttled.txt b/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/response_throttled.txt new file mode 100644 index 00000000..4cad7291 --- /dev/null +++ b/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/response_throttled.txt @@ -0,0 +1 @@ +LIMIT EXCEEDED diff --git a/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/status_available.expected b/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/status_available.expected index 2c3fe7a8..8f020a7a 100644 --- a/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/status_available.expected +++ b/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain diff --git a/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/status_available.txt b/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/status_available.txt index 679aadb9..ad047fa2 100644 --- a/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/status_available.txt +++ b/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/status_available.txt @@ -1 +1,6 @@ NOT FOUND +>>> Last update of WHOIS database: 2021-11-09T16:13:26Z <<< + +Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. + +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/status_registered.expected b/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/status_registered.expected index b3559dc5..07114061 100644 --- a/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/status_registered.expected +++ b/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/status_registered.expected @@ -1,16 +1,15 @@ #disclaimer - %s == "mTLD WHOIS LEGAL STATEMENT AND TERMS & CONDITIONS: The WHOIS service offered by mTLD and the access to the records in the mTLD WHOIS database are provided for information purposes only. It allows persons to check whether a specific domain name is still available or not and to obtain information related to the registration records of existing domain names. mTLD cannot, under any circumstances, be held liable in case the stored information would prove to be wrong, incomplete, or not accurate in any sense. By submitting a query you agree not to use the information made available to: allow, enable or otherwise support the transmission of unsolicited, commercial advertising or other solicitations whether via email or otherwise; target advertising in any possible way; or to cause nuisance in any possible way to the registrants by sending (whether by automated, electronic processes capable of enabling high volumes or other possible means) messages to them. Without prejudice to the above, it is explicitly forbidden to extract, copy and/or use or re-utilise in any form and by any means (electronically or not) the whole or a quantitatively or qualitatively substantial part of the contents of the WHOIS database without prior and explicit permission by mTLD, nor in any attempt hereof, or to apply automated, electronic processes to mTLD (or its systems). You agree that any reproduction and/or transmission of data for commercial purposes will always be considered as the extraction of a substantial part of the content of the WHOIS database. By submitting the query you agree to abide by this policy and accept that mTLD can take measures to limit the use of its WHOIS services in order to protect the privacy of its registrants or the integrity of the database." - + %s == "Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == "google.mobi" #domain_id - %s == "D117-MOBI" + %s == "D102500000000000117-LRMS" #status - %s == ["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED"] + %s == ["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"] #available? %s == false @@ -25,70 +24,43 @@ #updated_on %s %CLASS{time} - %s %TIME{2013-04-09 09:24:02 UTC} + %s %TIME{2021-04-09 09:29:29 UTC} #expires_on %s %CLASS{time} - %s %TIME{2014-05-11 21:08:42 UTC} + %s %TIME{2022-05-11 21:08:42 UTC} #registrar %s %CLASS{registrar} %s.id == "292" %s.name == "MarkMonitor Inc." - %s.organization == nil - %s.url == nil + %s.url == "http://www.markmonitor.com" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "mmr-14290820" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" + %s[0].id == nil + %s[0].name == nil + %s[0].organization == "Google LLC" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil %s[0].state == "CA" %s[0].country_code == "US" - %s[0].phone == "+1.6506234000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == nil #admin_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "mmr-14290820" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country_code == "US" - %s[0].phone == "+1.6506234000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s %SIZE{0} #technical_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "mmr-14290820" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country_code == "US" - %s[0].phone == "+1.6506234000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s %SIZE{0} #nameservers diff --git a/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/status_registered.txt b/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/status_registered.txt index b8588b63..fde9ffb0 100644 --- a/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/status_registered.txt +++ b/spec/fixtures/responses/whois.dotmobiregistry.net/mobi/status_registered.txt @@ -1,81 +1,32 @@ -mTLD WHOIS LEGAL STATEMENT AND TERMS & CONDITIONS: The WHOIS service offered -by mTLD and the access to the records in the mTLD WHOIS database are provided -for information purposes only. It allows persons to check whether a specific -domain name is still available or not and to obtain information related to -the registration records of existing domain names. mTLD cannot, under any -circumstances, be held liable in case the stored information would prove to -be wrong, incomplete, or not accurate in any sense. By submitting a query -you agree not to use the information made available to: allow, enable or -otherwise support the transmission of unsolicited, commercial advertising or -other solicitations whether via email or otherwise; target advertising in any -possible way; or to cause nuisance in any possible way to the registrants by -sending (whether by automated, electronic processes capable of enabling high -volumes or other possible means) messages to them. Without prejudice to the -above, it is explicitly forbidden to extract, copy and/or use or re-utilise -in any form and by any means (electronically or not) the whole or a -quantitatively or qualitatively substantial part of the contents of the WHOIS -database without prior and explicit permission by mTLD, nor in any attempt -hereof, or to apply automated, electronic processes to mTLD (or its systems). -You agree that any reproduction and/or transmission of data for commercial -purposes will always be considered as the extraction of a substantial part of -the content of the WHOIS database. By submitting the query you agree to abide -by this policy and accept that mTLD can take measures to limit the use of its -WHOIS services in order to protect the privacy of its registrants or the -integrity of the database. +Domain Name: GOOGLE.MOBI +Registry Domain ID: D102500000000000117-LRMS +Registrar WHOIS Server: whois.markmonitor.com +Registrar URL: http://www.markmonitor.com +Updated Date: 2021-04-09T09:29:29Z +Creation Date: 2006-05-11T21:08:42Z +Registry Expiry Date: 2022-05-11T21:08:42Z +Registrar Registration Expiration Date: +Registrar: MarkMonitor Inc. +Registrar IANA ID: 292 +Registrar Abuse Contact Email: abusecomplaints@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +Reseller: +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Registrant Organization: Google LLC +Registrant State/Province: CA +Registrant Country: US +Name Server: NS1.GOOGLE.COM +Name Server: NS2.GOOGLE.COM +Name Server: NS3.GOOGLE.COM +Name Server: NS4.GOOGLE.COM +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-09T16:13:10Z <<< -Domain ID:D117-MOBI -Domain Name:GOOGLE.MOBI -Created On:11-May-2006 21:08:42 UTC -Last Updated On:09-Apr-2013 09:24:02 UTC -Expiration Date:11-May-2014 21:08:42 UTC -Last Transferred Date:22-Sep-2006 10:24:54 UTC -Trademark Name:GOOGLE -Trademark Country:US -Trademark Number:2884502 -Date Trademark Applied For:1998-09-16 -Date Trademark Registered:2004-09-14 -Sponsoring Registrar:MarkMonitor Inc. (292) -Created by Registrar:mTLD Mobile Top Level Domain (4000002) -Last Updated by Registrar:MarkMonitor Inc. (292) -Status:CLIENT DELETE PROHIBITED -Status:CLIENT TRANSFER PROHIBITED -Status:CLIENT UPDATE PROHIBITED -Registrant ID:mmr-14290820 -Registrant Name:DNS Admin -Registrant Organization:Google Inc. -Registrant Street1:1600 Amphitheatre Parkway -Registrant City:Mountain View -Registrant State/Province:CA -Registrant Postal Code:94043 -Registrant Country:US -Registrant Phone:+1.6506234000 -Registrant FAX:+1.6506188571 -Registrant Email:dns-admin@google.com -Admin ID:mmr-14290820 -Admin Name:DNS Admin -Admin Organization:Google Inc. -Admin Street1:1600 Amphitheatre Parkway -Admin City:Mountain View -Admin State/Province:CA -Admin Postal Code:94043 -Admin Country:US -Admin Phone:+1.6506234000 -Admin FAX:+1.6506188571 -Admin Email:dns-admin@google.com -Tech ID:mmr-14290820 -Tech Name:DNS Admin -Tech Organization:Google Inc. -Tech Street1:1600 Amphitheatre Parkway -Tech City:Mountain View -Tech State/Province:CA -Tech Postal Code:94043 -Tech Country:US -Tech Phone:+1.6506234000 -Tech FAX:+1.6506188571 -Tech Email:dns-admin@google.com -Name Server:NS1.GOOGLE.COM -Name Server:NS2.GOOGLE.COM -Name Server:NS3.GOOGLE.COM -Name Server:NS4.GOOGLE.COM +For more information on Whois status codes, please visit https://icann.org/epp - +Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. + +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.dotpostregistry.net/post/status_available.expected b/spec/fixtures/responses/whois.dotpostregistry.net/post/status_available.expected index 2c3fe7a8..65f9ce91 100644 --- a/spec/fixtures/responses/whois.dotpostregistry.net/post/status_available.expected +++ b/spec/fixtures/responses/whois.dotpostregistry.net/post/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain diff --git a/spec/fixtures/responses/whois.dotpostregistry.net/post/status_available.txt b/spec/fixtures/responses/whois.dotpostregistry.net/post/status_available.txt index 679aadb9..857c824c 100644 --- a/spec/fixtures/responses/whois.dotpostregistry.net/post/status_available.txt +++ b/spec/fixtures/responses/whois.dotpostregistry.net/post/status_available.txt @@ -1 +1,5 @@ NOT FOUND +>>> Last update of WHOIS database: 2021-11-09T16:19:47Z <<< + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.dotpostregistry.net/post/status_registered.expected b/spec/fixtures/responses/whois.dotpostregistry.net/post/status_registered.expected index b97282f2..9cb45d9e 100644 --- a/spec/fixtures/responses/whois.dotpostregistry.net/post/status_registered.expected +++ b/spec/fixtures/responses/whois.dotpostregistry.net/post/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "Access to .POST REGISTRY WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the .POST Registry registry database. The data in this record is provided by .POST Registry for informational purposes only, and .POST Registry does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to: (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. .POST Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy." + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == "posteitaliane.post" #domain_id - %s == "D19482-POST" + %s == "D108700000000019482-AGRS" #status - %s == ["TRANSFER PROHIBITED"] + %s == ["ok https://icann.org/epp#ok"] #available? %s == false @@ -25,26 +25,25 @@ #updated_on %s %CLASS{time} - %s %TIME{2012-09-21 12:07:40 UTC} + %s %TIME{2021-09-21 22:31:15 UTC} #expires_on %s %CLASS{time} - %s %TIME{2014-09-21 12:03:07 UTC} + %s %TIME{2022-09-21 12:03:07 UTC} #registrar %s %CLASS{registrar} - %s.id == "R4947-POST" + %s.id == "9999" %s.name == "Universal Postal Union" - %s.organization == nil - %s.url == nil + %s.url == "" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "ITPI30001" + %s[0].id == "C19309314-AGRS" %s[0].name == "Poste Italiane" %s[0].organization == "Poste Italiane" %s[0].address == "Viale Europa 190" @@ -61,7 +60,7 @@ %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "UPU_C1002" + %s[0].id == "C19309312-AGRS" %s[0].name == "Giovanni Brardinoni" %s[0].organization == "Poste Italiane" %s[0].address == "Viale Europa 175" @@ -78,7 +77,7 @@ %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "UPU_C1001" + %s[0].id == "C19309311-AGRS" %s[0].name == "Andrea Speranza" %s[0].organization == "Poste Italiane" %s[0].address == "Viale Europa 175" diff --git a/spec/fixtures/responses/whois.dotpostregistry.net/post/status_registered.txt b/spec/fixtures/responses/whois.dotpostregistry.net/post/status_registered.txt index d697b4df..603fe2cb 100644 --- a/spec/fixtures/responses/whois.dotpostregistry.net/post/status_registered.txt +++ b/spec/fixtures/responses/whois.dotpostregistry.net/post/status_registered.txt @@ -1,106 +1,63 @@ -Access to .POST REGISTRY WHOIS information is provided to assist persons in -determining the contents of a domain name registration record in the -.POST Registry registry database. The data in this record is provided by -.POST Registry for informational purposes only, and .POST Registry does not -guarantee its accuracy. This service is intended only for query-based -access. You agree that you will use this data only for lawful purposes -and that, under no circumstances will you use this data to: (a) allow, -enable, or otherwise support the transmission by e-mail, telephone, or -facsimile of mass unsolicited, commercial advertising or solicitations -to entities other than the data recipient's own existing customers; or -(b) enable high volume, automated, electronic processes that send -queries or data to the systems of Registry Operator, a Registrar, or -Afilias except as reasonably necessary to register domain names or -modify existing registrations. All rights reserved. .POST Registry reserves -the right to modify these terms at any time. By submitting this query, -you agree to abide by this policy. - -Domain ID:D19482-POST -Domain Name:POSTEITALIANE.POST -Created On:21-Sep-2012 12:03:07 UTC -Last Updated On:21-Sep-2012 12:07:40 UTC -Expiration Date:21-Sep-2014 12:03:07 UTC -Sponsoring Registrar:Universal Postal Union (R4947-POST) -Status:TRANSFER PROHIBITED -Registrant ID:ITPI30001 -Registrant Name:Poste Italiane -Registrant Organization:Poste Italiane -Registrant Street1:Viale Europa 190 -Registrant Street2: -Registrant Street3: -Registrant City:Rome +Domain Name: POSTEITALIANE.POST +Registry Domain ID: D108700000000019482-AGRS +Registrar WHOIS Server: +Registrar URL: +Updated Date: 2021-09-21T22:31:15Z +Creation Date: 2012-09-21T12:03:07Z +Registry Expiry Date: 2022-09-21T12:03:07Z +Registrar Registration Expiration Date: +Registrar: Universal Postal Union +Registrar IANA ID: 9999 +Registrar Abuse Contact Email: +Registrar Abuse Contact Phone: +Reseller: +Domain Status: ok https://icann.org/epp#ok +Registry Registrant ID: C19309314-AGRS +Registrant Name: Poste Italiane +Registrant Organization: Poste Italiane +Registrant Street: Viale Europa 190 +Registrant City: Rome Registrant State/Province: -Registrant Postal Code:00144 -Registrant Country:IT -Registrant Phone:+39.0659581 -Registrant Phone Ext.: -Registrant FAX:+39.065942298 -Registrant FAX Ext.: -Registrant Email:info@poste.it -Admin ID:UPU_C1002 -Admin Name:Giovanni Brardinoni -Admin Organization:Poste Italiane -Admin Street1:Viale Europa 175 -Admin Street2: -Admin Street3: -Admin City:Rome +Registrant Postal Code: 00144 +Registrant Country: IT +Registrant Phone: +39.0659581 +Registrant Phone Ext: +Registrant Fax: +39.065942298 +Registrant Fax Ext: +Registrant Email: info@poste.it +Registry Admin ID: C19309312-AGRS +Admin Name: Giovanni Brardinoni +Admin Organization: Poste Italiane +Admin Street: Viale Europa 175 +Admin City: Rome Admin State/Province: -Admin Postal Code:00144 -Admin Country:IT -Admin Phone:+39.0659583671 -Admin Phone Ext.: -Admin FAX:+39.0698688651 -Admin FAX Ext.: -Admin Email:Giovanni.Brardinoni@Postecom.it -Billing ID:UPU_C1003 -Billing Name:Plautina Loreti -Billing Organization:Poste Italiane -Billing Street1:Viale Europa 175 -Billing Street2: -Billing Street3: -Billing City:Rome -Billing State/Province: -Billing Postal Code:00144 -Billing Country:IT -Billing Phone:+39.0659585699 -Billing Phone Ext.: -Billing FAX:+39.0659589591 -Billing FAX Ext.: -Billing Email:loretip@posteitaliane.it -Tech ID:UPU_C1001 -Tech Name:Andrea Speranza -Tech Organization:Poste Italiane -Tech Street1:Viale Europa 175 -Tech Street2: -Tech Street3: -Tech City:Rome +Admin Postal Code: 00144 +Admin Country: IT +Admin Phone: +39.0659583671 +Admin Phone Ext: +Admin Fax: +39.0698688651 +Admin Fax Ext: +Admin Email: Giovanni.Brardinoni@Postecom.it +Registry Tech ID: C19309311-AGRS +Tech Name: Andrea Speranza +Tech Organization: Poste Italiane +Tech Street: Viale Europa 175 +Tech City: Rome Tech State/Province: -Tech Postal Code:00144 -Tech Country:IT -Tech Phone:+39.0659583086 -Tech Phone Ext.: -Tech FAX:+39.0659582032 -Tech FAX Ext.: -Tech Email:netsecurity@postecom.it -Name Server:DNS.POSTE.IT -Name Server:DNS2.POSTE.IT -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -DNSSEC:Signed -DS Created 1:21-Sep-2012 12:04:45 UTC -DS Key Tag 1:43356 -Algorithm 1:7 -Digest Type 1:1 -Digest 1:DB013B5320B837FB3DF1F6A3ADCEA54910729ECB -DS Maximum Signature Life 1:3456000 seconds +Tech Postal Code: 00144 +Tech Country: IT +Tech Phone: +39.0659583086 +Tech Phone Ext: +Tech Fax: +39.0659582032 +Tech Fax Ext: +Tech Email: netsecurity@postecom.it +Name Server: DNS.POSTE.IT +Name Server: DNS2.POSTE.IT +DNSSEC: signedDelegation +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-09T16:19:33Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp - +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.dreamhost.com/status_registered.expected b/spec/fixtures/responses/whois.dreamhost.com/status_registered.expected index 6e12d679..e6166643 100644 --- a/spec/fixtures/responses/whois.dreamhost.com/status_registered.expected +++ b/spec/fixtures/responses/whois.dreamhost.com/status_registered.expected @@ -25,7 +25,6 @@ %s %CLASS{registrar} %s.id == "431" %s.name == "DREAMHOST" - %s.organization == "DREAMHOST" %s.url == "www.dreamhost.com" #registrant_contacts diff --git a/spec/fixtures/responses/whois.enom.com/status_registered.expected b/spec/fixtures/responses/whois.enom.com/status_registered.expected index 35130ef3..94c046a3 100644 --- a/spec/fixtures/responses/whois.enom.com/status_registered.expected +++ b/spec/fixtures/responses/whois.enom.com/status_registered.expected @@ -30,7 +30,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "eNom, Inc." - %s.organization == "eNom, Inc." %s.url == nil @@ -48,9 +47,9 @@ %s[0].state == "WA" %s[0].country == nil %s[0].country_code == "US" - %s[0].phone == "" - %s[0].fax == "" - %s[0].email == "" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == nil %s[0].created_on == nil %s[0].updated_on == nil diff --git a/spec/fixtures/responses/whois.eu/eu/status_registered.expected b/spec/fixtures/responses/whois.eu/eu/status_registered.expected index 53beed44..fe0e4558 100644 --- a/spec/fixtures/responses/whois.eu/eu/status_registered.expected +++ b/spec/fixtures/responses/whois.eu/eu/status_registered.expected @@ -29,7 +29,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor Inc." - %s.organization == nil %s.url == "https://www.markmonitor.com/" diff --git a/spec/fixtures/responses/whois.fi/fi/property_status_graceperiod.expected b/spec/fixtures/responses/whois.fi/fi/property_status_graceperiod.expected index 6e0a0db4..5f1ae17b 100644 --- a/spec/fixtures/responses/whois.fi/fi/property_status_graceperiod.expected +++ b/spec/fixtures/responses/whois.fi/fi/property_status_graceperiod.expected @@ -1,9 +1,9 @@ #disclaimer - %s == "More information is available at https://domain.fi/\nCopyright (c) Finnish Communications Regulatory Authority" + %s == "Copyright (c) Finnish Transport and Communications Agency Traficom" #domain - %s == "oogle.fi" + %s == "kalatalousministeri.fi" #domain_id %s %ERROR{AttributeNotSupported} @@ -21,51 +21,69 @@ #created_on %s %CLASS{time} - %s %TIME{2012-06-21} + %s %TIME{2018-03-14 17:47:42} #updated_on %s %CLASS{time} - %s %TIME{2013-06-22} + %s %TIME{2019-11-06} #expires_on %s %CLASS{time} - %s %TIME{2013-06-21} + %s %TIME{2020-03-14 17:47:42} #registrar - %s %ERROR{AttributeNotSupported} + %s.name == "Gandi SAS" + %s.url == "www.gandi.net" #registrant_contacts + %s %ERROR{AttributeNotSupported} + +#admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "NURMI" - %s[0].name == "-" - %s[0].organization == "Minna" - %s[0].address == "Huovitie 3" - %s[0].city == "HELSINKI" - %s[0].zip == "00400" + %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE + %s[0].id == "2823344-7" + %s[0].name == "Digiteam Oy" + %s[0].address == "Myllyniityntie 71" + %s[0].city == "Lohja" + %s[0].zip == "08100" %s[0].state == nil - %s[0].country == nil + %s[0].country == "Finland" %s[0].country_code == nil - %s[0].phone == "+358201599789" + %s[0].phone == "+358.503716096" %s[0].fax == nil - %s[0].email == nil + %s[0].email == "" %s[0].created_on == nil %s[0].updated_on == nil -#admin_contacts - %s %ERROR{AttributeNotSupported} - #technical_contacts - %s %ERROR{AttributeNotSupported} + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL + %s[0].id == nil + %s[0].name == "Seravo Oy" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil + %s[0].state == nil + %s[0].country == nil + %s[0].country_code == nil + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == "hostmaster@seravo.com" + %s[0].created_on == nil + %s[0].updated_on == nil #nameservers %s %CLASS{array} - %s %SIZE{2} + %s %SIZE{3} %s[0] %CLASS{nameserver} - %s[0].name == "a.ns.netim.net" + %s[0].name == "ns-184-c.gandi.net" %s[1] %CLASS{nameserver} - %s[1].name == "b.ns.netim.net" + %s[1].name == "ns-196-a.gandi.net" + %s[2] %CLASS{nameserver} + %s[2].name == "ns-73-b.gandi.net" diff --git a/spec/fixtures/responses/whois.fi/fi/property_status_graceperiod.txt b/spec/fixtures/responses/whois.fi/fi/property_status_graceperiod.txt index 115737dc..9ae61183 100644 --- a/spec/fixtures/responses/whois.fi/fi/property_status_graceperiod.txt +++ b/spec/fixtures/responses/whois.fi/fi/property_status_graceperiod.txt @@ -1,21 +1,45 @@ -IP: UNABLE TO RESOLVE - -domain: oogle.fi -descr: Minna -descr: NURMI -address: - -address: Huovitie 3 -address: 00400 -address: HELSINKI -phone: +358201599789 -status: Grace Period -created: 21.6.2012 -modified: 22.6.2013 -expires: 21.6.2013 -nserver: a.ns.netim.net [Ok] -nserver: b.ns.netim.net [Ok] -dnssec: no - -More information is available at https://domain.fi/ -Copyright (c) Finnish Communications Regulatory Authority + +domain.............: kalatalousministeri.fi +status.............: Grace Period +created............: 14.3.2018 17:47:42 +expires............: 14.3.2020 17:47:42 +available..........: 14.4.2020 17:47:42 +modified...........: 6.11.2019 +RegistryLock.......: no + +Nameservers + +nserver............: ns-184-c.gandi.net [OK] +nserver............: ns-196-a.gandi.net [OK] +nserver............: ns-73-b.gandi.net [OK] + +DNSSEC + +dnssec.............: no + +Holder + +name...............: Digiteam Oy +register number....: 2823344-7 +address............: Myllyniityntie 71 +address............: 08100 +address............: Lohja +country............: Finland +phone..............: +358.503716096 +holder email.......: + +Registrar + +registrar..........: Gandi SAS +www................: www.gandi.net + +Tech + +name...............: Seravo Oy +email..............: hostmaster@seravo.com + +>>> Last update of WHOIS database: 22.3.2020 13:47:27 (EET) <<< + + +Copyright (c) Finnish Transport and Communications Agency Traficom diff --git a/spec/fixtures/responses/whois.fi/fi/status_available.expected b/spec/fixtures/responses/whois.fi/fi/status_available.expected index 76acacb4..7a7183ac 100644 --- a/spec/fixtures/responses/whois.fi/fi/status_available.expected +++ b/spec/fixtures/responses/whois.fi/fi/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == "More information is available at https://domain.fi/\nCopyright (c) Finnish Communications Regulatory Authority" + %s == "Copyright (c) Finnish Transport and Communications Agency Traficom" #domain @@ -30,17 +30,19 @@ #registrar - %s %ERROR{AttributeNotSupported} + %s == nil #registrant_contacts - %s %CLASS{array} - %s == [] + %s %ERROR{AttributeNotSupported} #admin_contacts - %s %ERROR{AttributeNotSupported} + %s %CLASS{array} + %s == [] #technical_contacts - %s %ERROR{AttributeNotSupported} + %s %CLASS{array} + %s == [] + #nameservers diff --git a/spec/fixtures/responses/whois.fi/fi/status_available.txt b/spec/fixtures/responses/whois.fi/fi/status_available.txt index d0e3510d..d1af02bf 100644 --- a/spec/fixtures/responses/whois.fi/fi/status_available.txt +++ b/spec/fixtures/responses/whois.fi/fi/status_available.txt @@ -1,6 +1,5 @@ Domain not found -More information is available at https://domain.fi/ -Copyright (c) Finnish Communications Regulatory Authority +Copyright (c) Finnish Transport and Communications Agency Traficom diff --git a/spec/fixtures/responses/whois.fi/fi/status_registered.expected b/spec/fixtures/responses/whois.fi/fi/status_registered.expected index 503af845..b64ec7df 100644 --- a/spec/fixtures/responses/whois.fi/fi/status_registered.expected +++ b/spec/fixtures/responses/whois.fi/fi/status_registered.expected @@ -1,5 +1,5 @@ #disclaimer - %s == "More information is available at https://domain.fi/\nCopyright (c) Finnish Communications Regulatory Authority" + %s == "Copyright (c) Finnish Transport and Communications Agency Traficom" #domain @@ -25,51 +25,71 @@ #updated_on %s %CLASS{time} - %s %TIME{2013-06-07} + %s %TIME{2019-06-02} #expires_on %s %CLASS{time} - %s %TIME{2014-07-04} + %s %TIME{2020-07-04 10:15:55} #registrar - %s %ERROR{AttributeNotSupported} + %s.id == nil + %s.name == "MarkMonitor Inc." + %s.url == "www.markmonitor.com" #registrant_contacts + %s %ERROR{AttributeNotSupported} + + +#admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "09073468" - %s[0].name == "Domain Administrator" - %s[0].organization == "Google Finland Oy" - %s[0].address == "Mannerheimintie 12 B" - %s[0].city == "HELSINKI" - %s[0].zip == "00100" + %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE + %s[0].id == "3582691" + %s[0].name == "Google LLC" + %s[0].organization == nil + %s[0].address == "1600 Amphitheatre Parkway" + %s[0].zip == "94043" + %s[0].city == "Mountain View" %s[0].state == nil - %s[0].country == nil + %s[0].country == "United States of America" %s[0].country_code == nil - %s[0].phone == "35896966890" + %s[0].phone == "+1.6502530000" %s[0].fax == nil - %s[0].email == nil + %s[0].email == "" %s[0].created_on == nil %s[0].updated_on == nil -#admin_contacts - %s %ERROR{AttributeNotSupported} - #technical_contacts - %s %ERROR{AttributeNotSupported} + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL + %s[0].id == nil + %s[0].name == "Google LLC" + %s[0].organization == nil + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil + %s[0].state == nil + %s[0].country == nil + %s[0].country_code == nil + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == "ccops@markmonitor.com" + %s[0].created_on == nil + %s[0].updated_on == nil #nameservers %s %CLASS{array} %s %SIZE{4} %s[0] %CLASS{nameserver} - %s[0].name == "ns1.google.com" + %s[0].name == "ns3.google.com" %s[1] %CLASS{nameserver} - %s[1].name == "ns2.google.com" + %s[1].name == "ns4.google.com" %s[2] %CLASS{nameserver} - %s[2].name == "ns3.google.com" + %s[2].name == "ns1.google.com" %s[3] %CLASS{nameserver} - %s[3].name == "ns4.google.com" + %s[3].name == "ns2.google.com" diff --git a/spec/fixtures/responses/whois.fi/fi/status_registered.txt b/spec/fixtures/responses/whois.fi/fi/status_registered.txt index 22f4d792..aa97cedf 100644 --- a/spec/fixtures/responses/whois.fi/fi/status_registered.txt +++ b/spec/fixtures/responses/whois.fi/fi/status_registered.txt @@ -1,22 +1,47 @@ -domain: google.fi -descr: Google Finland Oy -descr: 09073468 -address: Domain Administrator -address: Mannerheimintie 12 B -address: 00100 -address: HELSINKI -phone: 35896966890 -status: Granted -created: 30.6.2006 -modified: 7.6.2013 -expires: 4.7.2014 -nserver: ns1.google.com [Ok] -nserver: ns2.google.com [Ok] -nserver: ns3.google.com [Ok] -nserver: ns4.google.com [Ok] -dnssec: no - -More information is available at https://domain.fi/ -Copyright (c) Finnish Communications Regulatory Authority +domain.............: google.fi +status.............: Registered +created............: 30.6.2006 00:00:00 +expires............: 4.7.2020 10:15:55 +available..........: 4.8.2020 10:15:55 +modified...........: 2.6.2019 +holder transfer....: 20.11.2018 +RegistryLock.......: locked + +Nameservers + +nserver............: ns3.google.com [OK] +nserver............: ns4.google.com [Technical Error] +nserver............: ns1.google.com [OK] +nserver............: ns2.google.com [OK] + +DNSSEC + +dnssec.............: no + +Holder + +name...............: Google LLC +register number....: 3582691 +address............: 1600 Amphitheatre Parkway +address............: 94043 +address............: Mountain View +country............: United States of America +phone..............: +1.6502530000 +holder email.......: + +Registrar + +registrar..........: MarkMonitor Inc. +www................: www.markmonitor.com + +Tech + +name...............: Google LLC +email..............: ccops@markmonitor.com + +>>> Last update of WHOIS database: 11.3.2020 19:45:14 (EET) <<< + + +Copyright (c) Finnish Transport and Communications Agency Traficom diff --git a/spec/fixtures/responses/whois.fi/fi/status_reserved.expected b/spec/fixtures/responses/whois.fi/fi/status_reserved.expected index facca0df..9e723ffe 100644 --- a/spec/fixtures/responses/whois.fi/fi/status_reserved.expected +++ b/spec/fixtures/responses/whois.fi/fi/status_reserved.expected @@ -1,5 +1,5 @@ #disclaimer - %s == "More information is available at https://domain.fi/\nCopyright (c) Finnish Communications Regulatory Authority" + %s == "Copyright (c) Finnish Transport and Communications Agency Traficom" #domain @@ -30,17 +30,18 @@ #registrar - %s %ERROR{AttributeNotSupported} + %s == nil #registrant_contacts - %s %CLASS{array} - %s == [] + %s %ERROR{AttributeNotSupported} #admin_contacts - %s %ERROR{AttributeNotSupported} + %s %CLASS{array} + %s == [] #technical_contacts - %s %ERROR{AttributeNotSupported} + %s %CLASS{array} + %s == [] #nameservers diff --git a/spec/fixtures/responses/whois.fi/fi/status_reserved.txt b/spec/fixtures/responses/whois.fi/fi/status_reserved.txt index d49a0e24..73a0e9a2 100644 --- a/spec/fixtures/responses/whois.fi/fi/status_reserved.txt +++ b/spec/fixtures/responses/whois.fi/fi/status_reserved.txt @@ -1,6 +1,5 @@ Domain not available -More information is available at https://domain.fi/ -Copyright (c) Finnish Communications Regulatory Authority +Copyright (c) Finnish Transport and Communications Agency Traficom diff --git a/spec/fixtures/responses/whois.gandi.net/status_registered.expected b/spec/fixtures/responses/whois.gandi.net/status_registered.expected index d6ab62fc..14934c85 100644 --- a/spec/fixtures/responses/whois.gandi.net/status_registered.expected +++ b/spec/fixtures/responses/whois.gandi.net/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "81" %s.name == "GANDI SAS" - %s.organization == "GANDI SAS" %s.url == "http://www.gandi.net" #registrant_contacts diff --git a/spec/fixtures/responses/whois.godaddy.com/status_registered.expected b/spec/fixtures/responses/whois.godaddy.com/status_registered.expected index 495a11ae..092fe5fc 100644 --- a/spec/fixtures/responses/whois.godaddy.com/status_registered.expected +++ b/spec/fixtures/responses/whois.godaddy.com/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "146" %s.name == "GoDaddy.com, LLC" - %s.organization == "GoDaddy.com, LLC" %s.url == "http://www.godaddy.com" diff --git a/spec/fixtures/responses/whois.in.ua/in.ua/status_available.expected b/spec/fixtures/responses/whois.in.ua/in.ua/status_available.expected index f304d3ea..3d5a25f8 100644 --- a/spec/fixtures/responses/whois.in.ua/in.ua/status_available.expected +++ b/spec/fixtures/responses/whois.in.ua/in.ua/status_available.expected @@ -9,7 +9,7 @@ #created_on - %s %ERROR{AttributeNotSupported} + %s == nil #updated_on %s == nil diff --git a/spec/fixtures/responses/whois.in.ua/in.ua/status_available.txt b/spec/fixtures/responses/whois.in.ua/in.ua/status_available.txt index 32b98a39..f03d6d0e 100644 --- a/spec/fixtures/responses/whois.in.ua/in.ua/status_available.txt +++ b/spec/fixtures/responses/whois.in.ua/in.ua/status_available.txt @@ -1,4 +1,12 @@ -% In.UA whois server. (whois.in.ua) -% All questions regarding this service please send to help@whois.in.ua -% To search for domains and In.UA maintainers using the web, visit http://whois.in.ua -% No records found for object U34JEDZCQ.IN.UA +% This is the SUNIC WHOIS server. +% The Whois is subject to Terms of use +% See https://hostmaster.ua/documents.php +% +% In the process of delegation of a domain name, +% the Registrant is an entity who uses and manages a certain domain name, +% and the Registrar is a business entity that provides the Registrant +% with the services necessary for the technical maintenance of the +% registration and operation of the domain name. +% For information on the Registrant's domain name, you should contact the Registrar. + +u34jedzcq.in.ua - Domain name does not exist diff --git a/spec/fixtures/responses/whois.in.ua/in.ua/status_registered.expected b/spec/fixtures/responses/whois.in.ua/in.ua/status_registered.expected index 63c8d320..b1b2b244 100644 --- a/spec/fixtures/responses/whois.in.ua/in.ua/status_registered.expected +++ b/spec/fixtures/responses/whois.in.ua/in.ua/status_registered.expected @@ -9,23 +9,24 @@ #created_on - %s %ERROR{AttributeNotSupported} + %s %CLASS{time} + %s %TIME{2007-12-18 20:12:35 +02:00} #updated_on %s %CLASS{time} - %s %TIME{2012-12-16 13:41:04} + %s %TIME{2019-12-03 11:15:10 +02:00} #expires_on %s %CLASS{time} - %s %TIME{2013-12-18 00:00:00} + %s %TIME{2020-12-20 00:00:00 +02:00} #nameservers %s %CLASS{array} %s %SIZE{3} %s[0] %CLASS{nameserver} - %s[0].name == "ns12.uadns.com" + %s[0].name == "ns10.uadns.com" %s[1] %CLASS{nameserver} - %s[1].name == "ns11.uadns.com" + %s[1].name == "ns12.uadns.com" %s[2] %CLASS{nameserver} - %s[2].name == "ns10.uadns.com" + %s[2].name == "ns11.uadns.com" diff --git a/spec/fixtures/responses/whois.in.ua/in.ua/status_registered.txt b/spec/fixtures/responses/whois.in.ua/in.ua/status_registered.txt index fc0adcd8..9aa3f66c 100644 --- a/spec/fixtures/responses/whois.in.ua/in.ua/status_registered.txt +++ b/spec/fixtures/responses/whois.in.ua/in.ua/status_registered.txt @@ -1,16 +1,92 @@ -% In.UA whois server. (whois.in.ua) -% All questions regarding this service please send to help@whois.in.ua -% To search for domains and In.UA maintainers using the web, visit http://whois.in.ua -domain: dle.in.ua -descr: dle.in.ua -admin-c: VP535-UANIC -tech-c: NIC-UANIC -status: OK-UNTIL 20131218000000 -nserver: NS12.UADNS.COM -nserver: NS11.UADNS.COM -nserver: NS10.UADNS.COM -mnt-by: DRS-MNT-INUA -mnt-lower: DRS-MNT-INUA -changed: notify@drs.ua 20121216134104 -source: INUA +% This is the SUNIC WHOIS server. +% The Whois is subject to Terms of use +% See https://hostmaster.ua/documents.php +% +% In the process of delegation of a domain name, +% the Registrant is an entity who uses and manages a certain domain name, +% and the Registrar is a business entity that provides the Registrant +% with the services necessary for the technical maintenance of the +% registration and operation of the domain name. +% For information on the Registrant's domain name, you should contact the Registrar. + +domain: dle.in.ua +dom-public: NO +mnt-by: ua.nic +nserver: ns10.uadns.com +nserver: ns12.uadns.com +nserver: ns11.uadns.com +status: ok +created: 2007-12-18 20:12:35+02 +modified: 2019-12-03 11:15:10+02 +expires: 2020-12-20 00:00:00+02 +source: SUNIC + +% Registrar: +% ========== +registrar: ua.nic +organization: NIC.UA LLC +organization-loc: ТОВ «НІК.ЮЕЙ» +url: http://nic.ua +city: Dnipro +country: UA +abuse-email: abuse@nic.ua +abuse-phone: +380.445933222 +abuse-postal: Ukraine 49000 Dnipro PO/BOX 80 +abuse-postal-loc: UA 49000 Днепр а/я 80 +source: SUNIC + +% Registrant: +% =========== +person: n/a +organization: n/a +address: n/a +person-loc: not published +organization-loc: not published +address-loc: not published +email: not published +phone: not published +fax: not published +mnt-by: sunic +status: linked +status: ok +created: 2017-09-30 01:31:30+03 +modified: 2017-09-30 01:31:30+03 +source: SUNIC + +% Administrative Contacts: +% ======================== +person: n/a +organization: n/a +address: n/a +person-loc: not published +organization-loc: not published +address-loc: not published +email: not published +phone: not published +fax: not published +mnt-by: sunic +status: linked +status: ok +created: 2017-09-30 01:31:30+03 +modified: 2017-09-30 01:31:30+03 +source: SUNIC + + +% Technical Contacts: +% =================== +person: NIC-UANIC +organization: NIC.UA LLC +address: not published +person-loc: n/a +organization-loc: n/a +address-loc: n/a +email: support@nic.ua +phone: +380.445933222 +fax: +380.445937569 +mnt-by: sunic +status: linked +status: ok +created: 2016-09-18 10:37:53+03 +modified: 2016-09-17 10:37:53+03 +source: SUNIC diff --git a/spec/fixtures/responses/whois.inregistry.net/in/property_status_missing.expected b/spec/fixtures/responses/whois.inregistry.net/in/property_status_missing.expected deleted file mode 100644 index ace5213e..00000000 --- a/spec/fixtures/responses/whois.inregistry.net/in/property_status_missing.expected +++ /dev/null @@ -1,2 +0,0 @@ -#status - %s == [] diff --git a/spec/fixtures/responses/whois.inregistry.net/in/property_status_missing.txt b/spec/fixtures/responses/whois.inregistry.net/in/property_status_missing.txt deleted file mode 100644 index 679aadb9..00000000 --- a/spec/fixtures/responses/whois.inregistry.net/in/property_status_missing.txt +++ /dev/null @@ -1 +0,0 @@ -NOT FOUND diff --git a/spec/fixtures/responses/whois.inregistry.net/in/property_status_multiple.expected b/spec/fixtures/responses/whois.inregistry.net/in/property_status_multiple.expected deleted file mode 100644 index f43ba268..00000000 --- a/spec/fixtures/responses/whois.inregistry.net/in/property_status_multiple.expected +++ /dev/null @@ -1,2 +0,0 @@ -#status - %s == ["CLIENT DELETE PROHIBITED", "CLIENT RENEW PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED"] diff --git a/spec/fixtures/responses/whois.inregistry.net/in/property_status_multiple.txt b/spec/fixtures/responses/whois.inregistry.net/in/property_status_multiple.txt deleted file mode 100644 index b83ce08d..00000000 --- a/spec/fixtures/responses/whois.inregistry.net/in/property_status_multiple.txt +++ /dev/null @@ -1,86 +0,0 @@ -Access to .IN WHOIS information is provided to assist persons in -determining the contents of a domain name registration record in the -.IN registry database. The data in this record is provided by -.IN Registry for informational purposes only, and .IN does not -guarantee its accuracy. This service is intended only for query-based -access. You agree that you will use this data only for lawful purposes -and that, under no circumstances will you use this data to: (a) allow, -enable, or otherwise support the transmission by e-mail, telephone, or -facsimile of mass unsolicited, commercial advertising or solicitations -to entities other than the data recipient's own existing customers; or -(b) enable high volume, automated, electronic processes that send -queries or data to the systems of Registry Operator, a Registrar, or -Afilias except as reasonably necessary to register domain names or -modify existing registrations. All rights reserved. .IN reserves -the right to modify these terms at any time. By submitting this query, -you agree to abide by this policy. - -Domain ID:D3271170-AFIN -Domain Name:VIDEOGRATIS.IN -Created On:27-Jan-2009 05:01:05 UTC -Last Updated On:01-Jul-2010 12:55:17 UTC -Expiration Date:27-Jan-2011 05:01:05 UTC -Sponsoring Registrar:GoDaddy.com Inc. (R101-AFIN) -Status:CLIENT DELETE PROHIBITED -Status:CLIENT RENEW PROHIBITED -Status:CLIENT TRANSFER PROHIBITED -Status:CLIENT UPDATE PROHIBITED -Registrant ID:CR51214064 -Registrant Name:claudio spada -Registrant Organization:sirismedia -Registrant Street1:foro buonaparte 69 -Registrant Street2: -Registrant Street3: -Registrant City:milano -Registrant State/Province:italy -Registrant Postal Code:20121 -Registrant Country:AX -Registrant Phone:+91.03902861317 -Registrant Phone Ext.: -Registrant FAX: -Registrant FAX Ext.: -Registrant Email:domini@siris.com -Admin ID:CR51214074 -Admin Name:claudio spada -Admin Organization:sirismedia -Admin Street1:foro buonaparte 69 -Admin Street2: -Admin Street3: -Admin City:milano -Admin State/Province:italy -Admin Postal Code:20121 -Admin Country:AX -Admin Phone:+91.03902861317 -Admin Phone Ext.: -Admin FAX: -Admin FAX Ext.: -Admin Email:domini@siris.com -Tech ID:CR51214069 -Tech Name:claudio spada -Tech Organization:sirismedia -Tech Street1:foro buonaparte 69 -Tech Street2: -Tech Street3: -Tech City:milano -Tech State/Province:italy -Tech Postal Code:20121 -Tech Country:AX -Tech Phone:+91.03902861317 -Tech Phone Ext.: -Tech FAX: -Tech FAX Ext.: -Tech Email:domini@siris.com -Name Server:NS1.SLICEHOST.NET -Name Server:NS2.SLICEHOST.NET -Name Server:NS3.SLICEHOST.NET -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: - diff --git a/spec/fixtures/responses/whois.inregistry.net/in/property_status_ok.expected b/spec/fixtures/responses/whois.inregistry.net/in/property_status_ok.expected deleted file mode 100644 index 0075a8d4..00000000 --- a/spec/fixtures/responses/whois.inregistry.net/in/property_status_ok.expected +++ /dev/null @@ -1,2 +0,0 @@ -#status - %s == ["OK"] diff --git a/spec/fixtures/responses/whois.inregistry.net/in/property_status_ok.txt b/spec/fixtures/responses/whois.inregistry.net/in/property_status_ok.txt deleted file mode 100644 index b57a69f9..00000000 --- a/spec/fixtures/responses/whois.inregistry.net/in/property_status_ok.txt +++ /dev/null @@ -1,83 +0,0 @@ -Access to .IN WHOIS information is provided to assist persons in -determining the contents of a domain name registration record in the -.IN registry database. The data in this record is provided by -.IN Registry for informational purposes only, and .IN does not -guarantee its accuracy. This service is intended only for query-based -access. You agree that you will use this data only for lawful purposes -and that, under no circumstances will you use this data to: (a) allow, -enable, or otherwise support the transmission by e-mail, telephone, or -facsimile of mass unsolicited, commercial advertising or solicitations -to entities other than the data recipient's own existing customers; or -(b) enable high volume, automated, electronic processes that send -queries or data to the systems of Registry Operator, a Registrar, or -Afilias except as reasonably necessary to register domain names or -modify existing registrations. All rights reserved. .IN reserves -the right to modify these terms at any time. By submitting this query, -you agree to abide by this policy. - -Domain ID:D21089-AFIN -Domain Name:GOOGLE.IN -Created On:14-Feb-2005 20:35:14 UTC -Last Updated On:06-Apr-2009 18:20:09 UTC -Expiration Date:14-Feb-2011 20:35:14 UTC -Sponsoring Registrar:Mark Monitor (R84-AFIN) -Status:OK -Registrant ID:EPPIPM-143349 -Registrant Name:Admin DNS -Registrant Organization:GOOGLE INC. -Registrant Street1:1600 Amphitheatre Parkway -Registrant Street2: -Registrant Street3: -Registrant City:Mountain View, CA -Registrant State/Province: -Registrant Postal Code:94043 -Registrant Country:US -Registrant Phone:+1.6503300100 -Registrant Phone Ext.: -Registrant FAX: -Registrant FAX Ext.: -Registrant Email:dns-admin@google.com -Admin ID:EPPIPM-143349 -Admin Name:Admin DNS -Admin Organization:GOOGLE INC. -Admin Street1:1600 Amphitheatre Parkway -Admin Street2: -Admin Street3: -Admin City:Mountain View, CA -Admin State/Province: -Admin Postal Code:94043 -Admin Country:US -Admin Phone:+1.6503300100 -Admin Phone Ext.: -Admin FAX: -Admin FAX Ext.: -Admin Email:dns-admin@google.com -Tech ID:EPPIPM-143349 -Tech Name:Admin DNS -Tech Organization:GOOGLE INC. -Tech Street1:1600 Amphitheatre Parkway -Tech Street2: -Tech Street3: -Tech City:Mountain View, CA -Tech State/Province: -Tech Postal Code:94043 -Tech Country:US -Tech Phone:+1.6503300100 -Tech Phone Ext.: -Tech FAX: -Tech FAX Ext.: -Tech Email:dns-admin@google.com -Name Server:NS1.GOOGLE.COM -Name Server:NS2.GOOGLE.COM -Name Server:NS3.GOOGLE.COM -Name Server:NS4.GOOGLE.COM -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: - diff --git a/spec/fixtures/responses/whois.inregistry.net/in/status_available.expected b/spec/fixtures/responses/whois.inregistry.net/in/status_available.expected deleted file mode 100644 index 2c3fe7a8..00000000 --- a/spec/fixtures/responses/whois.inregistry.net/in/status_available.expected +++ /dev/null @@ -1,50 +0,0 @@ -#disclaimer - %s == nil - - -#domain - %s == nil - -#domain_id - %s == nil - - -#status - %s == [] - -#available? - %s == true - -#registered? - %s == false - - -#created_on - %s == nil - -#updated_on - %s == nil - -#expires_on - %s == nil - - -#registrar - %s == nil - -#registrant_contacts - %s %CLASS{array} - %s == [] - -#admin_contacts - %s %CLASS{array} - %s == [] - -#technical_contacts - %s %CLASS{array} - %s == [] - - -#nameservers - %s %CLASS{array} - %s == [] diff --git a/spec/fixtures/responses/whois.inregistry.net/in/status_available.txt b/spec/fixtures/responses/whois.inregistry.net/in/status_available.txt deleted file mode 100644 index 679aadb9..00000000 --- a/spec/fixtures/responses/whois.inregistry.net/in/status_available.txt +++ /dev/null @@ -1 +0,0 @@ -NOT FOUND diff --git a/spec/fixtures/responses/whois.inregistry.net/in/status_registered.expected b/spec/fixtures/responses/whois.inregistry.net/in/status_registered.expected deleted file mode 100644 index da3d299e..00000000 --- a/spec/fixtures/responses/whois.inregistry.net/in/status_registered.expected +++ /dev/null @@ -1,109 +0,0 @@ -#disclaimer - %s == "Access to .IN WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the .IN registry database. The data in this record is provided by .IN Registry for informational purposes only, and .IN does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. .IN reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy." - - -#domain - %s == "google.in" - -#domain_id - %s == "D21089-AFIN" - - -#status - %s == ["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED"] - -#available? - %s == false - -#registered? - %s == true - - -#created_on - %s %TIME{2005-02-14 20:35:14 UTC} - -#updated_on - %s %TIME{2015-01-13 10:22:36 UTC} - -#expires_on - %s %TIME{2016-02-14 20:35:14 UTC} - - -#registrar - %s %CLASS{registrar} - %s.id == "R84-AFIN" - %s.name == "Mark Monitor" - -#registrant_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "mmr-108695" - %s[0].name == "Christina Chiou" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6502530001" - %s[0].email == "dns-admin@google.com" - %s[0].created_on == nil - %s[0].updated_on == nil - -#admin_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "mmr-108695" - %s[0].name == "Christina Chiou" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6502530001" - %s[0].email == "dns-admin@google.com" - %s[0].created_on == nil - %s[0].updated_on == nil - -#technical_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "mmr-108695" - %s[0].name == "Christina Chiou" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6502530001" - %s[0].email == "dns-admin@google.com" - %s[0].created_on == nil - %s[0].updated_on == nil - - -#nameservers - %s %CLASS{array} - %s %SIZE{4} - %s[0] %CLASS{nameserver} - %s[0] %CLASS{nameserver} - %s[0].name == "ns1.google.com" - %s[1] %CLASS{nameserver} - %s[1].name == "ns2.google.com" - %s[2] %CLASS{nameserver} - %s[2].name == "ns3.google.com" - %s[3] %CLASS{nameserver} - %s[3].name == "ns4.google.com" diff --git a/spec/fixtures/responses/whois.inregistry.net/in/status_registered.txt b/spec/fixtures/responses/whois.inregistry.net/in/status_registered.txt deleted file mode 100644 index e171a879..00000000 --- a/spec/fixtures/responses/whois.inregistry.net/in/status_registered.txt +++ /dev/null @@ -1,70 +0,0 @@ -Access to .IN WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the .IN registry database. The data in this record is provided by .IN Registry for informational purposes only, and .IN does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. .IN reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. - -Domain ID:D21089-AFIN -Domain Name:GOOGLE.IN -Created On:14-Feb-2005 20:35:14 UTC -Last Updated On:13-Jan-2015 10:22:36 UTC -Expiration Date:14-Feb-2016 20:35:14 UTC -Sponsoring Registrar:Mark Monitor (R84-AFIN) -Status:CLIENT DELETE PROHIBITED -Status:CLIENT TRANSFER PROHIBITED -Status:CLIENT UPDATE PROHIBITED -Registrant ID:mmr-108695 -Registrant Name:Christina Chiou -Registrant Organization:Google Inc. -Registrant Street1:1600 Amphitheatre Parkway -Registrant Street2: -Registrant Street3: -Registrant City:Mountain View -Registrant State/Province:CA -Registrant Postal Code:94043 -Registrant Country:US -Registrant Phone:+1.6502530000 -Registrant Phone Ext.: -Registrant FAX:+1.6502530001 -Registrant FAX Ext.: -Registrant Email:dns-admin@google.com -Admin ID:mmr-108695 -Admin Name:Christina Chiou -Admin Organization:Google Inc. -Admin Street1:1600 Amphitheatre Parkway -Admin Street2: -Admin Street3: -Admin City:Mountain View -Admin State/Province:CA -Admin Postal Code:94043 -Admin Country:US -Admin Phone:+1.6502530000 -Admin Phone Ext.: -Admin FAX:+1.6502530001 -Admin FAX Ext.: -Admin Email:dns-admin@google.com -Tech ID:mmr-108695 -Tech Name:Christina Chiou -Tech Organization:Google Inc. -Tech Street1:1600 Amphitheatre Parkway -Tech Street2: -Tech Street3: -Tech City:Mountain View -Tech State/Province:CA -Tech Postal Code:94043 -Tech Country:US -Tech Phone:+1.6502530000 -Tech Phone Ext.: -Tech FAX:+1.6502530001 -Tech FAX Ext.: -Tech Email:dns-admin@google.com -Name Server:NS1.GOOGLE.COM -Name Server:NS2.GOOGLE.COM -Name Server:NS3.GOOGLE.COM -Name Server:NS4.GOOGLE.COM -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -DNSSEC:Unsigned diff --git a/spec/fixtures/responses/whois.jprs.jp/jp/property_registrar.expected b/spec/fixtures/responses/whois.jprs.jp/jp/property_registrar.expected new file mode 100644 index 00000000..48be5fa7 --- /dev/null +++ b/spec/fixtures/responses/whois.jprs.jp/jp/property_registrar.expected @@ -0,0 +1,6 @@ +#registrar + %s %CLASS{registrar} + %s.id == nil + %s.name == "Netowl,Inc." + %s.organization == "Netowl, Inc." + %s.url == nil \ No newline at end of file diff --git a/spec/fixtures/responses/whois.jprs.jp/jp/property_registrar.txt b/spec/fixtures/responses/whois.jprs.jp/jp/property_registrar.txt new file mode 100644 index 00000000..e143c3db --- /dev/null +++ b/spec/fixtures/responses/whois.jprs.jp/jp/property_registrar.txt @@ -0,0 +1,29 @@ +[ JPRS database provides information on network administration. Its use is ] +[ restricted to network administration purposes. For further information, ] +[ use 'whois -h whois.jprs.jp help'. To suppress Japanese output, add'/e' ] +[ at the end of command, e.g. 'whois -h whois.jprs.jp xxx/e'. ] +Domain Information: [ドメイン情報] +[Domain Name] MAILMATE.JP + +[登録者名] ネットオウル株式会社 +[Registrant] Netowl,Inc. + +[Name Server] nitin.ns.cloudflare.com +[Name Server] rosa.ns.cloudflare.com +[Signing Key] + +[登録年月日] 2019/06/17 +[有効期限] 2025/06/30 +[状態] Active +[最終更新] 2024/07/01 01:05:03 (JST) + +Contact Information: [公開連絡窓口] +[名前] ネットオウル株式会社 +[Name] Netowl, Inc. +[Email] whois@netowl.jp +[Web Page] +[郵便番号] +[住所] +[Postal Address] +[電話番号] 075-256-8553 +[FAX番号] \ No newline at end of file diff --git a/spec/fixtures/responses/whois.jprs.jp/jp/status_registered.expected b/spec/fixtures/responses/whois.jprs.jp/jp/status_registered.expected index 4092fec4..cd40be2f 100644 --- a/spec/fixtures/responses/whois.jprs.jp/jp/status_registered.expected +++ b/spec/fixtures/responses/whois.jprs.jp/jp/status_registered.expected @@ -10,15 +10,15 @@ #created_on %s %CLASS{time} - %s %TIME{2005-05-30} + %s %TIME{2005-05-30 00:00:00 JST} #updated_on %s %CLASS{time} - %s %TIME{2013-06-01 01:05:07} + %s %TIME{2021-06-01 01:05:09 JST} #expires_on %s %CLASS{time} - %s %TIME{2014-05-31} + %s %TIME{2022-05-31 00:00:00 JST} #nameservers diff --git a/spec/fixtures/responses/whois.jprs.jp/jp/status_registered.txt b/spec/fixtures/responses/whois.jprs.jp/jp/status_registered.txt index ed59a9a6..a5814f0a 100644 --- a/spec/fixtures/responses/whois.jprs.jp/jp/status_registered.txt +++ b/spec/fixtures/responses/whois.jprs.jp/jp/status_registered.txt @@ -6,7 +6,7 @@ Domain Information: [Domain Name] GOOGLE.JP -[Registrant] Google Inc. +[Registrant] Google LLC [Name Server] ns1.google.com [Name Server] ns2.google.com @@ -15,18 +15,18 @@ Domain Information: [Signing Key] [Created on] 2005/05/30 -[Expires on] 2014/05/31 +[Expires on] 2022/05/31 [Status] Active -[Last Updated] 2013/06/01 01:05:07 (JST) +[Last Updated] 2021/06/01 01:05:09 (JST) Contact Information: -[Name] Google Inc. +[Name] Google LLC [Email] dns-admin@google.com [Web Page] [Postal code] 94043 [Postal Address] Mountain View 1600 Amphitheatre Parkway - US + CA [Phone] 16502530000 [Fax] 16502530001 diff --git a/spec/fixtures/responses/whois.jprs.jp/jp/status_reserved.expected b/spec/fixtures/responses/whois.jprs.jp/jp/status_reserved.expected index ca0447f6..3eac766f 100644 --- a/spec/fixtures/responses/whois.jprs.jp/jp/status_reserved.expected +++ b/spec/fixtures/responses/whois.jprs.jp/jp/status_reserved.expected @@ -13,7 +13,7 @@ #updated_on %s %CLASS{time} - %s %TIME{2001-02-21 00:00:00} + %s %TIME{2001-02-21 00:00:00 JST} #expires_on %s == nil diff --git a/spec/fixtures/responses/whois.jprs.jp/ne.jp/status_registered.expected b/spec/fixtures/responses/whois.jprs.jp/ne.jp/status_registered.expected index b45a55e8..426aa7ef 100644 --- a/spec/fixtures/responses/whois.jprs.jp/ne.jp/status_registered.expected +++ b/spec/fixtures/responses/whois.jprs.jp/ne.jp/status_registered.expected @@ -10,15 +10,15 @@ #created_on %s %CLASS{time} - %s %TIME{2003-09-11} + %s %TIME{2003-09-11 00:00:00 JST} #updated_on %s %CLASS{time} - %s %TIME{2009-10-23 19:22:08} + %s %TIME{2009-10-23 19:22:08 JST} #expires_on %s %CLASS{time} - %s %TIME{2010-09-30} + %s %TIME{2010-09-30 00:00:00 JST} #nameservers diff --git a/spec/fixtures/responses/whois.markmonitor.com/status_registered.expected b/spec/fixtures/responses/whois.markmonitor.com/status_registered.expected index 5ec8aa59..16e64bcd 100644 --- a/spec/fixtures/responses/whois.markmonitor.com/status_registered.expected +++ b/spec/fixtures/responses/whois.markmonitor.com/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "292" %s.name == "MarkMonitor, Inc." - %s.organization == "MarkMonitor, Inc." %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.monic.mo/mo/status_registered.expected b/spec/fixtures/responses/whois.monic.mo/mo/status_registered.expected index cf8346a7..8108ed81 100644 --- a/spec/fixtures/responses/whois.monic.mo/mo/status_registered.expected +++ b/spec/fixtures/responses/whois.monic.mo/mo/status_registered.expected @@ -33,7 +33,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MONIC" - %s.organization == nil %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/whois.nic.mx/mx/property_nameservers_with_ip.expected b/spec/fixtures/responses/whois.mx/mx/property_nameservers_with_ip.expected similarity index 100% rename from spec/fixtures/responses/whois.nic.mx/mx/property_nameservers_with_ip.expected rename to spec/fixtures/responses/whois.mx/mx/property_nameservers_with_ip.expected diff --git a/spec/fixtures/responses/whois.nic.mx/mx/property_nameservers_with_ip.txt b/spec/fixtures/responses/whois.mx/mx/property_nameservers_with_ip.txt similarity index 100% rename from spec/fixtures/responses/whois.nic.mx/mx/property_nameservers_with_ip.txt rename to spec/fixtures/responses/whois.mx/mx/property_nameservers_with_ip.txt diff --git a/spec/fixtures/responses/whois.nic.mx/mx/status_available.expected b/spec/fixtures/responses/whois.mx/mx/status_available.expected similarity index 100% rename from spec/fixtures/responses/whois.nic.mx/mx/status_available.expected rename to spec/fixtures/responses/whois.mx/mx/status_available.expected diff --git a/spec/fixtures/responses/whois.nic.mx/mx/status_available.txt b/spec/fixtures/responses/whois.mx/mx/status_available.txt similarity index 100% rename from spec/fixtures/responses/whois.nic.mx/mx/status_available.txt rename to spec/fixtures/responses/whois.mx/mx/status_available.txt diff --git a/spec/fixtures/responses/whois.nic.mx/mx/status_registered.expected b/spec/fixtures/responses/whois.mx/mx/status_registered.expected similarity index 100% rename from spec/fixtures/responses/whois.nic.mx/mx/status_registered.expected rename to spec/fixtures/responses/whois.mx/mx/status_registered.expected diff --git a/spec/fixtures/responses/whois.nic.mx/mx/status_registered.txt b/spec/fixtures/responses/whois.mx/mx/status_registered.txt similarity index 100% rename from spec/fixtures/responses/whois.nic.mx/mx/status_registered.txt rename to spec/fixtures/responses/whois.mx/mx/status_registered.txt diff --git a/spec/fixtures/responses/whois.na-nic.com.na/na/status_registered.expected b/spec/fixtures/responses/whois.na-nic.com.na/na/status_registered.expected index d7d73311..3bf15741 100644 --- a/spec/fixtures/responses/whois.na-nic.com.na/na/status_registered.expected +++ b/spec/fixtures/responses/whois.na-nic.com.na/na/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor" - %s.organization == nil %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.netcom.cm/cm/status_registered.expected b/spec/fixtures/responses/whois.netcom.cm/cm/status_registered.expected index 6f1cd6f7..0e77e8de 100644 --- a/spec/fixtures/responses/whois.netcom.cm/cm/status_registered.expected +++ b/spec/fixtures/responses/whois.netcom.cm/cm/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor Inc." - %s.organization == nil %s.url == nil diff --git a/spec/fixtures/responses/whois.netcom.cm/cm/status_suspended.expected b/spec/fixtures/responses/whois.netcom.cm/cm/status_suspended.expected index b3d4b163..8197ce4c 100644 --- a/spec/fixtures/responses/whois.netcom.cm/cm/status_suspended.expected +++ b/spec/fixtures/responses/whois.netcom.cm/cm/status_suspended.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "Registrar ANTIC" - %s.organization == nil %s.url == nil diff --git a/spec/fixtures/responses/whois.networksolutions.com/status_registered.expected b/spec/fixtures/responses/whois.networksolutions.com/status_registered.expected index 22ff0e38..944caef1 100644 --- a/spec/fixtures/responses/whois.networksolutions.com/status_registered.expected +++ b/spec/fixtures/responses/whois.networksolutions.com/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "2" %s.name == "NETWORK SOLUTIONS, LLC." - %s.organization == "NETWORK SOLUTIONS, LLC." %s.url == "http//www.networksolutions.com/en_US/" diff --git a/spec/fixtures/responses/whois.nic.ac/ac/status_registered.expected b/spec/fixtures/responses/whois.nic.ac/ac/status_registered.expected index 95bbf09d..84da2e75 100644 --- a/spec/fixtures/responses/whois.nic.ac/ac/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.ac/ac/status_registered.expected @@ -36,7 +36,6 @@ %s %CLASS{registrar} %s.id == "292" %s.name == "MarkMonitor Inc." - %s.organization == "MarkMonitor Inc." %s.url == "http://www.markmonitor.com" #registrant_contacts diff --git a/spec/fixtures/responses/whois.nic.af/af/status_registered.expected b/spec/fixtures/responses/whois.nic.af/af/status_registered.expected index fe40b300..859dfde4 100644 --- a/spec/fixtures/responses/whois.nic.af/af/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.af/af/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor" - %s.organization == nil %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.nic.ag/ag/status_available.expected b/spec/fixtures/responses/whois.nic.ag/ag/status_available.expected index 2c3fe7a8..65f9ce91 100644 --- a/spec/fixtures/responses/whois.nic.ag/ag/status_available.expected +++ b/spec/fixtures/responses/whois.nic.ag/ag/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain diff --git a/spec/fixtures/responses/whois.nic.ag/ag/status_available.txt b/spec/fixtures/responses/whois.nic.ag/ag/status_available.txt index 679aadb9..41c21c47 100644 --- a/spec/fixtures/responses/whois.nic.ag/ag/status_available.txt +++ b/spec/fixtures/responses/whois.nic.ag/ag/status_available.txt @@ -1 +1,6 @@ NOT FOUND +>>> Last update of WHOIS database: 2021-11-09T15:59:46Z <<< + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. + diff --git a/spec/fixtures/responses/whois.nic.ag/ag/status_registered.expected b/spec/fixtures/responses/whois.nic.ag/ag/status_registered.expected index 31fc9ac6..e7fa6f23 100644 --- a/spec/fixtures/responses/whois.nic.ag/ag/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.ag/ag/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "Access to CCTLD WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to: (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy." + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == "google.ag" #domain_id - %s == "D48552-LRCC" + %s == "D105800000000048552-AGRS" #status - %s == ["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED"] + %s == ["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"] #available? %s == false @@ -25,70 +25,43 @@ #updated_on %s %CLASS{time} - %s %TIME{2013-12-04 10:20:49 UTC} + %s %TIME{2020-12-04 10:29:47 UTC} #expires_on %s %CLASS{time} - %s %TIME{2015-01-05 14:06:59 UTC} + %s %TIME{2022-01-05 14:06:59 UTC} #registrar %s %CLASS{registrar} - %s.id == "R22-LRCC" - %s.name == "MarkMonitor, Inc." - %s.organization == nil - %s.url == nil + %s.id == "292" + %s.name == "MarkMonitor Inc." + %s.url == "http://www.markmonitor.com" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "AGRS-129819" - %s[0].name == "DNS Admin" + %s[0].id == nil + %s[0].name == nil %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil %s[0].state == "CA" %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == nil #admin_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "AGRS-129819" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s %SIZE{0} #technical_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "AGRS-129819" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s %SIZE{0} #nameservers @@ -99,6 +72,6 @@ %s[1] %CLASS{nameserver} %s[1].name == "ns2.google.com" %s[2] %CLASS{nameserver} - %s[2].name == "ns3.google.com" + %s[2].name == "ns4.google.com" %s[3] %CLASS{nameserver} - %s[3].name == "ns4.google.com" + %s[3].name == "ns3.google.com" diff --git a/spec/fixtures/responses/whois.nic.ag/ag/status_registered.txt b/spec/fixtures/responses/whois.nic.ag/ag/status_registered.txt index a3b4f900..73cd0881 100644 --- a/spec/fixtures/responses/whois.nic.ag/ag/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.ag/ag/status_registered.txt @@ -1,100 +1,31 @@ -Access to CCTLD WHOIS information is provided to assist persons in -determining the contents of a domain name registration record in the -Afilias registry database. The data in this record is provided by -Afilias Limited for informational purposes only, and Afilias does not -guarantee its accuracy. This service is intended only for query-based -access. You agree that you will use this data only for lawful purposes -and that, under no circumstances will you use this data to: (a) allow, -enable, or otherwise support the transmission by e-mail, telephone, or -facsimile of mass unsolicited, commercial advertising or solicitations -to entities other than the data recipient's own existing customers; or -(b) enable high volume, automated, electronic processes that send -queries or data to the systems of Registry Operator, a Registrar, or -Afilias except as reasonably necessary to register domain names or -modify existing registrations. All rights reserved. Afilias reserves -the right to modify these terms at any time. By submitting this query, -you agree to abide by this policy. +Domain Name: GOOGLE.AG +Registry Domain ID: D105800000000048552-AGRS +Registrar WHOIS Server: +Registrar URL: http://www.markmonitor.com +Updated Date: 2020-12-04T10:29:47Z +Creation Date: 2003-01-05T14:06:59Z +Registry Expiry Date: 2022-01-05T14:06:59Z +Registrar Registration Expiration Date: +Registrar: MarkMonitor Inc. +Registrar IANA ID: 292 +Registrar Abuse Contact Email: abusecomplaints@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +Reseller: +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Registrant Organization: Google Inc. +Registrant State/Province: CA +Registrant Country: US +Name Server: NS1.GOOGLE.COM +Name Server: NS2.GOOGLE.COM +Name Server: NS4.GOOGLE.COM +Name Server: NS3.GOOGLE.COM +DNSSEC: unsigned -Domain ID:D48552-LRCC -Domain Name:GOOGLE.AG -Created On:05-Jan-2003 14:06:59 UTC -Last Updated On:04-Dec-2013 10:20:49 UTC -Expiration Date:05-Jan-2015 14:06:59 UTC -Sponsoring Registrar:MarkMonitor, Inc. (R22-LRCC) -Status:CLIENT DELETE PROHIBITED -Status:CLIENT TRANSFER PROHIBITED -Status:CLIENT UPDATE PROHIBITED -Registrant ID:AGRS-129819 -Registrant Name:DNS Admin -Registrant Organization:Google Inc. -Registrant Street1:1600 Amphitheatre Parkway -Registrant Street2: -Registrant Street3: -Registrant City:Mountain View -Registrant State/Province:CA -Registrant Postal Code:94043 -Registrant Country:US -Registrant Phone:+1.6502530000 -Registrant Phone Ext.: -Registrant FAX:+1.6506188571 -Registrant FAX Ext.: -Registrant Email:dns-admin@google.com -Admin ID:AGRS-129819 -Admin Name:DNS Admin -Admin Organization:Google Inc. -Admin Street1:1600 Amphitheatre Parkway -Admin Street2: -Admin Street3: -Admin City:Mountain View -Admin State/Province:CA -Admin Postal Code:94043 -Admin Country:US -Admin Phone:+1.6502530000 -Admin Phone Ext.: -Admin FAX:+1.6506188571 -Admin FAX Ext.: -Admin Email:dns-admin@google.com -Billing ID:AGRS-129293 -Billing Name:CCOPS -Billing Organization:MarkMonitor -Billing Street1:PMB 155 -Billing Street2:10400 Overland Rd. -Billing Street3: -Billing City:Boise -Billing State/Province:ID -Billing Postal Code:83709-1433 -Billing Country:US -Billing Phone:+1.20838957 -Billing Phone Ext.: -Billing FAX:+1.20838957 -Billing FAX Ext.: -Billing Email:ccops@markmonitor.com -Tech ID:AGRS-129819 -Tech Name:DNS Admin -Tech Organization:Google Inc. -Tech Street1:1600 Amphitheatre Parkway -Tech Street2: -Tech Street3: -Tech City:Mountain View -Tech State/Province:CA -Tech Postal Code:94043 -Tech Country:US -Tech Phone:+1.6502530000 -Tech Phone Ext.: -Tech FAX:+1.6506188571 -Tech FAX Ext.: -Tech Email:dns-admin@google.com -Name Server:NS1.GOOGLE.COM -Name Server:NS2.GOOGLE.COM -Name Server:NS3.GOOGLE.COM -Name Server:NS4.GOOGLE.COM -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: +>>> Last update of WHOIS database: 2021-11-09T15:57:51Z <<< +For more information on Whois status codes, please visit https://icann.org/epp + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.nic.asia/asia/property_status_multiple.expected b/spec/fixtures/responses/whois.nic.asia/asia/property_status_multiple.expected index 5192c360..6cf0fd21 100644 --- a/spec/fixtures/responses/whois.nic.asia/asia/property_status_multiple.expected +++ b/spec/fixtures/responses/whois.nic.asia/asia/property_status_multiple.expected @@ -1,5 +1,5 @@ #status - %s == ["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED"] + %s == ["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited"] #available? %s == false diff --git a/spec/fixtures/responses/whois.nic.asia/asia/property_status_multiple.txt b/spec/fixtures/responses/whois.nic.asia/asia/property_status_multiple.txt index ac71d505..c66fa8c7 100644 --- a/spec/fixtures/responses/whois.nic.asia/asia/property_status_multiple.txt +++ b/spec/fixtures/responses/whois.nic.asia/asia/property_status_multiple.txt @@ -1,160 +1,28 @@ -DotAsia WHOIS LEGAL STATEMENT AND TERMS & CONDITIONS: The WHOIS service offered -by DotAsia and the access to the records in the DotAsia WHOIS database are provided -for information purposes only. It allows persons to check whether a specific -domain name is still available or not and to obtain information related to -the registration records of existing domain names. DotAsia cannot, under any -circumstances, be held liable in case the stored information would prove to -be wrong, incomplete, or not accurate in any sense. By submitting a query -you agree not to use the information made available to: allow, enable or -otherwise support the transmission of unsolicited, commercial advertising or -other solicitations whether via email or otherwise; target advertising in any -possible way; or to cause nuisance in any possible way to the registrants by -sending (whether by automated, electronic processes capable of enabling high -volumes or other possible means) messages to them. Without prejudice to the -above, it is explicitly forbidden to extract, copy and/or use or re-utilise -in any form and by any means (electronically or not) the whole or a -quantitatively or qualitatively substantial part of the contents of the WHOIS -database without prior and explicit permission by DotAsia, nor in any attempt -hereof, or to apply automated, electronic processes to DotAsia (or its systems). -You agree that any reproduction and/or transmission of data for commercial -purposes will always be considered as the extraction of a substantial part of -the content of the WHOIS database. By submitting the query you agree to abide -by this policy and accept that DotAsia can take measures to limit the use of its -WHOIS services in order to protect the privacy of its registrants or the -integrity of the database. +Domain Name: NOVALASH.ASIA +Registry Domain ID: D107700000001032500-AGRS +Registrar WHOIS Server: +Registrar URL: https://www.007names.com +Updated Date: 2021-10-29T11:13:56Z +Creation Date: 2008-10-30T22:54:15Z +Registry Expiry Date: 2022-10-30T22:54:15Z +Registrar Registration Expiration Date: +Registrar: 007Names, Inc. +Registrar IANA ID: 91 +Registrar Abuse Contact Email: +Registrar Abuse Contact Phone: +Reseller: +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Registrant Organization: Novalash +Registrant State/Province: TX +Registrant Country: US +Name Server: NS2.RACKSPACE.COM +Name Server: NS.RASKSPACE.COM +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-09T16:02:53Z <<< -Domain ID:D1032500-ASIA -Domain Name:NOVALASH.ASIA -Domain Create Date:30-Oct-2008 22:54:15 UTC -Domain Expiration Date:30-Oct-2012 22:54:15 UTC -Domain Last Updated Date:01-Oct-2010 03:30:34 UTC -Last Transferred Date: -IPR Name: -IPR Number: -IPR CC Locality: -IPR Applied: -IPR Registered: -IPR Class: -IPR form: -IPR Entitlement: -IPR Type: -Created by:007Names, Inc. R94-ASIA (91) -Last Updated by Registrar:007Names, Inc. R94-ASIA (91) -Sponsoring Registrar:007Names, Inc. R94-ASIA (91) -Registration Agent ID: -Registration Agent Name: -Registration Agent Organization: -Registration Agent Address: -Registration Agent Address2: -Registration Agent Address3: -Registration Agent City: -Registration Agent State/Province: -Registration Agent Country/Economy: -Registration Agent Postal Code: -Registration Agent Phone: -Registration Agent Phone Ext.: -Registration Agent FAX: -Registration Agent FAX Ext.: -Registration Agent E-mail: -Maintainer URL: -Domain Status:CLIENT DELETE PROHIBITED -Domain Status:CLIENT TRANSFER PROHIBITED -Registrant ID:7AERFN4T4P -Registrant Name:Sophy Merszei -Registrant Organization:Novalash -Registrant Address:3701 W. Alabama -Registrant Address2: -Registrant Address3: -Registrant City:Houston -Registrant State/Province:TX -Registrant Country/Economy:US -Registrant Postal Code:77027 -Registrant Phone:+1.8664301261 -Registrant Phone Ext.: -Registrant FAX: -Registrant FAX Ext.: -Registrant E-mail:khickman@awsp.com -Administrative ID:5MTMZMT3K1 -Administrative Name:Sophy Merszei -Administrative Organization:Novalash -Administrative Address:3701 W. Alabama -Administrative Address2: -Administrative Address3: -Administrative City:Houston -Administrative State/Province:TX -Administrative Country/Economy:US -Administrative Postal Code:77027 -Administrative Phone:+1.8664301261 -Administrative Phone Ext.: -Administrative FAX: -Administrative FAX Ext.: -Administrative E-mail:khickman@awsp.com -Technical ID:FR-11594d9eed91 -Technical Name:Edward Lin -Technical Organization:EDM Enterprise Co., LTD -Technical Address:No. 10 Lane 241, Chung Shan Road -Technical Address2: -Technical Address3: -Technical City:Shen Kang Hsiang -Technical State/Province:Taichung Hsien -Technical Country/Economy:TW -Technical Postal Code:35000 -Technical Phone:+886.425625115 -Technical Phone Ext.: -Technical FAX: -Technical FAX Ext.: -Technical E-mail:doamina@yahoo.com -Billing ID:5MTMZMT3K1 -Billing Name:Sophy Merszei -Billing Organization:Novalash -Billing Address:3701 W. Alabama -Billing Address2: -Billing Address3: -Billing City:Houston -Billing State/Province:TX -Billing Country/Economy:US -Billing Postal Code:77027 -Billing Phone:+1.8664301261 -Billing Phone Ext.: -Billing FAX: -Billing FAX Ext.: -Billing E-mail:khickman@awsp.com -CED ID:FR-11594d9eed91 -CED CC Locality:TW -CED State/Province:Taichung Hsien -CED City:Shen Kang Hsiang -CED Type of Legal Entity:Corporations or Companies -CED Type (Other): -CED Form of Identification:Certificate of Incorporation or equivalent business registration certificate -CED Form of ID (Other): -CED Identification Number:N9fTw -Operations and Notifications ID:7AERFN4T4P -Operations and Notifications Name:Sophy Merszei -Operations and Notifications Organization:Novalash -Operations and Notifications Address:3701 W. Alabama -Operations and Notifications Address2: -Operations and Notifications Address3: -Operations and Notifications City:Houston -Operations and Notifications State/Province:TX -Operations and Notifications Country/Economy:US -Operations and Notifications Postal Code:77027 -Operations and Notifications Phone:+1.8664301261 -Operations and Notifications Phone Ext.: -Operations and Notifications FAX: -Operations and Notifications FAX Ext.: -Operations and Notifications E-mail:khickman@awsp.com -Nameservers:NS2.RACKSPACE.COM -Nameservers:NS.RASKSPACE.COM -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: +For more information on Whois status codes, please visit https://icann.org/epp - +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.nic.asia/asia/property_status_single.expected b/spec/fixtures/responses/whois.nic.asia/asia/property_status_single.expected deleted file mode 100644 index 82e603c3..00000000 --- a/spec/fixtures/responses/whois.nic.asia/asia/property_status_single.expected +++ /dev/null @@ -1,8 +0,0 @@ -#status - %s == ["OK"] - -#available? - %s == false - -#registered? - %s == true diff --git a/spec/fixtures/responses/whois.nic.asia/asia/property_status_single.txt b/spec/fixtures/responses/whois.nic.asia/asia/property_status_single.txt deleted file mode 100644 index 1ac12a30..00000000 --- a/spec/fixtures/responses/whois.nic.asia/asia/property_status_single.txt +++ /dev/null @@ -1,159 +0,0 @@ -DotAsia WHOIS LEGAL STATEMENT AND TERMS & CONDITIONS: The WHOIS service offered -by DotAsia and the access to the records in the DotAsia WHOIS database are provided -for information purposes only. It allows persons to check whether a specific -domain name is still available or not and to obtain information related to -the registration records of existing domain names. DotAsia cannot, under any -circumstances, be held liable in case the stored information would prove to -be wrong, incomplete, or not accurate in any sense. By submitting a query -you agree not to use the information made available to: allow, enable or -otherwise support the transmission of unsolicited, commercial advertising or -other solicitations whether via email or otherwise; target advertising in any -possible way; or to cause nuisance in any possible way to the registrants by -sending (whether by automated, electronic processes capable of enabling high -volumes or other possible means) messages to them. Without prejudice to the -above, it is explicitly forbidden to extract, copy and/or use or re-utilise -in any form and by any means (electronically or not) the whole or a -quantitatively or qualitatively substantial part of the contents of the WHOIS -database without prior and explicit permission by DotAsia, nor in any attempt -hereof, or to apply automated, electronic processes to DotAsia (or its systems). -You agree that any reproduction and/or transmission of data for commercial -purposes will always be considered as the extraction of a substantial part of -the content of the WHOIS database. By submitting the query you agree to abide -by this policy and accept that DotAsia can take measures to limit the use of its -WHOIS services in order to protect the privacy of its registrants or the -integrity of the database. - -Domain ID:D93126-ASIA -Domain Name:CJ7.ASIA -Domain Create Date:15-Jan-2008 11:28:02 UTC -Domain Expiration Date:15-Jan-2010 11:28:02 UTC -Domain Last Updated Date:16-Mar-2008 04:30:25 UTC -Last Transferred Date: -IPR Name:DotAsia Organisation Ltd -IPR Number: -IPR CC Locality:HK -IPR Applied: -IPR Registered: -IPR Class: -IPR form: -IPR Entitlement: -IPR Type:SR1 -Created by:dotASIA R4-ASIA (9998) -Last Updated by Registrar:ASIA Registry R6-ASIA (9996) -Sponsoring Registrar:dotASIA R4-ASIA (9998) -Registration Agent ID: -Registration Agent Name: -Registration Agent Organization: -Registration Agent Address: -Registration Agent Address2: -Registration Agent Address3: -Registration Agent City: -Registration Agent State/Province: -Registration Agent Country/Economy: -Registration Agent Postal Code: -Registration Agent Phone: -Registration Agent Phone Ext.: -Registration Agent FAX: -Registration Agent FAX Ext.: -Registration Agent E-mail: -Maintainer URL: -Domain Status:OK -Registrant ID:FR-1158300cc88a -Registrant Name:Pioneer Domain (Temporary Delegation) -Registrant Organization:DotAsia Organisation -Registrant Address:Unit 617, Miramar Tower -Registrant Address2:132 Nathan Road -Registrant Address3: -Registrant City:Tsim Sha Tsui -Registrant State/Province:Kowloon -Registrant Country/Economy:HK -Registrant Postal Code:HK -Registrant Phone:+852.35202635 -Registrant Phone Ext.: -Registrant FAX: -Registrant FAX Ext.: -Registrant E-mail:domains@registry.asia -Administrative ID:FR-11582fd1b4a9 -Administrative Name:DotAsia Organisation -Administrative Organization:DotAsia Organisation -Administrative Address:Unit 617, Miramar Tower -Administrative Address2:132 Nathan Road -Administrative Address3: -Administrative City:Tsim Sha Tsui -Administrative State/Province:Kowloon -Administrative Country/Economy:HK -Administrative Postal Code:HK -Administrative Phone:+852.35202635 -Administrative Phone Ext.: -Administrative FAX: -Administrative FAX Ext.: -Administrative E-mail:domains@registry.asia -Technical ID:FR-11582fd1b4a9 -Technical Name:DotAsia Organisation -Technical Organization:DotAsia Organisation -Technical Address:Unit 617, Miramar Tower -Technical Address2:132 Nathan Road -Technical Address3: -Technical City:Tsim Sha Tsui -Technical State/Province:Kowloon -Technical Country/Economy:HK -Technical Postal Code:HK -Technical Phone:+852.35202635 -Technical Phone Ext.: -Technical FAX: -Technical FAX Ext.: -Technical E-mail:domains@registry.asia -Billing ID:FR-11582fd1b4a9 -Billing Name:DotAsia Organisation -Billing Organization:DotAsia Organisation -Billing Address:Unit 617, Miramar Tower -Billing Address2:132 Nathan Road -Billing Address3: -Billing City:Tsim Sha Tsui -Billing State/Province:Kowloon -Billing Country/Economy:HK -Billing Postal Code:HK -Billing Phone:+852.35202635 -Billing Phone Ext.: -Billing FAX: -Billing FAX Ext.: -Billing E-mail:domains@registry.asia -CED ID:FR-11582fd1b4a9 -CED CC Locality:HK -CED State/Province: -CED City: -CED Type of Legal Entity:Corporations or Companies -CED Type (Other): -CED Form of Identification:Certificate of Incorporation or equivalent business registration certificate -CED Form of ID (Other): -CED Identification Number:1073566 -Operations and Notifications ID:FR-11582fd1b4a9 -Operations and Notifications Name:DotAsia Organisation -Operations and Notifications Organization:DotAsia Organisation -Operations and Notifications Address:Unit 617, Miramar Tower -Operations and Notifications Address2:132 Nathan Road -Operations and Notifications Address3: -Operations and Notifications City:Tsim Sha Tsui -Operations and Notifications State/Province:Kowloon -Operations and Notifications Country/Economy:HK -Operations and Notifications Postal Code:HK -Operations and Notifications Phone:+852.35202635 -Operations and Notifications Phone Ext.: -Operations and Notifications FAX: -Operations and Notifications FAX Ext.: -Operations and Notifications E-mail:domains@registry.asia -Nameservers:NS1.DOTASIA.ORG -Nameservers:NS2.DOTASIA.ORG -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: - - diff --git a/spec/fixtures/responses/whois.nic.asia/asia/status_available.expected b/spec/fixtures/responses/whois.nic.asia/asia/status_available.expected index 31e4bf0c..2c28f207 100644 --- a/spec/fixtures/responses/whois.nic.asia/asia/status_available.expected +++ b/spec/fixtures/responses/whois.nic.asia/asia/status_available.expected @@ -1,6 +1,5 @@ #disclaimer - %s == nil - + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == nil diff --git a/spec/fixtures/responses/whois.nic.asia/asia/status_available.txt b/spec/fixtures/responses/whois.nic.asia/asia/status_available.txt index 679aadb9..7348ff82 100644 --- a/spec/fixtures/responses/whois.nic.asia/asia/status_available.txt +++ b/spec/fixtures/responses/whois.nic.asia/asia/status_available.txt @@ -1 +1,5 @@ NOT FOUND +>>> Last update of WHOIS database: 2021-11-09T16:01:55Z <<< + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.nic.asia/asia/status_registered.expected b/spec/fixtures/responses/whois.nic.asia/asia/status_registered.expected index 33c6797c..5995ed67 100644 --- a/spec/fixtures/responses/whois.nic.asia/asia/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.asia/asia/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "DotAsia WHOIS LEGAL STATEMENT AND TERMS & CONDITIONS: The WHOIS service offered by DotAsia and the access to the records in the DotAsia WHOIS database are provided for information purposes only. It allows persons to check whether a specific domain name is still available or not and to obtain information related to the registration records of existing domain names. DotAsia cannot, under any circumstances, be held liable in case the stored information would prove to be wrong, incomplete, or not accurate in any sense. By submitting a query you agree not to use the information made available to: allow, enable or otherwise support the transmission of unsolicited, commercial advertising or other solicitations whether via email or otherwise; target advertising in any possible way; or to cause nuisance in any possible way to the registrants by sending (whether by automated, electronic processes capable of enabling high volumes or other possible means) messages to them. Without prejudice to the above, it is explicitly forbidden to extract, copy and/or use or re-utilise in any form and by any means (electronically or not) the whole or a quantitatively or qualitatively substantial part of the contents of the WHOIS database without prior and explicit permission by DotAsia, nor in any attempt hereof, or to apply automated, electronic processes to DotAsia (or its systems). You agree that any reproduction and/or transmission of data for commercial purposes will always be considered as the extraction of a substantial part of the content of the WHOIS database. By submitting the query you agree to abide by this policy and accept that DotAsia can take measures to limit the use of its WHOIS services in order to protect the privacy of its registrants or the integrity of the database." + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == "cj7.asia" #domain_id - %s == "D93126-ASIA" + %s == "D107700000000093126-AGRS" #status - %s == ["OK"] + %s == ["ok https://icann.org/epp#ok"] #available? %s == false @@ -25,70 +25,43 @@ #updated_on %s %CLASS{time} - %s %TIME{2014-01-15 22:20:16 UTC} + %s %TIME{2020-01-15 22:20:23 UTC} #expires_on %s %CLASS{time} - %s %TIME{2015-01-15 11:28:02 UTC} + %s %TIME{2021-01-15 11:28:02 UTC} #registrar %s %CLASS{registrar} - %s.id == "800046" - %s.name == "dotASIA R4-ASIA" - %s.organization == nil - %s.url == nil + %s.id == "119" + %s.name == "DotAsia Organisation" + %s.url == "" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "FR-132aa75b4bf65" - %s[0].name == "RAXCO ASSETS CORP." + %s[0].id == nil + %s[0].name == nil %s[0].organization == "RAXCO ASSETS CORP." - %s[0].address == "RM 1201-1204 12/F\nSEA BIRD HSE\n22-28 WYNDHAM ST CENTRAL HK" - %s[0].city == "Hong Kong" - %s[0].zip == "" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil %s[0].state == "" %s[0].country_code == "HK" - %s[0].phone == "+852.21190333" - %s[0].fax == "+852.23045326" - %s[0].email == "eddie.yeung@bingogroup.com.hk" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == nil #admin_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "FR-132aa7afe0967" - %s[0].name == "Eddie Yeung" - %s[0].organization == "RAXCO ASSETS CORP." - %s[0].address == "RM 1201-1204 12/F\nSEA BIRD HSE\n22-28 WYNDHAM ST CENTRAL HK" - %s[0].city == "Hong Kong" - %s[0].zip == "" - %s[0].state == "" - %s[0].country_code == "HK" - %s[0].phone == "+852.21190333" - %s[0].fax == "" - %s[0].email == "eddie.yeung@bingogroup.com.hk" + %s %SIZE{0} #technical_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "FR-132aa7afe0967" - %s[0].name == "Eddie Yeung" - %s[0].organization == "RAXCO ASSETS CORP." - %s[0].address == "RM 1201-1204 12/F\nSEA BIRD HSE\n22-28 WYNDHAM ST CENTRAL HK" - %s[0].city == "Hong Kong" - %s[0].zip == "" - %s[0].state == "" - %s[0].country_code == "HK" - %s[0].phone == "+852.21190333" - %s[0].fax == "" - %s[0].email == "eddie.yeung@bingogroup.com.hk" + %s %SIZE{0} #nameservers @@ -103,9 +76,9 @@ %s[3] %CLASS{nameserver} %s[3].name == "ns4.dnspod.net" %s[4] %CLASS{nameserver} - %s[4].name == "ns5.dnspod.net" + %s[4].name == "ns6.dnspod.net" %s[5] %CLASS{nameserver} - %s[5].name == "ns6.dnspod.net" + %s[5].name == "ns5.dnspod.net" #reserved? diff --git a/spec/fixtures/responses/whois.nic.asia/asia/status_registered.txt b/spec/fixtures/responses/whois.nic.asia/asia/status_registered.txt index ed16d077..efec8ee0 100644 --- a/spec/fixtures/responses/whois.nic.asia/asia/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.asia/asia/status_registered.txt @@ -1,134 +1,31 @@ -DotAsia WHOIS LEGAL STATEMENT AND TERMS & CONDITIONS: The WHOIS service offered -by DotAsia and the access to the records in the DotAsia WHOIS database are provided -for information purposes only. It allows persons to check whether a specific -domain name is still available or not and to obtain information related to -the registration records of existing domain names. DotAsia cannot, under any -circumstances, be held liable in case the stored information would prove to -be wrong, incomplete, or not accurate in any sense. By submitting a query -you agree not to use the information made available to: allow, enable or -otherwise support the transmission of unsolicited, commercial advertising or -other solicitations whether via email or otherwise; target advertising in any -possible way; or to cause nuisance in any possible way to the registrants by -sending (whether by automated, electronic processes capable of enabling high -volumes or other possible means) messages to them. Without prejudice to the -above, it is explicitly forbidden to extract, copy and/or use or re-utilise -in any form and by any means (electronically or not) the whole or a -quantitatively or qualitatively substantial part of the contents of the WHOIS -database without prior and explicit permission by DotAsia, nor in any attempt -hereof, or to apply automated, electronic processes to DotAsia (or its systems). -You agree that any reproduction and/or transmission of data for commercial -purposes will always be considered as the extraction of a substantial part of -the content of the WHOIS database. By submitting the query you agree to abide -by this policy and accept that DotAsia can take measures to limit the use of its -WHOIS services in order to protect the privacy of its registrants or the -integrity of the database. - -Domain ID:D93126-ASIA -Domain Name:CJ7.ASIA -Domain Create Date:15-Jan-2008 11:28:02 UTC -Domain Expiration Date:15-Jan-2015 11:28:02 UTC -Domain Last Updated Date:15-Jan-2014 22:20:16 UTC -Last Transferred Date: -IPR Name:CJ7 -IPR CC Locality:HK -IPR Type:SR1 -Created by:dotASIA R4-ASIA (800046) -Last Updated by Registrar:ASIA Registry R6-ASIA (700001) -Sponsoring Registrar:dotASIA R4-ASIA (800046) -Domain Status:OK -Status:AUTORENEWPERIOD -Registrant ID:FR-132aa75b4bf65 -Registrant Name:RAXCO ASSETS CORP. -Registrant Organization:RAXCO ASSETS CORP. -Registrant Address:RM 1201-1204 12/F -Registrant Address2:SEA BIRD HSE -Registrant Address3:22-28 WYNDHAM ST CENTRAL HK -Registrant City:Hong Kong +Domain Name: CJ7.ASIA +Registry Domain ID: D107700000000093126-AGRS +Registrar WHOIS Server: +Registrar URL: +Updated Date: 2020-01-15T22:20:23Z +Creation Date: 2008-01-15T11:28:02Z +Registry Expiry Date: 2021-01-15T11:28:02Z +Registrar Registration Expiration Date: +Registrar: DotAsia Organisation +Registrar IANA ID: 119 +Registrar Abuse Contact Email: +Registrar Abuse Contact Phone: +Reseller: +Domain Status: ok https://icann.org/epp#ok +Registrant Organization: RAXCO ASSETS CORP. Registrant State/Province: -Registrant Country/Economy:HK -Registrant Postal Code: -Registrant Phone:+852.21190333 -Registrant Phone Ext.: -Registrant FAX:+852.23045326 -Registrant FAX Ext.: -Registrant E-mail:eddie.yeung@bingogroup.com.hk -Administrative ID:FR-132aa7afe0967 -Administrative Name:Eddie Yeung -Administrative Organization:RAXCO ASSETS CORP. -Administrative Address:RM 1201-1204 12/F -Administrative Address2:SEA BIRD HSE -Administrative Address3:22-28 WYNDHAM ST CENTRAL HK -Administrative City:Hong Kong -Administrative State/Province: -Administrative Country/Economy:HK -Administrative Postal Code: -Administrative Phone:+852.21190333 -Administrative Phone Ext.: -Administrative FAX: -Administrative FAX Ext.: -Administrative E-mail:eddie.yeung@bingogroup.com.hk -Technical ID:FR-132aa7afe0967 -Technical Name:Eddie Yeung -Technical Organization:RAXCO ASSETS CORP. -Technical Address:RM 1201-1204 12/F -Technical Address2:SEA BIRD HSE -Technical Address3:22-28 WYNDHAM ST CENTRAL HK -Technical City:Hong Kong -Technical State/Province: -Technical Country/Economy:HK -Technical Postal Code: -Technical Phone:+852.21190333 -Technical Phone Ext.: -Technical FAX: -Technical FAX Ext.: -Technical E-mail:eddie.yeung@bingogroup.com.hk -Billing ID:FR-132aa774c1b66 -Billing Name:Frankie Chan -Billing Organization:RAXCO ASSETS CORP. -Billing Address:RM 1201-1204 12/F -Billing Address2:SEA BIRD HSE -Billing Address3:22-28 WYNDHAM ST CENTRAL HK -Billing City:Hong Kong -Billing State/Province: -Billing Country/Economy:HK -Billing Postal Code: -Billing Phone:+852.21190333 -Billing Phone Ext.: -Billing FAX: -Billing FAX Ext.: -Billing E-mail:eddie.yeung@bingogroup.com.hk -CED ID:FR-132aa75b4bf65 -CED CC Locality:HK -CED Type of Legal Entity:Corporations or Companies -CED Form of Identification:Certificate of Incorporation or equivalent business registration certificate -CED Identification Number:35119870 -Operations and Notifications ID:FR-132aa75b4bf65 -Operations and Notifications Name:RAXCO ASSETS CORP. -Operations and Notifications Organization:RAXCO ASSETS CORP. -Operations and Notifications Address:RM 1201-1204 12/F -Operations and Notifications Address2:SEA BIRD HSE -Operations and Notifications Address3:22-28 WYNDHAM ST CENTRAL HK -Operations and Notifications City:Hong Kong -Operations and Notifications State/Province: -Operations and Notifications Country/Economy:HK -Operations and Notifications Postal Code: -Operations and Notifications Phone:+852.21190333 -Operations and Notifications Phone Ext.: -Operations and Notifications FAX:+852.23045326 -Operations and Notifications FAX Ext.: -Operations and Notifications E-mail:eddie.yeung@bingogroup.com.hk -Nameservers:NS1.DNSPOD.NET -Nameservers:NS2.DNSPOD.NET -Nameservers:NS3.DNSPOD.NET -Nameservers:NS4.DNSPOD.NET -Nameservers:NS5.DNSPOD.NET -Nameservers:NS6.DNSPOD.NET -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: +Registrant Country: HK +Name Server: NS1.DNSPOD.NET +Name Server: NS2.DNSPOD.NET +Name Server: NS3.DNSPOD.NET +Name Server: NS4.DNSPOD.NET +Name Server: NS6.DNSPOD.NET +Name Server: NS5.DNSPOD.NET +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-09T16:01:06Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp - +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.nic.asia/asia/status_reserved.expected b/spec/fixtures/responses/whois.nic.asia/asia/status_reserved.expected index 263f1176..0c8c7942 100644 --- a/spec/fixtures/responses/whois.nic.asia/asia/status_reserved.expected +++ b/spec/fixtures/responses/whois.nic.asia/asia/status_reserved.expected @@ -1,6 +1,5 @@ #disclaimer - %s == nil - + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == nil diff --git a/spec/fixtures/responses/whois.nic.asia/asia/status_reserved.txt b/spec/fixtures/responses/whois.nic.asia/asia/status_reserved.txt index 8a70b35f..fb0ae735 100644 --- a/spec/fixtures/responses/whois.nic.asia/asia/status_reserved.txt +++ b/spec/fixtures/responses/whois.nic.asia/asia/status_reserved.txt @@ -1 +1,5 @@ Reserved by DotAsia +>>> Last update of WHOIS database: 2021-11-09T16:01:48Z <<< + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.donuts.co/bike/status_available.expected b/spec/fixtures/responses/whois.nic.bike/bike/status_available.expected similarity index 100% rename from spec/fixtures/responses/whois.donuts.co/bike/status_available.expected rename to spec/fixtures/responses/whois.nic.bike/bike/status_available.expected diff --git a/spec/fixtures/responses/whois.nic.bike/bike/status_available.txt b/spec/fixtures/responses/whois.nic.bike/bike/status_available.txt new file mode 100644 index 00000000..7296b291 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.bike/bike/status_available.txt @@ -0,0 +1,5 @@ +Domain not found. +>>> Last update of WHOIS database: 2023-03-14T15:25:05Z <<< + +Terms of Use: Identity Digital Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Identity Digital does not guarantee its accuracy. Users accessing the Identity Digital Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used to: a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Identity Digital or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Identity Digital Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a +proper legal basis for accessing the withheld data. Access to this data can be requested by submitting a request via the form found at https://www.identity.digital/about/policies/whois-layered-access/ Identity Digital Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. \ No newline at end of file diff --git a/spec/fixtures/responses/whois.nic.bike/bike/status_registered.expected b/spec/fixtures/responses/whois.nic.bike/bike/status_registered.expected new file mode 100644 index 00000000..981aa57f --- /dev/null +++ b/spec/fixtures/responses/whois.nic.bike/bike/status_registered.expected @@ -0,0 +1,96 @@ +#domain + %s == "bike.bike" + +#domain_id + %s == "a864ce4015614eeda646a4121b91c784-DONUTS" + + +#status + %s == :registered + +#available? + %s == false + +#registered? + %s == true + + +#created_on + %s %CLASS{time} + %s %TIME{2015-07-19 17:01:03 UTC} + +#updated_on + %s %CLASS{time} + %s %TIME{2022-09-02 17:01:11 UTC} + +#expires_on + %s %CLASS{time} + %s %TIME{2023-07-19 17:01:03 UTC} + + +#registrar + %s %CLASS{registrar} + %s.id == "1011" + %s.name == "101domain GRS Limited" + %s.url == "http://101domain.com" + + +#registrant_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "Digital Privacy Corporation" + %s[0].address == "REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "CA" + %s[0].country_code == "US" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." + +#admin_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "REDACTED FOR PRIVACY" + %s[0].address == "REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "REDACTED FOR PRIVACY" + %s[0].country_code == "REDACTED FOR PRIVACY" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." + +#technical_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "REDACTED FOR PRIVACY" + %s[0].address == "REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "REDACTED FOR PRIVACY" + %s[0].country_code == "REDACTED FOR PRIVACY" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." + + +#nameservers + %s %CLASS{array} + %s %SIZE{2} + %s[0] %CLASS{nameserver} + %s[0].name == "ns1.gagarin2501.hospedagemdesites.ws" + %s[1] %CLASS{nameserver} + %s[1].name == "ns2.gagarin2501.hospedagemdesites.ws" diff --git a/spec/fixtures/responses/whois.nic.bike/bike/status_registered.txt b/spec/fixtures/responses/whois.nic.bike/bike/status_registered.txt new file mode 100644 index 00000000..d1a67087 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.bike/bike/status_registered.txt @@ -0,0 +1,61 @@ +Domain Name: bike.bike +Registry Domain ID: a864ce4015614eeda646a4121b91c784-DONUTS +Registrar WHOIS Server: whois.101domain.com +Registrar URL: http://101domain.com +Updated Date: 2022-09-02T17:01:11Z +Creation Date: 2015-07-19T17:01:03Z +Registry Expiry Date: 2023-07-19T17:01:03Z +Registrar: 101domain GRS Limited +Registrar IANA ID: 1011 +Registrar Abuse Contact Email: abuse@101domain.com +Registrar Abuse Contact Phone: +1.7604448674 +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Registry Registrant ID: REDACTED FOR PRIVACY +Registrant Name: REDACTED FOR PRIVACY +Registrant Organization: Digital Privacy Corporation +Registrant Street: REDACTED FOR PRIVACY +Registrant City: REDACTED FOR PRIVACY +Registrant State/Province: CA +Registrant Postal Code: REDACTED FOR PRIVACY +Registrant Country: US +Registrant Phone: REDACTED FOR PRIVACY +Registrant Phone Ext: REDACTED FOR PRIVACY +Registrant Fax: REDACTED FOR PRIVACY +Registrant Fax Ext: REDACTED FOR PRIVACY +Registrant Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Admin ID: REDACTED FOR PRIVACY +Admin Name: REDACTED FOR PRIVACY +Admin Organization: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin City: REDACTED FOR PRIVACY +Admin State/Province: REDACTED FOR PRIVACY +Admin Postal Code: REDACTED FOR PRIVACY +Admin Country: REDACTED FOR PRIVACY +Admin Phone: REDACTED FOR PRIVACY +Admin Phone Ext: REDACTED FOR PRIVACY +Admin Fax: REDACTED FOR PRIVACY +Admin Fax Ext: REDACTED FOR PRIVACY +Admin Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Tech ID: REDACTED FOR PRIVACY +Tech Name: REDACTED FOR PRIVACY +Tech Organization: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech City: REDACTED FOR PRIVACY +Tech State/Province: REDACTED FOR PRIVACY +Tech Postal Code: REDACTED FOR PRIVACY +Tech Country: REDACTED FOR PRIVACY +Tech Phone: REDACTED FOR PRIVACY +Tech Phone Ext: REDACTED FOR PRIVACY +Tech Fax: REDACTED FOR PRIVACY +Tech Fax Ext: REDACTED FOR PRIVACY +Tech Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Name Server: ns1.gagarin2501.hospedagemdesites.ws +Name Server: ns2.gagarin2501.hospedagemdesites.ws +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2023-03-14T15:30:01Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +Terms of Use: Identity Digital Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Identity Digital does not guarantee its accuracy. Users accessing the Identity Digital Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used to: a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Identity Digital or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Identity Digital Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a +proper legal basis for accessing the withheld data. Access to this data can be requested by submitting a request via the form found at https://www.identity.digital/about/policies/whois-layered-access/ Identity Digital Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. diff --git a/spec/fixtures/responses/whois.nic.cd/cd/status_registered.expected b/spec/fixtures/responses/whois.nic.cd/cd/status_registered.expected index 8ee0caab..2f9a9b7b 100644 --- a/spec/fixtures/responses/whois.nic.cd/cd/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.cd/cd/status_registered.expected @@ -29,7 +29,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MARKMONITOR" - %s.organization == nil %s.url == nil diff --git a/spec/fixtures/responses/whois.nic.cl/cl/status_available.expected b/spec/fixtures/responses/whois.nic.cl/cl/status_available.expected index 6d42b24f..30255cc4 100644 --- a/spec/fixtures/responses/whois.nic.cl/cl/status_available.expected +++ b/spec/fixtures/responses/whois.nic.cl/cl/status_available.expected @@ -7,14 +7,6 @@ #registered? %s == false - -#created_on - %s %ERROR{AttributeNotSupported} - -#expires_on - %s %ERROR{AttributeNotSupported} - - #nameservers %s %CLASS{array} %s == [] diff --git a/spec/fixtures/responses/whois.nic.cl/cl/status_available.txt b/spec/fixtures/responses/whois.nic.cl/cl/status_available.txt index 304dfe66..7298f249 100644 --- a/spec/fixtures/responses/whois.nic.cl/cl/status_available.txt +++ b/spec/fixtures/responses/whois.nic.cl/cl/status_available.txt @@ -1 +1,8 @@ -u34jedzcq.cl: no existe +%% +%% This is the NIC Chile Whois server (whois.nic.cl). +%% +%% Rights restricted by copyright. +%% See https://www.nic.cl/normativa/politica-publicacion-de-datos-cl.pdf +%% + +u34jedzcq.cl: no entries found. diff --git a/spec/fixtures/responses/whois.nic.cl/cl/status_registered.expected b/spec/fixtures/responses/whois.nic.cl/cl/status_registered.expected index bd6ea56c..adabe18d 100644 --- a/spec/fixtures/responses/whois.nic.cl/cl/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.cl/cl/status_registered.expected @@ -1,3 +1,7 @@ +#domain + %s == "google.cl" + + #status %s == :registered @@ -8,24 +12,35 @@ %s == true +#registrar + %s %CLASS{registrar} + %s.name == "MarkMonitor Inc." + %s.url == "https://markmonitor.com/" + +#registrant_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT + %s[0].name == "Google LLC" + %s[0].organization == "Google LLC" + #created_on - %s %ERROR{AttributeNotSupported} + %s %CLASS{time} + %s %TIME{2002-10-22 20:48:23 GMT} #expires_on - %s %ERROR{AttributeNotSupported} + %s %CLASS{time} + %s %TIME{2023-11-20 17:48:02 GMT} #nameservers %s %CLASS{array} %s %SIZE{4} %s[0] %CLASS{nameserver} - %s[0].name == "ns3.google.com" - %s[0].ipv4 == "216.239.36.10" + %s[0].name == "ns1.google.com" %s[1] %CLASS{nameserver} - %s[1].name == "ns4.google.com" - %s[1].ipv4 == "216.239.38.10" + %s[1].name == "ns2.google.com" %s[2] %CLASS{nameserver} - %s[2].name == "ns1.google.com" - %s[2].ipv4 == "216.239.32.10" + %s[2].name == "ns3.google.com" %s[3] %CLASS{nameserver} - %s[3].name == "ns2.google.com" - %s[3].ipv4 == "216.239.34.10" + %s[3].name == "ns4.google.com" diff --git a/spec/fixtures/responses/whois.nic.cl/cl/status_registered.txt b/spec/fixtures/responses/whois.nic.cl/cl/status_registered.txt index 22dccf33..0b276168 100644 --- a/spec/fixtures/responses/whois.nic.cl/cl/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.cl/cl/status_registered.txt @@ -1,28 +1,23 @@ -google.cl: - -ACE: google.cl (RFC-3490, RFC-3491, RFC-3492) - -Google Inc. Representada por NameAction Chile S.A. (ASESORIAS NAMEACTION CHILE LIMITADA) - -Contacto Administrativo (Administrative Contact): - Nombre : Markmonitor Tech - Organización: Markmonitor - -Contacto Técnico (Technical Contact): - Nombre : Markmonitor Tech - Organización: MarkMonitor - -Servidores de nombre (Domain servers): - ns3.google.com (216.239.36.10) - ns4.google.com (216.239.38.10) - ns1.google.com (216.239.32.10) - ns2.google.com (216.239.34.10) - -Última modificación al formulario - (Database last updated on): 23 de agosto de 2012 (10:10:08 GMT) - -Más información (More information): - http://www.nic.cl/registry/Whois.do?d=google.cl - -Este mensajes está impreso en ISO-8859-1 -(This message is printed in ISO-8859-1) +%% +%% This is the NIC Chile Whois server (whois.nic.cl). +%% +%% Rights restricted by copyright. +%% See https://www.nic.cl/normativa/politica-publicacion-de-datos-cl.pdf +%% + +Domain name: google.cl +Registrant name: Google LLC +Registrant organisation: Google LLC +Registrar name: MarkMonitor Inc. +Registrar URL: https://markmonitor.com/ +Creation date: 2002-10-22 17:48:23 CLST +Expiration date: 2023-11-20 14:48:02 CLST +Name server: ns1.google.com +Name server: ns2.google.com +Name server: ns3.google.com +Name server: ns4.google.com + +%% +%% For communication with domain contacts please use website. +%% See https://www.nic.cl/registry/Whois.do?d=google.cl +%% \ No newline at end of file diff --git a/spec/fixtures/responses/whois.centralnic.com/gb.net/status_available.expected b/spec/fixtures/responses/whois.nic.cloud/cloud/status_available.expected similarity index 91% rename from spec/fixtures/responses/whois.centralnic.com/gb.net/status_available.expected rename to spec/fixtures/responses/whois.nic.cloud/cloud/status_available.expected index 2c3fe7a8..9f23516a 100644 --- a/spec/fixtures/responses/whois.centralnic.com/gb.net/status_available.expected +++ b/spec/fixtures/responses/whois.nic.cloud/cloud/status_available.expected @@ -1,7 +1,3 @@ -#disclaimer - %s == nil - - #domain %s == nil @@ -10,7 +6,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.nic.cloud/cloud/status_available.txt b/spec/fixtures/responses/whois.nic.cloud/cloud/status_available.txt new file mode 100644 index 00000000..5cb43c43 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.cloud/cloud/status_available.txt @@ -0,0 +1,26 @@ +No Data Found +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-21T11:19:42Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +The Service is provided so that you may look up certain information in relation to domain names that we store in our database. + +Use of the Service is subject to our policies, in particular you should familiarise yourself with our Acceptable Use Policy and our Privacy Policy. + +The information provided by this Service is 'as is' and we make no guarantee of it its accuracy. + +You agree that by your use of the Service you will not use the information provided by us in a way which is: +* inconsistent with any applicable laws, +* inconsistent with any policy issued by us, +* to generate, distribute, or facilitate unsolicited mass email, promotions, advertisings or other solicitations, or +* to enable high volume, automated, electronic processes that apply to the Service. + +You acknowledge that: +* a response from the Service that a domain name is 'available', does not guarantee that is able to be registered, +* we may restrict, suspend or terminate your access to the Service at any time, and +* the copying, compilation, repackaging, dissemination or other use of the information provided by the Service is not permitted, without our express written consent. + +This information has been prepared and published in order to represent administrative and technical management of the TLD. + +We may discontinue or amend any part or the whole of these Terms of Service from time to time at our absolute discretion. diff --git a/spec/fixtures/responses/whois.nic.cloud/cloud/status_registered.expected b/spec/fixtures/responses/whois.nic.cloud/cloud/status_registered.expected new file mode 100644 index 00000000..ff58d283 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.cloud/cloud/status_registered.expected @@ -0,0 +1,99 @@ +#domain + %s == "google.cloud" + +#domain_id + %s == "DDDAA72F4F319486082E1B91922F2483D-ARI" + + +#status + %s == :registered + +#available? + %s == false + +#registered? + %s == true + + +#created_on + %s %CLASS{time} + %s %TIME{2016-01-27 01:19:35 GMT} + +#updated_on + %s %CLASS{time} + %s %TIME{2020-12-31 10:38:20 GMT} + +#expires_on + %s %CLASS{time} + %s %TIME{2022-01-27 01:19:35 GMT} + + +#registrar + %s %CLASS{registrar} + %s.id == "292" + %s.name == "MarkMonitor, Inc." + %s.url == "www.markmonitor.com" + +#registrant_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "Google LLC" + %s[0].address == "REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "CA" + %s[0].country_code == "US" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." + +#admin_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "REDACTED FOR PRIVACY" + %s[0].address == "REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "REDACTED FOR PRIVACY" + %s[0].country_code == "REDACTED FOR PRIVACY" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." + +#technical_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "REDACTED FOR PRIVACY" + %s[0].address == "REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "REDACTED FOR PRIVACY" + %s[0].country_code == "REDACTED FOR PRIVACY" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." + + +#nameservers + %s %CLASS{array} + %s %SIZE{4} + %s[0] %CLASS{nameserver} + %s[0].name == "ns1.google.com" + %s[1] %CLASS{nameserver} + %s[1].name == "ns2.google.com" + %s[2] %CLASS{nameserver} + %s[2].name == "ns3.google.com" + %s[3] %CLASS{nameserver} + %s[3].name == "ns4.google.com" diff --git a/spec/fixtures/responses/whois.nic.cloud/cloud/status_registered.txt b/spec/fixtures/responses/whois.nic.cloud/cloud/status_registered.txt new file mode 100644 index 00000000..401fb68f --- /dev/null +++ b/spec/fixtures/responses/whois.nic.cloud/cloud/status_registered.txt @@ -0,0 +1,89 @@ +Domain Name: google.cloud +Registry Domain ID: DDDAA72F4F319486082E1B91922F2483D-ARI +Registrar WHOIS Server: whois.markmonitor.com +Registrar URL: www.markmonitor.com +Updated Date: 2020-12-31T10:38:20Z +Creation Date: 2016-01-27T01:19:35Z +Registry Expiry Date: 2022-01-27T01:19:35Z +Registrar: MarkMonitor, Inc. +Registrar IANA ID: 292 +Registrar Abuse Contact Email: abusecomplaints@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Registry Registrant ID: REDACTED FOR PRIVACY +Registrant Name: REDACTED FOR PRIVACY +Registrant Organization: Google LLC +Registrant Street: REDACTED FOR PRIVACY +Registrant Street: REDACTED FOR PRIVACY +Registrant Street: REDACTED FOR PRIVACY +Registrant City: REDACTED FOR PRIVACY +Registrant State/Province: CA +Registrant Postal Code: REDACTED FOR PRIVACY +Registrant Country: US +Registrant Phone: REDACTED FOR PRIVACY +Registrant Phone Ext: REDACTED FOR PRIVACY +Registrant Fax: REDACTED FOR PRIVACY +Registrant Fax Ext: REDACTED FOR PRIVACY +Registrant Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Admin ID: REDACTED FOR PRIVACY +Admin Name: REDACTED FOR PRIVACY +Admin Organization: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin City: REDACTED FOR PRIVACY +Admin State/Province: REDACTED FOR PRIVACY +Admin Postal Code: REDACTED FOR PRIVACY +Admin Country: REDACTED FOR PRIVACY +Admin Phone: REDACTED FOR PRIVACY +Admin Phone Ext: REDACTED FOR PRIVACY +Admin Fax: REDACTED FOR PRIVACY +Admin Fax Ext: REDACTED FOR PRIVACY +Admin Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Tech ID: REDACTED FOR PRIVACY +Tech Name: REDACTED FOR PRIVACY +Tech Organization: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech City: REDACTED FOR PRIVACY +Tech State/Province: REDACTED FOR PRIVACY +Tech Postal Code: REDACTED FOR PRIVACY +Tech Country: REDACTED FOR PRIVACY +Tech Phone: REDACTED FOR PRIVACY +Tech Phone Ext: REDACTED FOR PRIVACY +Tech Fax: REDACTED FOR PRIVACY +Tech Fax Ext: REDACTED FOR PRIVACY +Tech Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Name Server: ns1.google.com +Name Server: ns2.google.com +Name Server: ns3.google.com +Name Server: ns4.google.com +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-21T11:19:46Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +The Service is provided so that you may look up certain information in relation to domain names that we store in our database. + +Use of the Service is subject to our policies, in particular you should familiarise yourself with our Acceptable Use Policy and our Privacy Policy. + +The information provided by this Service is 'as is' and we make no guarantee of it its accuracy. + +You agree that by your use of the Service you will not use the information provided by us in a way which is: +* inconsistent with any applicable laws, +* inconsistent with any policy issued by us, +* to generate, distribute, or facilitate unsolicited mass email, promotions, advertisings or other solicitations, or +* to enable high volume, automated, electronic processes that apply to the Service. + +You acknowledge that: +* a response from the Service that a domain name is 'available', does not guarantee that is able to be registered, +* we may restrict, suspend or terminate your access to the Service at any time, and +* the copying, compilation, repackaging, dissemination or other use of the information provided by the Service is not permitted, without our express written consent. + +This information has been prepared and published in order to represent administrative and technical management of the TLD. + +We may discontinue or amend any part or the whole of these Terms of Service from time to time at our absolute discretion. diff --git a/spec/fixtures/responses/whois.nic.co/co/status_available.expected b/spec/fixtures/responses/whois.nic.co/co/status_available.expected index d1a29220..9f23516a 100644 --- a/spec/fixtures/responses/whois.nic.co/co/status_available.expected +++ b/spec/fixtures/responses/whois.nic.co/co/status_available.expected @@ -1,12 +1,12 @@ #domain - %s == "u34jedzcq.co" + %s == nil #domain_id %s == nil #status - %s == nil + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.nic.co/co/status_available.txt b/spec/fixtures/responses/whois.nic.co/co/status_available.txt index 7970c40b..9ab7fc4d 100644 --- a/spec/fixtures/responses/whois.nic.co/co/status_available.txt +++ b/spec/fixtures/responses/whois.nic.co/co/status_available.txt @@ -1,38 +1,13 @@ -Not found: u34jedzcq.co +No Data Found +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-21T10:15:18Z <<< ->>>> Whois database was last updated on: Wed Jan 22 22:07:33 GMT 2014 <<<< -.CO Internet, S.A.S., the Administrator for .CO, has collected this -information for the WHOIS database through Accredited Registrars. -This information is provided to you for informational purposes only -and is designed to assist persons in determining contents of a domain -name registration record in the .CO Internet registry database. .CO -Internet makes this information available to you "as is" and does not -guarantee its accuracy. - -By submitting a WHOIS query, you agree that you will use this data -only for lawful purposes and that, under no circumstances will you -use this data: (1) to allow, enable, or otherwise support the transmission -of mass unsolicited, commercial advertising or solicitations via direct -mail, electronic mail, or by telephone; (2) in contravention of any -applicable data and privacy protection laws; or (3) to enable high volume, -automated, electronic processes that apply to the registry (or its systems). -Compilation, repackaging, dissemination, or other use of the WHOIS -database in its entirety, or of a substantial portion thereof, is not allowed -without .CO Internet's prior written permission. .CO Internet reserves the -right to modify or change these conditions at any time without prior or -subsequent notification of any kind. By executing this query, in any manner -whatsoever, you agree to abide by these terms. In some limited cases, -domains that might appear as available in whois might not actually be -available as they could be already registered and the whois not yet updated -and/or they could be part of the Restricted list. In this cases, performing a -check through your Registrar's (EPP check) will give you the actual status -of the domain. Additionally, domains currently or previously used as -extensions in 3rd level domains will not be available for registration in the -2nd level. For example, org.co,mil.co,edu.co,com.co,net.co,nom.co,arts.co, -firm.co,info.co,int.co,web.co,rec.co,co.co. - -NOTE: FAILURE TO LOCATE A RECORD IN THE WHOIS DATABASE IS NOT -INDICATIVE OF THE AVAILABILITY OF A DOMAIN NAME. - -All domain names are subject to certain additional domain name registration -rules. For details, please visit our site at www.cointernet.co . +For more information on Whois status codes, please visit https://icann.org/epp + +The above WHOIS results have been redacted to remove potential personal data. The full WHOIS output may be available to individuals and organisations with a legitimate interest in accessing this data not outweighed by the fundamental privacy rights of the data subject. To find out more, or to make a request for access, please visit: RDDSrequest.nic.co. + +.CO Internet, S.A.S., the Administrator for .CO, has collected this information for the WHOIS database through Accredited Registrars. This information is provided to you for informational purposes only and is designed to assist persons in determining contents of a domain name registration record in the .CO Internet registry database. .CO Internet makes this information available to you "as is" and does not guarantee its accuracy. + +By submitting a WHOIS query, you agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data: (1) to allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via direct mail, electronic mail, or by telephone; (2) in contravention of any applicable data and privacy protection laws; or (3) to enable high volume, automated, electronic processes that apply to the registry (or its systems). Compilation, repackaging, dissemination, or other use of the WHOIS database in its entirety, or of a substantial portion thereof, is not allowed without .CO Internet's prior written permission. .CO Internet reserves the right to modify or change these conditions at any time without prior or subsequent notification of any kind. By executing this query, in any manner whatsoever, you agree to abide by these terms. In some limited cases, domains that might appear as available in whois might not actually be available as they could be already registered and the whois not yet updated and/or they could be part of the Restricted list. In this cases, performing a check through your Registrar's (EPP check) will give you the actual status of the domain. Additionally, domains currently or previously used as extensions in 3rd level domains will not be available for registration in the 2nd level. For example, org.co, mil.co, edu.co, com.co, net.co, nom.co, arts.co, firm.co, info.co, int.co, web.co, rec.co, co.co. + +NOTE: FAILURE TO LOCATE A RECORD IN THE WHOIS DATABASE IS NOT INDICATIVE OF THE AVAILABILITY OF A DOMAIN NAME. All domain names are subject to certain additional domain name registration rules. For details, please visit our site at www.cointernet.co . diff --git a/spec/fixtures/responses/whois.nic.co/co/status_registered.expected b/spec/fixtures/responses/whois.nic.co/co/status_registered.expected index 64845955..e4cb3d21 100644 --- a/spec/fixtures/responses/whois.nic.co/co/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.co/co/status_registered.expected @@ -6,7 +6,7 @@ #status - %s == ["clientTransferProhibited"] + %s == :registered #available? %s == false @@ -21,81 +21,86 @@ #updated_on %s %CLASS{time} - %s %TIME{2013-10-14 13:03:24 GMT} + %s %TIME{2021-04-26 05:09:40 GMT} #expires_on %s %CLASS{time} - %s %TIME{2016-04-25 23:59:59 GMT} + %s %TIME{2022-04-25 23:59:59 GMT} #registrar %s %CLASS{registrar} %s.id == "299" - %s.name == "CSC CORPORATE DOMAINS" + %s.name == "CSC Corporate Domains, Inc." #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "365684910586C791" - %s[0].name == "Twitter, Inc." + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" %s[0].organization == "Twitter, Inc." - %s[0].address == "1355 Market Street\nSuite 900" - %s[0].city == "San Francisco" - %s[0].zip == "94103" + %s[0].address == "REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" %s[0].state == "CA" - %s[0].country == "United States" %s[0].country_code == "US" - %s[0].phone == "+1.4152229670" - %s[0].fax == "+1.4152220922" - %s[0].email == "domains@twitter.com" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "868543810568A633" - %s[0].name == "Domain Admin" - %s[0].organization == "Twitter, Inc." - %s[0].address == "1355 Market Street\nSuite 900" - %s[0].city == "San Francisco" - %s[0].zip == "94103" - %s[0].state == "California" - %s[0].country == "United States" - %s[0].country_code == "US" - %s[0].phone == "+1.4152229670" - %s[0].fax == "+1.4152220922" - %s[0].email == "domains@twitter.com" + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "REDACTED FOR PRIVACY" + %s[0].address == "REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "REDACTED FOR PRIVACY" + %s[0].country_code == "REDACTED FOR PRIVACY" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "42101611057C7478" - %s[0].name == "Tech Admin" - %s[0].organization == "Twitter, Inc." - %s[0].address == "1355 Market Street\nSuite 900" - %s[0].city == "San Francisco" - %s[0].zip == "94103" - %s[0].state == "California" - %s[0].country == "United States" - %s[0].country_code == "US" - %s[0].phone == "+1.4152229670" - %s[0].fax == "+1.4152220922" - %s[0].email == "domains-tech@twitter.com" + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "REDACTED FOR PRIVACY" + %s[0].address == "REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "REDACTED FOR PRIVACY" + %s[0].country_code == "REDACTED FOR PRIVACY" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #nameservers %s %CLASS{array} - %s %SIZE{4} + %s %SIZE{8} %s[0] %CLASS{nameserver} - %s[0].name == "ns1.p34.dynect.net" + %s[0].name == "ns3.p34.dynect.net" %s[1] %CLASS{nameserver} - %s[1].name == "ns2.p34.dynect.net" + %s[1].name == "ns4.p34.dynect.net" %s[2] %CLASS{nameserver} - %s[2].name == "ns3.p34.dynect.net" + %s[2].name == "d01-01.ns.twtrdns.net" %s[3] %CLASS{nameserver} - %s[3].name == "ns4.p34.dynect.net" + %s[3].name == "d01-02.ns.twtrdns.net" + %s[4] %CLASS{nameserver} + %s[4].name == "a.r06.twtrdns.net" + %s[5] %CLASS{nameserver} + %s[5].name == "b.r06.twtrdns.net" + %s[6] %CLASS{nameserver} + %s[6].name == "c.r06.twtrdns.net" + %s[7] %CLASS{nameserver} + %s[7].name == "d.r06.twtrdns.net" diff --git a/spec/fixtures/responses/whois.nic.co/co/status_registered.txt b/spec/fixtures/responses/whois.nic.co/co/status_registered.txt index 4fb9aea8..4dfcd5c5 100644 --- a/spec/fixtures/responses/whois.nic.co/co/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.co/co/status_registered.txt @@ -1,104 +1,81 @@ -Domain Name: T.CO -Domain ID: D740225-CO -Sponsoring Registrar: CSC CORPORATE DOMAINS -Sponsoring Registrar IANA ID: 299 -Registrar URL (registration services): whois.corporatedomains.com -Domain Status: clientTransferProhibited -Registrant ID: 365684910586C791 -Registrant Name: Twitter, Inc. -Registrant Organization: Twitter, Inc. -Registrant Address1: 1355 Market Street -Registrant Address2: Suite 900 -Registrant City: San Francisco -Registrant State/Province: CA -Registrant Postal Code: 94103 -Registrant Country: United States -Registrant Country Code: US -Registrant Phone Number: +1.4152229670 -Registrant Facsimile Number: +1.4152220922 -Registrant Email: domains@twitter.com -Administrative Contact ID: 868543810568A633 -Administrative Contact Name: Domain Admin -Administrative Contact Organization: Twitter, Inc. -Administrative Contact Address1: 1355 Market Street -Administrative Contact Address2: Suite 900 -Administrative Contact City: San Francisco -Administrative Contact State/Province: California -Administrative Contact Postal Code: 94103 -Administrative Contact Country: United States -Administrative Contact Country Code: US -Administrative Contact Phone Number: +1.4152229670 -Administrative Contact Facsimile Number: +1.4152220922 -Administrative Contact Email: domains@twitter.com -Billing Contact ID: 341112710590A136 -Billing Contact Name: ccTLD Billing -Billing Contact Organization: CSC Corporate Domains, Inc. -Billing Contact Address1: 2711 Centerville Rd. -Billing Contact City: Wilmington -Billing Contact State/Province: DE -Billing Contact Postal Code: 19808 -Billing Contact Country: United States -Billing Contact Country Code: US -Billing Contact Phone Number: +1.3026365400 -Billing Contact Facsimile Number: +1.3026365454 -Billing Contact Email: ccTLD-billing@cscinfo.com -Technical Contact ID: 42101611057C7478 -Technical Contact Name: Tech Admin -Technical Contact Organization: Twitter, Inc. -Technical Contact Address1: 1355 Market Street -Technical Contact Address2: Suite 900 -Technical Contact City: San Francisco -Technical Contact State/Province: California -Technical Contact Postal Code: 94103 -Technical Contact Country: United States -Technical Contact Country Code: US -Technical Contact Phone Number: +1.4152229670 -Technical Contact Facsimile Number: +1.4152220922 -Technical Contact Email: domains-tech@twitter.com -Name Server: NS1.P34.DYNECT.NET -Name Server: NS2.P34.DYNECT.NET -Name Server: NS3.P34.DYNECT.NET -Name Server: NS4.P34.DYNECT.NET -Created by Registrar: INJECTCSR -Last Updated by Registrar: CSC CORPORATE DOMAINS -Last Transferred Date: Sun Oct 13 16:51:10 GMT 2013 -Domain Registration Date: Mon Apr 26 07:50:40 GMT 2010 -Domain Expiration Date: Mon Apr 25 23:59:59 GMT 2016 -Domain Last Updated Date: Mon Oct 14 13:03:24 GMT 2013 +Domain Name: t.co +Registry Domain ID: D740225-CO +Registrar WHOIS Server: whois.corporatedomains.com +Registrar URL: whois.corporatedomains.com +Updated Date: 2021-04-26T05:09:40Z +Creation Date: 2010-04-26T07:50:40Z +Registry Expiry Date: 2022-04-25T23:59:59Z +Registrar: CSC Corporate Domains, Inc. +Registrar IANA ID: 299 +Registrar Abuse Contact Email: domainabuse@cscglobal.com +Registrar Abuse Contact Phone: +1.8887802723 +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited +Domain Status: serverTransferProhibited https://icann.org/epp#serverTransferProhibited +Domain Status: serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited +Registry Registrant ID: REDACTED FOR PRIVACY +Registrant Name: REDACTED FOR PRIVACY +Registrant Organization: Twitter, Inc. +Registrant Street: REDACTED FOR PRIVACY +Registrant Street: REDACTED FOR PRIVACY +Registrant Street: REDACTED FOR PRIVACY +Registrant City: REDACTED FOR PRIVACY +Registrant State/Province: CA +Registrant Postal Code: REDACTED FOR PRIVACY +Registrant Country: US +Registrant Phone: REDACTED FOR PRIVACY +Registrant Phone Ext: REDACTED FOR PRIVACY +Registrant Fax: REDACTED FOR PRIVACY +Registrant Fax Ext: REDACTED FOR PRIVACY +Registrant Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Admin ID: REDACTED FOR PRIVACY +Admin Name: REDACTED FOR PRIVACY +Admin Organization: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin City: REDACTED FOR PRIVACY +Admin State/Province: REDACTED FOR PRIVACY +Admin Postal Code: REDACTED FOR PRIVACY +Admin Country: REDACTED FOR PRIVACY +Admin Phone: REDACTED FOR PRIVACY +Admin Phone Ext: REDACTED FOR PRIVACY +Admin Fax: REDACTED FOR PRIVACY +Admin Fax Ext: REDACTED FOR PRIVACY +Admin Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Tech ID: REDACTED FOR PRIVACY +Tech Name: REDACTED FOR PRIVACY +Tech Organization: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech City: REDACTED FOR PRIVACY +Tech State/Province: REDACTED FOR PRIVACY +Tech Postal Code: REDACTED FOR PRIVACY +Tech Country: REDACTED FOR PRIVACY +Tech Phone: REDACTED FOR PRIVACY +Tech Phone Ext: REDACTED FOR PRIVACY +Tech Fax: REDACTED FOR PRIVACY +Tech Fax Ext: REDACTED FOR PRIVACY +Tech Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Name Server: ns3.p34.dynect.net +Name Server: ns4.p34.dynect.net +Name Server: d01-01.ns.twtrdns.net +Name Server: d01-02.ns.twtrdns.net +Name Server: a.r06.twtrdns.net +Name Server: b.r06.twtrdns.net +Name Server: c.r06.twtrdns.net +Name Server: d.r06.twtrdns.net +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-21T10:15:42Z <<< ->>>> Whois database was last updated on: Tue Feb 18 20:39:30 GMT 2014 <<<< -.CO Internet, S.A.S., the Administrator for .CO, has collected this -information for the WHOIS database through Accredited Registrars. -This information is provided to you for informational purposes only -and is designed to assist persons in determining contents of a domain -name registration record in the .CO Internet registry database. .CO -Internet makes this information available to you "as is" and does not -guarantee its accuracy. - -By submitting a WHOIS query, you agree that you will use this data -only for lawful purposes and that, under no circumstances will you -use this data: (1) to allow, enable, or otherwise support the transmission -of mass unsolicited, commercial advertising or solicitations via direct -mail, electronic mail, or by telephone; (2) in contravention of any -applicable data and privacy protection laws; or (3) to enable high volume, -automated, electronic processes that apply to the registry (or its systems). -Compilation, repackaging, dissemination, or other use of the WHOIS -database in its entirety, or of a substantial portion thereof, is not allowed -without .CO Internet's prior written permission. .CO Internet reserves the -right to modify or change these conditions at any time without prior or -subsequent notification of any kind. By executing this query, in any manner -whatsoever, you agree to abide by these terms. In some limited cases, -domains that might appear as available in whois might not actually be -available as they could be already registered and the whois not yet updated -and/or they could be part of the Restricted list. In this cases, performing a -check through your Registrar's (EPP check) will give you the actual status -of the domain. Additionally, domains currently or previously used as -extensions in 3rd level domains will not be available for registration in the -2nd level. For example, org.co,mil.co,edu.co,com.co,net.co,nom.co,arts.co, -firm.co,info.co,int.co,web.co,rec.co,co.co. - -NOTE: FAILURE TO LOCATE A RECORD IN THE WHOIS DATABASE IS NOT -INDICATIVE OF THE AVAILABILITY OF A DOMAIN NAME. - -All domain names are subject to certain additional domain name registration -rules. For details, please visit our site at www.cointernet.co . +For more information on Whois status codes, please visit https://icann.org/epp + +The above WHOIS results have been redacted to remove potential personal data. The full WHOIS output may be available to individuals and organisations with a legitimate interest in accessing this data not outweighed by the fundamental privacy rights of the data subject. To find out more, or to make a request for access, please visit: RDDSrequest.nic.co. + +.CO Internet, S.A.S., the Administrator for .CO, has collected this information for the WHOIS database through Accredited Registrars. This information is provided to you for informational purposes only and is designed to assist persons in determining contents of a domain name registration record in the .CO Internet registry database. .CO Internet makes this information available to you "as is" and does not guarantee its accuracy. + +By submitting a WHOIS query, you agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data: (1) to allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via direct mail, electronic mail, or by telephone; (2) in contravention of any applicable data and privacy protection laws; or (3) to enable high volume, automated, electronic processes that apply to the registry (or its systems). Compilation, repackaging, dissemination, or other use of the WHOIS database in its entirety, or of a substantial portion thereof, is not allowed without .CO Internet's prior written permission. .CO Internet reserves the right to modify or change these conditions at any time without prior or subsequent notification of any kind. By executing this query, in any manner whatsoever, you agree to abide by these terms. In some limited cases, domains that might appear as available in whois might not actually be available as they could be already registered and the whois not yet updated and/or they could be part of the Restricted list. In this cases, performing a check through your Registrar's (EPP check) will give you the actual status of the domain. Additionally, domains currently or previously used as extensions in 3rd level domains will not be available for registration in the 2nd level. For example, org.co, mil.co, edu.co, com.co, net.co, nom.co, arts.co, firm.co, info.co, int.co, web.co, rec.co, co.co. + +NOTE: FAILURE TO LOCATE A RECORD IN THE WHOIS DATABASE IS NOT INDICATIVE OF THE AVAILABILITY OF A DOMAIN NAME. All domain names are subject to certain additional domain name registration rules. For details, please visit our site at www.cointernet.co . diff --git a/spec/fixtures/responses/whois.nic.college/college/status_available.expected b/spec/fixtures/responses/whois.nic.college/college/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.nic.college/college/status_available.expected +++ b/spec/fixtures/responses/whois.nic.college/college/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.nic.college/college/status_available.txt b/spec/fixtures/responses/whois.nic.college/college/status_available.txt index b1b30e98..f99ef237 100644 --- a/spec/fixtures/responses/whois.nic.college/college/status_available.txt +++ b/spec/fixtures/responses/whois.nic.college/college/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-15T18:03:37.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.nic.college/college/status_registered.expected b/spec/fixtures/responses/whois.nic.college/college/status_registered.expected index 0e88fcdb..3ad63d88 100644 --- a/spec/fixtures/responses/whois.nic.college/college/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.college/college/status_registered.expected @@ -1,5 +1,5 @@ #disclaimer - %s == "Access to the whois service is rate limited. For more information, please see https://registrar-console.centralnic.com/pub/whois_guidance." + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == ["serverTransferProhibited", "serverUpdateProhibited", "serverDeleteProhibited", "serverRenewProhibited"] + %s == :registered #available? %s == false @@ -21,103 +21,64 @@ #created_on %s %CLASS{time} - %s %TIME{2013-09-11 00:00:00 UTC} + %s %TIME{2013-09-11 11:58:15 UTC} #updated_on %s %CLASS{time} - %s %TIME{2014-09-12 00:15:47 UTC} + %s %TIME{2021-09-05 00:10:44 UTC} #expires_on %s %CLASS{time} - %s %TIME{2015-09-11 23:59:59 UTC} + %s %TIME{2022-09-11 23:59:59 UTC} #registrar %s %CLASS{registrar} %s.id == "9999" %s.name == "CentralNic Ltd" - %s.organization == nil - %s.url == nil + %s.url == "https://www.centralnic.com/" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "H5178905" - %s[0].name == "Domain Administrator" + %s[0].id == nil + %s[0].name == nil %s[0].organization == "XYZ.COM LLC" - %s[0].address == "2121 E Tropicana Ave Suite #2" - %s[0].city == "Las Vegas" - %s[0].zip == "89119" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil %s[0].state == "NV" %s[0].country == nil %s[0].country_code == "US" - %s[0].phone == "+1.8009998422" - %s[0].fax == "+1.7023578299" - %s[0].email == "icann@xyz.com" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "H5178905" - %s[0].name == "Domain Administrator" - %s[0].organization == "XYZ.COM LLC" - %s[0].address == "2121 E Tropicana Ave Suite #2" - %s[0].city == "Las Vegas" - %s[0].zip == "89119" - %s[0].state == "NV" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.8009998422" - %s[0].fax == "+1.7023578299" - %s[0].email == "icann@xyz.com" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "H5178905" - %s[0].name == "Domain Administrator" - %s[0].organization == "XYZ.COM LLC" - %s[0].address == "2121 E Tropicana Ave Suite #2" - %s[0].city == "Las Vegas" - %s[0].zip == "89119" - %s[0].state == "NV" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.8009998422" - %s[0].fax == "+1.7023578299" - %s[0].email == "icann@xyz.com" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #nameservers %s %CLASS{array} - %s %SIZE{6} + %s %SIZE{4} %s[0] %CLASS{nameserver} - %s[0].name == "ns0.centralnic-dns.com" - %s[0].ipv4 == nil - %s[0].ipv6 == nil + %s[0].name == "a.nic.college" %s[1] %CLASS{nameserver} - %s[1].name == "ns1.centralnic-dns.com" - %s[1].ipv4 == nil - %s[1].ipv6 == nil + %s[1].name == "b.nic.college" %s[2] %CLASS{nameserver} - %s[2].name == "ns2.centralnic-dns.com" - %s[2].ipv4 == nil - %s[2].ipv6 == nil + %s[2].name == "c.nic.college" %s[3] %CLASS{nameserver} - %s[3].name == "ns3.centralnic-dns.com" - %s[3].ipv4 == nil - %s[3].ipv6 == nil - %s[4] %CLASS{nameserver} - %s[4].name == "ns4.centralnic-dns.com" - %s[4].ipv4 == nil - %s[4].ipv6 == nil - %s[5] %CLASS{nameserver} - %s[5].name == "ns5.centralnic-dns.com" - %s[5].ipv4 == nil - %s[5].ipv6 == nil + %s[3].name == "d.nic.college" diff --git a/spec/fixtures/responses/whois.nic.college/college/status_registered.txt b/spec/fixtures/responses/whois.nic.college/college/status_registered.txt index 271cd914..0579a476 100644 --- a/spec/fixtures/responses/whois.nic.college/college/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.college/college/status_registered.txt @@ -1,89 +1,47 @@ Domain Name: NIC.COLLEGE -Domain ID: D1465621-CNIC -WHOIS Server: whois.centralnic.com -Referral URL: http://www.centralnic.com/ -Updated Date: 2014-09-12T00:15:47.0Z -Creation Date: 2013-09-11T00:00:00.0Z -Registry Expiry Date: 2015-09-11T23:59:59.0Z -Sponsoring Registrar: CentralNic Ltd -Sponsoring Registrar IANA ID: 9999 -Domain Status: serverTransferProhibited -Domain Status: serverUpdateProhibited -Domain Status: serverDeleteProhibited -Domain Status: serverRenewProhibited -Registrant ID: H5178905 -Registrant Name: Domain Administrator +Registry Domain ID: D1465621-CNIC +Registrar WHOIS Server: whois.centralnic.com +Registrar URL: https://www.centralnic.com/ +Updated Date: 2021-09-05T00:10:44.0Z +Creation Date: 2013-09-11T11:58:15.0Z +Registry Expiry Date: 2022-09-11T23:59:59.0Z +Registrar: CentralNic Ltd +Registrar IANA ID: 9999 +Domain Status: serverTransferProhibited https://icann.org/epp#serverTransferProhibited +Domain Status: serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited +Domain Status: serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited +Domain Status: serverRenewProhibited https://icann.org/epp#serverRenewProhibited Registrant Organization: XYZ.COM LLC -Registrant Street: 2121 E Tropicana Ave Suite #2 -Registrant City: Las Vegas Registrant State/Province: NV -Registrant Postal Code: 89119 Registrant Country: US -Registrant Phone: +1.8009998422 -Registrant Phone Ext: -Registrant Fax: +1.7023578299 -Registrant Fax Ext: -Registrant Email: icann@xyz.com -Admin ID: H5178905 -Admin Name: Domain Administrator -Admin Organization: XYZ.COM LLC -Admin Street: 2121 E Tropicana Ave Suite #2 -Admin City: Las Vegas -Admin State/Province: NV -Admin Postal Code: 89119 -Admin Country: US -Admin Phone: +1.8009998422 -Admin Phone Ext: -Admin Fax: +1.7023578299 -Admin Fax Ext: -Admin Email: icann@xyz.com -Tech ID: H5178905 -Tech Name: Domain Administrator -Tech Organization: XYZ.COM LLC -Tech Street: 2121 E Tropicana Ave Suite #2 -Tech City: Las Vegas -Tech State/Province: NV -Tech Postal Code: 89119 -Tech Country: US -Tech Phone: +1.8009998422 -Tech Phone Ext: -Tech Fax: +1.7023578299 -Tech Fax Ext: -Tech Email: icann@xyz.com -Name Server: NS0.CENTRALNIC-DNS.COM -Name Server: NS1.CENTRALNIC-DNS.COM -Name Server: NS2.CENTRALNIC-DNS.COM -Name Server: NS3.CENTRALNIC-DNS.COM -Name Server: NS4.CENTRALNIC-DNS.COM -Name Server: NS5.CENTRALNIC-DNS.COM +Registrant Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Admin Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Tech Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Name Server: A.NIC.COLLEGE +Name Server: B.NIC.COLLEGE +Name Server: C.NIC.COLLEGE +Name Server: D.NIC.COLLEGE DNSSEC: unsigned -Billing ID: H5178905 -Billing Name: Domain Administrator -Billing Organization: XYZ.COM LLC -Billing Street: 2121 E Tropicana Ave Suite #2 -Billing City: Las Vegas -Billing State/Province: NV -Billing Postal Code: 89119 -Billing Country: US -Billing Phone: +1.8009998422 -Billing Phone Ext: -Billing Fax: +1.7023578299 -Billing Fax Ext: -Billing Email: icann@xyz.com ->>> Last update of WHOIS database: 2015-05-13T10:34:31.0Z <<< +Billing Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registrar Abuse Contact Email: ops@centralnic.com +Registrar Abuse Contact Phone: +44.2033880600 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-15T18:03:26.0Z <<< For more information on Whois status codes, please visit https://icann.org/epp -This whois service is provided by CentralNic Ltd and only contains +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in +ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - -Access to the whois service is rate limited. For more information, please -see https://registrar-console.centralnic.com/pub/whois_guidance. +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.nic.consulting/consulting/status_available.expected b/spec/fixtures/responses/whois.nic.consulting/consulting/status_available.expected new file mode 100644 index 00000000..4960f4aa --- /dev/null +++ b/spec/fixtures/responses/whois.nic.consulting/consulting/status_available.expected @@ -0,0 +1,21 @@ +#status + %s == [] + +#available? + %s == true + +#registered? + %s == false + +#created_on + %s == nil + +#updated_on + %s == nil + +#expires_on + %s == nil + +#nameservers + %s %CLASS{array} + %s == [] diff --git a/spec/fixtures/responses/whois.nic.consulting/consulting/status_available.txt b/spec/fixtures/responses/whois.nic.consulting/consulting/status_available.txt new file mode 100644 index 00000000..fbf900bf --- /dev/null +++ b/spec/fixtures/responses/whois.nic.consulting/consulting/status_available.txt @@ -0,0 +1,4 @@ +Domain not found. +>>> Last update of WHOIS database: 2024-07-31T18:17:15Z <<< +Terms of Use: Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by Identity Digital or the Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Identity Digital except as reasonably necessary to register domain names or modify existing registrations. When using the Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a proper legal basis for accessing the withheld data. Access to this data provided by Identity Digital can be requested by submitting a request via the form found at https://www.identity.digital/about/policies/whois-layered-access/. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. Identity Digital Inc. and Registry Operator reserve the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. + diff --git a/spec/fixtures/responses/whois.nic.consulting/consulting/status_registered.expected b/spec/fixtures/responses/whois.nic.consulting/consulting/status_registered.expected new file mode 100644 index 00000000..79b02082 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.consulting/consulting/status_registered.expected @@ -0,0 +1,30 @@ +#status + %s == ["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientRenewProhibited https://icann.org/epp#clientRenewProhibited","clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"] + +#available? + %s == false + +#registered? + %s == true + + +#created_on + %s %CLASS{time} + %s %TIME{2023-02-15T01:47:04Z} + +#updated_on + %s %CLASS{time} + %s %TIME{2024-07-14T03:59:16Z} + +#expires_on + %s %CLASS{time} + %s %TIME{2025-02-15T01:47:04Z} + + +#nameservers + %s %CLASS{array} + %s %SIZE{2} + %s[0] %CLASS{nameserver} + %s[0].name == "ns25.domaincontrol.com" + %s[1] %CLASS{nameserver} + %s[1].name == "ns26.domaincontrol.com" diff --git a/spec/fixtures/responses/whois.nic.consulting/consulting/status_registered.txt b/spec/fixtures/responses/whois.nic.consulting/consulting/status_registered.txt new file mode 100644 index 00000000..b093bfc7 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.consulting/consulting/status_registered.txt @@ -0,0 +1,61 @@ +Domain Name: topmba.consulting +Registry Domain ID: 6fc3d86850f343b7b15e3151b9baf2db-DONUTS +Registrar WHOIS Server: whois.godaddy.com/ +Registrar URL: http://www.godaddy.com/domains/search.aspx?ci=8990 +Updated Date: 2024-07-14T03:59:16Z +Creation Date: 2023-02-15T01:47:04Z +Registry Expiry Date: 2025-02-15T01:47:04Z +Registrar: GoDaddy.com, LLC +Registrar IANA ID: 146 +Registrar Abuse Contact Email: abuse@godaddy.com +Registrar Abuse Contact Phone: +1.4806242505 +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientRenewProhibited https://icann.org/epp#clientRenewProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Registry Registrant ID: REDACTED FOR PRIVACY +Registrant Name: REDACTED FOR PRIVACY +Registrant Organization: Domains By Proxy, LLC +Registrant Street: REDACTED FOR PRIVACY +Registrant City: REDACTED FOR PRIVACY +Registrant State/Province: Arizona +Registrant Postal Code: REDACTED FOR PRIVACY +Registrant Country: US +Registrant Phone: REDACTED FOR PRIVACY +Registrant Phone Ext: REDACTED FOR PRIVACY +Registrant Fax: REDACTED FOR PRIVACY +Registrant Fax Ext: REDACTED FOR PRIVACY +Registrant Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Admin ID: REDACTED FOR PRIVACY +Admin Name: REDACTED FOR PRIVACY +Admin Organization: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin City: REDACTED FOR PRIVACY +Admin State/Province: REDACTED FOR PRIVACY +Admin Postal Code: REDACTED FOR PRIVACY +Admin Country: REDACTED FOR PRIVACY +Admin Phone: REDACTED FOR PRIVACY +Admin Phone Ext: REDACTED FOR PRIVACY +Admin Fax: REDACTED FOR PRIVACY +Admin Fax Ext: REDACTED FOR PRIVACY +Admin Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Tech ID: REDACTED FOR PRIVACY +Tech Name: REDACTED FOR PRIVACY +Tech Organization: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech City: REDACTED FOR PRIVACY +Tech State/Province: REDACTED FOR PRIVACY +Tech Postal Code: REDACTED FOR PRIVACY +Tech Country: REDACTED FOR PRIVACY +Tech Phone: REDACTED FOR PRIVACY +Tech Phone Ext: REDACTED FOR PRIVACY +Tech Fax: REDACTED FOR PRIVACY +Tech Fax Ext: REDACTED FOR PRIVACY +Tech Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Name Server: ns25.domaincontrol.com +Name Server: ns26.domaincontrol.com +DNSSEC: signedDelegation +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2024-07-31T15:13:11Z <<< +For more information on Whois status codes, please visit https://icann.org/epp +Terms of Use: Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by Identity Digital or the Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Identity Digital except as reasonably necessary to register domain names or modify existing registrations. When using the Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a proper legal basis for accessing the withheld data. Access to this data provided by Identity Digital can be requested by submitting a request via the form found at https://www.identity.digital/about/policies/whois-layered-access/. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. Identity Digital Inc. and Registry Operator reserve the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. diff --git a/spec/fixtures/responses/whois.nic.cx/cx/status_registered.expected b/spec/fixtures/responses/whois.nic.cx/cx/status_registered.expected index 22ce82a2..3993344d 100644 --- a/spec/fixtures/responses/whois.nic.cx/cx/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.cx/cx/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor" - %s.organization == nil %s.url == nil diff --git a/spec/fixtures/responses/whois.nic.cz/cz/status_registered.expected b/spec/fixtures/responses/whois.nic.cz/cz/status_registered.expected index 5d501214..c9e5cf8f 100644 --- a/spec/fixtures/responses/whois.nic.cz/cz/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.cz/cz/status_registered.expected @@ -25,14 +25,13 @@ #expires_on %s %CLASS{time} - %s %TIME{2014-07-22} + %s %TIME{2014-07-22 00:00:00} #registrar %s %CLASS{registrar} %s.id == "REG-MARKMONITOR" %s.name == "REG-MARKMONITOR" - %s.organization == nil %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/whois.nic.design/design/status_available.expected b/spec/fixtures/responses/whois.nic.design/design/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.nic.design/design/status_available.expected +++ b/spec/fixtures/responses/whois.nic.design/design/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.nic.design/design/status_available.txt b/spec/fixtures/responses/whois.nic.design/design/status_available.txt index b1b30e98..d8a8400e 100644 --- a/spec/fixtures/responses/whois.nic.design/design/status_available.txt +++ b/spec/fixtures/responses/whois.nic.design/design/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-15T18:08:22.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.nic.design/design/status_registered.expected b/spec/fixtures/responses/whois.nic.design/design/status_registered.expected index c5ebd9d2..2c5339e4 100644 --- a/spec/fixtures/responses/whois.nic.design/design/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.design/design/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "Access to the whois service is rate limited. For more information, please see https://registrar-console.centralnic.com/pub/whois_guidance." + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain %s == "toplevel.design" #domain_id - %s == "D7069819-CNIC" + %s == "D44478444-CNIC" #status - %s == ["ok"] + %s == :registered #available? %s == false @@ -21,77 +21,54 @@ #created_on %s %CLASS{time} - %s %TIME{2015-02-27 16:08:32 UTC} + %s %TIME{2017-02-16 20:11:45 UTC} #updated_on %s %CLASS{time} - %s %TIME{2015-04-21 17:48:34 UTC} + %s %TIME{2021-08-30 22:42:53 UTC} #expires_on %s %CLASS{time} - %s %TIME{2016-02-27 23:59:59 UTC} + %s %TIME{2022-02-16 23:59:59 UTC} #registrar %s %CLASS{registrar} - %s.id == "9999" - %s.name == "Top Level Design, LLC" - %s.organization == nil - %s.url == nil + %s.id == "1861" + %s.name == "Porkbun, LLC" + %s.url == "https://porkbun.com/" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "H4596017" - %s[0].name == "Domain Administrator" - %s[0].organization == "Top Level Design, LLC" - %s[0].address == "742 Ocean Club Place" - %s[0].city == "Fernandina Beach" - %s[0].zip == "32034" - %s[0].state == "Florida" + %s[0].id == nil + %s[0].name == nil + %s[0].organization == "Top Level Design LLC" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil + %s[0].state == "Oregon" %s[0].country == nil %s[0].country_code == "US" - %s[0].phone == "+1.5038888808" - %s[0].fax == "+1.6788841468" - %s[0].email == "ray@tldesign.co" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "H4596017" - %s[0].name == "Domain Administrator" - %s[0].organization == "Top Level Design, LLC" - %s[0].address == "742 Ocean Club Place" - %s[0].city == "Fernandina Beach" - %s[0].zip == "32034" - %s[0].state == "Florida" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.5038888808" - %s[0].fax == "+1.6788841468" - %s[0].email == "ray@tldesign.co" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "H4596017" - %s[0].name == "Domain Administrator" - %s[0].organization == "Top Level Design, LLC" - %s[0].address == "742 Ocean Club Place" - %s[0].city == "Fernandina Beach" - %s[0].zip == "32034" - %s[0].state == "Florida" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.5038888808" - %s[0].fax == "+1.6788841468" - %s[0].email == "ray@tldesign.co" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #nameservers @@ -99,17 +76,9 @@ %s %SIZE{4} %s[0] %CLASS{nameserver} %s[0].name == "ns-170.awsdns-21.com" - %s[0].ipv4 == nil - %s[0].ipv6 == nil %s[1] %CLASS{nameserver} %s[1].name == "ns-904.awsdns-49.net" - %s[1].ipv4 == nil - %s[1].ipv6 == nil %s[2] %CLASS{nameserver} %s[2].name == "ns-1067.awsdns-05.org" - %s[2].ipv4 == nil - %s[2].ipv6 == nil %s[3] %CLASS{nameserver} %s[3].name == "ns-1873.awsdns-42.co.uk" - %s[3].ipv4 == nil - %s[3].ipv6 == nil diff --git a/spec/fixtures/responses/whois.nic.design/design/status_registered.txt b/spec/fixtures/responses/whois.nic.design/design/status_registered.txt index f82ac8f3..2b87542d 100644 --- a/spec/fixtures/responses/whois.nic.design/design/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.design/design/status_registered.txt @@ -1,84 +1,45 @@ Domain Name: TOPLEVEL.DESIGN -Domain ID: D7069819-CNIC -WHOIS Server: whois.nic.wiki -Referral URL: -Updated Date: 2015-04-21T17:48:34.0Z -Creation Date: 2015-02-27T16:08:32.0Z -Registry Expiry Date: 2016-02-27T23:59:59.0Z -Sponsoring Registrar: Top Level Design, LLC -Sponsoring Registrar IANA ID: 9999 -Domain Status: ok -Registrant ID: H4596017 -Registrant Name: Domain Administrator -Registrant Organization: Top Level Design, LLC -Registrant Street: 742 Ocean Club Place -Registrant City: Fernandina Beach -Registrant State/Province: Florida -Registrant Postal Code: 32034 +Registry Domain ID: D44478444-CNIC +Registrar WHOIS Server: whois.porkbun.com +Registrar URL: https://porkbun.com/ +Updated Date: 2021-08-30T22:42:53.0Z +Creation Date: 2017-02-16T20:11:45.0Z +Registry Expiry Date: 2022-02-16T23:59:59.0Z +Registrar: Porkbun, LLC +Registrar IANA ID: 1861 +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Registrant Organization: Top Level Design LLC +Registrant State/Province: Oregon Registrant Country: US -Registrant Phone: +1.5038888808 -Registrant Phone Ext: -Registrant Fax: +1.6788841468 -Registrant Fax Ext: -Registrant Email: ray@tldesign.co -Admin ID: H4596017 -Admin Name: Domain Administrator -Admin Organization: Top Level Design, LLC -Admin Street: 742 Ocean Club Place -Admin City: Fernandina Beach -Admin State/Province: Florida -Admin Postal Code: 32034 -Admin Country: US -Admin Phone: +1.5038888808 -Admin Phone Ext: -Admin Fax: +1.6788841468 -Admin Fax Ext: -Admin Email: ray@tldesign.co -Tech ID: H4596017 -Tech Name: Domain Administrator -Tech Organization: Top Level Design, LLC -Tech Street: 742 Ocean Club Place -Tech City: Fernandina Beach -Tech State/Province: Florida -Tech Postal Code: 32034 -Tech Country: US -Tech Phone: +1.5038888808 -Tech Phone Ext: -Tech Fax: +1.6788841468 -Tech Fax Ext: -Tech Email: ray@tldesign.co +Registrant Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Admin Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Tech Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. Name Server: NS-170.AWSDNS-21.COM Name Server: NS-904.AWSDNS-49.NET Name Server: NS-1067.AWSDNS-05.ORG Name Server: NS-1873.AWSDNS-42.CO.UK DNSSEC: unsigned -Billing ID: H4596017 -Billing Name: Domain Administrator -Billing Organization: Top Level Design, LLC -Billing Street: 742 Ocean Club Place -Billing City: Fernandina Beach -Billing State/Province: Florida -Billing Postal Code: 32034 -Billing Country: US -Billing Phone: +1.5038888808 -Billing Phone Ext: -Billing Fax: +1.6788841468 -Billing Fax Ext: -Billing Email: ray@tldesign.co ->>> Last update of WHOIS database: 2015-05-13T10:09:55.0Z <<< +Billing Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registrar Abuse Contact Email: abuse@porkbun.com +Registrar Abuse Contact Phone: +1.5038508351 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-15T18:08:15.0Z <<< For more information on Whois status codes, please visit https://icann.org/epp -This whois service is provided by CentralNic Ltd and only contains +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in +ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - -Access to the whois service is rate limited. For more information, please -see https://registrar-console.centralnic.com/pub/whois_guidance. +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.nic.dm/dm/status_registered.expected b/spec/fixtures/responses/whois.nic.dm/dm/status_registered.expected index 8c80cf40..9ff91d33 100644 --- a/spec/fixtures/responses/whois.nic.dm/dm/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.dm/dm/status_registered.expected @@ -36,7 +36,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor Inc." - %s.organization == nil %s.url == "www.markmonitor.com" #registrant_contacts diff --git a/spec/fixtures/responses/whois.nic.ec/ex/status_registered.expected b/spec/fixtures/responses/whois.nic.ec/ex/status_registered.expected index c5632025..ffa00a21 100644 --- a/spec/fixtures/responses/whois.nic.ec/ex/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.ec/ex/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor Inc." - %s.organization == nil %s.url == "www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.nic.es/es/status_available.expected b/spec/fixtures/responses/whois.nic.es/es/status_available.expected index abe349f1..845ba91c 100644 --- a/spec/fixtures/responses/whois.nic.es/es/status_available.expected +++ b/spec/fixtures/responses/whois.nic.es/es/status_available.expected @@ -29,7 +29,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "ES-NIC" - %s.organization == "ES-NIC Delegated Internet Registry for Spain" %s.url == nil diff --git a/spec/fixtures/responses/whois.nic.es/es/status_registered.expected b/spec/fixtures/responses/whois.nic.es/es/status_registered.expected index b20b77aa..2baebaf5 100644 --- a/spec/fixtures/responses/whois.nic.es/es/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.es/es/status_registered.expected @@ -17,21 +17,20 @@ #created_on %s %CLASS{time} - %s %TIME{16/09/03} + %s %TIME{2003-09-16} #updated_on %s %ERROR{AttributeNotSupported} #expires_on %s %CLASS{time} - %s %TIME{16/09/14} + %s %TIME{2014-09-16} #registrar %s %CLASS{registrar} %s.id == nil %s.name == "ES-NIC" - %s.organization == "ES-NIC Delegated Internet Registry for Spain" %s.url == nil diff --git a/spec/fixtures/responses/whois.nic.fr/fr/property_contact_without_address.expected b/spec/fixtures/responses/whois.nic.fr/fr/property_contact_without_address.expected deleted file mode 100644 index d7b31734..00000000 --- a/spec/fixtures/responses/whois.nic.fr/fr/property_contact_without_address.expected +++ /dev/null @@ -1,17 +0,0 @@ -#registrant_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "ANO00-FRNIC" - %s[0].name == "Ano Nymous" - %s[0].organization == nil - %s[0].address == nil - %s[0].city == nil - %s[0].zip == nil - %s[0].state == nil - %s[0].country == nil - %s[0].country_code == nil - %s[0].phone == nil - %s[0].fax == nil - %s[0].email == nil - %s[0].updated_on %TIME{2007-09-03 00:00:00 UTC} diff --git a/spec/fixtures/responses/whois.nic.fr/fr/property_contact_without_address.txt b/spec/fixtures/responses/whois.nic.fr/fr/property_contact_without_address.txt deleted file mode 100644 index 7b2f5bb1..00000000 --- a/spec/fixtures/responses/whois.nic.fr/fr/property_contact_without_address.txt +++ /dev/null @@ -1,83 +0,0 @@ -%% -%% This is the AFNIC Whois server. -%% -%% complete date format : DD/MM/YYYY -%% short date format : DD/MM -%% version : FRNIC-2.5 -%% -%% Rights restricted by copyright. -%% See http://www.afnic.fr/afnic/web/mentions-legales-whois_en -%% -%% Use '-h' option to obtain more information about this service. -%% -%% [82.52.158.225 REQUEST] >> shingara.fr -%% -%% RL Net [##########] - RL IP [#########.] -%% - -domain: shingara.fr -status: ACTIVE -hold: NO -holder-c: ANO00-FRNIC -admin-c: ANO00-FRNIC -tech-c: HU3-FRNIC -zone-c: NFC1-FRNIC -nsl-id: NSL26764-FRNIC -registrar: 1&1 Internet AG -anniversary: 03/09 -created: 03/09/2007 -last-update: 06/07/2009 -source: FRNIC - -ns-list: NSL26764-FRNIC -nserver: ns0.vodkanoire.net -nserver: ns1.vodkanoire.net -nserver: ns2.vodkanoire.net -source: FRNIC - -registrar: 1&1 Internet AG -type: Isp Option 1 -address: Brauerstr. 48 -address: DE-76135 KARLSRUHE -country: DE -phone: +49 721 91374 0 -fax-no: +49 721 91374 215 -e-mail: hostmaster@1und1.de -website: http://registrar.1und1.de -anonymous: NO -registered: 17/01/2001 -source: FRNIC - -nic-hdl: HU3-FRNIC -type: ROLE -contact: Hostmaster UNETUN -address: 1&1 Internet Sarl. -address: 7, place de la Gare -address: 57200 Sarreguemines -country: FR -e-mail: hostmaster@1and1.fr -admin-c: IR2-FRNIC -tech-c: IR2-FRNIC -changed: 15/03/2004 hostmaster@1and1.fr -anonymous: NO -obsoleted: NO -source: FRNIC - -nic-hdl: ANO00-FRNIC -type: PERSON -contact: Ano Nymous -remarks: -------------- WARNING -------------- -remarks: While the registrar knows him/her, -remarks: this person chose to restrict access -remarks: to his/her personal data. So PLEASE, -remarks: don't send emails to Ano Nymous. This -remarks: address is bogus and there is no hope -remarks: of a reply. -remarks: -------------- WARNING -------------- -changed: 03/09/2007 anonymous@nowhere.xx.fr -anonymous: YES -obsoleted: NO -eligstatus: ok -eligdate: 03/09/2007 00:00:00 -source: FRNIC - diff --git a/spec/fixtures/responses/whois.nic.fr/fr/status_registered.expected b/spec/fixtures/responses/whois.nic.fr/fr/status_registered.expected index b527669a..9efae622 100644 --- a/spec/fixtures/responses/whois.nic.fr/fr/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.fr/fr/status_registered.expected @@ -10,15 +10,15 @@ #created_on %s %CLASS{time} - %s %TIME{2000-07-27} + %s %TIME{2004-05-20 11:28:40 UTC} #updated_on %s %CLASS{time} - %s %TIME{2016-12-30} + %s %TIME{2018-04-08 03:52:04 UTC} #expires_on %s %CLASS{time} - %s %TIME{2017-12-30} + %s %TIME{2019-05-07 07:43:45 UTC} #registrant_contacts @@ -26,67 +26,63 @@ %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "GIH6-FRNIC" + %s[0].id == "U4339-FRNIC" %s[0].name == nil - %s[0].organization == "Google Ireland Holdings" - %s[0].address == "70 Sir John Rogersons Quay\n2 Dublin" + %s[0].organization == "1C2" + %s[0].address == "20-22, rue Louis Armand\n75015 Paris" %s[0].city == nil %s[0].zip == nil %s[0].state == nil %s[0].country == nil - %s[0].country_code == "IE" - %s[0].phone == "+353 14361000" + %s[0].country_code == "FR" + %s[0].phone == "+33 1 30 62 40 06" %s[0].fax == nil - %s[0].email == "dns-admin@google.com" - %s[0].updated_on %TIME{2015-03-20 00:00:00 UTC} + %s[0].email == "jmr@1c2.com" + %s[0].updated_on %TIME{2016-09-22 07:52:47 UTC} #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "GIH5-FRNIC" - %s[0].name == nil - %s[0].organization == "Google Ireland Holdings" - %s[0].address == "70 Sir John Rogersons Quay\n2 Dublin" + %s[0].id == "MO2494-FRNIC" + %s[0].name == "Magic Online" + %s[0].organization == "Magic Online" + %s[0].address == "130, avenue President Wilson\n93100 Montreuil\nParis" %s[0].city == nil %s[0].zip == nil %s[0].state == nil %s[0].country == nil - %s[0].country_code == "IE" - %s[0].phone == "+353 14361000" - %s[0].fax == nil - %s[0].email == "dns-admin@google.com" - %s[0].updated_on %TIME{2011-12-06 00:00:00 UTC} + %s[0].country_code == "FR" + %s[0].phone == "+33 1 41 58 22 50" + %s[0].fax == "+33 1 56 72 93 30" + %s[0].email == "hostmaster@magic.fr" + %s[0].updated_on %TIME{2014-03-31 16:13:52 UTC} #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "CP4370-FRNIC" - %s[0].name == "Ccops Provisioning" - %s[0].organization == "MarkMonitor" - %s[0].address == "10400 Overland Rd.\nPMB 155\n83709 Boise" + %s[0].id == "MO2556-FRNIC" + %s[0].name == "Magic Online" + %s[0].organization == "Magic Online" + %s[0].address == "130-134, avenue du President Wilson\n93100 Montreuil\nFrance" %s[0].city == nil %s[0].zip == nil %s[0].state == nil %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1 2083895740" - %s[0].fax == "+1 2083895771" - %s[0].email == "ccops@markmonitor.com" - %s[0].updated_on %TIME{2011-06-14 00:00:00 UTC} + %s[0].country_code == "FR" + %s[0].phone == "+33 1 41 58 22 50" + %s[0].fax == "+33 1 56 72 93 30" + %s[0].email == "production@magic.fr" + %s[0].updated_on %TIME{2014-05-20 15:07:08 UTC} #nameservers %s %CLASS{array} - %s %SIZE{4} + %s %SIZE{2} %s[0] %CLASS{nameserver} - %s[0].name == "ns1.google.com" + %s[0].name == "ns.magic.fr" %s[1] %CLASS{nameserver} - %s[1].name == "ns2.google.com" - %s[2] %CLASS{nameserver} - %s[2].name == "ns3.google.com" - %s[3] %CLASS{nameserver} - %s[3].name == "ns4.google.com" + %s[1].name == "ns2.magic.fr" diff --git a/spec/fixtures/responses/whois.nic.fr/fr/status_registered.txt b/spec/fixtures/responses/whois.nic.fr/fr/status_registered.txt index a01f4136..3cf84131 100644 --- a/spec/fixtures/responses/whois.nic.fr/fr/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.fr/fr/status_registered.txt @@ -1,9 +1,7 @@ -[Querying whois.nic.fr] -[whois.nic.fr] %% %% This is the AFNIC Whois server. %% -%% complete date format : DD/MM/YYYY +%% complete date format : YYYY-MM-DDThh:mm:ssZ %% short date format : DD/MM %% version : FRNIC-2.5 %% @@ -12,99 +10,99 @@ %% %% Use '-h' option to obtain more information about this service. %% -%% [0.0.0.0 REQUEST] >> google.fr +%% [209.153.220.50 REQUEST] >> 1c2.fr %% %% RL Net [##########] - RL IP [#########.] %% -domain: google.fr +domain: 1c2.fr status: ACTIVE hold: NO -holder-c: GIH6-FRNIC -admin-c: GIH5-FRNIC -tech-c: CP4370-FRNIC +holder-c: U4339-FRNIC +admin-c: MO2494-FRNIC +tech-c: MO2556-FRNIC zone-c: NFC1-FRNIC -nsl-id: NSL4386-FRNIC -registrar: MARKMONITOR Inc. -Expiry Date: 30/12/2017 -created: 27/07/2000 -last-update: 30/12/2016 +nsl-id: NSL1231-FRNIC +registrar: EPAG Domainservices GmbH +Expiry Date: 2019-05-07T07:43:45Z +created: 2004-05-20T11:28:40Z +last-update: 2018-04-08T03:52:04Z source: FRNIC -ns-list: NSL4386-FRNIC -nserver: ns1.google.com -nserver: ns2.google.com -nserver: ns3.google.com -nserver: ns4.google.com +ns-list: NSL1231-FRNIC +nserver: ns.magic.fr +nserver: ns2.magic.fr source: FRNIC -registrar: MARKMONITOR Inc. +registrar: EPAG Domainservices GmbH type: Isp Option 1 -address: 3540 East Longwing Lane -address: -address: ID 83646 MERIDIAN -country: US -phone: +1 208 389 5740 -fax-no: +1 208 389 5771 -e-mail: registry.admin@markmonitor.com -website: http://www.markmonitor.com +address: Niebuhrstraße 16b +address: DE-53113 BONN +country: DE +phone: +49 228 3296840 +fax-no: +49 228 3296849 +e-mail: support@epag.de +website: https://www.epag.de/en/services/domains/domain-pricing/ anonymous: NO -registered: 10/01/2002 +registered: 2006-01-11T12:00:00Z source: FRNIC -nic-hdl: GIH6-FRNIC +nic-hdl: U4339-FRNIC type: ORGANIZATION -contact: Google Ireland Holdings -address: 70 Sir John Rogersons Quay -address: 2 Dublin -country: IE -phone: +353 14361000 -e-mail: dns-admin@google.com -registrar: MARKMONITOR Inc. -changed: 20/03/2015 nic@nic.fr +contact: 1C2 +address: 20-22, rue Louis Armand +address: 75015 Paris +country: FR +phone: +33 1 30 62 40 06 +e-mail: jmr@1c2.com +registrar: EPAG Domainservices GmbH +changed: 2016-09-22T07:52:47Z nic@nic.fr anonymous: NO obsoleted: NO eligstatus: ok -eligsource: REGISTRAR -eligdate: 30/12/2011 18:15:32 +eligsource: REGISTRY +eligdate: 2016-09-22T07:52:47Z reachmedia: email reachstatus: ok -reachsource: REGISTRAR -reachdate: 20/03/2015 22:13:41 +reachsource: REGISTRY +reachdate: 2016-09-22T07:52:47Z source: FRNIC -nic-hdl: GIH5-FRNIC -type: ORGANIZATION -contact: Google Ireland Holdings -address: 70 Sir John Rogersons Quay -address: 2 Dublin -country: IE -phone: +353 14361000 -e-mail: dns-admin@google.com -registrar: MARKMONITOR Inc. -changed: 06/12/2011 nic@nic.fr +nic-hdl: MO2494-FRNIC +type: PERSON +contact: Magic Online +address: Magic Online +address: 130, avenue President Wilson +address: 93100 Montreuil +address: Paris +country: FR +phone: +33 1 41 58 22 50 +fax-no: +33 1 56 72 93 30 +e-mail: hostmaster@magic.fr +registrar: EPAG Domainservices GmbH +changed: 2014-03-31T16:13:52Z nic@nic.fr anonymous: NO obsoleted: NO -reachmedia: email -reachstatus: ok -reachsource: REGISTRAR -reachdate: 06/12/2011 10:28:50 +eligstatus: not identified +reachstatus: not identified source: FRNIC -nic-hdl: CP4370-FRNIC +nic-hdl: MO2556-FRNIC type: PERSON -contact: Ccops Provisioning -address: MarkMonitor -address: 10400 Overland Rd. -address: PMB 155 -address: 83709 Boise -country: US -phone: +1 2083895740 -fax-no: +1 2083895771 -e-mail: ccops@markmonitor.com -registrar: MARKMONITOR Inc. -changed: 14/06/2011 nic@nic.fr +contact: Magic Online +address: Magic Online +address: 130-134, avenue du President Wilson +address: 93100 Montreuil +address: France +country: FR +phone: +33 1 41 58 22 50 +fax-no: +33 1 56 72 93 30 +e-mail: production@magic.fr +registrar: EPAG Domainservices GmbH +changed: 2014-05-20T15:07:08Z nic@nic.fr anonymous: NO obsoleted: NO +eligstatus: not identified +reachstatus: not identified source: FRNIC diff --git a/spec/fixtures/responses/whois.nic.fr/tf/status_registered.expected b/spec/fixtures/responses/whois.nic.fr/tf/status_registered.expected index 3bcd3af5..e97dd22a 100644 --- a/spec/fixtures/responses/whois.nic.fr/tf/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.fr/tf/status_registered.expected @@ -10,15 +10,15 @@ #created_on %s %CLASS{time} - %s %TIME{2004-10-26} + %s %TIME{2004-10-25 22:00:00 UTC} #updated_on %s %CLASS{time} - %s %TIME{2016-10-25} + %s %TIME{2018-10-25 22:34:00 UTC} #expires_on %s %CLASS{time} - %s %TIME{2017-10-25} + %s %TIME{2019-10-25 22:00:00 UTC} #registrant_contacts @@ -29,16 +29,16 @@ %s[0].id == "AAEA9-FRNIC" %s[0].name == nil %s[0].organization == "Afnic (Terres Australes et Antarctiques - TOM)" - %s[0].address == "immeuble international\n2, rue Stephenson\nMontigny-Le-Bretonneux\n78181 Saint Quentin en Yvelines Cedex" + %s[0].address == "immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny le Bretonneux" %s[0].city == nil %s[0].zip == nil %s[0].state == nil %s[0].country == nil %s[0].country_code == "FR" - %s[0].phone == nil - %s[0].fax == nil - %s[0].email == nil - %s[0].updated_on %TIME{2008-10-09 00:00:00 UTC} + %s[0].phone == "+33 1 39 30 83 00" + %s[0].fax == "+33 1 39 30 83 01" + %s[0].email == "support@afnic.fr" + %s[0].updated_on %TIME{2017-07-17 12:40:50 UTC} #admin_contacts %s %CLASS{array} @@ -48,7 +48,7 @@ %s[0].id == "NFC1-FRNIC" %s[0].name == "NIC France Contact" %s[0].organization == "AFNIC" - %s[0].address == "immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex" + %s[0].address == "immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux" %s[0].city == nil %s[0].zip == nil %s[0].state == nil @@ -57,7 +57,7 @@ %s[0].phone == "+33 1 39 30 83 00" %s[0].fax == nil %s[0].email == "hostmaster@nic.fr" - %s[0].updated_on %TIME{2005-08-23 00:00:00 UTC} + %s[0].updated_on %TIME{2005-08-23 16:13:17 UTC} #technical_contacts %s %CLASS{array} @@ -67,7 +67,7 @@ %s[0].id == "NFC1-FRNIC" %s[0].name == "NIC France Contact" %s[0].organization == "AFNIC" - %s[0].address == "immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex" + %s[0].address == "immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux" %s[0].city == nil %s[0].zip == nil %s[0].state == nil @@ -76,7 +76,7 @@ %s[0].phone == "+33 1 39 30 83 00" %s[0].fax == nil %s[0].email == "hostmaster@nic.fr" - %s[0].updated_on %TIME{2005-08-23 00:00:00 UTC} + %s[0].updated_on %TIME{2005-08-23 16:13:17 UTC} #nameservers @@ -84,13 +84,7 @@ %s %SIZE{3} %s[0] %CLASS{nameserver} %s[0].name == "ns1.nic.fr" - %s[0].ipv4 == "192.134.4.1" - %s[0].ipv6 == "2001:67c:2218:2::4:1" %s[1] %CLASS{nameserver} %s[1].name == "ns2.nic.fr" - %s[1].ipv4 == "192.93.0.4" - %s[1].ipv6 == "2001:660:3005:1::1:2" %s[2] %CLASS{nameserver} %s[2].name == "ns3.nic.fr" - %s[2].ipv4 == "192.134.0.49" - %s[2].ipv6 == "2001:660:3006:1::1:1" diff --git a/spec/fixtures/responses/whois.nic.fr/tf/status_registered.txt b/spec/fixtures/responses/whois.nic.fr/tf/status_registered.txt index 79922184..771bc3a1 100644 --- a/spec/fixtures/responses/whois.nic.fr/tf/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.fr/tf/status_registered.txt @@ -1,9 +1,7 @@ -[Querying whois.nic.tf] -[whois.nic.tf] %% %% This is the AFNIC Whois server. %% -%% complete date format : DD/MM/YYYY +%% complete date format : YYYY-MM-DDThh:mm:ssZ %% short date format : DD/MM %% version : FRNIC-2.5 %% @@ -12,7 +10,7 @@ %% %% Use '-h' option to obtain more information about this service. %% -%% [0.0.0.0 REQUEST] >> nic.tf +%% [209.153.220.50 REQUEST] >> nic.tf %% %% RL Net [##########] - RL IP [#########.] %% @@ -31,31 +29,50 @@ remarks: Please email mailto: nic@nic.fr remarks: Spam mailto: abuse@nic.fr remarks: Test mailto: ping@nic.fr registrar: AFNIC registry -Expiry Date: 25/10/2017 -created: 26/10/2004 -last-update: 25/10/2016 +Expiry Date: 2019-10-25T22:00:00Z +created: 2004-10-25T22:00:00Z +last-update: 2018-10-25T22:34:00Z source: FRNIC ns-list: NSL1-FRNIC -nserver: ns1.nic.fr [192.134.4.1 2001:67c:2218:2::4:1] -nserver: ns2.nic.fr [192.93.0.4 2001:660:3005:1::1:2] -nserver: ns3.nic.fr [192.134.0.49 2001:660:3006:1::1:1] +nserver: ns1.nic.fr +nserver: ns2.nic.fr +nserver: ns3.nic.fr source: FRNIC registrar: AFNIC registry type: Isp Option 2 anonymous: YES -registered: 22/05/1997 +registered: 1997-05-22T12:00:00Z +source: FRNIC + +nic-hdl: AAEA9-FRNIC +type: ORGANIZATION +contact: Afnic (Terres Australes et Antarctiques - TOM) +address: immeuble le Stephenson +address: 1, rue Stephenson +address: Hall A2 - 3eme etage +address: 78180 Montigny le Bretonneux +country: FR +phone: +33 1 39 30 83 00 +fax-no: +33 1 39 30 83 01 +e-mail: support@afnic.fr +registrar: AFNIC registry +changed: 2017-07-17T12:40:50Z nic@nic.fr +anonymous: NO +obsoleted: NO +eligstatus: not identified +reachstatus: not identified source: FRNIC nic-hdl: NFC1-FRNIC type: ROLE contact: NIC France Contact address: AFNIC -address: immeuble international -address: 2, rue Stephenson -address: Montigny le Bretonneux -address: 78181 Saint Quentin en Yvelines Cedex +address: immeuble le Stephenson +address: 1, rue Stephensonq +address: Hall A2 - 3eme etage +address: 78180 Montigny-Le-Bretonneux country: FR phone: +33 1 39 30 83 00 e-mail: hostmaster@nic.fr @@ -70,22 +87,39 @@ tech-c: GO661-FRNIC tech-c: MS-FRNIC tech-c: AI1-FRNIC registrar: AFNIC registry -changed: 23/08/2005 hostmaster@nic.fr +changed: 2005-08-23T16:13:17Z hostmaster@nic.fr anonymous: NO obsoleted: NO +eligstatus: not identified +reachstatus: not identified source: FRNIC -nic-hdl: AAEA9-FRNIC -type: ORGANIZATION -contact: Afnic (Terres Australes et Antarctiques - TOM) -address: immeuble international -address: 2, rue Stephenson -address: Montigny-Le-Bretonneux -address: 78181 Saint Quentin en Yvelines Cedex +nic-hdl: NFC1-FRNIC +type: ROLE +contact: NIC France Contact +address: AFNIC +address: immeuble le Stephenson +address: 1, rue Stephenson +address: Hall A2 - 3eme etage +address: 78180 Montigny-Le-Bretonneux country: FR +phone: +33 1 39 30 83 00 +e-mail: hostmaster@nic.fr +admin-c: NFC1-FRNIC +tech-c: PL12-FRNIC +tech-c: JP-FRNIC +tech-c: MS1887-FRNIC +tech-c: VL-FRNIC +tech-c: PR1249-FRNIC +tech-c: PV827-FRNIC +tech-c: GO661-FRNIC +tech-c: MS-FRNIC +tech-c: AI1-FRNIC registrar: AFNIC registry -changed: 09/10/2008 whoismaster@nic.fr +changed: 2005-08-23T16:13:17Z hostmaster@nic.fr anonymous: NO obsoleted: NO +eligstatus: not identified +reachstatus: not identified source: FRNIC diff --git a/spec/fixtures/responses/whois.nic.fr/yt/status_registered.txt b/spec/fixtures/responses/whois.nic.fr/yt/status_registered.txt deleted file mode 100644 index 89e39f27..00000000 --- a/spec/fixtures/responses/whois.nic.fr/yt/status_registered.txt +++ /dev/null @@ -1,91 +0,0 @@ -[Querying whois.nic.yt] -[whois.nic.yt] -%% -%% This is the AFNIC Whois server. -%% -%% complete date format : DD/MM/YYYY -%% short date format : DD/MM -%% version : FRNIC-2.5 -%% -%% Rights restricted by copyright. -%% See https://www.afnic.fr/en/products-and-services/services/whois/whois-special-notice/ -%% -%% Use '-h' option to obtain more information about this service. -%% -%% [0.0.0.0 REQUEST] >> nic.yt -%% -%% RL Net [##########] - RL IP [#########.] -%% - -domain: nic.yt -status: ACTIVE -hold: NO -holder-c: AC3598-FRNIC -admin-c: NFC1-FRNIC -tech-c: NFC1-FRNIC -zone-c: NFC1-FRNIC -nsl-id: NSL1-FRNIC -remarks: Website at: http://www.nic.yt/ -remarks: Whois site at: whois.nic.fr -remarks: Please email mailto: nic@nic.fr -remarks: Spam mailto: abuse@nic.fr -remarks: Test mailto: ping@nic.fr -registrar: AFNIC registry -Expiry Date: 31/12/2017 -created: 01/01/1995 -last-update: 31/12/2016 -source: FRNIC - -ns-list: NSL1-FRNIC -nserver: ns1.nic.fr [192.134.4.1 2001:67c:2218:2::4:1] -nserver: ns2.nic.fr [192.93.0.4 2001:660:3005:1::1:2] -nserver: ns3.nic.fr [192.134.0.49 2001:660:3006:1::1:1] -source: FRNIC - -registrar: AFNIC registry -type: Isp Option 2 -anonymous: YES -registered: 22/05/1997 -source: FRNIC - -nic-hdl: NFC1-FRNIC -type: ROLE -contact: NIC France Contact -address: AFNIC -address: immeuble international -address: 2, rue Stephenson -address: Montigny le Bretonneux -address: 78181 Saint Quentin en Yvelines Cedex -country: FR -phone: +33 1 39 30 83 00 -e-mail: hostmaster@nic.fr -admin-c: NFC1-FRNIC -tech-c: PL12-FRNIC -tech-c: JP-FRNIC -tech-c: MS1887-FRNIC -tech-c: VL-FRNIC -tech-c: PR1249-FRNIC -tech-c: PV827-FRNIC -tech-c: GO661-FRNIC -tech-c: MS-FRNIC -tech-c: AI1-FRNIC -registrar: AFNIC registry -changed: 23/08/2005 hostmaster@nic.fr -anonymous: NO -obsoleted: NO -source: FRNIC - -nic-hdl: AC3598-FRNIC -type: ORGANIZATION -contact: Afnic (Mayotte - CTOM) -address: immeuble international -address: 2, rue Stephenson -address: Montigny-Le-Bretonneux -address: 78181 Saint Quentin en Yvelines Cedex -country: FR -registrar: AFNIC registry -changed: 09/10/2008 whoismaster@nic.fr -anonymous: NO -obsoleted: NO -source: FRNIC - diff --git a/spec/fixtures/responses/whois.nic.gd/gd/status_registered.expected b/spec/fixtures/responses/whois.nic.gd/gd/status_registered.expected index d57f7e9f..b2278262 100644 --- a/spec/fixtures/responses/whois.nic.gd/gd/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.gd/gd/status_registered.expected @@ -36,7 +36,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor Inc." - %s.organization == nil %s.url == "www.markmonitor.com" #registrant_contacts diff --git a/spec/fixtures/responses/whois.nic.gl/gl/status_registered.expected b/spec/fixtures/responses/whois.nic.gl/gl/status_registered.expected index 7bdbab04..4d344361 100644 --- a/spec/fixtures/responses/whois.nic.gl/gl/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.gl/gl/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor" - %s.organization == nil %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.centralnic.com/gb.com/status_available.expected b/spec/fixtures/responses/whois.nic.google/app/status_available.expected similarity index 91% rename from spec/fixtures/responses/whois.centralnic.com/gb.com/status_available.expected rename to spec/fixtures/responses/whois.nic.google/app/status_available.expected index 2c3fe7a8..9f23516a 100644 --- a/spec/fixtures/responses/whois.centralnic.com/gb.com/status_available.expected +++ b/spec/fixtures/responses/whois.nic.google/app/status_available.expected @@ -1,7 +1,3 @@ -#disclaimer - %s == nil - - #domain %s == nil @@ -10,7 +6,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.nic.google/app/status_available.txt b/spec/fixtures/responses/whois.nic.google/app/status_available.txt new file mode 100644 index 00000000..0b1adc23 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/app/status_available.txt @@ -0,0 +1,22 @@ +Domain not found. +>>> Last update of WHOIS database: 2019-06-28T20:37:28Z <<< + +Please query the WHOIS server of the owning registrar identified in this +output for information on how to contact the Registrant, Admin, or Tech +contact of the queried domain name. + +WHOIS information is provided by Charleston Road Registry Inc. (CRR) solely +for query-based, informational purposes. By querying our WHOIS database, you +are agreeing to comply with these terms +(https://www.registry.google/about/whois-disclaimer.html) and acknowledge +that your information will be used in accordance with CRR's Privacy Policy +(https://www.registry.google/about/privacy.html), so please read those +documents carefully. Any information provided is "as is" without any +guarantee of accuracy. You may not use such information to (a) allow, +enable, or otherwise support the transmission of mass unsolicited, +commercial advertising or solicitations; (b) enable high volume, automated, +electronic processes that access the systems of CRR or any ICANN-Accredited +Registrar, except as reasonably necessary to register domain names or modify +existing registrations; or (c) engage in or support unlawful behavior. CRR +reserves the right to restrict or deny your access to the Whois database, +and may modify these terms at any time. diff --git a/spec/fixtures/responses/whois.nic.google/app/status_registered.expected b/spec/fixtures/responses/whois.nic.google/app/status_registered.expected new file mode 100644 index 00000000..b213f094 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/app/status_registered.expected @@ -0,0 +1,52 @@ +#domain + %s == "google.app" + +#domain_id + %s == "2C5A4BAFF-APP" + +#status + %s == :registered + +#available? + %s == false + +#registered? + %s == true + + +#created_on + %s %CLASS{time} + %s %TIME{2018-03-29T16:02:13Z} + +#updated_on + %s %CLASS{time} + %s %TIME{2019-03-03T10:46:31Z} + +#expires_on + %s %CLASS{time} + %s %TIME{2020-03-29T16:02:13Z} + +#registrar + %s %CLASS{registrar} + %s.id == "292" + %s.name == "MarkMonitor Inc." + +#registrant_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].organization == "Google LLC" + %s[0].state == "CA" + %s[0].country_code == "US" + +#nameservers + %s %CLASS{array} + %s %SIZE{4} + %s[0] %CLASS{nameserver} + %s[0].name == "ns1.googledomains.com" + %s[1] %CLASS{nameserver} + %s[1].name == "ns2.googledomains.com" + %s[2] %CLASS{nameserver} + %s[2].name == "ns3.googledomains.com" + %s[3] %CLASS{nameserver} + %s[3].name == "ns4.googledomains.com" diff --git a/spec/fixtures/responses/whois.nic.google/app/status_registered.txt b/spec/fixtures/responses/whois.nic.google/app/status_registered.txt new file mode 100644 index 00000000..8e4bd7e5 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/app/status_registered.txt @@ -0,0 +1,87 @@ +Domain Name: google.app +Registry Domain ID: 2C5A4BAFF-APP +Registrar WHOIS Server: whois.nic.google +Registrar URL: http://www.markmonitor.com +Updated Date: 2019-03-03T10:46:31Z +Creation Date: 2018-03-29T16:02:13Z +Registry Expiry Date: 2020-03-29T16:02:13Z +Registrar: MarkMonitor Inc. +Registrar IANA ID: 292 +Registrar Abuse Contact Email: abusecomplaints@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Registry Registrant ID: REDACTED FOR PRIVACY +Registrant Name: REDACTED FOR PRIVACY +Registrant Organization: Google LLC +Registrant Street: REDACTED FOR PRIVACY +Registrant City: REDACTED FOR PRIVACY +Registrant State/Province: CA +Registrant Postal Code: REDACTED FOR PRIVACY +Registrant Country: US +Registrant Phone: REDACTED FOR PRIVACY +Registrant Fax: REDACTED FOR PRIVACY +Registrant Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Admin ID: REDACTED FOR PRIVACY +Admin Name: REDACTED FOR PRIVACY +Admin Organization: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin City: REDACTED FOR PRIVACY +Admin State/Province: REDACTED FOR PRIVACY +Admin Postal Code: REDACTED FOR PRIVACY +Admin Country: REDACTED FOR PRIVACY +Admin Phone: REDACTED FOR PRIVACY +Admin Fax: REDACTED FOR PRIVACY +Admin Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Tech ID: REDACTED FOR PRIVACY +Tech Name: REDACTED FOR PRIVACY +Tech Organization: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech City: REDACTED FOR PRIVACY +Tech State/Province: REDACTED FOR PRIVACY +Tech Postal Code: REDACTED FOR PRIVACY +Tech Country: REDACTED FOR PRIVACY +Tech Phone: REDACTED FOR PRIVACY +Tech Fax: REDACTED FOR PRIVACY +Tech Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Billing ID: REDACTED FOR PRIVACY +Billing Name: REDACTED FOR PRIVACY +Billing Organization: REDACTED FOR PRIVACY +Billing Street: REDACTED FOR PRIVACY +Billing City: REDACTED FOR PRIVACY +Billing State/Province: REDACTED FOR PRIVACY +Billing Postal Code: REDACTED FOR PRIVACY +Billing Country: REDACTED FOR PRIVACY +Billing Phone: REDACTED FOR PRIVACY +Billing Fax: REDACTED FOR PRIVACY +Billing Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Name Server: ns1.googledomains.com +Name Server: ns2.googledomains.com +Name Server: ns3.googledomains.com +Name Server: ns4.googledomains.com +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2019-06-28T20:28:47Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +Please query the WHOIS server of the owning registrar identified in this +output for information on how to contact the Registrant, Admin, or Tech +contact of the queried domain name. + +WHOIS information is provided by Charleston Road Registry Inc. (CRR) solely +for query-based, informational purposes. By querying our WHOIS database, you +are agreeing to comply with these terms +(https://www.registry.google/about/whois-disclaimer.html) and acknowledge +that your information will be used in accordance with CRR's Privacy Policy +(https://www.registry.google/about/privacy.html), so please read those +documents carefully. Any information provided is "as is" without any +guarantee of accuracy. You may not use such information to (a) allow, +enable, or otherwise support the transmission of mass unsolicited, +commercial advertising or solicitations; (b) enable high volume, automated, +electronic processes that access the systems of CRR or any ICANN-Accredited +Registrar, except as reasonably necessary to register domain names or modify +existing registrations; or (c) engage in or support unlawful behavior. CRR +reserves the right to restrict or deny your access to the Whois database, +and may modify these terms at any time. diff --git a/spec/fixtures/responses/whois.centralnic.com/ar.com/status_available.expected b/spec/fixtures/responses/whois.nic.google/dev/status_available.expected similarity index 91% rename from spec/fixtures/responses/whois.centralnic.com/ar.com/status_available.expected rename to spec/fixtures/responses/whois.nic.google/dev/status_available.expected index 2c3fe7a8..9f23516a 100644 --- a/spec/fixtures/responses/whois.centralnic.com/ar.com/status_available.expected +++ b/spec/fixtures/responses/whois.nic.google/dev/status_available.expected @@ -1,7 +1,3 @@ -#disclaimer - %s == nil - - #domain %s == nil @@ -10,7 +6,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.nic.google/dev/status_available.txt b/spec/fixtures/responses/whois.nic.google/dev/status_available.txt new file mode 100644 index 00000000..5dc1a798 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/dev/status_available.txt @@ -0,0 +1,22 @@ +Domain not found. +>>> Last update of WHOIS database: 2019-06-28T20:37:41Z <<< + +Please query the WHOIS server of the owning registrar identified in this +output for information on how to contact the Registrant, Admin, or Tech +contact of the queried domain name. + +WHOIS information is provided by Charleston Road Registry Inc. (CRR) solely +for query-based, informational purposes. By querying our WHOIS database, you +are agreeing to comply with these terms +(https://www.registry.google/about/whois-disclaimer.html) and acknowledge +that your information will be used in accordance with CRR's Privacy Policy +(https://www.registry.google/about/privacy.html), so please read those +documents carefully. Any information provided is "as is" without any +guarantee of accuracy. You may not use such information to (a) allow, +enable, or otherwise support the transmission of mass unsolicited, +commercial advertising or solicitations; (b) enable high volume, automated, +electronic processes that access the systems of CRR or any ICANN-Accredited +Registrar, except as reasonably necessary to register domain names or modify +existing registrations; or (c) engage in or support unlawful behavior. CRR +reserves the right to restrict or deny your access to the Whois database, +and may modify these terms at any time. diff --git a/spec/fixtures/responses/whois.nic.google/dev/status_registered.expected b/spec/fixtures/responses/whois.nic.google/dev/status_registered.expected new file mode 100644 index 00000000..d6a29d7f --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/dev/status_registered.expected @@ -0,0 +1,52 @@ +#domain + %s == "google.dev" + +#domain_id + %s == "2CF25B78E-DEV" + +#status + %s == :registered + +#available? + %s == false + +#registered? + %s == true + + +#created_on + %s %CLASS{time} + %s %TIME{2018-06-13T22:30:20Z} + +#updated_on + %s %CLASS{time} + %s %TIME{2019-06-13T22:30:20Z} + +#expires_on + %s %CLASS{time} + %s %TIME{2020-06-13T22:30:20Z} + +#registrar + %s %CLASS{registrar} + %s.id == "9998" + %s.name == "Charleston Road Registry Billable" + +#registrant_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].organization == "Charleston Road Registry, Inc." + %s[0].state == "CA" + %s[0].country_code == "US" + +#nameservers + %s %CLASS{array} + %s %SIZE{4} + %s[0] %CLASS{nameserver} + %s[0].name == "ns1.googledomains.com" + %s[1] %CLASS{nameserver} + %s[1].name == "ns2.googledomains.com" + %s[2] %CLASS{nameserver} + %s[2].name == "ns3.googledomains.com" + %s[3] %CLASS{nameserver} + %s[3].name == "ns4.googledomains.com" diff --git a/spec/fixtures/responses/whois.nic.google/dev/status_registered.txt b/spec/fixtures/responses/whois.nic.google/dev/status_registered.txt new file mode 100644 index 00000000..6fefba88 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/dev/status_registered.txt @@ -0,0 +1,78 @@ +Domain Name: google.dev +Registry Domain ID: 2CF25B78E-DEV +Registrar WHOIS Server: whois.nic.google +Registrar URL: http://www.charlestonroadregistry.com +Updated Date: 2019-06-13T22:30:20Z +Creation Date: 2018-06-13T22:30:20Z +Registry Expiry Date: 2020-06-13T22:30:20Z +Registrar: Charleston Road Registry Billable +Registrar IANA ID: 9998 +Registrar Abuse Contact Email: registry-abuse-support@google.com +Registrar Abuse Contact Phone: +1.2125652632 +Domain Status: autoRenewPeriod https://icann.org/epp#autoRenewPeriod +Domain Status: ok https://icann.org/epp#ok +Registry Registrant ID: REDACTED FOR PRIVACY +Registrant Name: REDACTED FOR PRIVACY +Registrant Organization: Charleston Road Registry, Inc. +Registrant Street: REDACTED FOR PRIVACY +Registrant Street: +Registrant City: REDACTED FOR PRIVACY +Registrant State/Province: CA +Registrant Postal Code: REDACTED FOR PRIVACY +Registrant Country: US +Registrant Phone: REDACTED FOR PRIVACY +Registrant Fax: REDACTED FOR PRIVACY +Registrant Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Admin ID: REDACTED FOR PRIVACY +Admin Name: REDACTED FOR PRIVACY +Admin Organization: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin Street: +Admin City: REDACTED FOR PRIVACY +Admin State/Province: REDACTED FOR PRIVACY +Admin Postal Code: REDACTED FOR PRIVACY +Admin Country: REDACTED FOR PRIVACY +Admin Phone: REDACTED FOR PRIVACY +Admin Fax: REDACTED FOR PRIVACY +Admin Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Tech ID: REDACTED FOR PRIVACY +Tech Name: REDACTED FOR PRIVACY +Tech Organization: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech Street: +Tech City: REDACTED FOR PRIVACY +Tech State/Province: REDACTED FOR PRIVACY +Tech Postal Code: REDACTED FOR PRIVACY +Tech Country: REDACTED FOR PRIVACY +Tech Phone: REDACTED FOR PRIVACY +Tech Fax: REDACTED FOR PRIVACY +Tech Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Name Server: ns1.googledomains.com +Name Server: ns2.googledomains.com +Name Server: ns3.googledomains.com +Name Server: ns4.googledomains.com +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2019-06-28T20:29:01Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +Please query the WHOIS server of the owning registrar identified in this +output for information on how to contact the Registrant, Admin, or Tech +contact of the queried domain name. + +WHOIS information is provided by Charleston Road Registry Inc. (CRR) solely +for query-based, informational purposes. By querying our WHOIS database, you +are agreeing to comply with these terms +(https://www.registry.google/about/whois-disclaimer.html) and acknowledge +that your information will be used in accordance with CRR's Privacy Policy +(https://www.registry.google/about/privacy.html), so please read those +documents carefully. Any information provided is "as is" without any +guarantee of accuracy. You may not use such information to (a) allow, +enable, or otherwise support the transmission of mass unsolicited, +commercial advertising or solicitations; (b) enable high volume, automated, +electronic processes that access the systems of CRR or any ICANN-Accredited +Registrar, except as reasonably necessary to register domain names or modify +existing registrations; or (c) engage in or support unlawful behavior. CRR +reserves the right to restrict or deny your access to the Whois database, +and may modify these terms at any time. diff --git a/spec/fixtures/responses/whois.centralnic.com/hu.com/status_available.expected b/spec/fixtures/responses/whois.nic.google/how/status_available.expected similarity index 91% rename from spec/fixtures/responses/whois.centralnic.com/hu.com/status_available.expected rename to spec/fixtures/responses/whois.nic.google/how/status_available.expected index 2c3fe7a8..9f23516a 100644 --- a/spec/fixtures/responses/whois.centralnic.com/hu.com/status_available.expected +++ b/spec/fixtures/responses/whois.nic.google/how/status_available.expected @@ -1,7 +1,3 @@ -#disclaimer - %s == nil - - #domain %s == nil @@ -10,7 +6,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.nic.google/how/status_available.txt b/spec/fixtures/responses/whois.nic.google/how/status_available.txt new file mode 100644 index 00000000..e269e4ef --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/how/status_available.txt @@ -0,0 +1,22 @@ +Domain not found. +>>> Last update of WHOIS database: 2019-06-28T20:37:51Z <<< + +Please query the WHOIS server of the owning registrar identified in this +output for information on how to contact the Registrant, Admin, or Tech +contact of the queried domain name. + +WHOIS information is provided by Charleston Road Registry Inc. (CRR) solely +for query-based, informational purposes. By querying our WHOIS database, you +are agreeing to comply with these terms +(https://www.registry.google/about/whois-disclaimer.html) and acknowledge +that your information will be used in accordance with CRR's Privacy Policy +(https://www.registry.google/about/privacy.html), so please read those +documents carefully. Any information provided is "as is" without any +guarantee of accuracy. You may not use such information to (a) allow, +enable, or otherwise support the transmission of mass unsolicited, +commercial advertising or solicitations; (b) enable high volume, automated, +electronic processes that access the systems of CRR or any ICANN-Accredited +Registrar, except as reasonably necessary to register domain names or modify +existing registrations; or (c) engage in or support unlawful behavior. CRR +reserves the right to restrict or deny your access to the Whois database, +and may modify these terms at any time. diff --git a/spec/fixtures/responses/whois.nic.google/how/status_registered.expected b/spec/fixtures/responses/whois.nic.google/how/status_registered.expected new file mode 100644 index 00000000..0de60816 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/how/status_registered.expected @@ -0,0 +1,52 @@ +#domain + %s == "google.how" + +#domain_id + %s == "62CF6AF-HOW" + +#status + %s == :registered + +#available? + %s == false + +#registered? + %s == true + + +#created_on + %s %CLASS{time} + %s %TIME{2015-01-12T16:14:39Z} + +#updated_on + %s %CLASS{time} + %s %TIME{2019-02-14T19:53:11Z} + +#expires_on + %s %CLASS{time} + %s %TIME{2020-01-12T16:14:39Z} + +#registrar + %s %CLASS{registrar} + %s.id == "292" + %s.name == "MarkMonitor Inc." + +#registrant_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].organization == "Google LLC" + %s[0].state == "CA" + %s[0].country_code == "US" + +#nameservers + %s %CLASS{array} + %s %SIZE{4} + %s[0] %CLASS{nameserver} + %s[0].name == "ns1.googledomains.com" + %s[1] %CLASS{nameserver} + %s[1].name == "ns2.googledomains.com" + %s[2] %CLASS{nameserver} + %s[2].name == "ns3.googledomains.com" + %s[3] %CLASS{nameserver} + %s[3].name == "ns4.googledomains.com" diff --git a/spec/fixtures/responses/whois.nic.google/how/status_registered.txt b/spec/fixtures/responses/whois.nic.google/how/status_registered.txt new file mode 100644 index 00000000..30e9d01c --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/how/status_registered.txt @@ -0,0 +1,87 @@ +Domain Name: google.how +Registry Domain ID: 62CF6AF-HOW +Registrar WHOIS Server: whois.nic.google +Registrar URL: http://www.markmonitor.com +Updated Date: 2019-02-14T19:53:11Z +Creation Date: 2015-01-12T16:14:39Z +Registry Expiry Date: 2020-01-12T16:14:39Z +Registrar: MarkMonitor Inc. +Registrar IANA ID: 292 +Registrar Abuse Contact Email: abusecomplaints@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Registry Registrant ID: REDACTED FOR PRIVACY +Registrant Name: REDACTED FOR PRIVACY +Registrant Organization: Google LLC +Registrant Street: REDACTED FOR PRIVACY +Registrant City: REDACTED FOR PRIVACY +Registrant State/Province: CA +Registrant Postal Code: REDACTED FOR PRIVACY +Registrant Country: US +Registrant Phone: REDACTED FOR PRIVACY +Registrant Fax: REDACTED FOR PRIVACY +Registrant Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Admin ID: REDACTED FOR PRIVACY +Admin Name: REDACTED FOR PRIVACY +Admin Organization: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin City: REDACTED FOR PRIVACY +Admin State/Province: REDACTED FOR PRIVACY +Admin Postal Code: REDACTED FOR PRIVACY +Admin Country: REDACTED FOR PRIVACY +Admin Phone: REDACTED FOR PRIVACY +Admin Fax: REDACTED FOR PRIVACY +Admin Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Tech ID: REDACTED FOR PRIVACY +Tech Name: REDACTED FOR PRIVACY +Tech Organization: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech City: REDACTED FOR PRIVACY +Tech State/Province: REDACTED FOR PRIVACY +Tech Postal Code: REDACTED FOR PRIVACY +Tech Country: REDACTED FOR PRIVACY +Tech Phone: REDACTED FOR PRIVACY +Tech Fax: REDACTED FOR PRIVACY +Tech Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Billing ID: REDACTED FOR PRIVACY +Billing Name: REDACTED FOR PRIVACY +Billing Organization: REDACTED FOR PRIVACY +Billing Street: REDACTED FOR PRIVACY +Billing City: REDACTED FOR PRIVACY +Billing State/Province: REDACTED FOR PRIVACY +Billing Postal Code: REDACTED FOR PRIVACY +Billing Country: REDACTED FOR PRIVACY +Billing Phone: REDACTED FOR PRIVACY +Billing Fax: REDACTED FOR PRIVACY +Billing Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Name Server: ns1.googledomains.com +Name Server: ns2.googledomains.com +Name Server: ns3.googledomains.com +Name Server: ns4.googledomains.com +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2019-06-28T20:29:12Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +Please query the WHOIS server of the owning registrar identified in this +output for information on how to contact the Registrant, Admin, or Tech +contact of the queried domain name. + +WHOIS information is provided by Charleston Road Registry Inc. (CRR) solely +for query-based, informational purposes. By querying our WHOIS database, you +are agreeing to comply with these terms +(https://www.registry.google/about/whois-disclaimer.html) and acknowledge +that your information will be used in accordance with CRR's Privacy Policy +(https://www.registry.google/about/privacy.html), so please read those +documents carefully. Any information provided is "as is" without any +guarantee of accuracy. You may not use such information to (a) allow, +enable, or otherwise support the transmission of mass unsolicited, +commercial advertising or solicitations; (b) enable high volume, automated, +electronic processes that access the systems of CRR or any ICANN-Accredited +Registrar, except as reasonably necessary to register domain names or modify +existing registrations; or (c) engage in or support unlawful behavior. CRR +reserves the right to restrict or deny your access to the Whois database, +and may modify these terms at any time. diff --git a/spec/fixtures/responses/whois.nic.google/page/status_available.expected b/spec/fixtures/responses/whois.nic.google/page/status_available.expected new file mode 100644 index 00000000..9f23516a --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/page/status_available.expected @@ -0,0 +1,46 @@ +#domain + %s == nil + +#domain_id + %s == nil + + +#status + %s == :available + +#available? + %s == true + +#registered? + %s == false + + +#created_on + %s == nil + +#updated_on + %s == nil + +#expires_on + %s == nil + + +#registrar + %s == nil + +#registrant_contacts + %s %CLASS{array} + %s == [] + +#admin_contacts + %s %CLASS{array} + %s == [] + +#technical_contacts + %s %CLASS{array} + %s == [] + + +#nameservers + %s %CLASS{array} + %s == [] diff --git a/spec/fixtures/responses/whois.nic.google/page/status_available.txt b/spec/fixtures/responses/whois.nic.google/page/status_available.txt new file mode 100644 index 00000000..5ed9bd13 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/page/status_available.txt @@ -0,0 +1,22 @@ +Domain not found. +>>> Last update of WHOIS database: 2019-06-28T20:38:01Z <<< + +Please query the WHOIS server of the owning registrar identified in this +output for information on how to contact the Registrant, Admin, or Tech +contact of the queried domain name. + +WHOIS information is provided by Charleston Road Registry Inc. (CRR) solely +for query-based, informational purposes. By querying our WHOIS database, you +are agreeing to comply with these terms +(https://www.registry.google/about/whois-disclaimer.html) and acknowledge +that your information will be used in accordance with CRR's Privacy Policy +(https://www.registry.google/about/privacy.html), so please read those +documents carefully. Any information provided is "as is" without any +guarantee of accuracy. You may not use such information to (a) allow, +enable, or otherwise support the transmission of mass unsolicited, +commercial advertising or solicitations; (b) enable high volume, automated, +electronic processes that access the systems of CRR or any ICANN-Accredited +Registrar, except as reasonably necessary to register domain names or modify +existing registrations; or (c) engage in or support unlawful behavior. CRR +reserves the right to restrict or deny your access to the Whois database, +and may modify these terms at any time. diff --git a/spec/fixtures/responses/whois.nic.google/page/status_registered.expected b/spec/fixtures/responses/whois.nic.google/page/status_registered.expected new file mode 100644 index 00000000..67a5c670 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/page/status_registered.expected @@ -0,0 +1,37 @@ +#domain + %s == "google.page" + +#domain_id + %s == "2D55CC686-PAGE" + +#status + %s == :registered + +#available? + %s == false + +#registered? + %s == true + + +#created_on + %s %CLASS{time} + %s %TIME{2018-08-13T21:29:41Z} + +#expires_on + %s %CLASS{time} + %s %TIME{2019-08-13T21:29:41Z} + +#registrar + %s %CLASS{registrar} + %s.id == "9998" + %s.name == "Charleston Road Registry Billable" + +#registrant_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].organization == "Charleston Road Registry, Inc." + %s[0].state == "CA" + %s[0].country_code == "US" + diff --git a/spec/fixtures/responses/whois.nic.google/page/status_registered.txt b/spec/fixtures/responses/whois.nic.google/page/status_registered.txt new file mode 100644 index 00000000..2ca2f9bc --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/page/status_registered.txt @@ -0,0 +1,72 @@ +Domain Name: google.page +Registry Domain ID: 2D55CC686-PAGE +Registrar WHOIS Server: whois.nic.google +Registrar URL: http://www.charlestonroadregistry.com +Creation Date: 2018-08-13T21:29:41Z +Registry Expiry Date: 2019-08-13T21:29:41Z +Registrar: Charleston Road Registry Billable +Registrar IANA ID: 9998 +Registrar Abuse Contact Email: registry-abuse-support@google.com +Registrar Abuse Contact Phone: +1.2125652632 +Domain Status: inactive https://icann.org/epp#inactive +Registry Registrant ID: REDACTED FOR PRIVACY +Registrant Name: REDACTED FOR PRIVACY +Registrant Organization: Charleston Road Registry, Inc. +Registrant Street: REDACTED FOR PRIVACY +Registrant Street: +Registrant City: REDACTED FOR PRIVACY +Registrant State/Province: CA +Registrant Postal Code: REDACTED FOR PRIVACY +Registrant Country: US +Registrant Phone: REDACTED FOR PRIVACY +Registrant Fax: REDACTED FOR PRIVACY +Registrant Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Admin ID: REDACTED FOR PRIVACY +Admin Name: REDACTED FOR PRIVACY +Admin Organization: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin Street: +Admin City: REDACTED FOR PRIVACY +Admin State/Province: REDACTED FOR PRIVACY +Admin Postal Code: REDACTED FOR PRIVACY +Admin Country: REDACTED FOR PRIVACY +Admin Phone: REDACTED FOR PRIVACY +Admin Fax: REDACTED FOR PRIVACY +Admin Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Tech ID: REDACTED FOR PRIVACY +Tech Name: REDACTED FOR PRIVACY +Tech Organization: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech Street: +Tech City: REDACTED FOR PRIVACY +Tech State/Province: REDACTED FOR PRIVACY +Tech Postal Code: REDACTED FOR PRIVACY +Tech Country: REDACTED FOR PRIVACY +Tech Phone: REDACTED FOR PRIVACY +Tech Fax: REDACTED FOR PRIVACY +Tech Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2019-06-28T20:29:24Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +Please query the WHOIS server of the owning registrar identified in this +output for information on how to contact the Registrant, Admin, or Tech +contact of the queried domain name. + +WHOIS information is provided by Charleston Road Registry Inc. (CRR) solely +for query-based, informational purposes. By querying our WHOIS database, you +are agreeing to comply with these terms +(https://www.registry.google/about/whois-disclaimer.html) and acknowledge +that your information will be used in accordance with CRR's Privacy Policy +(https://www.registry.google/about/privacy.html), so please read those +documents carefully. Any information provided is "as is" without any +guarantee of accuracy. You may not use such information to (a) allow, +enable, or otherwise support the transmission of mass unsolicited, +commercial advertising or solicitations; (b) enable high volume, automated, +electronic processes that access the systems of CRR or any ICANN-Accredited +Registrar, except as reasonably necessary to register domain names or modify +existing registrations; or (c) engage in or support unlawful behavior. CRR +reserves the right to restrict or deny your access to the Whois database, +and may modify these terms at any time. diff --git a/spec/fixtures/responses/whois.nic.google/soy/status_available.expected b/spec/fixtures/responses/whois.nic.google/soy/status_available.expected new file mode 100644 index 00000000..9f23516a --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/soy/status_available.expected @@ -0,0 +1,46 @@ +#domain + %s == nil + +#domain_id + %s == nil + + +#status + %s == :available + +#available? + %s == true + +#registered? + %s == false + + +#created_on + %s == nil + +#updated_on + %s == nil + +#expires_on + %s == nil + + +#registrar + %s == nil + +#registrant_contacts + %s %CLASS{array} + %s == [] + +#admin_contacts + %s %CLASS{array} + %s == [] + +#technical_contacts + %s %CLASS{array} + %s == [] + + +#nameservers + %s %CLASS{array} + %s == [] diff --git a/spec/fixtures/responses/whois.nic.google/soy/status_available.txt b/spec/fixtures/responses/whois.nic.google/soy/status_available.txt new file mode 100644 index 00000000..2394e205 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/soy/status_available.txt @@ -0,0 +1,22 @@ +Domain not found. +>>> Last update of WHOIS database: 2019-06-28T20:38:12Z <<< + +Please query the WHOIS server of the owning registrar identified in this +output for information on how to contact the Registrant, Admin, or Tech +contact of the queried domain name. + +WHOIS information is provided by Charleston Road Registry Inc. (CRR) solely +for query-based, informational purposes. By querying our WHOIS database, you +are agreeing to comply with these terms +(https://www.registry.google/about/whois-disclaimer.html) and acknowledge +that your information will be used in accordance with CRR's Privacy Policy +(https://www.registry.google/about/privacy.html), so please read those +documents carefully. Any information provided is "as is" without any +guarantee of accuracy. You may not use such information to (a) allow, +enable, or otherwise support the transmission of mass unsolicited, +commercial advertising or solicitations; (b) enable high volume, automated, +electronic processes that access the systems of CRR or any ICANN-Accredited +Registrar, except as reasonably necessary to register domain names or modify +existing registrations; or (c) engage in or support unlawful behavior. CRR +reserves the right to restrict or deny your access to the Whois database, +and may modify these terms at any time. diff --git a/spec/fixtures/responses/whois.nic.google/soy/status_registered.expected b/spec/fixtures/responses/whois.nic.google/soy/status_registered.expected new file mode 100644 index 00000000..9f33c16d --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/soy/status_registered.expected @@ -0,0 +1,52 @@ +#domain + %s == "google.soy" + +#domain_id + %s == "88628D1-SOY" + +#status + %s == :registered + +#available? + %s == false + +#registered? + %s == true + + +#created_on + %s %CLASS{time} + %s %TIME{2014-12-01T21:58:34Z} + +#updated_on + %s %CLASS{time} + %s %TIME{2019-02-14T19:53:13Z} + +#expires_on + %s %CLASS{time} + %s %TIME{2019-12-01T21:58:34Z} + +#registrar + %s %CLASS{registrar} + %s.id == "292" + %s.name == "MarkMonitor Inc." + +#registrant_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].organization == "Google LLC" + %s[0].state == "CA" + %s[0].country_code == "US" + +#nameservers + %s %CLASS{array} + %s %SIZE{4} + %s[0] %CLASS{nameserver} + %s[0].name == "ns1.googledomains.com" + %s[1] %CLASS{nameserver} + %s[1].name == "ns2.googledomains.com" + %s[2] %CLASS{nameserver} + %s[2].name == "ns3.googledomains.com" + %s[3] %CLASS{nameserver} + %s[3].name == "ns4.googledomains.com" diff --git a/spec/fixtures/responses/whois.nic.google/soy/status_registered.txt b/spec/fixtures/responses/whois.nic.google/soy/status_registered.txt new file mode 100644 index 00000000..4c01b26f --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/soy/status_registered.txt @@ -0,0 +1,87 @@ +Domain Name: google.soy +Registry Domain ID: 88628D1-SOY +Registrar WHOIS Server: whois.nic.google +Registrar URL: http://www.markmonitor.com +Updated Date: 2019-02-14T19:53:13Z +Creation Date: 2014-12-01T21:58:34Z +Registry Expiry Date: 2019-12-01T21:58:34Z +Registrar: MarkMonitor Inc. +Registrar IANA ID: 292 +Registrar Abuse Contact Email: abusecomplaints@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Registry Registrant ID: REDACTED FOR PRIVACY +Registrant Name: REDACTED FOR PRIVACY +Registrant Organization: Google LLC +Registrant Street: REDACTED FOR PRIVACY +Registrant City: REDACTED FOR PRIVACY +Registrant State/Province: CA +Registrant Postal Code: REDACTED FOR PRIVACY +Registrant Country: US +Registrant Phone: REDACTED FOR PRIVACY +Registrant Fax: REDACTED FOR PRIVACY +Registrant Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Admin ID: REDACTED FOR PRIVACY +Admin Name: REDACTED FOR PRIVACY +Admin Organization: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin City: REDACTED FOR PRIVACY +Admin State/Province: REDACTED FOR PRIVACY +Admin Postal Code: REDACTED FOR PRIVACY +Admin Country: REDACTED FOR PRIVACY +Admin Phone: REDACTED FOR PRIVACY +Admin Fax: REDACTED FOR PRIVACY +Admin Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Tech ID: REDACTED FOR PRIVACY +Tech Name: REDACTED FOR PRIVACY +Tech Organization: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech City: REDACTED FOR PRIVACY +Tech State/Province: REDACTED FOR PRIVACY +Tech Postal Code: REDACTED FOR PRIVACY +Tech Country: REDACTED FOR PRIVACY +Tech Phone: REDACTED FOR PRIVACY +Tech Fax: REDACTED FOR PRIVACY +Tech Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Billing ID: REDACTED FOR PRIVACY +Billing Name: REDACTED FOR PRIVACY +Billing Organization: REDACTED FOR PRIVACY +Billing Street: REDACTED FOR PRIVACY +Billing City: REDACTED FOR PRIVACY +Billing State/Province: REDACTED FOR PRIVACY +Billing Postal Code: REDACTED FOR PRIVACY +Billing Country: REDACTED FOR PRIVACY +Billing Phone: REDACTED FOR PRIVACY +Billing Fax: REDACTED FOR PRIVACY +Billing Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Name Server: ns1.googledomains.com +Name Server: ns2.googledomains.com +Name Server: ns3.googledomains.com +Name Server: ns4.googledomains.com +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2019-06-28T20:29:35Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +Please query the WHOIS server of the owning registrar identified in this +output for information on how to contact the Registrant, Admin, or Tech +contact of the queried domain name. + +WHOIS information is provided by Charleston Road Registry Inc. (CRR) solely +for query-based, informational purposes. By querying our WHOIS database, you +are agreeing to comply with these terms +(https://www.registry.google/about/whois-disclaimer.html) and acknowledge +that your information will be used in accordance with CRR's Privacy Policy +(https://www.registry.google/about/privacy.html), so please read those +documents carefully. Any information provided is "as is" without any +guarantee of accuracy. You may not use such information to (a) allow, +enable, or otherwise support the transmission of mass unsolicited, +commercial advertising or solicitations; (b) enable high volume, automated, +electronic processes that access the systems of CRR or any ICANN-Accredited +Registrar, except as reasonably necessary to register domain names or modify +existing registrations; or (c) engage in or support unlawful behavior. CRR +reserves the right to restrict or deny your access to the Whois database, +and may modify these terms at any time. diff --git a/spec/fixtures/responses/whois.nic.google/xn--q9jyb4c/status_available.expected b/spec/fixtures/responses/whois.nic.google/xn--q9jyb4c/status_available.expected new file mode 100644 index 00000000..9f23516a --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/xn--q9jyb4c/status_available.expected @@ -0,0 +1,46 @@ +#domain + %s == nil + +#domain_id + %s == nil + + +#status + %s == :available + +#available? + %s == true + +#registered? + %s == false + + +#created_on + %s == nil + +#updated_on + %s == nil + +#expires_on + %s == nil + + +#registrar + %s == nil + +#registrant_contacts + %s %CLASS{array} + %s == [] + +#admin_contacts + %s %CLASS{array} + %s == [] + +#technical_contacts + %s %CLASS{array} + %s == [] + + +#nameservers + %s %CLASS{array} + %s == [] diff --git a/spec/fixtures/responses/whois.nic.google/xn--q9jyb4c/status_available.txt b/spec/fixtures/responses/whois.nic.google/xn--q9jyb4c/status_available.txt new file mode 100644 index 00000000..78d2edfd --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/xn--q9jyb4c/status_available.txt @@ -0,0 +1,22 @@ +Domain not found. +>>> Last update of WHOIS database: 2019-06-28T20:38:53Z <<< + +Please query the WHOIS server of the owning registrar identified in this +output for information on how to contact the Registrant, Admin, or Tech +contact of the queried domain name. + +WHOIS information is provided by Charleston Road Registry Inc. (CRR) solely +for query-based, informational purposes. By querying our WHOIS database, you +are agreeing to comply with these terms +(https://www.registry.google/about/whois-disclaimer.html) and acknowledge +that your information will be used in accordance with CRR's Privacy Policy +(https://www.registry.google/about/privacy.html), so please read those +documents carefully. Any information provided is "as is" without any +guarantee of accuracy. You may not use such information to (a) allow, +enable, or otherwise support the transmission of mass unsolicited, +commercial advertising or solicitations; (b) enable high volume, automated, +electronic processes that access the systems of CRR or any ICANN-Accredited +Registrar, except as reasonably necessary to register domain names or modify +existing registrations; or (c) engage in or support unlawful behavior. CRR +reserves the right to restrict or deny your access to the Whois database, +and may modify these terms at any time. diff --git a/spec/fixtures/responses/whois.nic.google/xn--q9jyb4c/status_registered.expected b/spec/fixtures/responses/whois.nic.google/xn--q9jyb4c/status_registered.expected new file mode 100644 index 00000000..b3969f16 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/xn--q9jyb4c/status_registered.expected @@ -0,0 +1,52 @@ +#domain + %s == "google.xn--q9jyb4c" + +#domain_id + %s == "C176ED-Q9JYB4C" + +#status + %s == :registered + +#available? + %s == false + +#registered? + %s == true + + +#created_on + %s %CLASS{time} + %s %TIME{2014-03-04T19:45:32Z} + +#updated_on + %s %CLASS{time} + %s %TIME{2019-02-05T10:39:55Z} + +#expires_on + %s %CLASS{time} + %s %TIME{2020-03-04T19:45:32Z} + +#registrar + %s %CLASS{registrar} + %s.id == "292" + %s.name == "MarkMonitor Inc." + +#registrant_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].organization == "Google Inc." + %s[0].state == "CA" + %s[0].country_code == "US" + +#nameservers + %s %CLASS{array} + %s %SIZE{4} + %s[0] %CLASS{nameserver} + %s[0].name == "ns1.googledomains.com" + %s[1] %CLASS{nameserver} + %s[1].name == "ns2.googledomains.com" + %s[2] %CLASS{nameserver} + %s[2].name == "ns3.googledomains.com" + %s[3] %CLASS{nameserver} + %s[3].name == "ns4.googledomains.com" diff --git a/spec/fixtures/responses/whois.nic.google/xn--q9jyb4c/status_registered.txt b/spec/fixtures/responses/whois.nic.google/xn--q9jyb4c/status_registered.txt new file mode 100644 index 00000000..13c3ea0e --- /dev/null +++ b/spec/fixtures/responses/whois.nic.google/xn--q9jyb4c/status_registered.txt @@ -0,0 +1,76 @@ +Domain Name: google.xn--q9jyb4c +Registry Domain ID: C176ED-Q9JYB4C +Registrar WHOIS Server: whois.nic.google +Registrar URL: http://www.markmonitor.com +Updated Date: 2019-02-05T10:39:55Z +Creation Date: 2014-03-04T19:45:32Z +Registry Expiry Date: 2020-03-04T19:45:32Z +Registrar: MarkMonitor Inc. +Registrar IANA ID: 292 +Registrar Abuse Contact Email: abusecomplaints@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Registry Registrant ID: REDACTED FOR PRIVACY +Registrant Name: REDACTED FOR PRIVACY +Registrant Organization: Google Inc. +Registrant Street: REDACTED FOR PRIVACY +Registrant City: REDACTED FOR PRIVACY +Registrant State/Province: CA +Registrant Postal Code: REDACTED FOR PRIVACY +Registrant Country: US +Registrant Phone: REDACTED FOR PRIVACY +Registrant Fax: REDACTED FOR PRIVACY +Registrant Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Admin ID: REDACTED FOR PRIVACY +Admin Name: REDACTED FOR PRIVACY +Admin Organization: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin City: REDACTED FOR PRIVACY +Admin State/Province: REDACTED FOR PRIVACY +Admin Postal Code: REDACTED FOR PRIVACY +Admin Country: REDACTED FOR PRIVACY +Admin Phone: REDACTED FOR PRIVACY +Admin Fax: REDACTED FOR PRIVACY +Admin Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Tech ID: REDACTED FOR PRIVACY +Tech Name: REDACTED FOR PRIVACY +Tech Organization: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech City: REDACTED FOR PRIVACY +Tech State/Province: REDACTED FOR PRIVACY +Tech Postal Code: REDACTED FOR PRIVACY +Tech Country: REDACTED FOR PRIVACY +Tech Phone: REDACTED FOR PRIVACY +Tech Fax: REDACTED FOR PRIVACY +Tech Email: Please query the WHOIS server of the owning registrar identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Name Server: ns1.googledomains.com +Name Server: ns2.googledomains.com +Name Server: ns3.googledomains.com +Name Server: ns4.googledomains.com +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2019-06-28T20:28:31Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +Please query the WHOIS server of the owning registrar identified in this +output for information on how to contact the Registrant, Admin, or Tech +contact of the queried domain name. + +WHOIS information is provided by Charleston Road Registry Inc. (CRR) solely +for query-based, informational purposes. By querying our WHOIS database, you +are agreeing to comply with these terms +(https://www.registry.google/about/whois-disclaimer.html) and acknowledge +that your information will be used in accordance with CRR's Privacy Policy +(https://www.registry.google/about/privacy.html), so please read those +documents carefully. Any information provided is "as is" without any +guarantee of accuracy. You may not use such information to (a) allow, +enable, or otherwise support the transmission of mass unsolicited, +commercial advertising or solicitations; (b) enable high volume, automated, +electronic processes that access the systems of CRR or any ICANN-Accredited +Registrar, except as reasonably necessary to register domain names or modify +existing registrations; or (c) engage in or support unlawful behavior. CRR +reserves the right to restrict or deny your access to the Whois database, +and may modify these terms at any time. diff --git a/spec/fixtures/responses/whois.nic.gs/gs/status_registered.expected b/spec/fixtures/responses/whois.nic.gs/gs/status_registered.expected index 0fe57903..9fca914c 100644 --- a/spec/fixtures/responses/whois.nic.gs/gs/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.gs/gs/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor" - %s.organization == nil %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.nic.ht/ht/status_registered.expected b/spec/fixtures/responses/whois.nic.ht/ht/status_registered.expected index d4ec96f8..a90c4df3 100644 --- a/spec/fixtures/responses/whois.nic.ht/ht/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.ht/ht/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor" - %s.organization == nil %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.nic.io/io/status_registered.expected b/spec/fixtures/responses/whois.nic.io/io/status_registered.expected index e6f56006..6fcd1be2 100644 --- a/spec/fixtures/responses/whois.nic.io/io/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.io/io/status_registered.expected @@ -36,7 +36,6 @@ %s %CLASS{registrar} %s.id == "625" %s.name == "Name.com LLC" - %s.organization == "Name.com LLC" %s.url == "www.name.com" #registrant_contacts diff --git a/spec/fixtures/responses/whois.nic.jobs/jobs/status_registered.expected b/spec/fixtures/responses/whois.nic.jobs/jobs/status_registered.expected index 8c67870c..90a0cdee 100644 --- a/spec/fixtures/responses/whois.nic.jobs/jobs/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.jobs/jobs/status_registered.expected @@ -36,7 +36,6 @@ %s %CLASS{registrar} %s.id == "292" %s.name == "MARKMONITOR INC." - %s.organization == nil %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.nic.ki/ki/status_registered.expected b/spec/fixtures/responses/whois.nic.ki/ki/status_registered.expected index 682c51f0..62a2ebb5 100644 --- a/spec/fixtures/responses/whois.nic.ki/ki/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.ki/ki/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor" - %s.organization == nil %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.nic.la/la/property_status_multiple.expected b/spec/fixtures/responses/whois.nic.la/la/property_status_multiple.expected deleted file mode 100644 index 3247ae0d..00000000 --- a/spec/fixtures/responses/whois.nic.la/la/property_status_multiple.expected +++ /dev/null @@ -1,2 +0,0 @@ -#status - %s == ["TRANSFER PROHIBITED", "RENEW PERIOD"] diff --git a/spec/fixtures/responses/whois.nic.la/la/property_status_multiple.txt b/spec/fixtures/responses/whois.nic.la/la/property_status_multiple.txt deleted file mode 100644 index 4807eb4c..00000000 --- a/spec/fixtures/responses/whois.nic.la/la/property_status_multiple.txt +++ /dev/null @@ -1,75 +0,0 @@ -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - -Domain ID:CNIC-DO469366 -Domain Name:PLASTICSURGERY.LA -Created On:02-Feb-2004 01:00:00 UTC -Last Updated On:31-Mar-2010 12:43:59 UTC -Expiration Date:02-Feb-2017 23:59:59 UTC -Status:TRANSFER PROHIBITED -Status:RENEW PERIOD -Registrant ID:P-1901109 -Registrant Name:Jay Granzow -Registrant Organization:Jay Granzow -Registrant Street1:22930 Crenshaw Blvd. Suite D -Registrant City:Torrance -Registrant State/Province:CA -Registrant Postal Code:90505 -Registrant Country:US -Registrant Phone:+1.3105304200 -Registrant FAX:+1.3105301652 -Registrant Email:jwgranzow@gmail.com -Admin ID:P-1901109 -Admin Name:Jay Granzow -Admin Organization:Jay Granzow -Admin Street1:22930 Crenshaw Blvd. Suite D -Admin City:Torrance -Admin State/Province:CA -Admin Postal Code:90505 -Admin Country:US -Admin Phone:+1.3105304200 -Admin FAX:+1.3105301652 -Admin Email:jwgranzow@gmail.com -Tech ID:P-9055753 -Tech Name:Jay Granzow -Tech Organization:Jay Granzow -Tech Street1:22930 Crenshaw Blvd. Suite D -Tech City:Torrance -Tech State/Province:CA -Tech Postal Code:90505 -Tech Country:US -Tech Phone:+1.3105304200 -Tech FAX:+1.3105301652 -Tech Email:jwgranzow@yahoo.com -Billing ID:P-1901109 -Billing Name:Jay Granzow -Billing Organization:Jay Granzow -Billing Street1:22930 Crenshaw Blvd. Suite D -Billing City:Torrance -Billing State/Province:CA -Billing Postal Code:90505 -Billing Country:US -Billing Phone:+1.3105304200 -Billing FAX:+1.3105301652 -Billing Email:jwgranzow@gmail.com -Sponsoring Registrar ID:7091-KS -Sponsoring Registrar Organization:Key Systems GmbH -Sponsoring Registrar Street1:Im Oberen Werk 1 -Sponsoring Registrar City:St. Ingbert -Sponsoring Registrar Postal Code:66386 -Sponsoring Registrar Country:DE -Sponsoring Registrar Phone:+49.68949396850 -Sponsoring Registrar FAX:+49 (0)68949396851 -Sponsoring Registrar Website:http://www.key-systems.net/ -Name Server:NS2.SLCIT.COM -Name Server:NS1.SLCIT.COM -DNSSEC:Unsigned - - diff --git a/spec/fixtures/responses/whois.nic.la/la/property_status_single.expected b/spec/fixtures/responses/whois.nic.la/la/property_status_single.expected deleted file mode 100644 index 0075a8d4..00000000 --- a/spec/fixtures/responses/whois.nic.la/la/property_status_single.expected +++ /dev/null @@ -1,2 +0,0 @@ -#status - %s == ["OK"] diff --git a/spec/fixtures/responses/whois.nic.la/la/property_status_single.txt b/spec/fixtures/responses/whois.nic.la/la/property_status_single.txt deleted file mode 100644 index ef321e34..00000000 --- a/spec/fixtures/responses/whois.nic.la/la/property_status_single.txt +++ /dev/null @@ -1,70 +0,0 @@ -This whois service is provided by CentralNic Ltd and only contains information -pertaining to Internet domain names we have registered for our customers. By -using this service you are agreeing (1) not to use any information presented -here for any purpose other than determining ownership of domain names (2) not -to store or reproduce this data in any way. CentralNic Ltd - www.centralnic.com - -Domain ID:CNIC-DO471480 -Domain Name:GOOGLE.LA -Created On:18-Jul-2002 01:00:00 UTC -Last Updated On:15-Sep-2009 16:48:47 UTC -Expiration Date:18-Jul-2010 23:59:59 UTC -Status:OK -Registrant ID:ndn-96955 -Registrant Name:Google Inc -Registrant Organization:Google Inc -Registrant Street1:1600 Amphitheatre Parkway -Registrant City:Mountain View -Registrant State/Province:Ca -Registrant Postal Code:94043 -Registrant Country:US -Registrant Phone:+1.6502530000 -Registrant FAX:+1.65067188571 -Registrant Email:dns-admin@google.com -Admin ID:ndn-96955 -Admin Name:Google Inc -Admin Organization:Google Inc -Admin Street1:1600 Amphitheatre Parkway -Admin City:Mountain View -Admin State/Province:Ca -Admin Postal Code:94043 -Admin Country:US -Admin Phone:+1.6502530000 -Admin FAX:+1.65067188571 -Admin Email:dns-admin@google.com -Tech ID:ndn-96955 -Tech Name:Google Inc -Tech Organization:Google Inc -Tech Street1:1600 Amphitheatre Parkway -Tech City:Mountain View -Tech State/Province:Ca -Tech Postal Code:94043 -Tech Country:US -Tech Phone:+1.6502530000 -Tech FAX:+1.65067188571 -Tech Email:dns-admin@google.com -Billing ID:ndn-24412 -Billing Name:Domain Billing -Billing Organization:Markmonitor -Billing Street1:10400 Overland Rd. -Billing City:Boise -Billing State/Province:ID -Billing Postal Code:83709 -Billing Country:US -Billing Phone:+1.20838957 -Billing Email:ccops@markmonitor.com -Sponsoring Registrar ID:7279-LN -Sponsoring Registrar Organization:LA Registry Pte Ltd -Sponsoring Registrar Street1:120 Telok Ayer Street -Sponsoring Registrar City:Singapore -Sponsoring Registrar Postal Code:06859 -Sponsoring Registrar Country:SG -Sponsoring Registrar Phone:+44.8700170900 -Sponsoring Registrar FAX:+44.8700170901 -Sponsoring Registrar Website:http://www.la/ -Name Server:NS1.GOOGLE.COM -Name Server:NS2.GOOGLE.COM -Name Server:NS3.GOOGLE.COM -Name Server:NS4.GOOGLE.COM - - diff --git a/spec/fixtures/responses/whois.nic.la/la/status_available.expected b/spec/fixtures/responses/whois.nic.la/la/status_available.expected index 2c3fe7a8..c203a3b3 100644 --- a/spec/fixtures/responses/whois.nic.la/la/status_available.expected +++ b/spec/fixtures/responses/whois.nic.la/la/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "This whois service is provided by LANIC and only contains information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) LANIC http://www.lanic.gov.la/ Access to the whois service is rate limited. For more information, please see https://registrar-console.lanic.la/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.nic.la/la/status_available.txt b/spec/fixtures/responses/whois.nic.la/la/status_available.txt index 09cc0f7e..2156c5a7 100644 --- a/spec/fixtures/responses/whois.nic.la/la/status_available.txt +++ b/spec/fixtures/responses/whois.nic.la/la/status_available.txt @@ -1 +1,18 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-16T10:39:33.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +This whois service is provided by LANIC and only contains +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) LANIC http://www.lanic.gov.la/ + +Access to the whois service is rate limited. For more information, please +see https://registrar-console.lanic.la/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.nic.la/la/status_registered.expected b/spec/fixtures/responses/whois.nic.la/la/status_registered.expected index ac256227..7e278330 100644 --- a/spec/fixtures/responses/whois.nic.la/la/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.la/la/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" + %s == "This whois service is provided by LANIC and only contains information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) LANIC http://www.lanic.gov.la/ Access to the whois service is rate limited. For more information, please see https://registrar-console.lanic.la/pub/whois_guidance." #domain %s == "google.la" #domain_id - %s == "CNIC-DO471480" + %s == "D471480-LANIC" #status - %s == ["clientTransferProhibited", "serverTransferProhibited"] + %s == :registered #available? %s == false @@ -25,73 +25,39 @@ #updated_on %s %CLASS{time} - %s %TIME{2013-08-01 15:09:21 UTC} + %s %TIME{2021-07-04 21:39:38 UTC} #expires_on %s %CLASS{time} - %s %TIME{2014-07-18 23:59:59 UTC} + %s %TIME{2022-07-18 23:59:59 UTC} #registrar %s %CLASS{registrar} - %s.id == "H2948863" - %s.name == nil - %s.organization == "TLD Registrar Solutions Ltd" - %s.url == "www.tldregistrarsolutions.com" + %s.id == "" + %s.name == "TLD Registrar Solutions Ltd" + %s.url == "" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "ndn-96955" - %s[0].name == "Google Inc" - %s[0].organization == "Google Inc" - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "Ca" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.65067188571" - %s[0].email == "dns-admin@google.com" + %s[0].email == "https://whois.nic.la/contact/google.la/registrant" #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "ndn-96955" - %s[0].name == "Google Inc" - %s[0].organization == "Google Inc" - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "Ca" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.65067188571" - %s[0].email == "dns-admin@google.com" + %s[0].email == "https://whois.nic.la/contact/google.la/admin" #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "ndn-96955" - %s[0].name == "Google Inc" - %s[0].organization == "Google Inc" - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "Ca" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.65067188571" - %s[0].email == "dns-admin@google.com" + %s[0].email == "https://whois.nic.la/contact/google.la/tech" #nameservers diff --git a/spec/fixtures/responses/whois.nic.la/la/status_registered.txt b/spec/fixtures/responses/whois.nic.la/la/status_registered.txt index 59eefcf2..ce248f78 100644 --- a/spec/fixtures/responses/whois.nic.la/la/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.la/la/status_registered.txt @@ -1,77 +1,38 @@ -Domain ID:CNIC-DO471480 -Domain Name:GOOGLE.LA -Created On:2002-07-18T01:00:00.0Z -Last Updated On:2013-08-01T15:09:21.0Z -Expiration Date:2014-07-18T23:59:59.0Z -Status:clientTransferProhibited -Status:serverTransferProhibited -Registrant ID:ndn-96955 -Registrant Name:Google Inc -Registrant Organization:Google Inc -Registrant Street1:1600 Amphitheatre Parkway -Registrant City:Mountain View -Registrant State/Province:Ca -Registrant Postal Code:94043 -Registrant Country:US -Registrant Phone:+1.6502530000 -Registrant FAX:+1.65067188571 -Registrant Email:dns-admin@google.com -Admin ID:ndn-96955 -Admin Name:Google Inc -Admin Organization:Google Inc -Admin Street1:1600 Amphitheatre Parkway -Admin City:Mountain View -Admin State/Province:Ca -Admin Postal Code:94043 -Admin Country:US -Admin Phone:+1.6502530000 -Admin FAX:+1.65067188571 -Admin Email:dns-admin@google.com -Tech ID:ndn-96955 -Tech Name:Google Inc -Tech Organization:Google Inc -Tech Street1:1600 Amphitheatre Parkway -Tech City:Mountain View -Tech State/Province:Ca -Tech Postal Code:94043 -Tech Country:US -Tech Phone:+1.6502530000 -Tech FAX:+1.65067188571 -Tech Email:dns-admin@google.com -Billing ID:LAREG-4FB6D5852C61F054 -Billing Name:MarkMonitor, Inc. -Billing Organization:MarkMonitor, Inc. -Billing Street1:391 N Ancestor Place -Billing City:Boise -Billing State/Province:ID -Billing Postal Code:83704 -Billing Country:US -Billing Phone:+1.2083895740 -Billing FAX:+1.2083895771 -Billing Email:ccopsbilling@markmonitor.com -Sponsoring Registrar ID:H2948863 -Sponsoring Registrar IANA ID:1564 -Sponsoring Registrar Organization:TLD Registrar Solutions Ltd -Sponsoring Registrar Street1:35-39 Moorgate -Sponsoring Registrar City:London -Sponsoring Registrar State/Province:London -Sponsoring Registrar Postal Code:EC2R 6AR -Sponsoring Registrar Country:GB -Sponsoring Registrar Phone:020 33 88 0600 -Sponsoring Registrar Website:www.tldregistrarsolutions.com -Name Server:NS1.GOOGLE.COM -Name Server:NS2.GOOGLE.COM -Name Server:NS3.GOOGLE.COM -Name Server:NS4.GOOGLE.COM -DNSSEC:Unsigned +Domain Name: GOOGLE.LA +Registry Domain ID: D471480-LANIC +Registrar WHOIS Server: +Registrar URL: +Updated Date: 2021-07-04T21:39:38.0Z +Creation Date: 2002-07-18T01:00:00.0Z +Registry Expiry Date: 2022-07-18T23:59:59.0Z +Registrar: TLD Registrar Solutions Ltd +Registrar IANA ID: +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Registrant Email: https://whois.nic.la/contact/google.la/registrant +Admin Email: https://whois.nic.la/contact/google.la/admin +Tech Email: https://whois.nic.la/contact/google.la/tech +Name Server: NS1.GOOGLE.COM +Name Server: NS2.GOOGLE.COM +Name Server: NS3.GOOGLE.COM +Name Server: NS4.GOOGLE.COM +DNSSEC: unsigned +Billing Email: https://whois.nic.la/contact/google.la/billing +Registrar Abuse Contact Email: abuse@centralnic.com +Registrar Abuse Contact Phone: +44.20338806 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-16T09:38:33.0Z <<< -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ +For more information on Whois status codes, please visit https://icann.org/epp +This whois service is provided by LANIC and only contains +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) LANIC http://www.lanic.gov.la/ + +Access to the whois service is rate limited. For more information, please +see https://registrar-console.lanic.la/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.nic.me/me/property_nameservers_is_blank.txt b/spec/fixtures/responses/whois.nic.me/me/property_nameservers_is_blank.txt index f6e5d6d1..c9d5bec9 100644 --- a/spec/fixtures/responses/whois.nic.me/me/property_nameservers_is_blank.txt +++ b/spec/fixtures/responses/whois.nic.me/me/property_nameservers_is_blank.txt @@ -1,95 +1,28 @@ -WHOIS TERMS & CONDITIONS: Access to .ME WHOIS information is provided to -assist persons in determining the contents of a domain name registration -record in the .ME registry database. The data in this record is provided by -.ME Registry for informational purposes only, and .ME Registry does not -guarantee its accuracy. This service is intended only for query-based -access. You agree that you will use this data only for lawful purposes -and that, under no circumstances will you use this data to: (a) allow, -enable, or otherwise support the transmission by e-mail, telephone, -facsimile, or other electronic processes of mass unsolicited, commercial -advertising or solicitations to entities other than the data recipient's own -existing customers; or (b) enable high volume, automated, electronic -processes that send queries or data to the systems of Registry Operator, -except as reasonably necessary to register domain names or modify existing -registrations. All rights reserved. .ME Registry reserves the right to modify -these terms at any time. By submitting this query, you agree to abide by this -policy. - -Domain ID:D82062-ME -Domain Name:WOSSNA.ME -Domain Create Date:17-Jul-2008 15:54:20 UTC -Domain Last Updated Date:16-Aug-2010 02:15:52 UTC -Domain Expiration Date:17-Jul-2011 15:54:20 UTC -Last Transferred Date: -Trademark Name: -Trademark Country: -Trademark Number: -Date Trademark Applied For: -Date Trademark Registered: -Sponsoring Registrar:Gandi SAS R114-ME (81) -Created by:Gandi SAS R114-ME (81) -Last Updated by Registrar:Gandi SAS R114-ME (81) -Domain Status:CLIENT TRANSFER PROHIBITED -Domain Status:INACTIVE -Domain Status:PENDING DELETE -Registrant ID:GM937-GANDI -Registrant Name:Graeme Mathieson -Registrant Organization: -Registrant Address:12d Monktonhall Terrace -Registrant Address2: -Registrant Address3: -Registrant City:Musselburgh -Registrant State/Province: -Registrant Country/Economy:GB -Registrant Postal Code:EH21 6ER -Registrant Phone:+44.7949077744 -Registrant Phone Ext.: -Registrant FAX: -Registrant FAX Ext.: -Registrant E-mail:mathie@rubaidh.com -Admin ID:GM2519-GANDI -Admin Name:Graeme Mathieson -Admin Organization:Rubaidh Ltd -Admin Address:Stuart House -Admin Address2:Eskmills -Admin Address3: -Admin City:Musselburgh -Admin State/Province: -Admin Country/Economy:GB -Admin Postal Code:EH21 7PB -Admin Phone:+44.1312735271 -Admin Phone Ext.: -Admin FAX: -Admin FAX Ext.: -Admin E-mail:support@rubaidh.com -Tech ID:GM2519-GANDI -Tech Name:Graeme Mathieson -Tech Organization:Rubaidh Ltd -Tech Address:Stuart House -Tech Address2:Eskmills -Tech Address3: -Tech City:Musselburgh -Tech State/Province: -Tech Country/Economy:GB -Tech Postal Code:EH21 7PB -Tech Phone:+44.1312735271 -Tech Phone Ext.: -Tech FAX: -Tech FAX Ext.: -Tech E-mail:support@rubaidh.com -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: - +Domain Name: WOSSNA.ME +Registry Domain ID: D108500000011193422-AGRS +Registrar WHOIS Server: whois.gandi.net +Registrar URL: http://www.gandi.net +Updated Date: 2021-09-29T15:43:59Z +Creation Date: 2014-01-29T07:32:26Z +Registry Expiry Date: 2024-01-29T07:32:26Z +Registrar Registration Expiration Date: +Registrar: Gandi SAS +Registrar IANA ID: 81 +Registrar Abuse Contact Email: abuse@support.gandi.net +Registrar Abuse Contact Phone: +33.170377661 +Reseller: +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Registrant Organization: +Registrant State/Province: Paris +Registrant Country: FR +Name Server: +Name Server: +Name Server: +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-09T14:03:27Z <<< +For more information on Whois status codes, please visit https://icann.org/epp + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.nic.me/me/property_updated_on_is_blank.txt b/spec/fixtures/responses/whois.nic.me/me/property_updated_on_is_blank.txt index 2e6d26af..14bb974f 100644 --- a/spec/fixtures/responses/whois.nic.me/me/property_updated_on_is_blank.txt +++ b/spec/fixtures/responses/whois.nic.me/me/property_updated_on_is_blank.txt @@ -1,92 +1,28 @@ -WHOIS TERMS & CONDITIONS: Access to .ME WHOIS information is provided to -assist persons in determining the contents of a domain name registration -record in the .ME registry database. The data in this record is provided by -.ME Registry for informational purposes only, and .ME Registry does not -guarantee its accuracy. This service is intended only for query-based -access. You agree that you will use this data only for lawful purposes -and that, under no circumstances will you use this data to: (a) allow, -enable, or otherwise support the transmission by e-mail, telephone, -facsimile, or other electronic processes of mass unsolicited, commercial -advertising or solicitations to entities other than the data recipient's own -existing customers; or (b) enable high volume, automated, electronic -processes that send queries or data to the systems of Registry Operator, -except as reasonably necessary to register domain names or modify existing -registrations. All rights reserved. .ME Registry reserves the right to modify -these terms at any time. By submitting this query, you agree to abide by this -policy. - -Domain ID:D2021453-ME -Domain Name:FACTORYOUTLET.ME -Domain Create Date:27-May-2011 16:22:58 UTC -Domain Last Updated Date: -Domain Expiration Date:27-May-2012 16:22:58 UTC -Last Transferred Date: -Trademark Name: -Trademark Country: -Trademark Number: -Date Trademark Applied For: -Date Trademark Registered: -Sponsoring Registrar:Register.it S.p.A. R51-ME -Created by:Register.it S.p.A. R51-ME -Last Updated by Registrar: -Domain Status:TRANSFER PROHIBITED -Registrant ID:a66932b07c2b -Registrant Name:Attana' Simone -Registrant Organization: -Registrant Address:via Merano 9/11 -Registrant Address2: -Registrant Address3: -Registrant City:Gessate -Registrant State/Province:MI -Registrant Country/Economy:IT -Registrant Postal Code:20060 -Registrant Phone:+39.0295780392 -Registrant Phone Ext.: -Registrant FAX:+39.0295780392 -Registrant FAX Ext.: -Registrant E-mail:amministrazione@simoneattana.com -Admin ID:a6ea540dd5aa -Admin Name:Attana' Simone -Admin Organization:Simone Attana' -Admin Address:via Merano 9/11 -Admin Address2: -Admin Address3: -Admin City:Gessate -Admin State/Province:MI -Admin Country/Economy:IT -Admin Postal Code:20060 -Admin Phone:+39.0295780392 -Admin Phone Ext.: -Admin FAX:+39.0295780392 -Admin FAX Ext.: -Admin E-mail:amministrazione@simoneattana.com -Tech ID:FR-11b2b6d2f885 -Tech Name:Technical support -Tech Organization:REGISTER.IT S.p.a. -Tech Address:Via Ponti, 6 -Tech Address2: -Tech Address3: -Tech City:Bergamo -Tech State/Province:BG -Tech Country/Economy:IT -Tech Postal Code:24126 -Tech Phone:+39.0353230300 -Tech Phone Ext.: -Tech FAX:+39.0353230312 -Tech FAX Ext.: -Tech E-mail:support@register.it -Nameservers:NS1.REGISTER.IT -Nameservers:NS2.REGISTER.IT -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: - +Domain Name: WOSSNA.ME +Registry Domain ID: D108500000011193422-AGRS +Registrar WHOIS Server: whois.gandi.net +Registrar URL: http://www.gandi.net +Updated Date: +Creation Date: 2014-01-29T07:32:26Z +Registry Expiry Date: 2024-01-29T07:32:26Z +Registrar Registration Expiration Date: +Registrar: Gandi SAS +Registrar IANA ID: 81 +Registrar Abuse Contact Email: abuse@support.gandi.net +Registrar Abuse Contact Phone: +33.170377661 +Reseller: +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Registrant Organization: +Registrant State/Province: Paris +Registrant Country: FR +Name Server: B.DNS.GANDI.NET +Name Server: C.DNS.GANDI.NET +Name Server: A.DNS.GANDI.NET +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-09T14:03:27Z <<< +For more information on Whois status codes, please visit https://icann.org/epp + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.nic.me/me/response_throttled.expected b/spec/fixtures/responses/whois.nic.me/me/response_throttled.expected new file mode 100644 index 00000000..4302c673 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.me/me/response_throttled.expected @@ -0,0 +1,2 @@ +#response_throttled? + %s == true diff --git a/spec/fixtures/responses/whois.nic.me/me/response_throttled.txt b/spec/fixtures/responses/whois.nic.me/me/response_throttled.txt new file mode 100644 index 00000000..f35717cd --- /dev/null +++ b/spec/fixtures/responses/whois.nic.me/me/response_throttled.txt @@ -0,0 +1 @@ +WHOIS QUERY RATE LIMIT EXCEEDED. PLEASE WAIT AND TRY AGAIN. diff --git a/spec/fixtures/responses/whois.nic.me/me/status_available.expected b/spec/fixtures/responses/whois.nic.me/me/status_available.expected index 2c3fe7a8..65f9ce91 100644 --- a/spec/fixtures/responses/whois.nic.me/me/status_available.expected +++ b/spec/fixtures/responses/whois.nic.me/me/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain diff --git a/spec/fixtures/responses/whois.nic.me/me/status_available.txt b/spec/fixtures/responses/whois.nic.me/me/status_available.txt index 679aadb9..f636b0cc 100644 --- a/spec/fixtures/responses/whois.nic.me/me/status_available.txt +++ b/spec/fixtures/responses/whois.nic.me/me/status_available.txt @@ -1 +1,5 @@ NOT FOUND +>>> Last update of WHOIS database: 2021-11-09T14:27:38Z <<< + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.nic.me/me/status_registered.expected b/spec/fixtures/responses/whois.nic.me/me/status_registered.expected index 6c4adbd6..efc385a5 100644 --- a/spec/fixtures/responses/whois.nic.me/me/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.me/me/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "WHOIS TERMS & CONDITIONS: Access to .ME WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the .ME registry database. The data in this record is provided by .ME Registry for informational purposes only, and .ME Registry does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to: (a) allow, enable, or otherwise support the transmission by e-mail, telephone, facsimile, or other electronic processes of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. .ME Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy." + %s == "Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == "google.me" #domain_id - %s == "D11599-ME" + %s == "D108500000000011599-AGRS" #status - %s == ["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED", "DELETE PROHIBITED", "TRANSFER PROHIBITED", "UPDATE PROHIBITED"] + %s == ["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited", "serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited", "serverTransferProhibited https://icann.org/epp#serverTransferProhibited", "serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited"] #available? %s == false @@ -25,79 +25,51 @@ #updated_on %s %CLASS{time} - %s %TIME{2013-05-12 09:21:14 UTC} + %s %TIME{2021-05-12 09:39:59 UTC} #expires_on %s %CLASS{time} - %s %TIME{2014-06-13 17:17:40 UTC} + %s %TIME{2022-06-13 17:17:40 UTC} #registrar %s %CLASS{registrar} - %s.id == "R45-ME" - %s.name == "MarkMonitor Inc" - %s.organization == nil - %s.url == nil + %s.id == "292" + %s.name == "MarkMonitor Inc." + %s.url == "http://www.markmonitor.com" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "mmr-32097" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" + %s[0].id == nil + %s[0].name == nil + %s[0].organization == "Google LLC" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil %s[0].state == "CA" %s[0].country_code == "US" - %s[0].phone == "+1.6506234000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dotme@markmonitor.com" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == nil #admin_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "mmr-32097" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country_code == "US" - %s[0].phone == "+1.6506234000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dotme@markmonitor.com" + %s %SIZE{0} #technical_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "mmr-32097" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country_code == "US" - %s[0].phone == "+1.6506234000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dotme@markmonitor.com" - + %s %SIZE{0} #nameservers %s %CLASS{array} %s %SIZE{4} %s[0] %CLASS{nameserver} - %s[0].name == "ns2.google.com" + %s[0].name == "ns1.google.com" %s[1] %CLASS{nameserver} - %s[1].name == "ns1.google.com" + %s[1].name == "ns2.google.com" %s[2] %CLASS{nameserver} %s[2].name == "ns4.google.com" %s[3] %CLASS{nameserver} diff --git a/spec/fixtures/responses/whois.nic.me/me/status_registered.txt b/spec/fixtures/responses/whois.nic.me/me/status_registered.txt index c6cc2703..300acba8 100644 --- a/spec/fixtures/responses/whois.nic.me/me/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.me/me/status_registered.txt @@ -1,98 +1,34 @@ -WHOIS TERMS & CONDITIONS: Access to .ME WHOIS information is provided to -assist persons in determining the contents of a domain name registration -record in the .ME registry database. The data in this record is provided by -.ME Registry for informational purposes only, and .ME Registry does not -guarantee its accuracy. This service is intended only for query-based -access. You agree that you will use this data only for lawful purposes -and that, under no circumstances will you use this data to: (a) allow, -enable, or otherwise support the transmission by e-mail, telephone, -facsimile, or other electronic processes of mass unsolicited, commercial -advertising or solicitations to entities other than the data recipient's own -existing customers; or (b) enable high volume, automated, electronic -processes that send queries or data to the systems of Registry Operator, -except as reasonably necessary to register domain names or modify existing -registrations. All rights reserved. .ME Registry reserves the right to modify -these terms at any time. By submitting this query, you agree to abide by this -policy. - -Domain ID:D11599-ME -Domain Name:GOOGLE.ME -Domain Create Date:13-Jun-2008 17:17:40 UTC -Domain Last Updated Date:12-May-2013 09:21:14 UTC -Domain Expiration Date:13-Jun-2014 17:17:40 UTC -Last Transferred Date: -Trademark Name:google -Trademark Country:BX -Trademark Number:Benelux-0694499 -Date Trademark Applied For:2001-09-10 -Date Trademark Registered:2002-01-01 -Sponsoring Registrar:MarkMonitor Inc R45-ME -Created by:MarkMonitor Inc R45-ME -Last Updated by Registrar:MarkMonitor Inc R45-ME -Domain Status:CLIENT DELETE PROHIBITED -Domain Status:CLIENT TRANSFER PROHIBITED -Domain Status:CLIENT UPDATE PROHIBITED -Domain Status:DELETE PROHIBITED -Domain Status:TRANSFER PROHIBITED -Domain Status:UPDATE PROHIBITED -Registrant ID:mmr-32097 -Registrant Name:DNS Admin -Registrant Organization:Google Inc. -Registrant Address:1600 Amphitheatre Parkway -Registrant Address2: -Registrant Address3: -Registrant City:Mountain View -Registrant State/Province:CA -Registrant Country/Economy:US -Registrant Postal Code:94043 -Registrant Phone:+1.6506234000 -Registrant Phone Ext.: -Registrant FAX:+1.6506188571 -Registrant FAX Ext.: -Registrant E-mail:dotme@markmonitor.com -Admin ID:mmr-32097 -Admin Name:DNS Admin -Admin Organization:Google Inc. -Admin Address:1600 Amphitheatre Parkway -Admin Address2: -Admin Address3: -Admin City:Mountain View -Admin State/Province:CA -Admin Country/Economy:US -Admin Postal Code:94043 -Admin Phone:+1.6506234000 -Admin Phone Ext.: -Admin FAX:+1.6506188571 -Admin FAX Ext.: -Admin E-mail:dotme@markmonitor.com -Tech ID:mmr-32097 -Tech Name:DNS Admin -Tech Organization:Google Inc. -Tech Address:1600 Amphitheatre Parkway -Tech Address2: -Tech Address3: -Tech City:Mountain View -Tech State/Province:CA -Tech Country/Economy:US -Tech Postal Code:94043 -Tech Phone:+1.6506234000 -Tech Phone Ext.: -Tech FAX:+1.6506188571 -Tech FAX Ext.: -Tech E-mail:dotme@markmonitor.com -Nameservers:NS2.GOOGLE.COM -Nameservers:NS1.GOOGLE.COM -Nameservers:NS4.GOOGLE.COM -Nameservers:NS3.GOOGLE.COM -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -Nameservers: -DNSSEC:Unsigned - +Domain Name: GOOGLE.ME +Registry Domain ID: D108500000000011599-AGRS +Registrar WHOIS Server: +Registrar URL: http://www.markmonitor.com +Updated Date: 2021-05-12T09:39:59Z +Creation Date: 2008-06-13T17:17:40Z +Registry Expiry Date: 2022-06-13T17:17:40Z +Registrar Registration Expiration Date: +Registrar: MarkMonitor Inc. +Registrar IANA ID: 292 +Registrar Abuse Contact Email: abusecomplaints@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +Reseller: +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Domain Status: serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited +Domain Status: serverTransferProhibited https://icann.org/epp#serverTransferProhibited +Domain Status: serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited +Registrant Organization: Google LLC +Registrant State/Province: CA +Registrant Country: US +Name Server: NS1.GOOGLE.COM +Name Server: NS2.GOOGLE.COM +Name Server: NS4.GOOGLE.COM +Name Server: NS3.GOOGLE.COM +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-09T14:08:25Z <<< +For more information on Whois status codes, please visit https://icann.org/epp + +Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.nic.mg/mg/status_registered.expected b/spec/fixtures/responses/whois.nic.mg/mg/status_registered.expected index c573c0a8..06b57ae8 100644 --- a/spec/fixtures/responses/whois.nic.mg/mg/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.mg/mg/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor" - %s.organization == nil %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.nic.ms/ms/status_registered.expected b/spec/fixtures/responses/whois.nic.ms/ms/status_registered.expected index b2d6e0f7..be0b94c2 100644 --- a/spec/fixtures/responses/whois.nic.ms/ms/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.ms/ms/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor" - %s.organization == nil %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.nic.mu/mu/status_registered.expected b/spec/fixtures/responses/whois.nic.mu/mu/status_registered.expected index 8ab648a9..82607948 100644 --- a/spec/fixtures/responses/whois.nic.mu/mu/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.mu/mu/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor" - %s.organization == nil %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.nic.net.ng/ng/status_registered.expected b/spec/fixtures/responses/whois.nic.net.ng/ng/status_registered.expected index 2c068961..e776542a 100644 --- a/spec/fixtures/responses/whois.nic.net.ng/ng/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.net.ng/ng/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "nira" - %s.organization == nil %s.url == nil diff --git a/spec/fixtures/responses/whois.nic.net.sb/sb/status_registered.expected b/spec/fixtures/responses/whois.nic.net.sb/sb/status_registered.expected index 61a0dfe9..2e0ad578 100644 --- a/spec/fixtures/responses/whois.nic.net.sb/sb/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.net.sb/sb/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "Key-Systems" - %s.organization == nil %s.url == "http://www.key-systems.net" diff --git a/spec/fixtures/responses/whois.nic.nf/nf/status_registered.expected b/spec/fixtures/responses/whois.nic.nf/nf/status_registered.expected index a88215fe..4456b64f 100644 --- a/spec/fixtures/responses/whois.nic.nf/nf/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.nf/nf/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor" - %s.organization == nil %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.nic.online/online/status_available.expected b/spec/fixtures/responses/whois.nic.online/online/status_available.expected new file mode 100644 index 00000000..64c3bae5 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.online/online/status_available.expected @@ -0,0 +1,50 @@ +#disclaimer + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." + + +#domain + %s == nil + +#domain_id + %s == nil + + +#status + %s == :available + +#available? + %s == true + +#registered? + %s == false + + +#created_on + %s == nil + +#updated_on + %s == nil + +#expires_on + %s == nil + + +#registrar + %s == nil + +#registrant_contacts + %s %CLASS{array} + %s == [] + +#admin_contacts + %s %CLASS{array} + %s == [] + +#technical_contacts + %s %CLASS{array} + %s == [] + + +#nameservers + %s %CLASS{array} + %s == [] diff --git a/spec/fixtures/responses/whois.nic.online/online/status_available.txt b/spec/fixtures/responses/whois.nic.online/online/status_available.txt new file mode 100644 index 00000000..89913588 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.online/online/status_available.txt @@ -0,0 +1,21 @@ +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-15T15:30:47.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.nic.online/online/status_registered.expected b/spec/fixtures/responses/whois.nic.online/online/status_registered.expected new file mode 100644 index 00000000..a5263865 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.online/online/status_registered.expected @@ -0,0 +1,106 @@ +#disclaimer + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." + + +#domain + %s == "google.online" + +#domain_id + %s == "D9566483-CNIC" + + +#status + %s == :registered + +#available? + %s == false + +#registered? + %s == true + + +#created_on + %s %CLASS{time} + %s %TIME{2015-08-19 11:27:00 UTC} + +#updated_on + %s %CLASS{time} + %s %TIME{2021-08-25 01:16:45 UTC} + +#expires_on + %s %CLASS{time} + %s %TIME{2022-08-19 23:59:59 UTC} + + +#registrar + %s %CLASS{registrar} + %s.id == "292" + %s.name == "MarkMonitor, Inc (TLDs)" + %s.url == "" + +#registrant_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT + %s[0].id == nil + %s[0].name == nil + %s[0].organization == "Google LLC" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil + %s[0].state == "CA" + %s[0].country == nil + %s[0].country_code == "US" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." + +#admin_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE + %s[0].id == nil + %s[0].name == nil + %s[0].organization == nil + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil + %s[0].state == nil + %s[0].country == nil + %s[0].country_code == nil + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." + +#technical_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL + %s[0].id == nil + %s[0].name == nil + %s[0].organization == nil + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil + %s[0].state == nil + %s[0].country == nil + %s[0].country_code == nil + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." + + +#nameservers + %s %CLASS{array} + %s %SIZE{4} + %s[0] %CLASS{nameserver} + %s[0].name == "ns3.googledomains.com" + %s[1] %CLASS{nameserver} + %s[1].name == "ns1.googledomains.com" + %s[2] %CLASS{nameserver} + %s[2].name == "ns2.googledomains.com" + %s[3] %CLASS{nameserver} + %s[3].name == "ns4.googledomains.com" diff --git a/spec/fixtures/responses/whois.nic.online/online/status_registered.txt b/spec/fixtures/responses/whois.nic.online/online/status_registered.txt new file mode 100644 index 00000000..f28a030f --- /dev/null +++ b/spec/fixtures/responses/whois.nic.online/online/status_registered.txt @@ -0,0 +1,45 @@ +Domain Name: GOOGLE.ONLINE +Registry Domain ID: D9566483-CNIC +Registrar WHOIS Server: whois.markmonitor.com +Registrar URL: +Updated Date: 2021-08-25T01:16:45.0Z +Creation Date: 2015-08-19T11:27:00.0Z +Registry Expiry Date: 2022-08-19T23:59:59.0Z +Registrar: MarkMonitor, Inc (TLDs) +Registrar IANA ID: 292 +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Registrant Organization: Google LLC +Registrant State/Province: CA +Registrant Country: US +Registrant Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Admin Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Tech Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Name Server: NS3.GOOGLEDOMAINS.COM +Name Server: NS1.GOOGLEDOMAINS.COM +Name Server: NS2.GOOGLEDOMAINS.COM +Name Server: NS4.GOOGLEDOMAINS.COM +DNSSEC: unsigned +Registrar Abuse Contact Email: ccops@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-15T15:30:37.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.nic.pm/pm/status_registered.expected b/spec/fixtures/responses/whois.nic.pm/pm/status_registered.expected index fc793da1..1ff8ca6e 100644 --- a/spec/fixtures/responses/whois.nic.pm/pm/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.pm/pm/status_registered.expected @@ -10,15 +10,15 @@ #created_on %s %CLASS{time} - %s %TIME{1995-01-01} + %s %TIME{1994-12-31 23:00:00 UTC} #updated_on %s %CLASS{time} - %s %TIME{2016-12-31} + %s %TIME{2018-12-31 23:33:19 UTC} #expires_on %s %CLASS{time} - %s %TIME{2017-12-31} + %s %TIME{2019-12-31 23:00:00 UTC} #registrant_contacts @@ -29,16 +29,16 @@ %s[0].id == "APEM2-FRNIC" %s[0].name == nil %s[0].organization == "Afnic (Saint-Pierre et Miquelon - CTOM)" - %s[0].address == "immeuble international\n2, rue Stephenson\nMontigny-Le-Bretonneux\n78181 Saint Quentin en Yvelines Cedex" + %s[0].address == "immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny le Bretonneux" %s[0].city == nil %s[0].zip == nil %s[0].state == nil %s[0].country == nil %s[0].country_code == "FR" - %s[0].phone == nil - %s[0].fax == nil - %s[0].email == nil - %s[0].updated_on %TIME{2008-10-09 00:00:00 UTC} + %s[0].phone == "+33 1 39 30 83 00" + %s[0].fax == "+33 1 39 30 83 01" + %s[0].email == "support@afnic.fr" + %s[0].updated_on %TIME{2017-07-17 12:39:46 UTC} #admin_contacts %s %CLASS{array} @@ -48,7 +48,7 @@ %s[0].id == "NFC1-FRNIC" %s[0].name == "NIC France Contact" %s[0].organization == "AFNIC" - %s[0].address == "immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex" + %s[0].address == "immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux" %s[0].city == nil %s[0].zip == nil %s[0].state == nil @@ -57,7 +57,7 @@ %s[0].phone == "+33 1 39 30 83 00" %s[0].fax == nil %s[0].email == "hostmaster@nic.fr" - %s[0].updated_on %TIME{2005-08-23 00:00:00 UTC} + %s[0].updated_on %TIME{2005-08-23 16:13:17 UTC} #technical_contacts %s %CLASS{array} @@ -67,7 +67,7 @@ %s[0].id == "NFC1-FRNIC" %s[0].name == "NIC France Contact" %s[0].organization == "AFNIC" - %s[0].address == "immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex" + %s[0].address == "immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux" %s[0].city == nil %s[0].zip == nil %s[0].state == nil @@ -76,9 +76,15 @@ %s[0].phone == "+33 1 39 30 83 00" %s[0].fax == nil %s[0].email == "hostmaster@nic.fr" - %s[0].updated_on %TIME{2005-08-23 00:00:00 UTC} + %s[0].updated_on %TIME{2005-08-23 16:13:17 UTC} #nameservers %s %CLASS{array} %s %SIZE{3} + %s[0] %CLASS{nameserver} + %s[0].name == "ns1.nic.fr" + %s[1] %CLASS{nameserver} + %s[1].name == "ns2.nic.fr" + %s[2] %CLASS{nameserver} + %s[2].name == "ns3.nic.fr" diff --git a/spec/fixtures/responses/whois.nic.pm/pm/status_registered.txt b/spec/fixtures/responses/whois.nic.pm/pm/status_registered.txt index 01fc19fb..031021d0 100644 --- a/spec/fixtures/responses/whois.nic.pm/pm/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.pm/pm/status_registered.txt @@ -1,9 +1,7 @@ -[Querying whois.nic.pm] -[whois.nic.pm] %% %% This is the AFNIC Whois server. %% -%% complete date format : DD/MM/YYYY +%% complete date format : YYYY-MM-DDThh:mm:ssZ %% short date format : DD/MM %% version : FRNIC-2.5 %% @@ -12,7 +10,7 @@ %% %% Use '-h' option to obtain more information about this service. %% -%% [0.0.0.0 REQUEST] >> nic.pm +%% [209.153.220.50 REQUEST] >> nic.pm %% %% RL Net [##########] - RL IP [#########.] %% @@ -31,31 +29,50 @@ remarks: Please email mailto: nic@nic.fr remarks: Spam mailto: abuse@nic.fr remarks: Test mailto: ping@nic.fr registrar: AFNIC registry -Expiry Date: 31/12/2017 -created: 01/01/1995 -last-update: 31/12/2016 +Expiry Date: 2019-12-31T23:00:00Z +created: 1994-12-31T23:00:00Z +last-update: 2018-12-31T23:33:19Z source: FRNIC ns-list: NSL1-FRNIC -nserver: ns1.nic.fr [192.134.4.1 2001:67c:2218:2::4:1] -nserver: ns2.nic.fr [192.93.0.4 2001:660:3005:1::1:2] -nserver: ns3.nic.fr [192.134.0.49 2001:660:3006:1::1:1] +nserver: ns1.nic.fr +nserver: ns2.nic.fr +nserver: ns3.nic.fr source: FRNIC registrar: AFNIC registry type: Isp Option 2 anonymous: YES -registered: 22/05/1997 +registered: 1997-05-22T12:00:00Z +source: FRNIC + +nic-hdl: APEM2-FRNIC +type: ORGANIZATION +contact: Afnic (Saint-Pierre et Miquelon - CTOM) +address: immeuble le Stephenson +address: 1, rue Stephenson +address: Hall A2 - 3eme etage +address: 78180 Montigny le Bretonneux +country: FR +phone: +33 1 39 30 83 00 +fax-no: +33 1 39 30 83 01 +e-mail: support@afnic.fr +registrar: AFNIC registry +changed: 2017-07-17T12:39:46Z nic@nic.fr +anonymous: NO +obsoleted: NO +eligstatus: not identified +reachstatus: not identified source: FRNIC nic-hdl: NFC1-FRNIC type: ROLE contact: NIC France Contact address: AFNIC -address: immeuble international -address: 2, rue Stephenson -address: Montigny le Bretonneux -address: 78181 Saint Quentin en Yvelines Cedex +address: immeuble le Stephenson +address: 1, rue Stephenson +address: Hall A2 - 3eme etage +address: 78180 Montigny-Le-Bretonneux country: FR phone: +33 1 39 30 83 00 e-mail: hostmaster@nic.fr @@ -70,22 +87,39 @@ tech-c: GO661-FRNIC tech-c: MS-FRNIC tech-c: AI1-FRNIC registrar: AFNIC registry -changed: 23/08/2005 hostmaster@nic.fr +changed: 2005-08-23T16:13:17Z hostmaster@nic.fr anonymous: NO obsoleted: NO +eligstatus: not identified +reachstatus: not identified source: FRNIC -nic-hdl: APEM2-FRNIC -type: ORGANIZATION -contact: Afnic (Saint-Pierre et Miquelon - CTOM) -address: immeuble international -address: 2, rue Stephenson -address: Montigny-Le-Bretonneux -address: 78181 Saint Quentin en Yvelines Cedex +nic-hdl: NFC1-FRNIC +type: ROLE +contact: NIC France Contact +address: AFNIC +address: immeuble le Stephenson +address: 1, rue Stephenson +address: Hall A2 - 3eme etage +address: 78180 Montigny-Le-Bretonneux country: FR +phone: +33 1 39 30 83 00 +e-mail: hostmaster@nic.fr +admin-c: NFC1-FRNIC +tech-c: PL12-FRNIC +tech-c: JP-FRNIC +tech-c: MS1887-FRNIC +tech-c: VL-FRNIC +tech-c: PR1249-FRNIC +tech-c: PV827-FRNIC +tech-c: GO661-FRNIC +tech-c: MS-FRNIC +tech-c: AI1-FRNIC registrar: AFNIC registry -changed: 09/10/2008 whoismaster@nic.fr +changed: 2005-08-23T16:13:17Z hostmaster@nic.fr anonymous: NO obsoleted: NO +eligstatus: not identified +reachstatus: not identified source: FRNIC diff --git a/spec/fixtures/responses/whois.nic.pw/pw/status_available.expected b/spec/fixtures/responses/whois.nic.pw/pw/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.nic.pw/pw/status_available.expected +++ b/spec/fixtures/responses/whois.nic.pw/pw/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.nic.pw/pw/status_available.txt b/spec/fixtures/responses/whois.nic.pw/pw/status_available.txt index 09cc0f7e..57216f02 100644 --- a/spec/fixtures/responses/whois.nic.pw/pw/status_available.txt +++ b/spec/fixtures/responses/whois.nic.pw/pw/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: previous registration D10194332-CNIC was purged on 2016-12-16T06:35:25.0Z (DOMAIN NOT FOUND) + +>>> Last update of WHOIS database: 2021-12-16T10:47:34.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.nic.pw/pw/status_registered.expected b/spec/fixtures/responses/whois.nic.pw/pw/status_registered.expected index 5c22ba99..636c4ec0 100644 --- a/spec/fixtures/responses/whois.nic.pw/pw/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.pw/pw/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/" + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain %s == "google.pw" #domain_id - %s == "CNIC-DO949924" + %s == "D949924-CNIC" #status - %s == ["clientTransferProhibited", "clientUpdateProhibited", "clientDeleteProhibited", "serverTransferProhibited"] + %s == :registered #available? %s == false @@ -25,103 +25,41 @@ #updated_on %s %CLASS{time} - %s %TIME{2014-01-18 00:13:36 UTC} + %s %TIME{2021-02-04 15:18:38 UTC} #expires_on %s %CLASS{time} - %s %TIME{2017-02-10 23:59:59 UTC} + %s %TIME{2022-02-10 23:59:59 UTC} #registrar %s %CLASS{registrar} - %s.id == "7061-EM" - %s.name == nil - %s.organization == "MarkMonitor, Inc." - %s.url == "http://www.markmonitor.com/" + %s.id == "292" + %s.name == "MarkMonitor, Inc." + %s.url == "" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "H2396041" - %s[0].name == "DNS Admin - Google Inc" - %s[0].organization == "Google Inc" - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6502530001" - %s[0].email == "dns-admin@google.com" + %s[0].email == "https://whois.nic.pw/contact/google.pw/registrant" #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "H2396041" - %s[0].name == "DNS Admin - Google Inc" - %s[0].organization == "Google Inc" - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6502530001" - %s[0].email == "dns-admin@google.com" + %s[0].email == "https://whois.nic.pw/contact/google.pw/admin" #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "H2396041" - %s[0].name == "DNS Admin - Google Inc" - %s[0].organization == "Google Inc" - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6502530001" - %s[0].email == "dns-admin@google.com" + %s[0].email == "https://whois.nic.pw/contact/google.pw/tech" #nameservers %s %CLASS{array} - %s %SIZE{7} - %s[0] %CLASS{nameserver} - %s[0].name == "ns1.markmonitor.com" - %s[0].ipv4 == nil - %s[0].ipv6 == nil - %s[1] %CLASS{nameserver} - %s[1].name == "ns2.markmonitor.com" - %s[1].ipv4 == nil - %s[1].ipv6 == nil - %s[2] %CLASS{nameserver} - %s[2].name == "ns3.markmonitor.com" - %s[2].ipv4 == nil - %s[2].ipv6 == nil - %s[3] %CLASS{nameserver} - %s[3].name == "ns4.markmonitor.com" - %s[3].ipv4 == nil - %s[3].ipv6 == nil - %s[4] %CLASS{nameserver} - %s[4].name == "ns5.markmonitor.com" - %s[4].ipv4 == nil - %s[4].ipv6 == nil - %s[5] %CLASS{nameserver} - %s[5].name == "ns6.markmonitor.com" - %s[5].ipv4 == nil - %s[5].ipv6 == nil - %s[6] %CLASS{nameserver} - %s[6].name == "ns7.markmonitor.com" - %s[6].ipv4 == nil - %s[6].ipv6 == nil + %s %SIZE{0} diff --git a/spec/fixtures/responses/whois.nic.pw/pw/status_registered.txt b/spec/fixtures/responses/whois.nic.pw/pw/status_registered.txt index e60c3bfe..0cad9f25 100644 --- a/spec/fixtures/responses/whois.nic.pw/pw/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.pw/pw/status_registered.txt @@ -1,85 +1,40 @@ -Domain ID:CNIC-DO949924 -Domain Name:GOOGLE.PW -Created On:2012-10-12T10:19:46.0Z -Last Updated On:2014-01-18T00:13:36.0Z -Expiration Date:2017-02-10T23:59:59.0Z -Status:clientTransferProhibited -Status:clientUpdateProhibited -Status:clientDeleteProhibited -Status:serverTransferProhibited -Registrant ID:H2396041 -Registrant Name:DNS Admin - Google Inc -Registrant Organization:Google Inc -Registrant Street1:1600 Amphitheatre Parkway -Registrant City:Mountain View -Registrant State/Province:CA -Registrant Postal Code:94043 -Registrant Country:US -Registrant Phone:+1.6502530000 -Registrant FAX:+1.6502530001 -Registrant Email:dns-admin@google.com -Admin ID:H2396041 -Admin Name:DNS Admin - Google Inc -Admin Organization:Google Inc -Admin Street1:1600 Amphitheatre Parkway -Admin City:Mountain View -Admin State/Province:CA -Admin Postal Code:94043 -Admin Country:US -Admin Phone:+1.6502530000 -Admin FAX:+1.6502530001 -Admin Email:dns-admin@google.com -Tech ID:H2396041 -Tech Name:DNS Admin - Google Inc -Tech Organization:Google Inc -Tech Street1:1600 Amphitheatre Parkway -Tech City:Mountain View -Tech State/Province:CA -Tech Postal Code:94043 -Tech Country:US -Tech Phone:+1.6502530000 -Tech FAX:+1.6502530001 -Tech Email:dns-admin@google.com -Billing ID:7061-EM -Billing Name:Domain Administrator -Billing Organization:MarkMonitor, Inc. -Billing Street1:Emerald Tech Center -Billing Street2:391 N. Ancestor Place -Billing City:Boise -Billing State/Province:ID -Billing Postal Code:83704 -Billing Country:US -Billing Phone:+1.2083895740 -Billing FAX:+1.2083895771 -Billing Email:ccops@markmonitor.com -Sponsoring Registrar ID:7061-EM -Sponsoring Registrar IANA ID:292 -Sponsoring Registrar Organization:MarkMonitor, Inc. -Sponsoring Registrar Street1:Emerald Tech Center -Sponsoring Registrar Street2:391 N. Ancestor Place -Sponsoring Registrar City:Boise -Sponsoring Registrar State/Province:ID -Sponsoring Registrar Postal Code:83704 -Sponsoring Registrar Country:US -Sponsoring Registrar Phone:+1.2083895740 -Sponsoring Registrar FAX:+1.2083895771 -Sponsoring Registrar Website:http://www.markmonitor.com/ -Name Server:NS1.MARKMONITOR.COM -Name Server:NS2.MARKMONITOR.COM -Name Server:NS3.MARKMONITOR.COM -Name Server:NS4.MARKMONITOR.COM -Name Server:NS5.MARKMONITOR.COM -Name Server:NS6.MARKMONITOR.COM -Name Server:NS7.MARKMONITOR.COM -DNSSEC:Unsigned +Domain Name: GOOGLE.PW +Registry Domain ID: D949924-CNIC +Registrar WHOIS Server: whois.markmonitor.com +Registrar URL: +Updated Date: 2021-02-04T15:18:38.0Z +Creation Date: 2012-10-12T10:19:46.0Z +Registry Expiry Date: 2022-02-10T23:59:59.0Z +Registrar: MarkMonitor, Inc. +Registrar IANA ID: 292 +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: inactive https://icann.org/epp#inactive +Registrant Email: https://whois.nic.pw/contact/google.pw/registrant +Admin Email: https://whois.nic.pw/contact/google.pw/admin +Tech Email: https://whois.nic.pw/contact/google.pw/tech +Name Server: +DNSSEC: unsigned +Registrar Abuse Contact Email: ccops@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-16T10:47:36.0Z <<< -This whois service is provided by CentralNic Ltd and only contains -information pertaining to Internet domain names we have registered for -our customers. By using this service you are agreeing (1) not to use any -information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in -any way, (3) not to use any high-volume, automated, electronic processes -to obtain data from this service. Abuse of this service is monitored and -actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ +For more information on Whois status codes, please visit https://icann.org/epp +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.nic.re/re/status_registered.expected b/spec/fixtures/responses/whois.nic.re/re/status_registered.expected index b4105e27..7956b916 100644 --- a/spec/fixtures/responses/whois.nic.re/re/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.re/re/status_registered.expected @@ -10,15 +10,15 @@ #created_on %s %CLASS{time} - %s %TIME{1995-01-01} + %s %TIME{1994-12-31 23:00:00 UTC} #updated_on %s %CLASS{time} - %s %TIME{2016-12-31} + %s %TIME{2018-12-31 23:33:19 UTC} #expires_on %s %CLASS{time} - %s %TIME{2017-12-31} + %s %TIME{2019-12-31 23:00:00 UTC} #registrant_contacts @@ -29,16 +29,16 @@ %s[0].id == "A1967-FRNIC" %s[0].name == nil %s[0].organization == "AFNIC" - %s[0].address == "immeuble international\n2, rue Stephenson\nMontigny-Le-Bretonneux\n78181 Saint Quentin en Yvelines" + %s[0].address == "immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny le Bretonneux" %s[0].city == nil %s[0].zip == nil %s[0].state == nil %s[0].country == nil %s[0].country_code == "FR" - %s[0].phone == nil - %s[0].fax == nil - %s[0].email == nil - %s[0].updated_on %TIME{2009-12-02 00:00:00 UTC} + %s[0].phone == "+33 1 39 30 83 00" + %s[0].fax == "+33 1 39 30 83 01" + %s[0].email == "support@afnic.fr" + %s[0].updated_on %TIME{2017-07-17 12:40:19 UTC} #admin_contacts %s %CLASS{array} @@ -48,7 +48,7 @@ %s[0].id == "NFC1-FRNIC" %s[0].name == "NIC France Contact" %s[0].organization == "AFNIC" - %s[0].address == "immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex" + %s[0].address == "immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux" %s[0].city == nil %s[0].zip == nil %s[0].state == nil @@ -57,7 +57,7 @@ %s[0].phone == "+33 1 39 30 83 00" %s[0].fax == nil %s[0].email == "hostmaster@nic.fr" - %s[0].updated_on %TIME{2005-08-23 00:00:00 UTC} + %s[0].updated_on %TIME{2005-08-23 16:13:17 UTC} #technical_contacts %s %CLASS{array} @@ -67,7 +67,7 @@ %s[0].id == "NFC1-FRNIC" %s[0].name == "NIC France Contact" %s[0].organization == "AFNIC" - %s[0].address == "immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex" + %s[0].address == "immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux" %s[0].city == nil %s[0].zip == nil %s[0].state == nil @@ -76,9 +76,15 @@ %s[0].phone == "+33 1 39 30 83 00" %s[0].fax == nil %s[0].email == "hostmaster@nic.fr" - %s[0].updated_on %TIME{2005-08-23 00:00:00 UTC} + %s[0].updated_on %TIME{2005-08-23 16:13:17 UTC} #nameservers %s %CLASS{array} %s %SIZE{3} + %s[0] %CLASS{nameserver} + %s[0].name == "ns1.nic.fr" + %s[1] %CLASS{nameserver} + %s[1].name == "ns2.nic.fr" + %s[2] %CLASS{nameserver} + %s[2].name == "ns3.nic.fr" diff --git a/spec/fixtures/responses/whois.nic.re/re/status_registered.txt b/spec/fixtures/responses/whois.nic.re/re/status_registered.txt index 39d74469..196a5a0b 100644 --- a/spec/fixtures/responses/whois.nic.re/re/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.re/re/status_registered.txt @@ -1,9 +1,7 @@ -[Querying whois.nic.re] -[whois.nic.re] %% %% This is the AFNIC Whois server. %% -%% complete date format : DD/MM/YYYY +%% complete date format : YYYY-MM-DDThh:mm:ssZ %% short date format : DD/MM %% version : FRNIC-2.5 %% @@ -12,7 +10,7 @@ %% %% Use '-h' option to obtain more information about this service. %% -%% [0.0.0.0 REQUEST] >> nic.re +%% [209.153.220.50 REQUEST] >> nic.re %% %% RL Net [##########] - RL IP [#########.] %% @@ -25,56 +23,88 @@ admin-c: NFC1-FRNIC tech-c: NFC1-FRNIC zone-c: NFC1-FRNIC nsl-id: NSL1-FRNIC -dsl-id: SIGN736572-FRNIC +dsl-id: SIGN1272510-FRNIC registrar: AFNIC registry -Expiry Date: 31/12/2017 -created: 01/01/1995 -last-update: 31/12/2016 +Expiry Date: 2019-12-31T23:00:00Z +created: 1994-12-31T23:00:00Z +last-update: 2018-12-31T23:33:19Z source: FRNIC ns-list: NSL1-FRNIC -nserver: ns1.nic.fr [192.134.4.1 2001:67c:2218:2::4:1] -nserver: ns2.nic.fr [192.93.0.4 2001:660:3005:1::1:2] -nserver: ns3.nic.fr [192.134.0.49 2001:660:3006:1::1:1] +nserver: ns1.nic.fr +nserver: ns2.nic.fr +nserver: ns3.nic.fr source: FRNIC -ds-list: SIGN736572-FRNIC -key1-tag: 42275 +ds-list: SIGN1272510-FRNIC +key1-tag: 64861 key1-algo: 8 [RSASHA256] key1-dgst-t: 2 [SHA-256] -key1-dgst: 0337202F13AADFAFF4197396D15C4DC26FB04CF0AC775F595743A2EC075DF9D3 +key1-dgst: 52E3E60DCE1D18991299D4948CB7716E188F86D33EE6D3FB40220E17643A28CC source: FRNIC registrar: AFNIC registry type: Isp Option 2 anonymous: YES -registered: 22/05/1997 +registered: 1997-05-22T12:00:00Z source: FRNIC nic-hdl: A1967-FRNIC type: ORGANIZATION contact: AFNIC -address: immeuble international -address: 2, rue Stephenson -address: Montigny-Le-Bretonneux -address: 78181 Saint Quentin en Yvelines +address: immeuble le Stephenson +address: 1, rue Stephenson +address: Hall A2 - 3eme etage +address: 78180 Montigny le Bretonneux country: FR +phone: +33 1 39 30 83 00 +fax-no: +33 1 39 30 83 01 +e-mail: support@afnic.fr +registrar: AFNIC registry +changed: 2017-07-17T12:40:19Z nic@nic.fr +anonymous: NO +obsoleted: NO +eligstatus: not identified +reachstatus: not identified +source: FRNIC + +nic-hdl: NFC1-FRNIC +type: ROLE +contact: NIC France Contact +address: AFNIC +address: immeuble le Stephenson +address: 1, rue Stephenson +address: Hall A2 - 3eme etage +address: 78180 Montigny-Le-Bretonneux +country: FR +phone: +33 1 39 30 83 00 +e-mail: hostmaster@nic.fr +admin-c: NFC1-FRNIC +tech-c: PL12-FRNIC +tech-c: JP-FRNIC +tech-c: MS1887-FRNIC +tech-c: VL-FRNIC +tech-c: PR1249-FRNIC +tech-c: PV827-FRNIC +tech-c: GO661-FRNIC +tech-c: MS-FRNIC +tech-c: AI1-FRNIC registrar: AFNIC registry -changed: 02/12/2009 nic@nic.fr +changed: 2005-08-23T16:13:17Z hostmaster@nic.fr anonymous: NO obsoleted: NO -eligstatus: ok -eligdate: 01/01/1995 00:00:00 +eligstatus: not identified +reachstatus: not identified source: FRNIC nic-hdl: NFC1-FRNIC type: ROLE contact: NIC France Contact address: AFNIC -address: immeuble international -address: 2, rue Stephenson -address: Montigny le Bretonneux -address: 78181 Saint Quentin en Yvelines Cedex +address: immeuble le Stephenson +address: 1, rue Stephenson +address: Hall A2 - 3eme etage +address: 78180 Montigny-Le-Bretonneux country: FR phone: +33 1 39 30 83 00 e-mail: hostmaster@nic.fr @@ -89,8 +119,10 @@ tech-c: GO661-FRNIC tech-c: MS-FRNIC tech-c: AI1-FRNIC registrar: AFNIC registry -changed: 23/08/2005 hostmaster@nic.fr +changed: 2005-08-23T16:13:17Z hostmaster@nic.fr anonymous: NO obsoleted: NO +eligstatus: not identified +reachstatus: not identified source: FRNIC diff --git a/spec/fixtures/responses/whois.nic.sh/sh/status_registered.expected b/spec/fixtures/responses/whois.nic.sh/sh/status_registered.expected index 1a13f5b9..bc289911 100644 --- a/spec/fixtures/responses/whois.nic.sh/sh/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.sh/sh/status_registered.expected @@ -36,7 +36,6 @@ %s %CLASS{registrar} %s.id == "292" %s.name == "MarkMonitor Inc." - %s.organization == "MarkMonitor Inc." %s.url == "http://www.markmonitor.com" #registrant_contacts diff --git a/spec/fixtures/responses/whois.nic.so/so/status_available.expected b/spec/fixtures/responses/whois.nic.so/so/status_available.expected index 03cb4d2b..1b4217a2 100644 --- a/spec/fixtures/responses/whois.nic.so/so/status_available.expected +++ b/spec/fixtures/responses/whois.nic.so/so/status_available.expected @@ -1,5 +1,8 @@ +#domain + %s == "u34jedzcq.so" + #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.nic.so/so/status_available.txt b/spec/fixtures/responses/whois.nic.so/so/status_available.txt index d3c062ff..a27b4bb0 100644 --- a/spec/fixtures/responses/whois.nic.so/so/status_available.txt +++ b/spec/fixtures/responses/whois.nic.so/so/status_available.txt @@ -1 +1,8 @@ -Not found: u34jedzcq.so +Domain Name: u34jedzcq.so +Domain Status: No Object Found +>>> Last update of WHOIS database: 2023-01-16T18:45:24.287Z <<< + + +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. This WHOIS database is provided by as a service to the internet community. + +The data is for information purposes only. We do 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. \ No newline at end of file diff --git a/spec/fixtures/responses/whois.nic.so/so/status_registered.expected b/spec/fixtures/responses/whois.nic.so/so/status_registered.expected index 1a157bf4..677500e5 100644 --- a/spec/fixtures/responses/whois.nic.so/so/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.so/so/status_registered.expected @@ -1,5 +1,12 @@ +#domain + %s == "google.so" + +#domain_id + %s == "34544-sonic" + + #status - %s == ["serverDeleteProhibited", "serverTransferProhibited"] + %s == :registered #available? %s == false @@ -10,16 +17,69 @@ #created_on %s %CLASS{time} - %s %TIME{2011-01-24 02:22:24 UTC} + %s %TIME{2011-01-24 00:00:00 UTC} #updated_on %s %CLASS{time} - %s %TIME{2011-01-25 04:20:26 UTC} + %s %TIME{2022-12-23 09:26:14 UTC} #expires_on %s %CLASS{time} - %s %TIME{2014-01-24 02:22:24 UTC} + %s %TIME{2024-01-24 00:00:00 UTC} + +#registrar + %s %CLASS{registrar} + %s.name == "Mark Monitor" + +#registrant_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT + %s[0].id == "CAKlg-SfRgX" + %s[0].name == "Domain Administrator" + %s[0].organization == "Google LLC" + %s[0].address == "1600 Amphitheatre Parkway" + %s[0].city == "Mountain View" + %s[0].zip == "94043" + %s[0].state == "CA" + %s[0].country == nil + %s[0].country_code == "US" + %s[0].phone == "+1.6502530000" + %s[0].fax == "+1.6502530001" + %s[0].email == "dns-admin@google.com" + +#admin_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE + %s[0].id == "ns66c-kLSXy" + %s[0].name == "Domain Administrator" + %s[0].organization == "Google LLC" + %s[0].address == "1600 Amphitheatre Parkway" + %s[0].city == "Mountain View" + %s[0].zip == "94043" + %s[0].state == "CA" + %s[0].country == nil + %s[0].country_code == "US" + %s[0].phone == "+1.6502530000" + %s[0].fax == "+1.6502530001" + %s[0].email == "dns-admin@google.com" +#technical_contacts + %s[0].id == "J8ANM-4ZMch" + %s[0].name == "Domain Administrator" + %s[0].organization == "Google LLC" + %s[0].address == "1600 Amphitheatre Parkway" + %s[0].city == "Mountain View" + %s[0].zip == "94043" + %s[0].state == "CA" + %s[0].country == nil + %s[0].country_code == "US" + %s[0].phone == "+1.6502530000" + %s[0].fax == "+1.6502530001" + %s[0].email == "dns-admin@google.com" #nameservers %s %CLASS{array} diff --git a/spec/fixtures/responses/whois.nic.so/so/status_registered.txt b/spec/fixtures/responses/whois.nic.so/so/status_registered.txt index a39cf6f2..6ee78cc5 100644 --- a/spec/fixtures/responses/whois.nic.so/so/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.so/so/status_registered.txt @@ -1,22 +1,59 @@ -Whois Results for "google.so". - Domain Name: google.so -Creation Date: 2011-01-24T02:22:24.0Z -Last Updated On: 2011-01-25T04:20:26.0Z -Expiration Date: 2014-01-24T02:22:24.0Z -Sponsoring Registrar: MarkMonitor Inc. -Status: serverDeleteProhibited -Status: serverTransferProhibited -Registrant ID: mm-google -Admin Contact ID: mm-google -Billing Contact ID: so-mm-billing -Tech Contact ID: mm-google +Registry Domain ID: 34544-sonic +Registry WHOIS Server: whois.nic.so +Registrar URL: +Updated Date: 2022-12-23T09:26:14.78Z +Creation Date: 2011-01-24T00:00:00.0Z +Registry Expiry Date: 2024-01-24T00:00:00.0Z +Registrar Registration Expiration Date: 2024-01-24T00:00:00.0Z +Registrar: Mark Monitor +Registrar Abuse Contact Email: ccops@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Registry Registrant ID: CAKlg-SfRgX +Registrant Name: Domain Administrator +Registrant Organization: Google LLC +Registrant Street: 1600 Amphitheatre Parkway +Registrant City: Mountain View +Registrant State/Province: CA +Registrant Postal Code: 94043 +Registrant Country: US +Registrant Phone: +1.6502530000 +Registrant Fax: +1.6502530001 +Registrant Email: dns-admin@google.com +Registry Admin ID: ns66c-kLSXy +Admin Name: Domain Administrator +Admin Organization: Google LLC +Admin Street: 1600 Amphitheatre Parkway +Admin City: Mountain View +Admin State/Province: CA +Admin Postal Code: 94043 +Admin Country: US +Admin Phone: +1.6502530000 +Admin Fax: +1.6502530001 +Admin Email: dns-admin@google.com +Registry Tech ID: J8ANM-4ZMch +Tech Name: Domain Administrator +Tech Organization: Google LLC +Tech Street: 1600 Amphitheatre Parkway +Tech City: Mountain View +Tech State/Province: CA +Tech Postal Code: 94043 +Tech Country: US +Tech Phone: +1.6502530000 +Tech Fax: +1.6502530001 +Tech Email: dns-admin@google.com Name Server: ns1.google.com Name Server: ns2.google.com Name Server: ns3.google.com Name Server: ns4.google.com +DNSSEC: unsigned +>>> Last update of WHOIS database: 2023-01-16T18:45:24.287Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +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. This WHOIS database is provided by as a service to the internet community. -Access to WHOIS information is provided to assist persons in determining -the contents of a domain name registration record in the registry database. -The data in this record is provided for informational purposes only without -any accuracy guarantee. +The data is for information purposes only. We do 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. diff --git a/spec/fixtures/responses/whois.nic.space/space/status_available.expected b/spec/fixtures/responses/whois.nic.space/space/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.nic.space/space/status_available.expected +++ b/spec/fixtures/responses/whois.nic.space/space/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.nic.space/space/status_available.txt b/spec/fixtures/responses/whois.nic.space/space/status_available.txt index 09cc0f7e..31b21ab4 100644 --- a/spec/fixtures/responses/whois.nic.space/space/status_available.txt +++ b/spec/fixtures/responses/whois.nic.space/space/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-16T10:59:29.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.nic.space/space/status_registered.expected b/spec/fixtures/responses/whois.nic.space/space/status_registered.expected index fe2f63aa..673896cd 100644 --- a/spec/fixtures/responses/whois.nic.space/space/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.space/space/status_registered.expected @@ -1,5 +1,5 @@ #disclaimer - %s == "Access to the whois service is rate limited. For more information, please see https://registrar-console.centralnic.com/pub/whois_guidance." + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == ["ok https://icann.org/epp#ok"] + %s == :registered #available? %s == false @@ -21,97 +21,83 @@ #created_on %s %CLASS{time} - %s %TIME{2014-04-10T09:14:07.0Z} + %s %TIME{2014-04-10 09:14:07 UTC} #updated_on %s %CLASS{time} - %s %TIME{2015-04-04T00:14:21.0Z} + %s %TIME{2021-06-01 11:38:04 UTC} #expires_on %s %CLASS{time} - %s %TIME{2016-04-10T23:59:59.0Z} + %s %TIME{2022-04-10 23:59:59 UTC} #registrar %s %CLASS{registrar} %s.id == "9999" %s.name == "CentralNic Ltd" - %s.organization == nil - %s.url == nil + %s.url == "https://www.centralnic.com/" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "C11480" + %s[0].id == nil %s[0].name == "Domain Administrator" %s[0].organization == "CentralNic Ltd" %s[0].address == "35-39 Moorgate" %s[0].city == "London" %s[0].zip == "EC2R 6AR" %s[0].state == "" - %s[0].country == nil %s[0].country_code == "GB" %s[0].phone == "+44.2033880600" %s[0].fax == "+44.2033880601" %s[0].email == "domains@centralnic.com" - %s[0].created_on == nil - %s[0].updated_on == nil #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "C11480" + %s[0].id == nil %s[0].name == "Domain Administrator" %s[0].organization == "CentralNic Ltd" %s[0].address == "35-39 Moorgate" %s[0].city == "London" %s[0].zip == "EC2R 6AR" %s[0].state == "" - %s[0].country == nil %s[0].country_code == "GB" %s[0].phone == "+44.2033880600" %s[0].fax == "+44.2033880601" %s[0].email == "domains@centralnic.com" - %s[0].created_on == nil - %s[0].updated_on == nil #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "C11480" + %s[0].id == nil %s[0].name == "Domain Administrator" %s[0].organization == "CentralNic Ltd" %s[0].address == "35-39 Moorgate" %s[0].city == "London" %s[0].zip == "EC2R 6AR" %s[0].state == "" - %s[0].country == nil %s[0].country_code == "GB" %s[0].phone == "+44.2033880600" %s[0].fax == "+44.2033880601" %s[0].email == "domains@centralnic.com" - %s[0].created_on == nil - %s[0].updated_on == nil #nameservers %s %CLASS{array} - %s %SIZE{6} + %s %SIZE{4} %s[0] %CLASS{nameserver} - %s[0].name == "ns0.centralnic-dns.com" + %s[0].name == "a.nic.space" %s[1] %CLASS{nameserver} - %s[1].name == "ns1.centralnic-dns.com" + %s[1].name == "b.nic.space" %s[2] %CLASS{nameserver} - %s[2].name == "ns2.centralnic-dns.com" + %s[2].name == "e.nic.space" %s[3] %CLASS{nameserver} - %s[3].name == "ns3.centralnic-dns.com" - %s[4] %CLASS{nameserver} - %s[4].name == "ns4.centralnic-dns.com" - %s[5] %CLASS{nameserver} - %s[5].name == "ns5.centralnic-dns.com" + %s[3].name == "f.nic.space" diff --git a/spec/fixtures/responses/whois.nic.space/space/status_registered.txt b/spec/fixtures/responses/whois.nic.space/space/status_registered.txt index 66679c66..d61fad1e 100644 --- a/spec/fixtures/responses/whois.nic.space/space/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.space/space/status_registered.txt @@ -1,86 +1,80 @@ Domain Name: NIC.SPACE -Domain ID: D2361836-CNIC -WHOIS Server: whois.centralnic.com -Referral URL: http://www.centralnic.com/ -Updated Date: 2015-04-04T00:14:21.0Z +Registry Domain ID: D2361836-CNIC +Registrar WHOIS Server: whois.centralnic.com +Registrar URL: https://www.centralnic.com/ +Updated Date: 2021-06-01T11:38:04.0Z Creation Date: 2014-04-10T09:14:07.0Z -Registry Expiry Date: 2016-04-10T23:59:59.0Z -Sponsoring Registrar: CentralNic Ltd -Sponsoring Registrar IANA ID: 9999 -Domain Status: ok https://icann.org/epp#ok -Registrant ID: C11480 +Registry Expiry Date: 2022-04-10T23:59:59.0Z +Registrar: CentralNic Ltd +Registrar IANA ID: 9999 +Domain Status: serverTransferProhibited https://icann.org/epp#serverTransferProhibited +Domain Status: serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited +Domain Status: serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited +Domain Status: serverRenewProhibited https://icann.org/epp#serverRenewProhibited Registrant Name: Domain Administrator Registrant Organization: CentralNic Ltd Registrant Street: 35-39 Moorgate Registrant City: London -Registrant State/Province: +Registrant State/Province: Registrant Postal Code: EC2R 6AR Registrant Country: GB Registrant Phone: +44.2033880600 -Registrant Phone Ext: Registrant Fax: +44.2033880601 -Registrant Fax Ext: Registrant Email: domains@centralnic.com -Admin ID: C11480 Admin Name: Domain Administrator Admin Organization: CentralNic Ltd Admin Street: 35-39 Moorgate Admin City: London -Admin State/Province: +Admin State/Province: Admin Postal Code: EC2R 6AR Admin Country: GB Admin Phone: +44.2033880600 -Admin Phone Ext: Admin Fax: +44.2033880601 -Admin Fax Ext: Admin Email: domains@centralnic.com -Tech ID: C11480 Tech Name: Domain Administrator Tech Organization: CentralNic Ltd Tech Street: 35-39 Moorgate Tech City: London -Tech State/Province: +Tech State/Province: Tech Postal Code: EC2R 6AR Tech Country: GB Tech Phone: +44.2033880600 -Tech Phone Ext: Tech Fax: +44.2033880601 -Tech Fax Ext: Tech Email: domains@centralnic.com -Name Server: NS0.CENTRALNIC-DNS.COM -Name Server: NS1.CENTRALNIC-DNS.COM -Name Server: NS2.CENTRALNIC-DNS.COM -Name Server: NS3.CENTRALNIC-DNS.COM -Name Server: NS4.CENTRALNIC-DNS.COM -Name Server: NS5.CENTRALNIC-DNS.COM +Name Server: A.NIC.SPACE +Name Server: B.NIC.SPACE +Name Server: E.NIC.SPACE +Name Server: F.NIC.SPACE DNSSEC: unsigned -Billing ID: C11480 Billing Name: Domain Administrator Billing Organization: CentralNic Ltd Billing Street: 35-39 Moorgate Billing City: London -Billing State/Province: +Billing State/Province: Billing Postal Code: EC2R 6AR Billing Country: GB Billing Phone: +44.2033880600 -Billing Phone Ext: Billing Fax: +44.2033880601 -Billing Fax Ext: Billing Email: domains@centralnic.com ->>> Last update of WHOIS database: 2015-11-30T04:08:49.0Z <<< +Registrar Abuse Contact Email: ops@centralnic.com +Registrar Abuse Contact Phone: +44.2033880600 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-16T10:57:32.0Z <<< For more information on Whois status codes, please visit https://icann.org/epp -This whois service is provided by CentralNic Ltd and only contains +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in +ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - -Access to the whois service is rate limited. For more information, please -see https://registrar-console.centralnic.com/pub/whois_guidance. +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.nic.systems/systems/status_available.expected b/spec/fixtures/responses/whois.nic.systems/systems/status_available.expected new file mode 100644 index 00000000..9f23516a --- /dev/null +++ b/spec/fixtures/responses/whois.nic.systems/systems/status_available.expected @@ -0,0 +1,46 @@ +#domain + %s == nil + +#domain_id + %s == nil + + +#status + %s == :available + +#available? + %s == true + +#registered? + %s == false + + +#created_on + %s == nil + +#updated_on + %s == nil + +#expires_on + %s == nil + + +#registrar + %s == nil + +#registrant_contacts + %s %CLASS{array} + %s == [] + +#admin_contacts + %s %CLASS{array} + %s == [] + +#technical_contacts + %s %CLASS{array} + %s == [] + + +#nameservers + %s %CLASS{array} + %s == [] diff --git a/spec/fixtures/responses/whois.nic.systems/systems/status_available.txt b/spec/fixtures/responses/whois.nic.systems/systems/status_available.txt new file mode 100644 index 00000000..7296b291 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.systems/systems/status_available.txt @@ -0,0 +1,5 @@ +Domain not found. +>>> Last update of WHOIS database: 2023-03-14T15:25:05Z <<< + +Terms of Use: Identity Digital Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Identity Digital does not guarantee its accuracy. Users accessing the Identity Digital Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used to: a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Identity Digital or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Identity Digital Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a +proper legal basis for accessing the withheld data. Access to this data can be requested by submitting a request via the form found at https://www.identity.digital/about/policies/whois-layered-access/ Identity Digital Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. \ No newline at end of file diff --git a/spec/fixtures/responses/whois.nic.systems/systems/status_available_premium.expected b/spec/fixtures/responses/whois.nic.systems/systems/status_available_premium.expected new file mode 100644 index 00000000..9f23516a --- /dev/null +++ b/spec/fixtures/responses/whois.nic.systems/systems/status_available_premium.expected @@ -0,0 +1,46 @@ +#domain + %s == nil + +#domain_id + %s == nil + + +#status + %s == :available + +#available? + %s == true + +#registered? + %s == false + + +#created_on + %s == nil + +#updated_on + %s == nil + +#expires_on + %s == nil + + +#registrar + %s == nil + +#registrant_contacts + %s %CLASS{array} + %s == [] + +#admin_contacts + %s %CLASS{array} + %s == [] + +#technical_contacts + %s %CLASS{array} + %s == [] + + +#nameservers + %s %CLASS{array} + %s == [] diff --git a/spec/fixtures/responses/whois.nic.systems/systems/status_available_premium.txt b/spec/fixtures/responses/whois.nic.systems/systems/status_available_premium.txt new file mode 100644 index 00000000..c04eec43 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.systems/systems/status_available_premium.txt @@ -0,0 +1,6 @@ +Domain not found. +This premium domain is available for purchase. If you would like to make an offer, please contact platinums@identity.digital. +>>> Last update of WHOIS database: 2023-03-14T15:37:28Z <<< + +Terms of Use: Identity Digital Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Identity Digital does not guarantee its accuracy. Users accessing the Identity Digital Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used to: a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Identity Digital or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Identity Digital Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a +proper legal basis for accessing the withheld data. Access to this data can be requested by submitting a request via the form found at https://www.identity.digital/about/policies/whois-layered-access/ Identity Digital Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. \ No newline at end of file diff --git a/spec/fixtures/responses/whois.nic.systems/systems/status_registered.expected b/spec/fixtures/responses/whois.nic.systems/systems/status_registered.expected new file mode 100644 index 00000000..d7aa0874 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.systems/systems/status_registered.expected @@ -0,0 +1,99 @@ +#domain + %s == "donuts.systems" + +#domain_id + %s == "c73f4743486e4a1d8cb725fe0b0d26d7-DONUTS" + + +#status + %s == :registered + +#available? + %s == false + +#registered? + %s == true + + +#created_on + %s %CLASS{time} + %s %TIME{2014-02-28 17:19:53 GMT} + +#updated_on + %s %CLASS{time} + %s %TIME{2018-02-07 18:00:53 GMT} + +#expires_on + %s %CLASS{time} + %s %TIME{2024-02-28 17:19:53 GMT} + + +#registrar + %s %CLASS{registrar} + %s.id == "9998" + %s.name == "Donuts Internal (9998)" + %s.url == "https://identity.digital" + +#registrant_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "Donuts Inc." + %s[0].address == "REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "WA" + %s[0].country_code == "US" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." + +#admin_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "REDACTED FOR PRIVACY" + %s[0].address == "REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "REDACTED FOR PRIVACY" + %s[0].country_code == "REDACTED FOR PRIVACY" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." + +#technical_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "REDACTED FOR PRIVACY" + %s[0].address == "REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "REDACTED FOR PRIVACY" + %s[0].country_code == "REDACTED FOR PRIVACY" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." + + +#nameservers + %s %CLASS{array} + %s %SIZE{4} + %s[0] %CLASS{nameserver} + %s[0].name == "ns-1501.awsdns-59.org" + %s[1] %CLASS{nameserver} + %s[1].name == "ns-380.awsdns-47.com" + %s[2] %CLASS{nameserver} + %s[2].name == "ns-811.awsdns-37.net" + %s[3] %CLASS{nameserver} + %s[3].name == "ns-1597.awsdns-07.co.uk" diff --git a/spec/fixtures/responses/whois.nic.systems/systems/status_registered.txt b/spec/fixtures/responses/whois.nic.systems/systems/status_registered.txt new file mode 100644 index 00000000..5905bf3e --- /dev/null +++ b/spec/fixtures/responses/whois.nic.systems/systems/status_registered.txt @@ -0,0 +1,63 @@ +Domain Name: donuts.systems +Registry Domain ID: c73f4743486e4a1d8cb725fe0b0d26d7-DONUTS +Registrar WHOIS Server: whois.identitydigital.services +Registrar URL: https://identity.digital +Updated Date: 2018-02-07T18:00:53Z +Creation Date: 2014-02-28T17:19:53Z +Registry Expiry Date: 2024-02-28T17:19:53Z +Registrar: Donuts Internal (9998) +Registrar IANA ID: 9998 +Registrar Abuse Contact Email: +Registrar Abuse Contact Phone: +Domain Status: serverTransferProhibited https://icann.org/epp#serverTransferProhibited +Registry Registrant ID: REDACTED FOR PRIVACY +Registrant Name: REDACTED FOR PRIVACY +Registrant Organization: Donuts Inc. +Registrant Street: REDACTED FOR PRIVACY +Registrant City: REDACTED FOR PRIVACY +Registrant State/Province: WA +Registrant Postal Code: REDACTED FOR PRIVACY +Registrant Country: US +Registrant Phone: REDACTED FOR PRIVACY +Registrant Phone Ext: REDACTED FOR PRIVACY +Registrant Fax: REDACTED FOR PRIVACY +Registrant Fax Ext: REDACTED FOR PRIVACY +Registrant Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Admin ID: REDACTED FOR PRIVACY +Admin Name: REDACTED FOR PRIVACY +Admin Organization: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin City: REDACTED FOR PRIVACY +Admin State/Province: REDACTED FOR PRIVACY +Admin Postal Code: REDACTED FOR PRIVACY +Admin Country: REDACTED FOR PRIVACY +Admin Phone: REDACTED FOR PRIVACY +Admin Phone Ext: REDACTED FOR PRIVACY +Admin Fax: REDACTED FOR PRIVACY +Admin Fax Ext: REDACTED FOR PRIVACY +Admin Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Tech ID: REDACTED FOR PRIVACY +Tech Name: REDACTED FOR PRIVACY +Tech Organization: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech City: REDACTED FOR PRIVACY +Tech State/Province: REDACTED FOR PRIVACY +Tech Postal Code: REDACTED FOR PRIVACY +Tech Country: REDACTED FOR PRIVACY +Tech Phone: REDACTED FOR PRIVACY +Tech Phone Ext: REDACTED FOR PRIVACY +Tech Fax: REDACTED FOR PRIVACY +Tech Fax Ext: REDACTED FOR PRIVACY +Tech Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Name Server: ns-1501.awsdns-59.org +Name Server: ns-380.awsdns-47.com +Name Server: ns-811.awsdns-37.net +Name Server: ns-1597.awsdns-07.co.uk +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2023-03-14T15:32:19Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +Terms of Use: Identity Digital Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Identity Digital does not guarantee its accuracy. Users accessing the Identity Digital Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used to: a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Identity Digital or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Identity Digital Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a +proper legal basis for accessing the withheld data. Access to this data can be requested by submitting a request via the form found at https://www.identity.digital/about/policies/whois-layered-access/ Identity Digital Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. diff --git a/spec/fixtures/responses/whois.nic.systems/systems/status_reserved.expected b/spec/fixtures/responses/whois.nic.systems/systems/status_reserved.expected new file mode 100644 index 00000000..c446a92b --- /dev/null +++ b/spec/fixtures/responses/whois.nic.systems/systems/status_reserved.expected @@ -0,0 +1,46 @@ +#domain + %s == nil + +#domain_id + %s == nil + + +#status + %s == :reserved + +#available? + %s == false + +#registered? + %s == true + + +#created_on + %s == nil + +#updated_on + %s == nil + +#expires_on + %s == nil + + +#registrar + %s == nil + +#registrant_contacts + %s %CLASS{array} + %s == [] + +#admin_contacts + %s %CLASS{array} + %s == [] + +#technical_contacts + %s %CLASS{array} + %s == [] + + +#nameservers + %s %CLASS{array} + %s == [] diff --git a/spec/fixtures/responses/whois.nic.systems/systems/status_reserved.txt b/spec/fixtures/responses/whois.nic.systems/systems/status_reserved.txt new file mode 100644 index 00000000..09ca1d9a --- /dev/null +++ b/spec/fixtures/responses/whois.nic.systems/systems/status_reserved.txt @@ -0,0 +1,5 @@ +The registration of this domain is restricted, as it is protected by the Identity Digital DPML Brand Protection policy. Additional information can be found at https://www.identity.digital/what-we-do/brand-protection. +>>> Last update of WHOIS database: 2023-03-14T15:27:37Z <<< + +Terms of Use: Identity Digital Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Identity Digital does not guarantee its accuracy. Users accessing the Identity Digital Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used to: a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Identity Digital or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Identity Digital Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a +proper legal basis for accessing the withheld data. Access to this data can be requested by submitting a request via the form found at https://www.identity.digital/about/policies/whois-layered-access/ Identity Digital Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. diff --git a/spec/fixtures/responses/whois.nic.tc/tc/status_registered.expected b/spec/fixtures/responses/whois.nic.tc/tc/status_registered.expected index c6e776ae..fa465c04 100644 --- a/spec/fixtures/responses/whois.nic.tc/tc/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.tc/tc/status_registered.expected @@ -31,7 +31,6 @@ %s %CLASS{registrar} %s.id == "292" %s.name == "MarkMonitor" - %s.organization == nil %s.url == nil diff --git a/spec/fixtures/responses/whois.nic.tech/tech/status_available.expected b/spec/fixtures/responses/whois.nic.tech/tech/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.nic.tech/tech/status_available.expected +++ b/spec/fixtures/responses/whois.nic.tech/tech/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.nic.tech/tech/status_available.txt b/spec/fixtures/responses/whois.nic.tech/tech/status_available.txt index 09cc0f7e..5ce8c7fb 100644 --- a/spec/fixtures/responses/whois.nic.tech/tech/status_available.txt +++ b/spec/fixtures/responses/whois.nic.tech/tech/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-16T13:48:48.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.nic.tech/tech/status_registered.expected b/spec/fixtures/responses/whois.nic.tech/tech/status_registered.expected index ee412458..5bf4a7ce 100644 --- a/spec/fixtures/responses/whois.nic.tech/tech/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.tech/tech/status_registered.expected @@ -1,5 +1,5 @@ #disclaimer - %s == "Access to the whois service is rate limited. For more information, please see https://registrar-console.centralnic.com/pub/whois_guidance." + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == ["serverTransferProhibited https://icann.org/epp#serverTransferProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited", "clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited"] + %s == :registered #available? %s == false @@ -21,77 +21,54 @@ #created_on %s %CLASS{time} - %s %TIME{2015-07-29 00:00:00 UTC} + %s %TIME{2015-07-29 14:20:05 UTC} #updated_on %s %CLASS{time} - %s %TIME{2015-08-04 09:00:43 UTC} + %s %TIME{2021-08-25 01:16:43 UTC} #expires_on %s %CLASS{time} - %s %TIME{2017-07-29 23:59:59 UTC} + %s %TIME{2022-07-29 23:59:59 UTC} #registrar %s %CLASS{registrar} %s.id == "292" %s.name == "MarkMonitor, Inc (TLDs)" - %s.organization == nil - %s.url == nil + %s.url == "" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "mmr-87489" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" + %s[0].id == nil + %s[0].name == nil + %s[0].organization == "Google LLC" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil %s[0].state == "CA" %s[0].country == nil %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6502530001" - %s[0].email == "dns-admin@google.com" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "mmr-87489" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6502530001" - %s[0].email == "dns-admin@google.com" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "mmr-87489" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6502530001" - %s[0].email == "dns-admin@google.com" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #nameservers diff --git a/spec/fixtures/responses/whois.nic.tech/tech/status_registered.txt b/spec/fixtures/responses/whois.nic.tech/tech/status_registered.txt index 5f5e2ce1..3f1ccfcc 100644 --- a/spec/fixtures/responses/whois.nic.tech/tech/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.tech/tech/status_registered.txt @@ -1,65 +1,37 @@ Domain Name: GOOGLE.TECH -Domain ID: D9157622-CNIC -WHOIS Server: whois.markmonitor.com -Referral URL: https://www.markmonitor.com/ -Updated Date: 2015-08-04T09:00:43.0Z -Creation Date: 2015-07-29T00:00:00.0Z -Registry Expiry Date: 2017-07-29T23:59:59.0Z -Sponsoring Registrar: MarkMonitor, Inc (TLDs) -Sponsoring Registrar IANA ID: 292 -Domain Status: serverTransferProhibited https://icann.org/epp#serverTransferProhibited +Registry Domain ID: D9157622-CNIC +Registrar WHOIS Server: whois.markmonitor.com +Registrar URL: +Updated Date: 2021-08-25T01:16:43.0Z +Creation Date: 2015-07-29T14:20:05.0Z +Registry Expiry Date: 2022-07-29T23:59:59.0Z +Registrar: MarkMonitor, Inc (TLDs) +Registrar IANA ID: 292 Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited -Registrant ID: mmr-87489 -Registrant Name: DNS Admin -Registrant Organization: Google Inc. -Registrant Street: 1600 Amphitheatre Parkway -Registrant City: Mountain View +Registrant Organization: Google LLC Registrant State/Province: CA -Registrant Postal Code: 94043 Registrant Country: US -Registrant Phone: +1.6502530000 -Registrant Phone Ext: -Registrant Fax: +1.6502530001 -Registrant Fax Ext: -Registrant Email: dns-admin@google.com -Admin ID: mmr-87489 -Admin Name: DNS Admin -Admin Organization: Google Inc. -Admin Street: 1600 Amphitheatre Parkway -Admin City: Mountain View -Admin State/Province: CA -Admin Postal Code: 94043 -Admin Country: US -Admin Phone: +1.6502530000 -Admin Phone Ext: -Admin Fax: +1.6502530001 -Admin Fax Ext: -Admin Email: dns-admin@google.com -Tech ID: mmr-87489 -Tech Name: DNS Admin -Tech Organization: Google Inc. -Tech Street: 1600 Amphitheatre Parkway -Tech City: Mountain View -Tech State/Province: CA -Tech Postal Code: 94043 -Tech Country: US -Tech Phone: +1.6502530000 -Tech Phone Ext: -Tech Fax: +1.6502530001 -Tech Fax Ext: -Tech Email: dns-admin@google.com +Registrant Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Admin Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Tech Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. Name Server: NS2.GOOGLE.COM Name Server: NS4.GOOGLE.COM Name Server: NS3.GOOGLE.COM Name Server: NS1.GOOGLE.COM DNSSEC: unsigned ->>> Last update of WHOIS database: 2015-09-18T00:34:52.0Z <<< +Registrar Abuse Contact Email: ccops@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-16T13:48:38.0Z <<< For more information on Whois status codes, please visit https://icann.org/epp -This whois service is provided by CentralNic Ltd and only contains +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining @@ -67,8 +39,7 @@ ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - -Access to the whois service is rate limited. For more information, please -see https://registrar-console.centralnic.com/pub/whois_guidance. +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.nic.tl/tl/status_registered.expected b/spec/fixtures/responses/whois.nic.tl/tl/status_registered.expected index 030dcb90..c9f52cce 100644 --- a/spec/fixtures/responses/whois.nic.tl/tl/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.tl/tl/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor" - %s.organization == nil %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.nic.travel/travel/property_status_multiple.expected b/spec/fixtures/responses/whois.nic.travel/travel/property_status_multiple.expected deleted file mode 100644 index acf90754..00000000 --- a/spec/fixtures/responses/whois.nic.travel/travel/property_status_multiple.expected +++ /dev/null @@ -1,2 +0,0 @@ -#status - %s == ["clientDeleteProhibited", "clientTransferProhibited"] diff --git a/spec/fixtures/responses/whois.nic.travel/travel/property_status_multiple.txt b/spec/fixtures/responses/whois.nic.travel/travel/property_status_multiple.txt deleted file mode 100644 index cdd5698e..00000000 --- a/spec/fixtures/responses/whois.nic.travel/travel/property_status_multiple.txt +++ /dev/null @@ -1,83 +0,0 @@ -Domain Name: WEBCAMS.TRAVEL -Domain ID: D108042-TRAVEL -Sponsoring Registrar: SECURA GMBH -Sponsoring Registrar IANA ID: 111 -Domain Status: clientDeleteProhibited -Domain Status: clientTransferProhibited -Registrant ID: P-IRO86-YIHZ -Registrant Name: Ingo Oppermann -Registrant Organization: OPAG Online Promotion AG -Registrant Address1: Austr.37 -Registrant City: Vaduz -Registrant Postal Code: 9490 -Registrant Country: Liechtenstein -Registrant Country Code: LI -Registrant Phone Number: +41.442777501 -Registrant Facsimile Number: +41.763770216 -Registrant Email: ingo.oppermann@topin.travel -Administrative Contact ID: P-IRO86-YIHZ -Administrative Contact Name: Ingo Oppermann -Administrative Contact Organization: OPAG Online Promotion AG -Administrative Contact Address1: Austr.37 -Administrative Contact City: Vaduz -Administrative Contact Postal Code: 9490 -Administrative Contact Country: Liechtenstein -Administrative Contact Country Code: LI -Administrative Contact Phone Number: +41.442777501 -Administrative Contact Facsimile Number: +41.763770216 -Administrative Contact Email: ingo.oppermann@topin.travel -Billing Contact ID: P-HVO132-PVII -Billing Contact Name: Hans-Peter Oswald -Billing Contact Organization: Secura GmbH -Billing Contact Address1: Frohnhofweg 18 -Billing Contact City: Koeln -Billing Contact State/Province: NRW -Billing Contact Postal Code: 50858 -Billing Contact Country: Germany -Billing Contact Country Code: DE -Billing Contact Phone Number: +49.2212571213 -Billing Contact Facsimile Number: +49.221925227 -Billing Contact Email: secura@domainregistry.de -Technical Contact ID: P-HVO132-PVII -Technical Contact Name: Hans-Peter Oswald -Technical Contact Organization: Secura GmbH -Technical Contact Address1: Frohnhofweg 18 -Technical Contact City: Koeln -Technical Contact State/Province: NRW -Technical Contact Postal Code: 50858 -Technical Contact Country: Germany -Technical Contact Country Code: DE -Technical Contact Phone Number: +49.2212571213 -Technical Contact Facsimile Number: +49.221925227 -Technical Contact Email: secura@domainregistry.de -Name Server: FINKPLOYD.NRG4U.COM -Name Server: C00L3R.NETWORX.CH -Created by Registrar: SECURA GMBH -Last Updated by Registrar: SECURA GMBH -Domain Registration Date: Tue Aug 01 12:39:21 GMT 2006 -Domain Expiration Date: Tue Jul 31 23:59:59 GMT 2012 -Domain Last Updated Date: Mon Aug 30 12:52:13 GMT 2010 - ->>>> Whois database was last updated on: Tue Aug 23 16:43:08 GMT 2011 <<<< - -Tralliance, Inc., the Registry Operator for .travel, has collected this information -for the WHOIS database through an ICANN-Accredited Registrar. This information -is provided to you for informational purposes only and is designed to assist -persons in determining contents of a domain name registration record in the -Tralliance registry database. Tralliance makes this information available to you -"as is" and does not guarantee its accuracy. By submitting a WHOIS query, you -agree that you will use this data only for lawful purposes and that, under no -circumstances will you use this data: (1) to allow, enable, or otherwise -support the transmission of mass unsolicited, commercial advertising or -solicitations via direct mail, electronic mail, or by telephone; (2) in -contravention of any applicable data and privacy protection acts; or (3) to -enable high volume, automated, electronic processes that apply to the registry -(or its systems). Compilation, repackaging, dissemination, or other use of the -WHOIS database in its entirety, or of a substantial portion thereof, is not -allowed without Tralliance's prior written permission. Tralliance reserves the -right to modify or change these conditions at any time without prior or -subsequent notification of any kind. By executing this query, in any manner -whatsoever, you agree to abide by these terms. - -NOTE: FAILURE TO LOCATE A RECORD IN THE WHOIS DATABASE IS NOT INDICATIVE -OF THE AVAILABILITY OF A DOMAIN NAME. diff --git a/spec/fixtures/responses/whois.nic.travel/travel/property_status_single.expected b/spec/fixtures/responses/whois.nic.travel/travel/property_status_single.expected deleted file mode 100644 index ff6bdbc8..00000000 --- a/spec/fixtures/responses/whois.nic.travel/travel/property_status_single.expected +++ /dev/null @@ -1,2 +0,0 @@ -#status - %s == ["ok"] diff --git a/spec/fixtures/responses/whois.nic.travel/travel/property_status_single.txt b/spec/fixtures/responses/whois.nic.travel/travel/property_status_single.txt deleted file mode 100644 index c1874f58..00000000 --- a/spec/fixtures/responses/whois.nic.travel/travel/property_status_single.txt +++ /dev/null @@ -1,75 +0,0 @@ -Domain Name: TRAVEL.TRAVEL -Domain ID: D24096-TRAVEL -Sponsoring Registrar: NEUSTAR GATEWAY -Domain Status: ok -Registrant ID: TRALLIANCE -Registrant Name: Tralliance Corporation -Registrant Address1: 110 East Broward Blvd, 14th floor -Registrant City: Fort Lauderdale -Registrant State/Province: FL -Registrant Postal Code: 33301 -Registrant Country: United States -Registrant Country Code: US -Registrant Phone Number: +1.9547695999 -Registrant Email: info@tralliance.travel -Administrative Contact ID: TRALLIANCE -Administrative Contact Name: Tralliance Corporation -Administrative Contact Address1: 110 East Broward Blvd, 14th floor -Administrative Contact City: Fort Lauderdale -Administrative Contact State/Province: FL -Administrative Contact Postal Code: 33301 -Administrative Contact Country: United States -Administrative Contact Country Code: US -Administrative Contact Phone Number: +1.9547695999 -Administrative Contact Email: info@tralliance.travel -Billing Contact ID: TRALLIANCE -Billing Contact Name: Tralliance Corporation -Billing Contact Address1: 110 East Broward Blvd, 14th floor -Billing Contact City: Fort Lauderdale -Billing Contact State/Province: FL -Billing Contact Postal Code: 33301 -Billing Contact Country: United States -Billing Contact Country Code: US -Billing Contact Phone Number: +1.9547695999 -Billing Contact Email: info@tralliance.travel -Technical Contact ID: TRALLIANCE -Technical Contact Name: Tralliance Corporation -Technical Contact Address1: 110 East Broward Blvd, 14th floor -Technical Contact City: Fort Lauderdale -Technical Contact State/Province: FL -Technical Contact Postal Code: 33301 -Technical Contact Country: United States -Technical Contact Country Code: US -Technical Contact Phone Number: +1.9547695999 -Technical Contact Email: info@tralliance.travel -Name Server: NETSYS.COM -Name Server: NS01-MIA.THEGLOBE.COM -Created by Registrar: NEUSTAR GATEWAY -Last Updated by Registrar: NMUTONYI -Domain Registration Date: Tue Oct 04 21:44:27 GMT 2005 -Domain Expiration Date: Sun Oct 03 23:59:59 GMT 2010 -Domain Last Updated Date: Sun Jul 23 16:08:37 GMT 2006 - ->>>> Whois database was last updated on: Fri Dec 25 21:30:26 GMT 2009 <<<< - -Tralliance, Inc., the Registry Operator for .travel, has collected this information -for the WHOIS database through an ICANN-Accredited Registrar. This information -is provided to you for informational purposes only and is designed to assist -persons in determining contents of a domain name registration record in the -Tralliance registry database. Tralliance makes this information available to you -"as is" and does not guarantee its accuracy. By submitting a WHOIS query, you -agree that you will use this data only for lawful purposes and that, under no -circumstances will you use this data: (1) to allow, enable, or otherwise -support the transmission of mass unsolicited, commercial advertising or -solicitations via direct mail, electronic mail, or by telephone; (2) in -contravention of any applicable data and privacy protection acts; or (3) to -enable high volume, automated, electronic processes that apply to the registry -(or its systems). Compilation, repackaging, dissemination, or other use of the -WHOIS database in its entirety, or of a substantial portion thereof, is not -allowed without Tralliance's prior written permission. Tralliance reserves the -right to modify or change these conditions at any time without prior or -subsequent notification of any kind. By executing this query, in any manner -whatsoever, you agree to abide by these terms. - -NOTE: FAILURE TO LOCATE A RECORD IN THE WHOIS DATABASE IS NOT INDICATIVE -OF THE AVAILABILITY OF A DOMAIN NAME. diff --git a/spec/fixtures/responses/whois.nic.travel/travel/status_available.expected b/spec/fixtures/responses/whois.nic.travel/travel/status_available.expected index 9e655088..6bbcc28c 100644 --- a/spec/fixtures/responses/whois.nic.travel/travel/status_available.expected +++ b/spec/fixtures/responses/whois.nic.travel/travel/status_available.expected @@ -1,12 +1,12 @@ #domain - %s == "u34jedzcq.travel" + %s == nil #domain_id %s == nil #status - %s == nil + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.nic.travel/travel/status_available.txt b/spec/fixtures/responses/whois.nic.travel/travel/status_available.txt index eaf12066..f64ea3ea 100644 --- a/spec/fixtures/responses/whois.nic.travel/travel/status_available.txt +++ b/spec/fixtures/responses/whois.nic.travel/travel/status_available.txt @@ -1,25 +1,5 @@ -Not found: u34jedzcq.travel +Domain not found. +>>> Last update of WHOIS database: 2023-03-14T15:28:30Z <<< ->>>> Whois database was last updated on: Wed Jan 22 22:06:14 GMT 2014 <<<< - -Tralliance, Inc., the Registry Operator for .travel, has collected this information -for the WHOIS database through an ICANN-Accredited Registrar. This information -is provided to you for informational purposes only and is designed to assist -persons in determining contents of a domain name registration record in the -Tralliance registry database. Tralliance makes this information available to you -"as is" and does not guarantee its accuracy. By submitting a WHOIS query, you -agree that you will use this data only for lawful purposes and that, under no -circumstances will you use this data: (1) to allow, enable, or otherwise -support the transmission of mass unsolicited, commercial advertising or -solicitations via direct mail, electronic mail, or by telephone; (2) in -contravention of any applicable data and privacy protection acts; or (3) to -enable high volume, automated, electronic processes that apply to the registry -(or its systems). Compilation, repackaging, dissemination, or other use of the -WHOIS database in its entirety, or of a substantial portion thereof, is not -allowed without Tralliance's prior written permission. Tralliance reserves the -right to modify or change these conditions at any time without prior or -subsequent notification of any kind. By executing this query, in any manner -whatsoever, you agree to abide by these terms. - -NOTE: FAILURE TO LOCATE A RECORD IN THE WHOIS DATABASE IS NOT INDICATIVE -OF THE AVAILABILITY OF A DOMAIN NAME. +Terms of Use: Identity Digital Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Identity Digital does not guarantee its accuracy. Users accessing the Identity Digital Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used to: a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Identity Digital or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Identity Digital Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a +proper legal basis for accessing the withheld data. Access to this data can be requested by submitting a request via the form found at https://www.identity.digital/about/policies/whois-layered-access/ Identity Digital Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. diff --git a/spec/fixtures/responses/whois.nic.travel/travel/status_registered.expected b/spec/fixtures/responses/whois.nic.travel/travel/status_registered.expected index 11a8815f..b05c1b1a 100644 --- a/spec/fixtures/responses/whois.nic.travel/travel/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.travel/travel/status_registered.expected @@ -2,11 +2,11 @@ %s == "travel.travel" #domain_id - %s == "D24096-TRAVEL" + %s == "ff0390f7114c4ad99ac46ae56c00300f-DONUTS" #status - %s == ["ok"] + %s == :registered #available? %s == false @@ -21,78 +21,79 @@ #updated_on %s %CLASS{time} - %s %TIME{2013-09-18 15:13:32 GMT} + %s %TIME{2022-11-18 00:00:14 GMT} #expires_on %s %CLASS{time} - %s %TIME{2021-10-03 23:59:59 GMT} + %s %TIME{2023-10-03 23:59:59 GMT} #registrar %s %CLASS{registrar} - %s.id == nil - %s.name == "NEUSTAR GATEWAY" - + %s.id == "9998" + %s.name == "Donuts Internal (9998)" + %s.url == "https://identity.digital" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "TRALLIANCE" - %s[0].name == "Tralliance Corporation" - %s[0].organization == nil - %s[0].address == "110 East Broward Blvd, 14th floor" - %s[0].city == "Fort Lauderdale" - %s[0].zip == "33301" - %s[0].state == "FL" - %s[0].country == "United States" - %s[0].country_code == "US" - %s[0].phone == "+1.9547695999" - %s[0].fax == nil - %s[0].email == "info@tralliance.travel" + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "Donuts Inc." + %s[0].address == "REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "WA" + %s[0].country_code == "us" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "TRALLIANCE" - %s[0].name == "Tralliance Corporation" - %s[0].organization == nil - %s[0].address == "110 East Broward Blvd, 14th floor" - %s[0].city == "Fort Lauderdale" - %s[0].zip == "33301" - %s[0].state == "FL" - %s[0].country == "United States" - %s[0].country_code == "US" - %s[0].phone == "+1.9547695999" - %s[0].fax == nil - %s[0].email == "info@tralliance.travel" + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "REDACTED FOR PRIVACY" + %s[0].address == "REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "REDACTED FOR PRIVACY" + %s[0].country_code == "REDACTED FOR PRIVACY" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "TRALLIANCE" - %s[0].name == "Tralliance Corporation" - %s[0].organization == nil - %s[0].address == "110 East Broward Blvd, 14th floor" - %s[0].city == "Fort Lauderdale" - %s[0].zip == "33301" - %s[0].state == "FL" - %s[0].country == "United States" - %s[0].country_code == "US" - %s[0].phone == "+1.9547695999" - %s[0].fax == nil - %s[0].email == "info@tralliance.travel" + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "REDACTED FOR PRIVACY" + %s[0].address == "REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "REDACTED FOR PRIVACY" + %s[0].country_code == "REDACTED FOR PRIVACY" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #nameservers %s %CLASS{array} - %s %SIZE{2} + %s %SIZE{4} %s[0] %CLASS{nameserver} - %s[0].name == "ns01-mia.theglobe.com" + %s[0].name == "ns-1812.awsdns-34.co.uk" %s[1] %CLASS{nameserver} - %s[1].name == "netsys.com" + %s[1].name == "ns-458.awsdns-57.com" + %s[2] %CLASS{nameserver} + %s[2].name == "ns-935.awsdns-52.net" + %s[3] %CLASS{nameserver} + %s[3].name == "ns-1480.awsdns-57.org" diff --git a/spec/fixtures/responses/whois.nic.travel/travel/status_registered.txt b/spec/fixtures/responses/whois.nic.travel/travel/status_registered.txt index d94bb85d..974ec79f 100644 --- a/spec/fixtures/responses/whois.nic.travel/travel/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.travel/travel/status_registered.txt @@ -1,76 +1,63 @@ -Domain Name: TRAVEL.TRAVEL -Domain ID: D24096-TRAVEL -Sponsoring Registrar: NEUSTAR GATEWAY -Registrar URL (registration services): whois.neustar.us -Domain Status: ok -Registrant ID: TRALLIANCE -Registrant Name: Tralliance Corporation -Registrant Address1: 110 East Broward Blvd, 14th floor -Registrant City: Fort Lauderdale -Registrant State/Province: FL -Registrant Postal Code: 33301 -Registrant Country: United States -Registrant Country Code: US -Registrant Phone Number: +1.9547695999 -Registrant Email: info@tralliance.travel -Administrative Contact ID: TRALLIANCE -Administrative Contact Name: Tralliance Corporation -Administrative Contact Address1: 110 East Broward Blvd, 14th floor -Administrative Contact City: Fort Lauderdale -Administrative Contact State/Province: FL -Administrative Contact Postal Code: 33301 -Administrative Contact Country: United States -Administrative Contact Country Code: US -Administrative Contact Phone Number: +1.9547695999 -Administrative Contact Email: info@tralliance.travel -Billing Contact ID: TRALLIANCE -Billing Contact Name: Tralliance Corporation -Billing Contact Address1: 110 East Broward Blvd, 14th floor -Billing Contact City: Fort Lauderdale -Billing Contact State/Province: FL -Billing Contact Postal Code: 33301 -Billing Contact Country: United States -Billing Contact Country Code: US -Billing Contact Phone Number: +1.9547695999 -Billing Contact Email: info@tralliance.travel -Technical Contact ID: TRALLIANCE -Technical Contact Name: Tralliance Corporation -Technical Contact Address1: 110 East Broward Blvd, 14th floor -Technical Contact City: Fort Lauderdale -Technical Contact State/Province: FL -Technical Contact Postal Code: 33301 -Technical Contact Country: United States -Technical Contact Country Code: US -Technical Contact Phone Number: +1.9547695999 -Technical Contact Email: info@tralliance.travel -Name Server: NS01-MIA.THEGLOBE.COM -Name Server: NETSYS.COM -Created by Registrar: NEUSTAR GATEWAY -Last Updated by Registrar: AHANACEK -Domain Registration Date: Tue Oct 04 21:44:27 GMT 2005 -Domain Expiration Date: Sun Oct 03 23:59:59 GMT 2021 -Domain Last Updated Date: Wed Sep 18 15:13:32 GMT 2013 +Domain Name: travel.travel +Registry Domain ID: ff0390f7114c4ad99ac46ae56c00300f-DONUTS +Registrar WHOIS Server: whois.identitydigital.services +Registrar URL: https://identity.digital +Updated Date: 2022-11-18T00:00:14Z +Creation Date: 2005-10-04T21:44:27Z +Registry Expiry Date: 2023-10-03T23:59:59Z +Registrar: Donuts Internal (9998) +Registrar IANA ID: 9998 +Registrar Abuse Contact Email: +Registrar Abuse Contact Phone: +Domain Status: ok https://icann.org/epp#ok +Registry Registrant ID: REDACTED FOR PRIVACY +Registrant Name: REDACTED FOR PRIVACY +Registrant Organization: Donuts Inc. +Registrant Street: REDACTED FOR PRIVACY +Registrant City: REDACTED FOR PRIVACY +Registrant State/Province: WA +Registrant Postal Code: REDACTED FOR PRIVACY +Registrant Country: us +Registrant Phone: REDACTED FOR PRIVACY +Registrant Phone Ext: REDACTED FOR PRIVACY +Registrant Fax: REDACTED FOR PRIVACY +Registrant Fax Ext: REDACTED FOR PRIVACY +Registrant Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Admin ID: REDACTED FOR PRIVACY +Admin Name: REDACTED FOR PRIVACY +Admin Organization: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin City: REDACTED FOR PRIVACY +Admin State/Province: REDACTED FOR PRIVACY +Admin Postal Code: REDACTED FOR PRIVACY +Admin Country: REDACTED FOR PRIVACY +Admin Phone: REDACTED FOR PRIVACY +Admin Phone Ext: REDACTED FOR PRIVACY +Admin Fax: REDACTED FOR PRIVACY +Admin Fax Ext: REDACTED FOR PRIVACY +Admin Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Tech ID: REDACTED FOR PRIVACY +Tech Name: REDACTED FOR PRIVACY +Tech Organization: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech City: REDACTED FOR PRIVACY +Tech State/Province: REDACTED FOR PRIVACY +Tech Postal Code: REDACTED FOR PRIVACY +Tech Country: REDACTED FOR PRIVACY +Tech Phone: REDACTED FOR PRIVACY +Tech Phone Ext: REDACTED FOR PRIVACY +Tech Fax: REDACTED FOR PRIVACY +Tech Fax Ext: REDACTED FOR PRIVACY +Tech Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Name Server: ns-1812.awsdns-34.co.uk +Name Server: ns-458.awsdns-57.com +Name Server: ns-935.awsdns-52.net +Name Server: ns-1480.awsdns-57.org +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2023-03-14T15:28:47Z <<< ->>>> Whois database was last updated on: Tue Feb 18 20:31:29 GMT 2014 <<<< +For more information on Whois status codes, please visit https://icann.org/epp -Tralliance, Inc., the Registry Operator for .travel, has collected this information -for the WHOIS database through an ICANN-Accredited Registrar. This information -is provided to you for informational purposes only and is designed to assist -persons in determining contents of a domain name registration record in the -Tralliance registry database. Tralliance makes this information available to you -"as is" and does not guarantee its accuracy. By submitting a WHOIS query, you -agree that you will use this data only for lawful purposes and that, under no -circumstances will you use this data: (1) to allow, enable, or otherwise -support the transmission of mass unsolicited, commercial advertising or -solicitations via direct mail, electronic mail, or by telephone; (2) in -contravention of any applicable data and privacy protection acts; or (3) to -enable high volume, automated, electronic processes that apply to the registry -(or its systems). Compilation, repackaging, dissemination, or other use of the -WHOIS database in its entirety, or of a substantial portion thereof, is not -allowed without Tralliance's prior written permission. Tralliance reserves the -right to modify or change these conditions at any time without prior or -subsequent notification of any kind. By executing this query, in any manner -whatsoever, you agree to abide by these terms. - -NOTE: FAILURE TO LOCATE A RECORD IN THE WHOIS DATABASE IS NOT INDICATIVE -OF THE AVAILABILITY OF A DOMAIN NAME. +Terms of Use: Identity Digital Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Identity Digital does not guarantee its accuracy. Users accessing the Identity Digital Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used to: a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Identity Digital or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Identity Digital Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a +proper legal basis for accessing the withheld data. Access to this data can be requested by submitting a request via the form found at https://www.identity.digital/about/policies/whois-layered-access/ Identity Digital Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. diff --git a/spec/fixtures/responses/whois.nic.uk/uk/response_throttled.txt b/spec/fixtures/responses/whois.nic.uk/uk/response_throttled.txt index e567c804..68f54363 100644 --- a/spec/fixtures/responses/whois.nic.uk/uk/response_throttled.txt +++ b/spec/fixtures/responses/whois.nic.uk/uk/response_throttled.txt @@ -1,9 +1,20 @@ - Error for "google.co.uk". +Error for "google.co.uk". - The WHOIS query quota for 127.0.0.1 has been exceeded - and will be replenished in 50 seconds. +the WHOIS query quota for 127.0.0.1 has been exceeded +and will be replenished in 0.61 seconds - WHOIS lookup made at 20:30:08 08-Jan-2010 +WHOIS lookup made at 13:11:09 16-Nov-2021 -- - \ No newline at end of file +This WHOIS information is provided for free by Nominet UK the central registry +for .uk domain names. This information and the .uk WHOIS are: + + Copyright Nominet UK 1996 - 2021. + +You may not access the .uk WHOIS or use any data from it except as permitted +by the terms of use available in full at https://www.nominet.uk/whoisterms, +which includes restrictions on: (A) use of the data for advertising, or its +repackaging, recompilation, redistribution or reuse (B) obscuring, removing +or hiding any or all of this notice and (C) exceeding query rate or volume +limits. The data is provided on an 'as-is' basis and may lag behind the +register. Access may be withdrawn or restricted at any time. \ No newline at end of file diff --git a/spec/fixtures/responses/whois.nic.wf/wf/status_registered.expected b/spec/fixtures/responses/whois.nic.wf/wf/status_registered.expected index 34e5f789..e2ae24c5 100644 --- a/spec/fixtures/responses/whois.nic.wf/wf/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.wf/wf/status_registered.expected @@ -10,15 +10,15 @@ #created_on %s %CLASS{time} - %s %TIME{1995-01-01} + %s %TIME{1994-12-31 23:00:00 UTC} #updated_on %s %CLASS{time} - %s %TIME{2016-12-31} + %s %TIME{2018-12-31 23:33:39 UTC} #expires_on %s %CLASS{time} - %s %TIME{2017-12-31} + %s %TIME{2019-12-31 23:00:00 UTC} #registrant_contacts @@ -29,16 +29,16 @@ %s[0].id == "AEFT2-FRNIC" %s[0].name == nil %s[0].organization == "Afnic (Wallis et Futuna - TOM)" - %s[0].address == "immeuble international\n2, rue Stephenson\nMontigny-Le-Bretonneux\n78181 Saint Quentin en Yvelines Cedex" + %s[0].address == "immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny le Bretonneux" %s[0].city == nil %s[0].zip == nil %s[0].state == nil %s[0].country == nil %s[0].country_code == "FR" - %s[0].phone == nil - %s[0].fax == nil - %s[0].email == nil - %s[0].updated_on %TIME{2008-10-09 00:00:00 UTC} + %s[0].phone == "+33 1 39 30 83 00" + %s[0].fax == "+33 1 39 30 83 01" + %s[0].email == "support@afnic.fr" + %s[0].updated_on %TIME{2017-07-17 12:41:18 UTC} #admin_contacts %s %CLASS{array} @@ -48,7 +48,7 @@ %s[0].id == "NFC1-FRNIC" %s[0].name == "NIC France Contact" %s[0].organization == "AFNIC" - %s[0].address == "immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex" + %s[0].address == "immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux" %s[0].city == nil %s[0].zip == nil %s[0].state == nil @@ -57,7 +57,7 @@ %s[0].phone == "+33 1 39 30 83 00" %s[0].fax == nil %s[0].email == "hostmaster@nic.fr" - %s[0].updated_on %TIME{2005-08-23 00:00:00 UTC} + %s[0].updated_on %TIME{2005-08-23 16:13:17 UTC} #technical_contacts %s %CLASS{array} @@ -67,7 +67,7 @@ %s[0].id == "NFC1-FRNIC" %s[0].name == "NIC France Contact" %s[0].organization == "AFNIC" - %s[0].address == "immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex" + %s[0].address == "immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux" %s[0].city == nil %s[0].zip == nil %s[0].state == nil @@ -76,7 +76,7 @@ %s[0].phone == "+33 1 39 30 83 00" %s[0].fax == nil %s[0].email == "hostmaster@nic.fr" - %s[0].updated_on %TIME{2005-08-23 00:00:00 UTC} + %s[0].updated_on %TIME{2005-08-23 16:13:17 UTC} #nameservers @@ -84,13 +84,7 @@ %s %SIZE{3} %s[0] %CLASS{nameserver} %s[0].name == "ns1.nic.fr" - %s[0].ipv4 == "192.134.4.1" - %s[0].ipv6 == "2001:67c:2218:2::4:1" %s[1] %CLASS{nameserver} %s[1].name == "ns2.nic.fr" - %s[1].ipv4 == "192.93.0.4" - %s[1].ipv6 == "2001:660:3005:1::1:2" %s[2] %CLASS{nameserver} %s[2].name == "ns3.nic.fr" - %s[2].ipv4 == "192.134.0.49" - %s[2].ipv6 == "2001:660:3006:1::1:1" diff --git a/spec/fixtures/responses/whois.nic.wf/wf/status_registered.txt b/spec/fixtures/responses/whois.nic.wf/wf/status_registered.txt index 199a6190..3be37f5a 100644 --- a/spec/fixtures/responses/whois.nic.wf/wf/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.wf/wf/status_registered.txt @@ -1,9 +1,7 @@ -[Querying whois.nic.wf] -[whois.nic.wf] %% %% This is the AFNIC Whois server. %% -%% complete date format : DD/MM/YYYY +%% complete date format : YYYY-MM-DDThh:mm:ssZ %% short date format : DD/MM %% version : FRNIC-2.5 %% @@ -12,7 +10,7 @@ %% %% Use '-h' option to obtain more information about this service. %% -%% [0.0.0.0 REQUEST] >> nic.wf +%% [209.153.220.50 REQUEST] >> nic.wf %% %% RL Net [##########] - RL IP [#########.] %% @@ -31,45 +29,79 @@ remarks: Please email mailto: nic@nic.fr remarks: Spam mailto: abuse@nic.fr remarks: Test mailto: ping@nic.fr registrar: AFNIC registry -Expiry Date: 31/12/2017 -created: 01/01/1995 -last-update: 31/12/2016 +Expiry Date: 2019-12-31T23:00:00Z +created: 1994-12-31T23:00:00Z +last-update: 2018-12-31T23:33:39Z source: FRNIC ns-list: NSL1-FRNIC -nserver: ns1.nic.fr [192.134.4.1 2001:67c:2218:2::4:1] -nserver: ns2.nic.fr [192.93.0.4 2001:660:3005:1::1:2] -nserver: ns3.nic.fr [192.134.0.49 2001:660:3006:1::1:1] +nserver: ns1.nic.fr +nserver: ns2.nic.fr +nserver: ns3.nic.fr source: FRNIC registrar: AFNIC registry type: Isp Option 2 anonymous: YES -registered: 22/05/1997 +registered: 1997-05-22T12:00:00Z source: FRNIC nic-hdl: AEFT2-FRNIC type: ORGANIZATION contact: Afnic (Wallis et Futuna - TOM) -address: immeuble international -address: 2, rue Stephenson -address: Montigny-Le-Bretonneux -address: 78181 Saint Quentin en Yvelines Cedex +address: immeuble le Stephenson +address: 1, rue Stephenson +address: Hall A2 - 3eme etage +address: 78180 Montigny le Bretonneux country: FR +phone: +33 1 39 30 83 00 +fax-no: +33 1 39 30 83 01 +e-mail: support@afnic.fr +registrar: AFNIC registry +changed: 2017-07-17T12:41:18Z nic@nic.fr +anonymous: NO +obsoleted: NO +eligstatus: not identified +reachstatus: not identified +source: FRNIC + +nic-hdl: NFC1-FRNIC +type: ROLE +contact: NIC France Contact +address: AFNIC +address: immeuble le Stephenson +address: 1, rue Stephenson +address: Hall A2 - 3eme etage +address: 78180 Montigny-Le-Bretonneux +country: FR +phone: +33 1 39 30 83 00 +e-mail: hostmaster@nic.fr +admin-c: NFC1-FRNIC +tech-c: PL12-FRNIC +tech-c: JP-FRNIC +tech-c: MS1887-FRNIC +tech-c: VL-FRNIC +tech-c: PR1249-FRNIC +tech-c: PV827-FRNIC +tech-c: GO661-FRNIC +tech-c: MS-FRNIC +tech-c: AI1-FRNIC registrar: AFNIC registry -changed: 09/10/2008 whoismaster@nic.fr +changed: 2005-08-23T16:13:17Z hostmaster@nic.fr anonymous: NO obsoleted: NO +eligstatus: not identified +reachstatus: not identified source: FRNIC nic-hdl: NFC1-FRNIC type: ROLE contact: NIC France Contact address: AFNIC -address: immeuble international -address: 2, rue Stephenson -address: Montigny le Bretonneux -address: 78181 Saint Quentin en Yvelines Cedex +address: immeuble le Stephenson +address: 1, rue Stephenson +address: Hall A2 - 3eme etage +address: 78180 Montigny-Le-Bretonneux country: FR phone: +33 1 39 30 83 00 e-mail: hostmaster@nic.fr @@ -84,8 +116,10 @@ tech-c: GO661-FRNIC tech-c: MS-FRNIC tech-c: AI1-FRNIC registrar: AFNIC registry -changed: 23/08/2005 hostmaster@nic.fr +changed: 2005-08-23T16:13:17Z hostmaster@nic.fr anonymous: NO obsoleted: NO +eligstatus: not identified +reachstatus: not identified source: FRNIC diff --git a/spec/fixtures/responses/whois.nic.world/world/status_available.expected b/spec/fixtures/responses/whois.nic.world/world/status_available.expected new file mode 100644 index 00000000..9f23516a --- /dev/null +++ b/spec/fixtures/responses/whois.nic.world/world/status_available.expected @@ -0,0 +1,46 @@ +#domain + %s == nil + +#domain_id + %s == nil + + +#status + %s == :available + +#available? + %s == true + +#registered? + %s == false + + +#created_on + %s == nil + +#updated_on + %s == nil + +#expires_on + %s == nil + + +#registrar + %s == nil + +#registrant_contacts + %s %CLASS{array} + %s == [] + +#admin_contacts + %s %CLASS{array} + %s == [] + +#technical_contacts + %s %CLASS{array} + %s == [] + + +#nameservers + %s %CLASS{array} + %s == [] diff --git a/spec/fixtures/responses/whois.nic.world/world/status_available.txt b/spec/fixtures/responses/whois.nic.world/world/status_available.txt new file mode 100644 index 00000000..cad3a491 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.world/world/status_available.txt @@ -0,0 +1,5 @@ +Domain not found. +>>> Last update of WHOIS database: 2023-03-14T15:29:14Z <<< + +Terms of Use: Identity Digital Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Identity Digital does not guarantee its accuracy. Users accessing the Identity Digital Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used to: a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Identity Digital or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Identity Digital Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a +proper legal basis for accessing the withheld data. Access to this data can be requested by submitting a request via the form found at https://www.identity.digital/about/policies/whois-layered-access/ Identity Digital Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. diff --git a/spec/fixtures/responses/whois.nic.world/world/status_registered.expected b/spec/fixtures/responses/whois.nic.world/world/status_registered.expected new file mode 100644 index 00000000..84acae52 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.world/world/status_registered.expected @@ -0,0 +1,95 @@ +#domain + %s == "solex.world" + +#domain_id + %s == "0bd73f47b47f436cac3ee5b20df18ef5-DONUTS" + + +#status + %s == :registered + +#available? + %s == false + +#registered? + %s == true + + +#created_on + %s %CLASS{time} + %s %TIME{2017-10-03 11:12:14 GMT} + +#updated_on + %s %CLASS{time} + %s %TIME{2022-10-06 14:00:13 GMT} + +#expires_on + %s %CLASS{time} + %s %TIME{2023-10-03 11:12:14 GMT} + + +#registrar + %s %CLASS{registrar} + %s.id == "433" + %s.name == "OVH SAS" + %s.url == "http://www.ovh.com" + +#registrant_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "" + %s[0].address == "REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "" + %s[0].country_code == "FR" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." + +#admin_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "REDACTED FOR PRIVACY" + %s[0].address == "REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "REDACTED FOR PRIVACY" + %s[0].country_code == "REDACTED FOR PRIVACY" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." + +#technical_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "REDACTED FOR PRIVACY" + %s[0].address == "REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "REDACTED FOR PRIVACY" + %s[0].country_code == "REDACTED FOR PRIVACY" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." + + +#nameservers + %s %CLASS{array} + %s %SIZE{2} + %s[0] %CLASS{nameserver} + %s[0].name == "dns104.ovh.net" + %s[1] %CLASS{nameserver} + %s[1].name == "ns104.ovh.net" diff --git a/spec/fixtures/responses/whois.nic.world/world/status_registered.txt b/spec/fixtures/responses/whois.nic.world/world/status_registered.txt new file mode 100644 index 00000000..e40ca172 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.world/world/status_registered.txt @@ -0,0 +1,62 @@ +Domain Name: solex.world +Registry Domain ID: 0bd73f47b47f436cac3ee5b20df18ef5-DONUTS +Registrar WHOIS Server: whois.ovh.com +Registrar URL: http://www.ovh.com +Updated Date: 2022-10-06T14:00:13Z +Creation Date: 2017-10-03T11:12:14Z +Registry Expiry Date: 2023-10-03T11:12:14Z +Registrar: OVH SAS +Registrar IANA ID: 433 +Registrar Abuse Contact Email: abuse@ovh.net +Registrar Abuse Contact Phone: +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Registry Registrant ID: REDACTED FOR PRIVACY +Registrant Name: REDACTED FOR PRIVACY +Registrant Organization: +Registrant Street: REDACTED FOR PRIVACY +Registrant City: REDACTED FOR PRIVACY +Registrant State/Province: +Registrant Postal Code: REDACTED FOR PRIVACY +Registrant Country: FR +Registrant Phone: REDACTED FOR PRIVACY +Registrant Phone Ext: REDACTED FOR PRIVACY +Registrant Fax: REDACTED FOR PRIVACY +Registrant Fax Ext: REDACTED FOR PRIVACY +Registrant Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Admin ID: REDACTED FOR PRIVACY +Admin Name: REDACTED FOR PRIVACY +Admin Organization: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin City: REDACTED FOR PRIVACY +Admin State/Province: REDACTED FOR PRIVACY +Admin Postal Code: REDACTED FOR PRIVACY +Admin Country: REDACTED FOR PRIVACY +Admin Phone: REDACTED FOR PRIVACY +Admin Phone Ext: REDACTED FOR PRIVACY +Admin Fax: REDACTED FOR PRIVACY +Admin Fax Ext: REDACTED FOR PRIVACY +Admin Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Tech ID: REDACTED FOR PRIVACY +Tech Name: REDACTED FOR PRIVACY +Tech Organization: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech City: REDACTED FOR PRIVACY +Tech State/Province: REDACTED FOR PRIVACY +Tech Postal Code: REDACTED FOR PRIVACY +Tech Country: REDACTED FOR PRIVACY +Tech Phone: REDACTED FOR PRIVACY +Tech Phone Ext: REDACTED FOR PRIVACY +Tech Fax: REDACTED FOR PRIVACY +Tech Fax Ext: REDACTED FOR PRIVACY +Tech Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Name Server: dns104.ovh.net +Name Server: ns104.ovh.net +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2023-03-14T15:29:28Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +Terms of Use: Identity Digital Inc. provides this Whois service for information purposes, and to assist persons in obtaining information about or related to a domain name registration record. Identity Digital does not guarantee its accuracy. Users accessing the Identity Digital Whois service agree to use the data only for lawful purposes, and under no circumstances may this data be used to: a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the registrar's own existing customers and b) enable high volume, automated, electronic processes that send queries or data to the systems of Identity Digital or any ICANN-accredited registrar, except as reasonably necessary to register domain names or modify existing registrations. When using the Identity Digital Whois service, please consider the following: The Whois service is not a replacement for standard EPP commands to the SRS service. Whois is not considered authoritative for registered domain objects. The Whois service may be scheduled for downtime during production or OT&E maintenance periods. Queries to the Whois services are throttled. If too many queries are received from a single IP address within a specified time, the service will begin to reject further queries for a period of time to prevent disruption of Whois service access. Abuse of the Whois system through data mining is mitigated by detecting and limiting bulk query access from single sources. Where applicable, the presence of a [Non-Public Data] tag indicates that such data is not made publicly available due to applicable data privacy laws or requirements. Should you wish to contact the registrant, please refer to the Whois records available through the registrar URL listed above. Access to non-public data may be provided, upon request, where it can be reasonably confirmed that the requester holds a specific legitimate interest and a +proper legal basis for accessing the withheld data. Access to this data can be requested by submitting a request via the form found at https://www.identity.digital/about/policies/whois-layered-access/ Identity Digital Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. diff --git a/spec/fixtures/responses/whois.nic.xxx/xxx/status_available.expected b/spec/fixtures/responses/whois.nic.xxx/xxx/status_available.expected index 31e4bf0c..851c6127 100644 --- a/spec/fixtures/responses/whois.nic.xxx/xxx/status_available.expected +++ b/spec/fixtures/responses/whois.nic.xxx/xxx/status_available.expected @@ -1,6 +1,5 @@ #disclaimer - %s == nil - + %s == "The Service is provided so that you may look up certain information in relation to domain names that we store in our database. Use of the Service is subject to our policies, in particular you should familiarise yourself with our Acceptable Use Policy and our Privacy Policy. The information provided by this Service is 'as is' and we make no guarantee of it its accuracy. You agree that by your use of the Service you will not use the information provided by us in a way which is: * inconsistent with any applicable laws, * inconsistent with any policy issued by us, * to generate, distribute, or facilitate unsolicited mass email, promotions, advertisings or other solicitations, or * to enable high volume, automated, electronic processes that apply to the Service. You acknowledge that: * a response from the Service that a domain name is 'available', does not guarantee that is able to be registered, * we may restrict, suspend or terminate your access to the Service at any time, and * the copying, compilation, repackaging, dissemination or other use of the information provided by the Service is not permitted, without our express written consent. This information has been prepared and published in order to represent administrative and technical management of the TLD. We may discontinue or amend any part or the whole of these Terms of Service from time to time at our absolute discretion." #domain %s == nil @@ -10,7 +9,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.nic.xxx/xxx/status_available.txt b/spec/fixtures/responses/whois.nic.xxx/xxx/status_available.txt index 679aadb9..5f7c8633 100644 --- a/spec/fixtures/responses/whois.nic.xxx/xxx/status_available.txt +++ b/spec/fixtures/responses/whois.nic.xxx/xxx/status_available.txt @@ -1 +1,26 @@ -NOT FOUND +No Data Found +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-09T21:50:19Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +The Service is provided so that you may look up certain information in relation to domain names that we store in our database. + +Use of the Service is subject to our policies, in particular you should familiarise yourself with our Acceptable Use Policy and our Privacy Policy. + +The information provided by this Service is 'as is' and we make no guarantee of it its accuracy. + +You agree that by your use of the Service you will not use the information provided by us in a way which is: +* inconsistent with any applicable laws, +* inconsistent with any policy issued by us, +* to generate, distribute, or facilitate unsolicited mass email, promotions, advertisings or other solicitations, or +* to enable high volume, automated, electronic processes that apply to the Service. + +You acknowledge that: +* a response from the Service that a domain name is 'available', does not guarantee that is able to be registered, +* we may restrict, suspend or terminate your access to the Service at any time, and +* the copying, compilation, repackaging, dissemination or other use of the information provided by the Service is not permitted, without our express written consent. + +This information has been prepared and published in order to represent administrative and technical management of the TLD. + +We may discontinue or amend any part or the whole of these Terms of Service from time to time at our absolute discretion. diff --git a/spec/fixtures/responses/whois.nic.xxx/xxx/status_registered.expected b/spec/fixtures/responses/whois.nic.xxx/xxx/status_registered.expected index b13fe02e..820c03e0 100644 --- a/spec/fixtures/responses/whois.nic.xxx/xxx/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.xxx/xxx/status_registered.expected @@ -1,16 +1,16 @@ #disclaimer - %s == "Access to .XXX ICM REGISTRY WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the ICM registry database. The data in this record is provided by ICM Registry for informational purposes only, and ICM does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. ICM reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy." + %s == "The Service is provided so that you may look up certain information in relation to domain names that we store in our database. Use of the Service is subject to our policies, in particular you should familiarise yourself with our Acceptable Use Policy and our Privacy Policy. The information provided by this Service is 'as is' and we make no guarantee of it its accuracy. You agree that by your use of the Service you will not use the information provided by us in a way which is: * inconsistent with any applicable laws, * inconsistent with any policy issued by us, * to generate, distribute, or facilitate unsolicited mass email, promotions, advertisings or other solicitations, or * to enable high volume, automated, electronic processes that apply to the Service. You acknowledge that: * a response from the Service that a domain name is 'available', does not guarantee that is able to be registered, * we may restrict, suspend or terminate your access to the Service at any time, and * the copying, compilation, repackaging, dissemination or other use of the information provided by the Service is not permitted, without our express written consent. This information has been prepared and published in order to represent administrative and technical management of the TLD. We may discontinue or amend any part or the whole of these Terms of Service from time to time at our absolute discretion." #domain - %s == "masala.xxx" + %s == "sex.xxx" #domain_id - %s == "D130773-XXX" + %s == "D855895-GDREG" #status - %s == ["ok"] + %s == :registered #available? %s == false @@ -21,86 +21,89 @@ #created_on %s %CLASS{time} - %s %TIME{2011-12-01 01:37:55 UTC} + %s %TIME{2012-05-31 14:58:50 UTC} #updated_on %s %CLASS{time} - %s %TIME{2013-12-02 22:20:04 UTC} + %s %TIME{2021-05-01 08:25:32 UTC} #expires_on %s %CLASS{time} - %s %TIME{2014-12-01 01:37:55 UTC} + %s %TIME{2022-05-31 14:58:50 UTC} #registrar %s %CLASS{registrar} - %s.id == "R3228-XXX" - %s.name == "Mesh Digital Limited" - %s.organization == nil - %s.url == nil + %s.id == "625" + %s.name == "Name.com, Inc." + %s.url == "www.name.com" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "MNT5BB23000590" - %s[0].name == "Domainmonster.com Privacy Service" - %s[0].organization == "Identity Protect Limited" - %s[0].address == "PO Box 795" - %s[0].city == "Godalming" - %s[0].zip == "GU7 9GA" - %s[0].state == "Surrey" + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "Domain Protection Services, Inc." + %s[0].address == "REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "" %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.1483307527" - %s[0].fax == "+44.1483304031" - %s[0].email == "masala.xxx@privatemonster.com" + %s[0].country_code == "US" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "MNT5BB23000590" - %s[0].name == "Domainmonster.com Privacy Service" - %s[0].organization == "Identity Protect Limited" - %s[0].address == "PO Box 795" - %s[0].city == "Godalming" - %s[0].zip == "GU7 9GA" - %s[0].state == "Surrey" + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "REDACTED FOR PRIVACY" + %s[0].address == "REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "REDACTED FOR PRIVACY" %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.1483307527" - %s[0].fax == "+44.1483304031" - %s[0].email == "masala.xxx@privatemonster.com" + %s[0].country_code == "REDACTED FOR PRIVACY" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "MNT5BB23000590" - %s[0].name == "Domainmonster.com Privacy Service" - %s[0].organization == "Identity Protect Limited" - %s[0].address == "PO Box 795" - %s[0].city == "Godalming" - %s[0].zip == "GU7 9GA" - %s[0].state == "Surrey" + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "REDACTED FOR PRIVACY" + %s[0].address == "REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "REDACTED FOR PRIVACY" %s[0].country == nil - %s[0].country_code == "GB" - %s[0].phone == "+44.1483307527" - %s[0].fax == "+44.1483304031" - %s[0].email == "masala.xxx@privatemonster.com" + %s[0].country_code == "REDACTED FOR PRIVACY" + %s[0].phone == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY" + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #nameservers %s %CLASS{array} - %s %SIZE{2} + %s %SIZE{4} %s[0] %CLASS{nameserver} - %s[0].name == "ns39.domaincontrol.com" + %s[0].name == "ns4.imlns.com" %s[1] %CLASS{nameserver} - %s[1].name == "ns40.domaincontrol.com" + %s[1].name == "ns3.imlns.com" + %s[2] %CLASS{nameserver} + %s[2].name == "ns1.imlns.com" + %s[3] %CLASS{nameserver} + %s[3].name == "ns.imlns.com" #reserved? diff --git a/spec/fixtures/responses/whois.nic.xxx/xxx/status_registered.txt b/spec/fixtures/responses/whois.nic.xxx/xxx/status_registered.txt index 5b23d22c..be05bb7c 100644 --- a/spec/fixtures/responses/whois.nic.xxx/xxx/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.xxx/xxx/status_registered.txt @@ -1,66 +1,87 @@ -Domain Name:MASALA.XXX -Domain ID: D130773-XXX -Creation Date: 01-Dec-2011 01:37:55 UTC -Updated Date: 02-Dec-2013 22:20:04 UTC -Registry Expiry Date: 01-Dec-2014 01:37:55 UTC -Sponsoring Registrar:Mesh Digital Limited (R3228-XXX) -Sponsoring Registrar IANA ID: 1390 -WHOIS Server: -Referral URL: -Domain Status: ok -Registrant ID:MNT5BB23000590 -Registrant Name:Domainmonster.com Privacy Service -Registrant Organization:Identity Protect Limited -Registrant Street: PO Box 795 -Registrant City:Godalming -Registrant State/Province:Surrey -Registrant Postal Code:GU7 9GA -Registrant Country:GB -Registrant Phone:+44.1483307527 -Registrant Phone Ext: -Registrant Fax: +44.1483304031 -Registrant Fax Ext: -Registrant Email:masala.xxx@privatemonster.com -Admin ID:MNT5BB23000590 -Admin Name:Domainmonster.com Privacy Service -Admin Organization:Identity Protect Limited -Admin Street: PO Box 795 -Admin City:Godalming -Admin State/Province:Surrey -Admin Postal Code:GU7 9GA -Admin Country:GB -Admin Phone:+44.1483307527 -Admin Phone Ext: -Admin Fax: +44.1483304031 -Admin Fax Ext: -Admin Email:masala.xxx@privatemonster.com -Tech ID:MNT5BB23000590 -Tech Name:Domainmonster.com Privacy Service -Tech Organization:Identity Protect Limited -Tech Street: PO Box 795 -Tech City:Godalming -Tech State/Province:Surrey -Tech Postal Code:GU7 9GA -Tech Country:GB -Tech Phone:+44.1483307527 -Tech Phone Ext: -Tech Fax: +44.1483304031 -Tech Fax Ext: -Tech Email:masala.xxx@privatemonster.com -Name Server:NS39.DOMAINCONTROL.COM -Name Server:NS40.DOMAINCONTROL.COM -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: +Domain Name: sex.xxx +Registry Domain ID: D855895-GDREG +Registrar WHOIS Server: +Registrar URL: www.name.com +Updated Date: 2021-05-01T08:25:32Z +Creation Date: 2012-05-31T14:58:50Z +Registry Expiry Date: 2022-05-31T14:58:50Z +Registrar: Name.com, Inc. +Registrar IANA ID: 625 +Registrar Abuse Contact Email: abuse@name.com +Registrar Abuse Contact Phone: +1.7203101849 +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Registry Registrant ID: REDACTED FOR PRIVACY +Registrant Name: REDACTED FOR PRIVACY +Registrant Organization: Domain Protection Services, Inc. +Registrant Street: REDACTED FOR PRIVACY +Registrant Street: REDACTED FOR PRIVACY +Registrant Street: REDACTED FOR PRIVACY +Registrant City: REDACTED FOR PRIVACY +Registrant State/Province: +Registrant Postal Code: REDACTED FOR PRIVACY +Registrant Country: US +Registrant Phone: REDACTED FOR PRIVACY +Registrant Phone Ext: REDACTED FOR PRIVACY +Registrant Fax: REDACTED FOR PRIVACY +Registrant Fax Ext: REDACTED FOR PRIVACY +Registrant Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Admin ID: REDACTED FOR PRIVACY +Admin Name: REDACTED FOR PRIVACY +Admin Organization: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin City: REDACTED FOR PRIVACY +Admin State/Province: REDACTED FOR PRIVACY +Admin Postal Code: REDACTED FOR PRIVACY +Admin Country: REDACTED FOR PRIVACY +Admin Phone: REDACTED FOR PRIVACY +Admin Phone Ext: REDACTED FOR PRIVACY +Admin Fax: REDACTED FOR PRIVACY +Admin Fax Ext: REDACTED FOR PRIVACY +Admin Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Registry Tech ID: REDACTED FOR PRIVACY +Tech Name: REDACTED FOR PRIVACY +Tech Organization: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech City: REDACTED FOR PRIVACY +Tech State/Province: REDACTED FOR PRIVACY +Tech Postal Code: REDACTED FOR PRIVACY +Tech Country: REDACTED FOR PRIVACY +Tech Phone: REDACTED FOR PRIVACY +Tech Phone Ext: REDACTED FOR PRIVACY +Tech Fax: REDACTED FOR PRIVACY +Tech Fax Ext: REDACTED FOR PRIVACY +Tech Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Name Server: ns4.imlns.com +Name Server: ns3.imlns.com +Name Server: ns1.imlns.com +Name Server: ns.imlns.com +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-09T21:49:36Z <<< -Access to .XXX ICM REGISTRY WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the ICM registry database. The data in this record is provided by ICM Registry for informational purposes only, and ICM does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. ICM reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. +For more information on Whois status codes, please visit https://icann.org/epp +The Service is provided so that you may look up certain information in relation to domain names that we store in our database. +Use of the Service is subject to our policies, in particular you should familiarise yourself with our Acceptable Use Policy and our Privacy Policy. + +The information provided by this Service is 'as is' and we make no guarantee of it its accuracy. + +You agree that by your use of the Service you will not use the information provided by us in a way which is: +* inconsistent with any applicable laws, +* inconsistent with any policy issued by us, +* to generate, distribute, or facilitate unsolicited mass email, promotions, advertisings or other solicitations, or +* to enable high volume, automated, electronic processes that apply to the Service. + +You acknowledge that: +* a response from the Service that a domain name is 'available', does not guarantee that is able to be registered, +* we may restrict, suspend or terminate your access to the Service at any time, and +* the copying, compilation, repackaging, dissemination or other use of the information provided by the Service is not permitted, without our express written consent. + +This information has been prepared and published in order to represent administrative and technical management of the TLD. + +We may discontinue or amend any part or the whole of these Terms of Service from time to time at our absolute discretion. diff --git a/spec/fixtures/responses/whois.nic.xxx/xxx/status_reserved.txt b/spec/fixtures/responses/whois.nic.xxx/xxx/status_reserved.txt index b9b91ce7..7b990057 100644 --- a/spec/fixtures/responses/whois.nic.xxx/xxx/status_reserved.txt +++ b/spec/fixtures/responses/whois.nic.xxx/xxx/status_reserved.txt @@ -1 +1,26 @@ -Reserved by ICM Registry +Reserved Domain Name +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-09T21:52:15Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +The Service is provided so that you may look up certain information in relation to domain names that we store in our database. + +Use of the Service is subject to our policies, in particular you should familiarise yourself with our Acceptable Use Policy and our Privacy Policy. + +The information provided by this Service is 'as is' and we make no guarantee of it its accuracy. + +You agree that by your use of the Service you will not use the information provided by us in a way which is: +* inconsistent with any applicable laws, +* inconsistent with any policy issued by us, +* to generate, distribute, or facilitate unsolicited mass email, promotions, advertisings or other solicitations, or +* to enable high volume, automated, electronic processes that apply to the Service. + +You acknowledge that: +* a response from the Service that a domain name is 'available', does not guarantee that is able to be registered, +* we may restrict, suspend or terminate your access to the Service at any time, and +* the copying, compilation, repackaging, dissemination or other use of the information provided by the Service is not permitted, without our express written consent. + +This information has been prepared and published in order to represent administrative and technical management of the TLD. + +We may discontinue or amend any part or the whole of these Terms of Service from time to time at our absolute discretion. diff --git a/spec/fixtures/responses/whois.nic.xyz/xyz/status_available.expected b/spec/fixtures/responses/whois.nic.xyz/xyz/status_available.expected index 2c3fe7a8..64c3bae5 100644 --- a/spec/fixtures/responses/whois.nic.xyz/xyz/status_available.expected +++ b/spec/fixtures/responses/whois.nic.xyz/xyz/status_available.expected @@ -1,5 +1,5 @@ #disclaimer - %s == nil + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == [] + %s == :available #available? %s == true diff --git a/spec/fixtures/responses/whois.nic.xyz/xyz/status_available.txt b/spec/fixtures/responses/whois.nic.xyz/xyz/status_available.txt index 09cc0f7e..8295f14b 100644 --- a/spec/fixtures/responses/whois.nic.xyz/xyz/status_available.txt +++ b/spec/fixtures/responses/whois.nic.xyz/xyz/status_available.txt @@ -1 +1,21 @@ -DOMAIN NOT FOUND +The queried object does not exist: DOMAIN NOT FOUND + +>>> Last update of WHOIS database: 2021-12-16T13:52:59.0Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain +information pertaining to Internet domain names registered by our +our customers. By using this service you are agreeing (1) not to use any +information presented here for any purpose other than determining +ownership of domain names, (2) not to store or reproduce this data in +any way, (3) not to use any high-volume, automated, electronic processes +to obtain data from this service. Abuse of this service is monitored and +actions in contravention of these terms will result in being permanently +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) + +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.nic.xyz/xyz/status_registered.expected b/spec/fixtures/responses/whois.nic.xyz/xyz/status_registered.expected index b8b7a122..8b2555ca 100644 --- a/spec/fixtures/responses/whois.nic.xyz/xyz/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.xyz/xyz/status_registered.expected @@ -1,5 +1,5 @@ #disclaimer - %s == "Access to the whois service is rate limited. For more information, please see https://registrar-console.centralnic.com/pub/whois_guidance." + %s == "The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance." #domain @@ -10,7 +10,7 @@ #status - %s == ["clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited", "clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited"] + %s == :registered #available? %s == false @@ -25,9 +25,9 @@ #updated_on %s %CLASS{time} - %s %TIME{2015-08-18 15:09:36 UTC} + %s %TIME{2018-04-23 22:02:32 UTC} -#expires_on +#expires_on %s %CLASS{time} %s %TIME{2025-03-20 23:59:59 UTC} @@ -36,71 +36,39 @@ %s %CLASS{registrar} %s.id == "292" %s.name == "MarkMonitor, Inc (TLDs)" - %s.organization == nil - %s.url == nil + %s.url == "" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "mmr-87489" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" + %s[0].id == nil + %s[0].name == nil + %s[0].organization == "Google LLC" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil %s[0].state == "CA" %s[0].country == nil %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6502530001" - %s[0].email == "dns-admin@google.com" - %s[0].url == nil - %s[0].created_on == nil - %s[0].updated_on == nil + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #admin_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "mmr-87489" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6502530001" - %s[0].email == "dns-admin@google.com" - %s[0].url == nil - %s[0].created_on == nil - %s[0].updated_on == nil + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #technical_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "mmr-87489" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.6502530000" - %s[0].fax == "+1.6502530001" - %s[0].email == "dns-admin@google.com" - %s[0].url == nil - %s[0].created_on == nil - %s[0].updated_on == nil + %s[0].email == "Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #nameservers @@ -108,17 +76,9 @@ %s %SIZE{4} %s[0] %CLASS{nameserver} %s[0].name == "ns2.google.com" - %s[0].ipv4 == nil - %s[0].ipv6 == nil %s[1] %CLASS{nameserver} %s[1].name == "ns4.google.com" - %s[1].ipv4 == nil - %s[1].ipv6 == nil %s[2] %CLASS{nameserver} %s[2].name == "ns3.google.com" - %s[2].ipv4 == nil - %s[2].ipv6 == nil %s[3] %CLASS{nameserver} %s[3].name == "ns1.google.com" - %s[3].ipv4 == nil - %s[3].ipv6 == nil diff --git a/spec/fixtures/responses/whois.nic.xyz/xyz/status_registered.txt b/spec/fixtures/responses/whois.nic.xyz/xyz/status_registered.txt index 1cd82ab7..cac6af94 100644 --- a/spec/fixtures/responses/whois.nic.xyz/xyz/status_registered.txt +++ b/spec/fixtures/responses/whois.nic.xyz/xyz/status_registered.txt @@ -1,73 +1,45 @@ Domain Name: ABC.XYZ -Domain ID: D2192285-CNIC -WHOIS Server: whois.markmonitor.com -Referral URL: https://www.markmonitor.com/ -Updated Date: 2015-08-18T15:09:36.0Z +Registry Domain ID: D2192285-CNIC +Registrar WHOIS Server: whois.markmonitor.com +Registrar URL: +Updated Date: 2018-04-23T22:02:32.0Z Creation Date: 2014-03-20T12:59:17.0Z Registry Expiry Date: 2025-03-20T23:59:59.0Z -Sponsoring Registrar: MarkMonitor, Inc (TLDs) -Sponsoring Registrar IANA ID: 292 +Registrar: MarkMonitor, Inc (TLDs) +Registrar IANA ID: 292 Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited -Registrant ID: mmr-87489 -Registrant Name: DNS Admin -Registrant Organization: Google Inc. -Registrant Street: 1600 Amphitheatre Parkway -Registrant City: Mountain View +Registrant Organization: Google LLC Registrant State/Province: CA -Registrant Postal Code: 94043 Registrant Country: US -Registrant Phone: +1.6502530000 -Registrant Phone Ext: -Registrant Fax: +1.6502530001 -Registrant Fax Ext: -Registrant Email: dns-admin@google.com -Admin ID: mmr-87489 -Admin Name: DNS Admin -Admin Organization: Google Inc. -Admin Street: 1600 Amphitheatre Parkway -Admin City: Mountain View -Admin State/Province: CA -Admin Postal Code: 94043 -Admin Country: US -Admin Phone: +1.6502530000 -Admin Phone Ext: -Admin Fax: +1.6502530001 -Admin Fax Ext: -Admin Email: dns-admin@google.com -Tech ID: mmr-87489 -Tech Name: DNS Admin -Tech Organization: Google Inc. -Tech Street: 1600 Amphitheatre Parkway -Tech City: Mountain View -Tech State/Province: CA -Tech Postal Code: 94043 -Tech Country: US -Tech Phone: +1.6502530000 -Tech Phone Ext: -Tech Fax: +1.6502530001 -Tech Fax Ext: -Tech Email: dns-admin@google.com +Registrant Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Admin Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +Tech Email: Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. Name Server: NS2.GOOGLE.COM Name Server: NS4.GOOGLE.COM Name Server: NS3.GOOGLE.COM Name Server: NS1.GOOGLE.COM DNSSEC: unsigned ->>> Last update of WHOIS database: 2015-11-29T21:11:15.0Z <<< +Registrar Abuse Contact Email: ccops@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-12-16T13:52:29.0Z <<< For more information on Whois status codes, please visit https://icann.org/epp -This whois service is provided by CentralNic Ltd and only contains +>>> IMPORTANT INFORMATION ABOUT THE DEPLOYMENT OF RDAP: please visit +https://www.centralnic.com/support/rdap <<< + +The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining -ownership of domain names, (2) not to store or reproduce this data in +ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently -blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/ - -Access to the whois service is rate limited. For more information, please -see https://registrar-console.centralnic.com/pub/whois_guidance. +blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) +Access to the Whois and RDAP services is rate limited. For more +information, visit https://registrar-console.centralnic.com/pub/whois_guidance. diff --git a/spec/fixtures/responses/whois.nic.yt/yt/response_throttled.expected b/spec/fixtures/responses/whois.nic.yt/yt/response_throttled.expected new file mode 100644 index 00000000..4302c673 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.yt/yt/response_throttled.expected @@ -0,0 +1,2 @@ +#response_throttled? + %s == true diff --git a/spec/fixtures/responses/whois.nic.fr/yt/response_throttled.txt b/spec/fixtures/responses/whois.nic.yt/yt/response_throttled.txt similarity index 100% rename from spec/fixtures/responses/whois.nic.fr/yt/response_throttled.txt rename to spec/fixtures/responses/whois.nic.yt/yt/response_throttled.txt diff --git a/spec/fixtures/responses/whois.nic.fr/yt/status_available.expected b/spec/fixtures/responses/whois.nic.yt/yt/status_available.expected similarity index 100% rename from spec/fixtures/responses/whois.nic.fr/yt/status_available.expected rename to spec/fixtures/responses/whois.nic.yt/yt/status_available.expected diff --git a/spec/fixtures/responses/whois.nic.fr/yt/status_available.txt b/spec/fixtures/responses/whois.nic.yt/yt/status_available.txt similarity index 100% rename from spec/fixtures/responses/whois.nic.fr/yt/status_available.txt rename to spec/fixtures/responses/whois.nic.yt/yt/status_available.txt diff --git a/spec/fixtures/responses/whois.nic.fr/yt/status_registered.expected b/spec/fixtures/responses/whois.nic.yt/yt/status_registered.expected similarity index 66% rename from spec/fixtures/responses/whois.nic.fr/yt/status_registered.expected rename to spec/fixtures/responses/whois.nic.yt/yt/status_registered.expected index b55bc97c..8eb63ff1 100644 --- a/spec/fixtures/responses/whois.nic.fr/yt/status_registered.expected +++ b/spec/fixtures/responses/whois.nic.yt/yt/status_registered.expected @@ -10,15 +10,15 @@ #created_on %s %CLASS{time} - %s %TIME{1995-01-01} + %s %TIME{1994-12-31 23:00:00 UTC} #updated_on %s %CLASS{time} - %s %TIME{2016-12-31} + %s %TIME{2018-12-31 23:33:38 UTC} #expires_on %s %CLASS{time} - %s %TIME{2017-12-31} + %s %TIME{2019-12-31 23:00:00 UTC} #registrant_contacts @@ -29,16 +29,16 @@ %s[0].id == "AC3598-FRNIC" %s[0].name == nil %s[0].organization == "Afnic (Mayotte - CTOM)" - %s[0].address == "immeuble international\n2, rue Stephenson\nMontigny-Le-Bretonneux\n78181 Saint Quentin en Yvelines Cedex" + %s[0].address == "immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny le Bretonneux" %s[0].city == nil %s[0].zip == nil %s[0].state == nil %s[0].country == nil %s[0].country_code == "FR" - %s[0].phone == nil - %s[0].fax == nil - %s[0].email == nil - %s[0].updated_on %TIME{2008-10-09 00:00:00 UTC} + %s[0].phone == "+33 1 39 30 83 00" + %s[0].fax == "+33 1 39 30 83 01" + %s[0].email == "support@afnic.fr" + %s[0].updated_on %TIME{2017-07-17 12:41:44 UTC} #admin_contacts %s %CLASS{array} @@ -48,7 +48,7 @@ %s[0].id == "NFC1-FRNIC" %s[0].name == "NIC France Contact" %s[0].organization == "AFNIC" - %s[0].address == "immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex" + %s[0].address == "immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux" %s[0].city == nil %s[0].zip == nil %s[0].state == nil @@ -57,7 +57,7 @@ %s[0].phone == "+33 1 39 30 83 00" %s[0].fax == nil %s[0].email == "hostmaster@nic.fr" - %s[0].updated_on %TIME{2005-08-23 00:00:00 UTC} + %s[0].updated_on %TIME{2005-08-23 16:13:17 UTC} #technical_contacts %s %CLASS{array} @@ -67,7 +67,7 @@ %s[0].id == "NFC1-FRNIC" %s[0].name == "NIC France Contact" %s[0].organization == "AFNIC" - %s[0].address == "immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex" + %s[0].address == "immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux" %s[0].city == nil %s[0].zip == nil %s[0].state == nil @@ -76,7 +76,7 @@ %s[0].phone == "+33 1 39 30 83 00" %s[0].fax == nil %s[0].email == "hostmaster@nic.fr" - %s[0].updated_on %TIME{2005-08-23 00:00:00 UTC} + %s[0].updated_on %TIME{2005-08-23 16:13:17 UTC} #nameservers @@ -84,13 +84,7 @@ %s %SIZE{3} %s[0] %CLASS{nameserver} %s[0].name == "ns1.nic.fr" - %s[0].ipv4 == "192.134.4.1" - %s[0].ipv6 == "2001:67c:2218:2::4:1" %s[1] %CLASS{nameserver} %s[1].name == "ns2.nic.fr" - %s[1].ipv4 == "192.93.0.4" - %s[1].ipv6 == "2001:660:3005:1::1:2" %s[2] %CLASS{nameserver} %s[2].name == "ns3.nic.fr" - %s[2].ipv4 == "192.134.0.49" - %s[2].ipv6 == "2001:660:3006:1::1:1" diff --git a/spec/fixtures/responses/whois.nic.yt/yt/status_registered.txt b/spec/fixtures/responses/whois.nic.yt/yt/status_registered.txt new file mode 100644 index 00000000..edc155c8 --- /dev/null +++ b/spec/fixtures/responses/whois.nic.yt/yt/status_registered.txt @@ -0,0 +1,125 @@ +%% +%% This is the AFNIC Whois server. +%% +%% complete date format : YYYY-MM-DDThh:mm:ssZ +%% short date format : DD/MM +%% version : FRNIC-2.5 +%% +%% Rights restricted by copyright. +%% See https://www.afnic.fr/en/products-and-services/services/whois/whois-special-notice/ +%% +%% Use '-h' option to obtain more information about this service. +%% +%% [209.153.220.50 REQUEST] >> nic.yt +%% +%% RL Net [##########] - RL IP [#########.] +%% + +domain: nic.yt +status: ACTIVE +hold: NO +holder-c: AC3598-FRNIC +admin-c: NFC1-FRNIC +tech-c: NFC1-FRNIC +zone-c: NFC1-FRNIC +nsl-id: NSL1-FRNIC +remarks: Website at: http://www.nic.yt/ +remarks: Whois site at: whois.nic.fr +remarks: Please email mailto: nic@nic.fr +remarks: Spam mailto: abuse@nic.fr +remarks: Test mailto: ping@nic.fr +registrar: AFNIC registry +Expiry Date: 2019-12-31T23:00:00Z +created: 1994-12-31T23:00:00Z +last-update: 2018-12-31T23:33:38Z +source: FRNIC + +ns-list: NSL1-FRNIC +nserver: ns1.nic.fr +nserver: ns2.nic.fr +nserver: ns3.nic.fr +source: FRNIC + +registrar: AFNIC registry +type: Isp Option 2 +anonymous: YES +registered: 1997-05-22T12:00:00Z +source: FRNIC + +nic-hdl: AC3598-FRNIC +type: ORGANIZATION +contact: Afnic (Mayotte - CTOM) +address: immeuble le Stephenson +address: 1, rue Stephenson +address: Hall A2 - 3eme etage +address: 78180 Montigny le Bretonneux +country: FR +phone: +33 1 39 30 83 00 +fax-no: +33 1 39 30 83 01 +e-mail: support@afnic.fr +registrar: AFNIC registry +changed: 2017-07-17T12:41:44Z nic@nic.fr +anonymous: NO +obsoleted: NO +eligstatus: not identified +reachstatus: not identified +source: FRNIC + +nic-hdl: NFC1-FRNIC +type: ROLE +contact: NIC France Contact +address: AFNIC +address: immeuble le Stephenson +address: 1, rue Stephenson +address: Hall A2 - 3eme etage +address: 78180 Montigny-Le-Bretonneux +country: FR +phone: +33 1 39 30 83 00 +e-mail: hostmaster@nic.fr +admin-c: NFC1-FRNIC +tech-c: PL12-FRNIC +tech-c: JP-FRNIC +tech-c: MS1887-FRNIC +tech-c: VL-FRNIC +tech-c: PR1249-FRNIC +tech-c: PV827-FRNIC +tech-c: GO661-FRNIC +tech-c: MS-FRNIC +tech-c: AI1-FRNIC +registrar: AFNIC registry +changed: 2005-08-23T16:13:17Z hostmaster@nic.fr +anonymous: NO +obsoleted: NO +eligstatus: not identified +reachstatus: not identified +source: FRNIC + +nic-hdl: NFC1-FRNIC +type: ROLE +contact: NIC France Contact +address: AFNIC +address: immeuble le Stephenson +address: 1, rue Stephenson +address: Hall A2 - 3eme etage +address: 78180 Montigny-Le-Bretonneux +country: FR +phone: +33 1 39 30 83 00 +e-mail: hostmaster@nic.fr +admin-c: NFC1-FRNIC +tech-c: PL12-FRNIC +tech-c: JP-FRNIC +tech-c: MS1887-FRNIC +tech-c: VL-FRNIC +tech-c: PR1249-FRNIC +tech-c: PV827-FRNIC +tech-c: GO661-FRNIC +tech-c: MS-FRNIC +tech-c: AI1-FRNIC +registrar: AFNIC registry +changed: 2005-08-23T16:13:17Z hostmaster@nic.fr +anonymous: NO +obsoleted: NO +eligstatus: not identified +reachstatus: not identified +source: FRNIC + diff --git a/spec/fixtures/responses/whois.pairnic.com/status_registered.expected b/spec/fixtures/responses/whois.pairnic.com/status_registered.expected index 0ba856c7..e7d43079 100644 --- a/spec/fixtures/responses/whois.pairnic.com/status_registered.expected +++ b/spec/fixtures/responses/whois.pairnic.com/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "99" %s.name == "pairNIC INC" - %s.organization == "pairNIC INC" %s.url == "https://www.pairnic.com" @@ -49,9 +48,9 @@ %s[0].zip == "15203" %s[0].state == "PA" %s[0].country_code == "US" - %s[0].phone == "" - %s[0].fax == "" - %s[0].email == "" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == nil #admin_contacts %s %CLASS{array} diff --git a/spec/fixtures/responses/whois.pandi.or.id/id/status_available.expected b/spec/fixtures/responses/whois.pandi.or.id/id/status_available.expected deleted file mode 100644 index 2c3fe7a8..00000000 --- a/spec/fixtures/responses/whois.pandi.or.id/id/status_available.expected +++ /dev/null @@ -1,50 +0,0 @@ -#disclaimer - %s == nil - - -#domain - %s == nil - -#domain_id - %s == nil - - -#status - %s == [] - -#available? - %s == true - -#registered? - %s == false - - -#created_on - %s == nil - -#updated_on - %s == nil - -#expires_on - %s == nil - - -#registrar - %s == nil - -#registrant_contacts - %s %CLASS{array} - %s == [] - -#admin_contacts - %s %CLASS{array} - %s == [] - -#technical_contacts - %s %CLASS{array} - %s == [] - - -#nameservers - %s %CLASS{array} - %s == [] diff --git a/spec/fixtures/responses/whois.pandi.or.id/id/status_available.txt b/spec/fixtures/responses/whois.pandi.or.id/id/status_available.txt deleted file mode 100644 index 09cc0f7e..00000000 --- a/spec/fixtures/responses/whois.pandi.or.id/id/status_available.txt +++ /dev/null @@ -1 +0,0 @@ -DOMAIN NOT FOUND diff --git a/spec/fixtures/responses/whois.pandi.or.id/id/status_registered.expected b/spec/fixtures/responses/whois.pandi.or.id/id/status_registered.expected deleted file mode 100644 index 06bb45bf..00000000 --- a/spec/fixtures/responses/whois.pandi.or.id/id/status_registered.expected +++ /dev/null @@ -1,115 +0,0 @@ -#disclaimer - %s == nil - - -#domain - %s == "google.co.id" - -#domain_id - %s == "PANDI-DO246796" - - -#status - %s == ["clientTransferProhibited", "serverTransferProhibited"] - -#available? - %s == false - -#registered? - %s == true - - -#created_on - %s %CLASS{time} - %s %TIME{2004-12-18 13:33:21 UTC} - -#updated_on - %s %CLASS{time} - %s %TIME{2013-09-20 23:24:51 UTC} - -#expires_on - %s %CLASS{time} - %s %TIME{2014-09-01 23:59:59 UTC} - - -#registrar - %s %CLASS{registrar} - %s.id == "digitalreg" - %s.name == nil - %s.organization == "Digital Registra" - %s.url == nil - -#registrant_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "0123459P2ZC" - %s[0].name == "Domain Administrator" - %s[0].organization == "PT Google Indonesia" - %s[0].address == "Menara BCA Grand Indonesia\nRegus Grand Indonesia" - %s[0].city == "Jakarta" - %s[0].zip == "10310" - %s[0].state == "Jakarta" - %s[0].country == nil - %s[0].country_code == "ID" - %s[0].phone == "+62.2123584400" - %s[0].fax == "+62.2123584400" - %s[0].email == "dns-admin@google.com" - -#admin_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "0123459P2ZC" - %s[0].name == "Domain Administrator" - %s[0].organization == "PT Google Indonesia" - %s[0].address == "Menara BCA Grand Indonesia\nRegus Grand Indonesia" - %s[0].city == "Jakarta" - %s[0].zip == "10310" - %s[0].state == "Jakarta" - %s[0].country == nil - %s[0].country_code == "ID" - %s[0].phone == "+62.2123584400" - %s[0].fax == "+62.2123584400" - %s[0].email == "dns-admin@google.com" - -#technical_contacts - %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "01234616RFG" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country == nil - %s[0].country_code == "US" - %s[0].phone == "+1.65030000" - %s[0].fax == "+1.65030001" - %s[0].email == "dns-admin@google.com" - - -#nameservers - %s %CLASS{array} - %s %SIZE{4} - %s[0] %CLASS{nameserver} - %s[0].name == "ns1.google.com" - %s[0].ipv4 == nil - %s[0].ipv6 == nil - %s[1] %CLASS{nameserver} - %s[1].name == "ns2.google.com" - %s[1].ipv4 == nil - %s[1].ipv6 == nil - %s[2] %CLASS{nameserver} - %s[2].name == "ns3.google.com" - %s[2].ipv4 == nil - %s[2].ipv6 == nil - %s[3] %CLASS{nameserver} - %s[3].name == "ns4.google.com" - %s[3].ipv4 == nil - %s[3].ipv6 == nil diff --git a/spec/fixtures/responses/whois.pandi.or.id/id/status_registered.txt b/spec/fixtures/responses/whois.pandi.or.id/id/status_registered.txt deleted file mode 100644 index fd23f7dc..00000000 --- a/spec/fixtures/responses/whois.pandi.or.id/id/status_registered.txt +++ /dev/null @@ -1,66 +0,0 @@ -Domain ID:PANDI-DO246796 -Domain Name:GOOGLE.CO.ID -Created On:18-Dec-2004 13:33:21 UTC -Last Updated On:20-Sep-2013 23:24:51 UTC -Expiration Date:01-Sep-2014 23:59:59 UTC -Status:clientTransferProhibited -Status:serverTransferProhibited -Registrant ID:0123459P2ZC -Registrant Name:Domain Administrator -Registrant Organization:PT Google Indonesia -Registrant Street1:Menara BCA Grand Indonesia -Registrant Street2:Regus Grand Indonesia -Registrant City:Jakarta -Registrant State/Province:Jakarta -Registrant Postal Code:10310 -Registrant Country:ID -Registrant Phone:+62.2123584400 -Registrant FAX:+62.2123584400 -Registrant Email:dns-admin@google.com -Admin ID:0123459P2ZC -Admin Name:Domain Administrator -Admin Organization:PT Google Indonesia -Admin Street1:Menara BCA Grand Indonesia -Admin Street2:Regus Grand Indonesia -Admin City:Jakarta -Admin State/Province:Jakarta -Admin Postal Code:10310 -Admin Country:ID -Admin Phone:+62.2123584400 -Admin FAX:+62.2123584400 -Admin Email:dns-admin@google.com -Tech ID:01234616RFG -Tech Name:DNS Admin -Tech Organization:Google Inc. -Tech Street1:1600 Amphitheatre Parkway -Tech City:Mountain View -Tech State/Province:CA -Tech Postal Code:94043 -Tech Country:US -Tech Phone:+1.65030000 -Tech FAX:+1.65030001 -Tech Email:dns-admin@google.com -Billing ID:0120505a1pl -Billing Name:CCOPS Billing -Billing Organization:MarkMonitor Inc. -Billing Street1:JL.Hang Kesturi KM 4 Kabil Indus -Billing City:Boise -Billing State/Province:ID -Billing Postal Code:83704 -Billing Country:US -Billing Phone:+1.2083895741 -Billing FAX:+1.2083895771 -Billing Email:ccopsbilling@markmonitor.com -Sponsoring Registrar ID:digitalreg -Sponsoring Registrar Organization:Digital Registra -Sponsoring Registrar Postal Code:55281 -Sponsoring Registrar Country:ID -Sponsoring Registrar Phone:0274882257 -Name Server:NS1.GOOGLE.COM -Name Server:NS2.GOOGLE.COM -Name Server:NS3.GOOGLE.COM -Name Server:NS4.GOOGLE.COM -DNSSEC:Unsigned - - - diff --git a/spec/fixtures/responses/whois.pir.org/org/status_available.expected b/spec/fixtures/responses/whois.pir.org/org/status_available.expected index 2c3fe7a8..ed0d1c58 100644 --- a/spec/fixtures/responses/whois.pir.org/org/status_available.expected +++ b/spec/fixtures/responses/whois.pir.org/org/status_available.expected @@ -1,6 +1,5 @@ #disclaimer - %s == nil - + %s == "Access to Public Interest Registry WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Public Interest Registry registry database. The data in this record is provided by Public Interest Registry for informational purposes only, and Public Interest Registry does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Public Interest Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." #domain %s == nil diff --git a/spec/fixtures/responses/whois.pir.org/org/status_available.txt b/spec/fixtures/responses/whois.pir.org/org/status_available.txt index 679aadb9..25c317c6 100644 --- a/spec/fixtures/responses/whois.pir.org/org/status_available.txt +++ b/spec/fixtures/responses/whois.pir.org/org/status_available.txt @@ -1 +1,6 @@ NOT FOUND +>>> Last update of WHOIS database: 2021-11-09T16:35:20Z <<< + +Access to Public Interest Registry WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Public Interest Registry registry database. The data in this record is provided by Public Interest Registry for informational purposes only, and Public Interest Registry does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Public Interest Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. + +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.pir.org/org/status_registered.expected b/spec/fixtures/responses/whois.pir.org/org/status_registered.expected index bf58bfc4..af47fc90 100644 --- a/spec/fixtures/responses/whois.pir.org/org/status_registered.expected +++ b/spec/fixtures/responses/whois.pir.org/org/status_registered.expected @@ -1,5 +1,6 @@ #disclaimer - %s == "Access to Public Interest Registry WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Public Interest Registry registry database. The data in this record is provided by Public Interest Registry for informational purposes only, and Public Interest Registry does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Public Interest Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." + %s == "Access to Public Interest Registry WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Public Interest Registry registry database. The data in this record is provided by Public Interest Registry for informational purposes only, and Public Interest Registry does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Public Interest Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name." + #domain %s == "google.org" @@ -8,7 +9,7 @@ #status - %s == ["clientDeleteProhibited", "clientTransferProhibited", "clientUpdateProhibited"] + %s == ["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited", "serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited", "serverTransferProhibited https://icann.org/epp#serverTransferProhibited", "serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited"] #available? %s == false @@ -23,70 +24,43 @@ #updated_on %s %CLASS{time} - %s %TIME{2013-09-18 09:17:35 UTC} + %s %TIME{2021-09-18 09:24:00 UTC} #expires_on %s %CLASS{time} - %s %TIME{2014-10-20 04:00:00 UTC} + %s %TIME{2022-10-20 04:00:00 UTC} #registrar %s %CLASS{registrar} %s.id == "292" - %s.name == "MarkMonitor Inc. (R37-LROR)" - %s.organization == nil - %s.url == nil + %s.name == "MarkMonitor Inc." + %s.url == "http://www.markmonitor.com" #registrant_contacts %s %CLASS{array} %s %SIZE{1} %s[0] %CLASS{contact} %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT - %s[0].id == "mmr-32097" - %s[0].name == "DNS Admin" + %s[0].id == nil + %s[0].name == nil %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" + %s[0].address == nil + %s[0].city == nil + %s[0].zip == nil %s[0].state == "CA" %s[0].country_code == "US" - %s[0].phone == "+1.6506234000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s[0].phone == nil + %s[0].fax == nil + %s[0].email == nil #admin_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE - %s[0].id == "mmr-32097" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country_code == "US" - %s[0].phone == "+1.6506234000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s %SIZE{0} #technical_contacts %s %CLASS{array} - %s %SIZE{1} - %s[0] %CLASS{contact} - %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL - %s[0].id == "mmr-32097" - %s[0].name == "DNS Admin" - %s[0].organization == "Google Inc." - %s[0].address == "1600 Amphitheatre Parkway" - %s[0].city == "Mountain View" - %s[0].zip == "94043" - %s[0].state == "CA" - %s[0].country_code == "US" - %s[0].phone == "+1.6506234000" - %s[0].fax == "+1.6506188571" - %s[0].email == "dns-admin@google.com" + %s %SIZE{0} #nameservers diff --git a/spec/fixtures/responses/whois.pir.org/org/status_registered.txt b/spec/fixtures/responses/whois.pir.org/org/status_registered.txt index 1823f173..98630737 100644 --- a/spec/fixtures/responses/whois.pir.org/org/status_registered.txt +++ b/spec/fixtures/responses/whois.pir.org/org/status_registered.txt @@ -1,67 +1,35 @@ -Domain Name:GOOGLE.ORG -Domain ID: D2244233-LROR +Domain Name: GOOGLE.ORG +Registry Domain ID: D2244233-LROR +Registrar WHOIS Server: whois.markmonitor.com +Registrar URL: http://www.markmonitor.com +Updated Date: 2021-09-18T09:24:00Z Creation Date: 1998-10-21T04:00:00Z -Updated Date: 2013-09-18T09:17:35Z -Registry Expiry Date: 2014-10-20T04:00:00Z -Sponsoring Registrar:MarkMonitor Inc. (R37-LROR) -Sponsoring Registrar IANA ID: 292 -WHOIS Server: -Referral URL: -Domain Status: clientDeleteProhibited -Domain Status: clientTransferProhibited -Domain Status: clientUpdateProhibited -Registrant ID:mmr-32097 -Registrant Name:DNS Admin -Registrant Organization:Google Inc. -Registrant Street: 1600 Amphitheatre Parkway -Registrant City:Mountain View -Registrant State/Province:CA -Registrant Postal Code:94043 -Registrant Country:US -Registrant Phone:+1.6506234000 -Registrant Phone Ext: -Registrant Fax: +1.6506188571 -Registrant Fax Ext: -Registrant Email:dns-admin@google.com -Admin ID:mmr-32097 -Admin Name:DNS Admin -Admin Organization:Google Inc. -Admin Street: 1600 Amphitheatre Parkway -Admin City:Mountain View -Admin State/Province:CA -Admin Postal Code:94043 -Admin Country:US -Admin Phone:+1.6506234000 -Admin Phone Ext: -Admin Fax: +1.6506188571 -Admin Fax Ext: -Admin Email:dns-admin@google.com -Tech ID:mmr-32097 -Tech Name:DNS Admin -Tech Organization:Google Inc. -Tech Street: 1600 Amphitheatre Parkway -Tech City:Mountain View -Tech State/Province:CA -Tech Postal Code:94043 -Tech Country:US -Tech Phone:+1.6506234000 -Tech Phone Ext: -Tech Fax: +1.6506188571 -Tech Fax Ext: -Tech Email:dns-admin@google.com -Name Server:NS2.GOOGLE.COM -Name Server:NS1.GOOGLE.COM -Name Server:NS3.GOOGLE.COM -Name Server:NS4.GOOGLE.COM -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -Name Server: -DNSSEC:Unsigned +Registry Expiry Date: 2022-10-20T04:00:00Z +Registrar Registration Expiration Date: +Registrar: MarkMonitor Inc. +Registrar IANA ID: 292 +Registrar Abuse Contact Email: abusecomplaints@markmonitor.com +Registrar Abuse Contact Phone: +1.2083895740 +Reseller: +Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited +Domain Status: serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited +Domain Status: serverTransferProhibited https://icann.org/epp#serverTransferProhibited +Domain Status: serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited +Registrant Organization: Google Inc. +Registrant State/Province: CA +Registrant Country: US +Name Server: NS2.GOOGLE.COM +Name Server: NS1.GOOGLE.COM +Name Server: NS3.GOOGLE.COM +Name Server: NS4.GOOGLE.COM +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form https://www.icann.org/wicf/) +>>> Last update of WHOIS database: 2021-11-09T16:35:03Z <<< -Access to Public Interest Registry WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Public Interest Registry registry database. The data in this record is provided by Public Interest Registry for informational purposes only, and Public Interest Registry does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Public Interest Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. +For more information on Whois status codes, please visit https://icann.org/epp + +Access to Public Interest Registry WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Public Interest Registry registry database. The data in this record is provided by Public Interest Registry for informational purposes only, and Public Interest Registry does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Public Interest Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. + +The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name. diff --git a/spec/fixtures/responses/whois.pnina.ps/ps/status_registered.expected b/spec/fixtures/responses/whois.pnina.ps/ps/status_registered.expected index 27b80d46..9cf563a4 100644 --- a/spec/fixtures/responses/whois.pnina.ps/ps/status_registered.expected +++ b/spec/fixtures/responses/whois.pnina.ps/ps/status_registered.expected @@ -31,7 +31,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor Inc." - %s.organization == nil %s.url == nil diff --git a/spec/fixtures/responses/whois.register.bg/bg/status_registered.expected b/spec/fixtures/responses/whois.register.bg/bg/status_registered.expected index dd4141fd..a83031e4 100644 --- a/spec/fixtures/responses/whois.register.bg/bg/status_registered.expected +++ b/spec/fixtures/responses/whois.register.bg/bg/status_registered.expected @@ -10,14 +10,14 @@ #created_on %s %CLASS{time} - %s %TIME{2003-06-30 00:00:00} + %s %TIME{2003-06-30 00:00:00 EEST} #updated_on %s %ERROR{AttributeNotSupported} #expires_on %s %CLASS{time} - %s %TIME{2014-06-30 00:00:00} + %s %TIME{2014-06-30 00:00:00 EEST} #nameservers diff --git a/spec/fixtures/responses/whois.registry.gy/gy/status_registered.expected b/spec/fixtures/responses/whois.registry.gy/gy/status_registered.expected index ee2a6722..ef231f1c 100644 --- a/spec/fixtures/responses/whois.registry.gy/gy/status_registered.expected +++ b/spec/fixtures/responses/whois.registry.gy/gy/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor" - %s.organization == nil %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.registry.in/in/status_available.expected b/spec/fixtures/responses/whois.registry.in/in/status_available.expected new file mode 100644 index 00000000..00f7eabe --- /dev/null +++ b/spec/fixtures/responses/whois.registry.in/in/status_available.expected @@ -0,0 +1,50 @@ +#disclaimer + %s == "Access to .IN WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the .IN registry database. The data in this record is provided by .IN Registry for informational purposes only ,and .IN does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator or a Registrar, or Neustar except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. .IN reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy." + + +#domain + %s == nil + +#domain_id + %s == nil + + +#status + %s == [] + +#available? + %s == true + +#registered? + %s == false + + +#created_on + %s == nil + +#updated_on + %s == nil + +#expires_on + %s == nil + + +#registrar + %s == nil + +#registrant_contacts + %s %CLASS{array} + %s == [] + +#admin_contacts + %s %CLASS{array} + %s == [] + +#technical_contacts + %s %CLASS{array} + %s == [] + + +#nameservers + %s %CLASS{array} + %s == [] diff --git a/spec/fixtures/responses/whois.registry.in/in/status_available.txt b/spec/fixtures/responses/whois.registry.in/in/status_available.txt new file mode 100644 index 00000000..ed632418 --- /dev/null +++ b/spec/fixtures/responses/whois.registry.in/in/status_available.txt @@ -0,0 +1,7 @@ +No Data Found +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-09T16:27:54Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +Access to .IN WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the .IN registry database. The data in this record is provided by .IN Registry for informational purposes only ,and .IN does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator or a Registrar, or Neustar except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. .IN reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. diff --git a/spec/fixtures/responses/whois.registry.in/in/status_registered.expected b/spec/fixtures/responses/whois.registry.in/in/status_registered.expected new file mode 100644 index 00000000..dbe878fd --- /dev/null +++ b/spec/fixtures/responses/whois.registry.in/in/status_registered.expected @@ -0,0 +1,104 @@ +#disclaimer + %s == "Access to .IN WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the .IN registry database. The data in this record is provided by .IN Registry for informational purposes only ,and .IN does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator or a Registrar, or Neustar except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. .IN reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy." + + +#domain + %s == "google.in" + +#domain_id + %s == "D21089-IN" + + +#status + %s == ["clientTransferProhibited http://www.icann.org/epp#clientTransferProhibited", "clientDeleteProhibited http://www.icann.org/epp#clientDeleteProhibited", "clientUpdateProhibited http://www.icann.org/epp#clientUpdateProhibited"] + +#available? + %s == false + +#registered? + %s == true + + +#created_on + %s %TIME{2005-02-14 20:35:14 UTC} + +#updated_on + %s %TIME{2021-01-18 10:38:43 UTC} + +#expires_on + %s %TIME{2022-02-14 20:35:14 UTC} + + +#registrar + %s %CLASS{registrar} + %s.id == "292" + %s.name == "MarkMonitor Inc." + %s.url == "http://www.markmonitor.com" + +#registrant_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "Google LLC" + %s[0].address == "REDACTED FOR PRIVACY\nREDACTED FOR PRIVACY\nREDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "CA" + %s[0].country == nil + %s[0].country_code == "US" + %s[0].phone == "REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY" + %s[0].email == "Please contact the Registrar listed above" + +#admin_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "REDACTED FOR PRIVACY" + %s[0].address == "REDACTED FOR PRIVACY\nREDACTED FOR PRIVACY\nREDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "REDACTED FOR PRIVACY" + %s[0].country == nil + %s[0].country_code == "REDACTED FOR PRIVACY" + %s[0].phone == "REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY" + %s[0].email == "Please contact the Registrar listed above" + +#technical_contacts + %s %CLASS{array} + %s %SIZE{1} + %s[0] %CLASS{contact} + %s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL + %s[0].id == "REDACTED FOR PRIVACY" + %s[0].name == "REDACTED FOR PRIVACY" + %s[0].organization == "REDACTED FOR PRIVACY" + %s[0].address == "REDACTED FOR PRIVACY\nREDACTED FOR PRIVACY\nREDACTED FOR PRIVACY" + %s[0].city == "REDACTED FOR PRIVACY" + %s[0].zip == "REDACTED FOR PRIVACY" + %s[0].state == "REDACTED FOR PRIVACY" + %s[0].country == nil + %s[0].country_code == "REDACTED FOR PRIVACY" + %s[0].phone == "REDACTED FOR PRIVACY" + %s[0].fax == "REDACTED FOR PRIVACY" + %s[0].email == "Please contact the Registrar listed above" + + +#nameservers + %s %CLASS{array} + %s %SIZE{4} + %s[0] %CLASS{nameserver} + %s[0] %CLASS{nameserver} + %s[0].name == "ns4.google.com" + %s[1] %CLASS{nameserver} + %s[1].name == "ns2.google.com" + %s[2] %CLASS{nameserver} + %s[2].name == "ns1.google.com" + %s[3] %CLASS{nameserver} + %s[3].name == "ns3.google.com" diff --git a/spec/fixtures/responses/whois.registry.in/in/status_registered.txt b/spec/fixtures/responses/whois.registry.in/in/status_registered.txt new file mode 100644 index 00000000..e71c1765 --- /dev/null +++ b/spec/fixtures/responses/whois.registry.in/in/status_registered.txt @@ -0,0 +1,70 @@ +Domain Name: google.in +Registry Domain ID: D21089-IN +Registrar WHOIS Server: +Registrar URL: http://www.markmonitor.com +Updated Date: 2021-01-18T10:38:43Z +Creation Date: 2005-02-14T20:35:14Z +Registry Expiry Date: 2022-02-14T20:35:14Z +Registrar: MarkMonitor Inc. +Registrar IANA ID: 292 +Registrar Abuse Contact Email: +Registrar Abuse Contact Phone: +Domain Status: clientTransferProhibited http://www.icann.org/epp#clientTransferProhibited +Domain Status: clientDeleteProhibited http://www.icann.org/epp#clientDeleteProhibited +Domain Status: clientUpdateProhibited http://www.icann.org/epp#clientUpdateProhibited +Registry Registrant ID: REDACTED FOR PRIVACY +Registrant Name: REDACTED FOR PRIVACY +Registrant Organization: Google LLC +Registrant Street: REDACTED FOR PRIVACY +Registrant Street: REDACTED FOR PRIVACY +Registrant Street: REDACTED FOR PRIVACY +Registrant City: REDACTED FOR PRIVACY +Registrant State/Province: CA +Registrant Postal Code: REDACTED FOR PRIVACY +Registrant Country: US +Registrant Phone: REDACTED FOR PRIVACY +Registrant Phone Ext: REDACTED FOR PRIVACY +Registrant Fax: REDACTED FOR PRIVACY +Registrant Fax Ext: REDACTED FOR PRIVACY +Registrant Email: Please contact the Registrar listed above +Registry Admin ID: REDACTED FOR PRIVACY +Admin Name: REDACTED FOR PRIVACY +Admin Organization: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin Street: REDACTED FOR PRIVACY +Admin City: REDACTED FOR PRIVACY +Admin State/Province: REDACTED FOR PRIVACY +Admin Postal Code: REDACTED FOR PRIVACY +Admin Country: REDACTED FOR PRIVACY +Admin Phone: REDACTED FOR PRIVACY +Admin Phone Ext: REDACTED FOR PRIVACY +Admin Fax: REDACTED FOR PRIVACY +Admin Fax Ext: REDACTED FOR PRIVACY +Admin Email: Please contact the Registrar listed above +Registry Tech ID: REDACTED FOR PRIVACY +Tech Name: REDACTED FOR PRIVACY +Tech Organization: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech Street: REDACTED FOR PRIVACY +Tech City: REDACTED FOR PRIVACY +Tech State/Province: REDACTED FOR PRIVACY +Tech Postal Code: REDACTED FOR PRIVACY +Tech Country: REDACTED FOR PRIVACY +Tech Phone: REDACTED FOR PRIVACY +Tech Phone Ext: REDACTED FOR PRIVACY +Tech Fax: REDACTED FOR PRIVACY +Tech Fax Ext: REDACTED FOR PRIVACY +Tech Email: Please contact the Registrar listed above +Name Server: ns4.google.com +Name Server: ns2.google.com +Name Server: ns1.google.com +Name Server: ns3.google.com +DNSSEC: unsigned +URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/ +>>> Last update of WHOIS database: 2021-11-09T16:27:43Z <<< + +For more information on Whois status codes, please visit https://icann.org/epp + +Access to .IN WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the .IN registry database. The data in this record is provided by .IN Registry for informational purposes only ,and .IN does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator or a Registrar, or Neustar except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. .IN reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. diff --git a/spec/fixtures/responses/whois.registry.om/om/status_registered.expected b/spec/fixtures/responses/whois.registry.om/om/status_registered.expected index 2b135776..251d455b 100644 --- a/spec/fixtures/responses/whois.registry.om/om/status_registered.expected +++ b/spec/fixtures/responses/whois.registry.om/om/status_registered.expected @@ -34,7 +34,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "Oman Telecommunication Company" - %s.organization == "Oman Telecommunication Company" %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/whois.registry.qa/qa/status_registered.expected b/spec/fixtures/responses/whois.registry.qa/qa/status_registered.expected index 1ec84577..89a9cc0e 100644 --- a/spec/fixtures/responses/whois.registry.qa/qa/status_registered.expected +++ b/spec/fixtures/responses/whois.registry.qa/qa/status_registered.expected @@ -33,7 +33,6 @@ %s %CLASS{registrar} %s.id == "QatarTelecom" %s.name == "Qatar Telecom (Qtel) Q. S. C" - %s.organization == "Qatar Telecom (Qtel) Q. S. C" #registrant_contacts %s %CLASS{array} diff --git a/spec/fixtures/responses/whois.rnids.rs/rs/status_registered.expected b/spec/fixtures/responses/whois.rnids.rs/rs/status_registered.expected index 4dfbe278..c0348523 100644 --- a/spec/fixtures/responses/whois.rnids.rs/rs/status_registered.expected +++ b/spec/fixtures/responses/whois.rnids.rs/rs/status_registered.expected @@ -36,7 +36,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "NINET Company d.o.o." - %s.organization == nil %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/whois.rotld.ro/ro/property_status_updateprohibited.expected b/spec/fixtures/responses/whois.rotld.ro/ro/property_status_updateprohibited.expected deleted file mode 100644 index 3f198701..00000000 --- a/spec/fixtures/responses/whois.rotld.ro/ro/property_status_updateprohibited.expected +++ /dev/null @@ -1,8 +0,0 @@ -#status - %s == :registered - -#available? - %s == false - -#registered? - %s == true diff --git a/spec/fixtures/responses/whois.rotld.ro/ro/property_status_updateprohibited.txt b/spec/fixtures/responses/whois.rotld.ro/ro/property_status_updateprohibited.txt deleted file mode 100644 index 02416369..00000000 --- a/spec/fixtures/responses/whois.rotld.ro/ro/property_status_updateprohibited.txt +++ /dev/null @@ -1,28 +0,0 @@ - -% Whois Server Version 3.0 - whois.rotld.ro:43 - -% Rights restricted by copyright. -% Specifically, this data MAY ONLY be used for Internet operational -% purposes. It may not be used for targeted advertising or any -% other purpose. - -% Este INTERZISA folosirea datelor de pe acest server in oricare -% alt scop decat operarea retelei. In special este INTERZISA -% folosirea lor in scopuri publicitare. - -% Top Level Domain : ro -% Maintainance : www.rotld.ro - - Domain Name: google.ro - Registered On: 2000-07-17 - Registrar: MarkMonitor Inc. - Referral URL: - - Nameserver: ns4.google.com - Nameserver: ns1.google.com - Nameserver: ns3.google.com - Nameserver: ns2.google.com - - Domain Status: UpdateProhibited - - diff --git a/spec/fixtures/responses/whois.rotld.ro/ro/status_available.expected b/spec/fixtures/responses/whois.rotld.ro/ro/status_available.expected index 982cebd7..d8970605 100644 --- a/spec/fixtures/responses/whois.rotld.ro/ro/status_available.expected +++ b/spec/fixtures/responses/whois.rotld.ro/ro/status_available.expected @@ -9,14 +9,13 @@ #created_on - %s %ERROR{AttributeNotSupported} + %s == nil #updated_on %s %ERROR{AttributeNotSupported} #expires_on - %s %ERROR{AttributeNotSupported} - + %s == nil #nameservers %s %CLASS{array} diff --git a/spec/fixtures/responses/whois.rotld.ro/ro/status_available.txt b/spec/fixtures/responses/whois.rotld.ro/ro/status_available.txt index fdcfbd44..2b5a0176 100644 --- a/spec/fixtures/responses/whois.rotld.ro/ro/status_available.txt +++ b/spec/fixtures/responses/whois.rotld.ro/ro/status_available.txt @@ -1,17 +1,29 @@ -% Whois Server Version 3.0 - whois.rotld.ro:43 +% The WHOIS service offered by ROTLD and the access to the records in the ROTLD WHOIS database +% are provided for information purposes and to be used within the scope of technical or administrative +% necessities of Internet operation or to remedy legal problems. The use for other purposes, +% in particular for advertising and domain hunting, is not permitted. -% Rights restricted by copyright. -% Specifically, this data MAY ONLY be used for Internet operational -% purposes. It may not be used for targeted advertising or any -% other purpose. +% Without prejudice to the above, it is explicitly forbidden to extract, copy and/or use or re-utilise +% in any form and by any means (electronically or not) the whole or a quantitatively or qualitatively +% substantial part of the contents of the WHOIS database without prior and explicit permission by ROTLD, +% nor in any attempt hereof, to apply automated, electronic processes to ROTLD (or its systems). -% Este INTERZISA folosirea datelor de pe acest server in oricare -% alt scop decat operarea retelei. In special este INTERZISA -% folosirea lor in scopuri publicitare. +% ROTLD cannot, under any circumstances, be held liable in case the stored information would prove +% to be wrong, incomplete or not accurate in any sense. + +% You agree that any reproduction and/or transmission of data for commercial purposes will always +% be considered as the extraction of a substantial part of the content of the WHOIS database. + +% By submitting the query you agree to abide by this policy and accept that ROTLD can take measures +% to limit the use of its WHOIS services in order to protect the privacy of its registrants or the +% integrity of the database. + +% The ROTLD WHOIS service on port 43 never discloses any information concerning the registrant. + +% Registrant information can be obtained through use of the web-based whois service available from +% the ROTLD website www.rotld.ro -% Top Level Domain : ro -% Maintainance : www.rotld.ro % No entries found for the selected source(s). diff --git a/spec/fixtures/responses/whois.rotld.ro/ro/status_registered.expected b/spec/fixtures/responses/whois.rotld.ro/ro/status_registered.expected index a287bbdc..5273bc47 100644 --- a/spec/fixtures/responses/whois.rotld.ro/ro/status_registered.expected +++ b/spec/fixtures/responses/whois.rotld.ro/ro/status_registered.expected @@ -9,31 +9,30 @@ #created_on - %s %ERROR{AttributeNotSupported} + %s %CLASS{time} + %s %TIME{2000-07-17 00:00:00} #updated_on %s %ERROR{AttributeNotSupported} #expires_on - %s %ERROR{AttributeNotSupported} + %s %CLASS{time} + %s %TIME{2024-09-15 00:00:00} +#registrar + %s %CLASS{registrar} + %s.id == nil + %s.name == "MarkMonitor Inc." + %s.url == "www.markmonitor.com" #nameservers %s %CLASS{array} %s %SIZE{4} %s[0] %CLASS{nameserver} %s[0].name == "ns1.google.com" - %s[0].ipv4 == nil - %s[0].ipv6 == nil %s[1] %CLASS{nameserver} %s[1].name == "ns2.google.com" - %s[1].ipv4 == nil - %s[1].ipv6 == nil %s[2] %CLASS{nameserver} %s[2].name == "ns3.google.com" - %s[2].ipv4 == nil - %s[2].ipv6 == nil %s[3] %CLASS{nameserver} %s[3].name == "ns4.google.com" - %s[3].ipv4 == nil - %s[3].ipv6 == nil diff --git a/spec/fixtures/responses/whois.rotld.ro/ro/status_registered.txt b/spec/fixtures/responses/whois.rotld.ro/ro/status_registered.txt index fb084973..1e433302 100644 --- a/spec/fixtures/responses/whois.rotld.ro/ro/status_registered.txt +++ b/spec/fixtures/responses/whois.rotld.ro/ro/status_registered.txt @@ -1,22 +1,37 @@ -% Whois Server Version 3.0 - whois.rotld.ro:43 +% The WHOIS service offered by ROTLD and the access to the records in the ROTLD WHOIS database +% are provided for information purposes and to be used within the scope of technical or administrative +% necessities of Internet operation or to remedy legal problems. The use for other purposes, +% in particular for advertising and domain hunting, is not permitted. -% Rights restricted by copyright. -% Specifically, this data MAY ONLY be used for Internet operational -% purposes. It may not be used for targeted advertising or any -% other purpose. +% Without prejudice to the above, it is explicitly forbidden to extract, copy and/or use or re-utilise +% in any form and by any means (electronically or not) the whole or a quantitatively or qualitatively +% substantial part of the contents of the WHOIS database without prior and explicit permission by ROTLD, +% nor in any attempt hereof, to apply automated, electronic processes to ROTLD (or its systems). -% Este INTERZISA folosirea datelor de pe acest server in oricare -% alt scop decat operarea retelei. In special este INTERZISA -% folosirea lor in scopuri publicitare. +% ROTLD cannot, under any circumstances, be held liable in case the stored information would prove +% to be wrong, incomplete or not accurate in any sense. + +% You agree that any reproduction and/or transmission of data for commercial purposes will always +% be considered as the extraction of a substantial part of the content of the WHOIS database. + +% By submitting the query you agree to abide by this policy and accept that ROTLD can take measures +% to limit the use of its WHOIS services in order to protect the privacy of its registrants or the +% integrity of the database. + +% The ROTLD WHOIS service on port 43 never discloses any information concerning the registrant. + +% Registrant information can be obtained through use of the web-based whois service available from +% the ROTLD website www.rotld.ro -% Top Level Domain : ro -% Maintainance : www.rotld.ro Domain Name: google.ro Registered On: 2000-07-17 + Expires On: 2024-09-15 Registrar: MarkMonitor Inc. - Referral URL: http://www.markmonitor.com + Referral URL: www.markmonitor.com + + DNSSEC: Inactive Nameserver: ns1.google.com Nameserver: ns2.google.com diff --git a/spec/fixtures/responses/whois.rrpproxy.net/status_registered.expected b/spec/fixtures/responses/whois.rrpproxy.net/status_registered.expected index 6f6c8b78..993b4c0c 100644 --- a/spec/fixtures/responses/whois.rrpproxy.net/status_registered.expected +++ b/spec/fixtures/responses/whois.rrpproxy.net/status_registered.expected @@ -31,7 +31,6 @@ %s %CLASS{registrar} %s.id == "269" %s.name == "Key-Systems GmbH" - %s.organization == "Key-Systems GmbH" %s.url == "http://www.reasonnet.com" diff --git a/spec/fixtures/responses/whois.safenames.net/status_registered.expected b/spec/fixtures/responses/whois.safenames.net/status_registered.expected index 5ca7c4c2..adf841e3 100644 --- a/spec/fixtures/responses/whois.safenames.net/status_registered.expected +++ b/spec/fixtures/responses/whois.safenames.net/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "447" %s.name == "Safenames Ltd" - %s.organization == "Safenames Ltd" %s.url == "http://www.safenames.net" diff --git a/spec/fixtures/responses/whois.schlund.info/status_registered.expected b/spec/fixtures/responses/whois.schlund.info/status_registered.expected index 3be1e637..d3125908 100644 --- a/spec/fixtures/responses/whois.schlund.info/status_registered.expected +++ b/spec/fixtures/responses/whois.schlund.info/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "83" %s.name == "1&1 Internet AG" - %s.organization == "1&1 Internet AG" %s.url == "http://1and1.com" @@ -47,7 +46,7 @@ %s[0].address == "Elgendorfer Str. 57" %s[0].city == "Montabaur" %s[0].zip == "56410" - %s[0].state == "" + %s[0].state == nil %s[0].country_code == "DE" %s[0].phone == "+49.2602960" %s[0].fax == "+49.72191374215" @@ -64,7 +63,7 @@ %s[0].address == "Elgendorfer Str. 57" %s[0].city == "Montabaur" %s[0].zip == "56410" - %s[0].state == "" + %s[0].state == nil %s[0].country_code == "DE" %s[0].phone == "+49.2602960" %s[0].fax == "+49.72191374215" @@ -81,7 +80,7 @@ %s[0].address == "Brauerstr. 48" %s[0].city == "Karlsruhe" %s[0].zip == "76135" - %s[0].state == "" + %s[0].state == nil %s[0].country_code == "DE" %s[0].phone == "+49.7219600" %s[0].fax == "+49.72191374248" diff --git a/spec/fixtures/responses/whois.smallregistry.net/status_registered.expected b/spec/fixtures/responses/whois.smallregistry.net/status_registered.expected index d01371a7..eddf7124 100644 --- a/spec/fixtures/responses/whois.smallregistry.net/status_registered.expected +++ b/spec/fixtures/responses/whois.smallregistry.net/status_registered.expected @@ -36,7 +36,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "GOOGLE" - %s.organization == "GOOGLE" %s.url == "http://www.google.com" #registrant_contacts diff --git a/spec/fixtures/responses/whois.srs.net.nz/nz/status_registered.expected b/spec/fixtures/responses/whois.srs.net.nz/nz/status_registered.expected index 014a1119..c9cacf9a 100644 --- a/spec/fixtures/responses/whois.srs.net.nz/nz/status_registered.expected +++ b/spec/fixtures/responses/whois.srs.net.nz/nz/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonitor" - %s.organization == nil %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/whois.sx/sx/status_registered.expected b/spec/fixtures/responses/whois.sx/sx/status_registered.expected index f996b4a6..58f3d04a 100644 --- a/spec/fixtures/responses/whois.sx/sx/status_registered.expected +++ b/spec/fixtures/responses/whois.sx/sx/status_registered.expected @@ -36,7 +36,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "SX Registry O" - %s.organization == nil %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/whois.tcinet.ru/ru/status_registered.expected b/spec/fixtures/responses/whois.tcinet.ru/ru/status_registered.expected index 78a22cc4..e628ae3e 100644 --- a/spec/fixtures/responses/whois.tcinet.ru/ru/status_registered.expected +++ b/spec/fixtures/responses/whois.tcinet.ru/ru/status_registered.expected @@ -29,9 +29,8 @@ #registrar %s %CLASS{registrar} - %s.id == "RU-CENTER-REG-RIPN" - %s.name == nil - %s.organization == nil + %s.id == nil + %s.name == "RU-CENTER-REG-RIPN" #registrant_contacts %s %ERROR{AttributeNotSupported} diff --git a/spec/fixtures/responses/whois.tcinet.ru/su/status_registered.expected b/spec/fixtures/responses/whois.tcinet.ru/su/status_registered.expected index 09a350c4..28cf866f 100644 --- a/spec/fixtures/responses/whois.tcinet.ru/su/status_registered.expected +++ b/spec/fixtures/responses/whois.tcinet.ru/su/status_registered.expected @@ -29,9 +29,8 @@ #registrar %s %CLASS{registrar} - %s.id == "RUCENTER-REG-FID" - %s.name == nil - %s.organization == nil + %s.id == nil + %s.name == "RUCENTER-REG-FID" #registrant_contacts %s %ERROR{AttributeNotSupported} diff --git a/spec/fixtures/responses/whois.tcinet.ru/xn--p1ai/status_registered.expected b/spec/fixtures/responses/whois.tcinet.ru/xn--p1ai/status_registered.expected index b5ab784f..b47774a8 100644 --- a/spec/fixtures/responses/whois.tcinet.ru/xn--p1ai/status_registered.expected +++ b/spec/fixtures/responses/whois.tcinet.ru/xn--p1ai/status_registered.expected @@ -29,9 +29,8 @@ #registrar %s %CLASS{registrar} - %s.id == "R01-REG-RF" - %s.name == nil - %s.organization == nil + %s.id == nil + %s.name == "R01-REG-RF" #registrant_contacts %s %ERROR{AttributeNotSupported} diff --git a/spec/fixtures/responses/whois.tld.ee/ee/property_status_serverhold.expected b/spec/fixtures/responses/whois.tld.ee/ee/property_status_serverhold.expected index 3b360e7e..a8698953 100644 --- a/spec/fixtures/responses/whois.tld.ee/ee/property_status_serverhold.expected +++ b/spec/fixtures/responses/whois.tld.ee/ee/property_status_serverhold.expected @@ -31,7 +31,6 @@ #registrar %s %CLASS{registrar} %s.name == "Edicy OÜ" - %s.organization == "Edicy OÜ" %s.url == "http://www.edicy.com" #registrant_contacts diff --git a/spec/fixtures/responses/whois.tld.ee/ee/status_expired.expected b/spec/fixtures/responses/whois.tld.ee/ee/status_expired.expected index 7d9a2a2d..02ef55f3 100644 --- a/spec/fixtures/responses/whois.tld.ee/ee/status_expired.expected +++ b/spec/fixtures/responses/whois.tld.ee/ee/status_expired.expected @@ -28,7 +28,6 @@ #registrar %s %CLASS{registrar} %s.name == "Elisa Eesti AS" - %s.organization == "Elisa Eesti AS" %s.url == "http://www.elisa.ee" #registrant_contacts diff --git a/spec/fixtures/responses/whois.tld.ee/ee/status_registered.expected b/spec/fixtures/responses/whois.tld.ee/ee/status_registered.expected index 8aafb0f9..7af333d7 100644 --- a/spec/fixtures/responses/whois.tld.ee/ee/status_registered.expected +++ b/spec/fixtures/responses/whois.tld.ee/ee/status_registered.expected @@ -31,7 +31,6 @@ #registrar %s %CLASS{registrar} %s.name == "Elisa Eesti AS" - %s.organization == "Elisa Eesti AS" %s.url == "http://www.elisa.ee" #registrant_contacts diff --git a/spec/fixtures/responses/whois.tld.sy/sy/status_registered.expected b/spec/fixtures/responses/whois.tld.sy/sy/status_registered.expected index 47bb255f..9448b9be 100644 --- a/spec/fixtures/responses/whois.tld.sy/sy/status_registered.expected +++ b/spec/fixtures/responses/whois.tld.sy/sy/status_registered.expected @@ -31,7 +31,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "nans" - %s.organization == nil %s.url == nil diff --git a/spec/fixtures/responses/whois.tucows.com/status_registered.expected b/spec/fixtures/responses/whois.tucows.com/status_registered.expected index bb8fc20c..d740aea1 100644 --- a/spec/fixtures/responses/whois.tucows.com/status_registered.expected +++ b/spec/fixtures/responses/whois.tucows.com/status_registered.expected @@ -33,7 +33,6 @@ %s %CLASS{registrar} %s.id == "69" %s.name == "TUCOWS, INC." - %s.organization == "TUCOWS, INC." %s.url == "http://tucowsdomains.com" #registrant_contacts diff --git a/spec/fixtures/responses/whois.tznic.or.tz/tz/status_registered.expected b/spec/fixtures/responses/whois.tznic.or.tz/tz/status_registered.expected index de48fd9d..2ddeef5c 100644 --- a/spec/fixtures/responses/whois.tznic.or.tz/tz/status_registered.expected +++ b/spec/fixtures/responses/whois.tznic.or.tz/tz/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "REG-TZNIC" %s.name == "REG-TZNIC" - %s.organization == nil %s.url == nil #registrant_contacts diff --git a/spec/fixtures/responses/whois.udag.net/status_registered.expected b/spec/fixtures/responses/whois.udag.net/status_registered.expected index 824b391f..fb4ce02d 100644 --- a/spec/fixtures/responses/whois.udag.net/status_registered.expected +++ b/spec/fixtures/responses/whois.udag.net/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "1408" %s.name == "united domains AG" - %s.organization == "united domains AG" %s.url == "http://www.united-domains.de/" diff --git a/spec/fixtures/responses/whois.uniregistry.net/tattoo/status_registered.expected b/spec/fixtures/responses/whois.uniregistry.net/tattoo/status_registered.expected index f35425cf..3a58f876 100644 --- a/spec/fixtures/responses/whois.uniregistry.net/tattoo/status_registered.expected +++ b/spec/fixtures/responses/whois.uniregistry.net/tattoo/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "9999" %s.name == "Uniregistry, Corp." - %s.organization == "Uniregistry, Corp." %s.url == nil diff --git a/spec/fixtures/responses/whois.verisign-grs.com/com/status_registered.expected b/spec/fixtures/responses/whois.verisign-grs.com/com/status_registered.expected index a8d13d23..a3d53460 100644 --- a/spec/fixtures/responses/whois.verisign-grs.com/com/status_registered.expected +++ b/spec/fixtures/responses/whois.verisign-grs.com/com/status_registered.expected @@ -36,7 +36,6 @@ %s %CLASS{registrar} %s.id == "292" %s.name == "MarkMonitor Inc." - %s.organization == nil %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.verisign-grs.com/net/status_registered.expected b/spec/fixtures/responses/whois.verisign-grs.com/net/status_registered.expected index 3436048a..7e8c4ae2 100644 --- a/spec/fixtures/responses/whois.verisign-grs.com/net/status_registered.expected +++ b/spec/fixtures/responses/whois.verisign-grs.com/net/status_registered.expected @@ -36,7 +36,6 @@ %s %CLASS{registrar} %s.id == "292" %s.name == "MarkMonitor Inc." - %s.organization == nil %s.url == "http://www.markmonitor.com" diff --git a/spec/fixtures/responses/whois.wildwestdomains.com/status_available.expected b/spec/fixtures/responses/whois.wildwestdomains.com/status_available.expected index 6bbcc28c..b74f7760 100644 --- a/spec/fixtures/responses/whois.wildwestdomains.com/status_available.expected +++ b/spec/fixtures/responses/whois.wildwestdomains.com/status_available.expected @@ -1,5 +1,5 @@ #domain - %s == nil + %s == "sadasdsa.com" #domain_id %s == nil diff --git a/spec/fixtures/responses/whois.wildwestdomains.com/status_registered.expected b/spec/fixtures/responses/whois.wildwestdomains.com/status_registered.expected index 7fc70147..6be4ae30 100644 --- a/spec/fixtures/responses/whois.wildwestdomains.com/status_registered.expected +++ b/spec/fixtures/responses/whois.wildwestdomains.com/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == "440" %s.name == "Wild West Domains, LLC" - %s.organization == "Wild West Domains, LLC" %s.url == "http://www.wildwestdomains.com" diff --git a/spec/fixtures/responses/whois.yoursrs.com/status_registered.expected b/spec/fixtures/responses/whois.yoursrs.com/status_registered.expected index e40ab085..05302e36 100644 --- a/spec/fixtures/responses/whois.yoursrs.com/status_registered.expected +++ b/spec/fixtures/responses/whois.yoursrs.com/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "REALTIME REGISTER B.V." - %s.organization == nil %s.url == nil diff --git a/spec/fixtures/responses/whois.za.org/za.org/status_registered.expected b/spec/fixtures/responses/whois.za.org/za.org/status_registered.expected index 11f52d49..1dd9c4c1 100644 --- a/spec/fixtures/responses/whois.za.org/za.org/status_registered.expected +++ b/spec/fixtures/responses/whois.za.org/za.org/status_registered.expected @@ -14,7 +14,7 @@ #updated_on %s %CLASS{time} - %s %TIME{2005-08-15 12:15:10} + %s %TIME{2005-08-15 12:15:10 BST} #expires_on %s %ERROR{AttributeNotSupported} diff --git a/spec/fixtures/responses/whois1.nic.bi/bi/status_registered.expected b/spec/fixtures/responses/whois1.nic.bi/bi/status_registered.expected index bc71e645..a83b93b1 100644 --- a/spec/fixtures/responses/whois1.nic.bi/bi/status_registered.expected +++ b/spec/fixtures/responses/whois1.nic.bi/bi/status_registered.expected @@ -32,7 +32,6 @@ %s %CLASS{registrar} %s.id == nil %s.name == "MarkMonito" - %s.organization == nil %s.url == nil diff --git a/spec/tlds.yml b/spec/tlds.yml index 8363b810..3a51e0e1 100644 --- a/spec/tlds.yml +++ b/spec/tlds.yml @@ -2,17 +2,13 @@ ae.org: _server: whois.centralnic.com _subdir: ae.org status_available: u34jedzcq.ae.org - status_registered: kidzlink.ae.org -ar.com: - _server: whois.centralnic.com - _subdir: ar.com - status_available: u34jedzcq.ar.com - status_registered: hotel.ar.com + status_registered: greenflame.ae.org + status_purged: kidzlink.ae.org br.com: _server: whois.centralnic.com _subdir: br.com status_available: u34jedzcq.br.com - status_registered: billboard.br.com + status_registered: linet.br.com cn.com: _server: whois.centralnic.com _subdir: cn.com @@ -33,71 +29,21 @@ eu.com: _subdir: eu.com status_available: u34jedzcq.eu.com status_registered: walkabout.eu.com -gb.com: - _server: whois.centralnic.com - _subdir: gb.com - status_available: u34jedzcq.gb.com - status_registered: hotel.gb.com -gb.net: - _server: whois.centralnic.com - _subdir: gb.net - status_available: u34jedzcq.gb.net - status_registered: hotel.gb.net gr.com: _server: whois.centralnic.com _subdir: gr.com status_available: u34jedzcq.gr.com status_registered: google.gr.com -hu.com: - _server: whois.centralnic.com - _subdir: hu.com - status_available: u34jedzcq.hu.com - status_registered: porn.hu.com jp.net: _server: whois.centralnic.com _subdir: jp.net status_available: u34jedzcq.jp.net status_registered: ntt.jp.net -jpn.com: - _server: whois.centralnic.com - _subdir: jpn.com - status_available: u34jedzcq.jpn.com - status_registered: koi.jpn.com -kr.com: - _server: whois.centralnic.com - _subdir: kr.com - status_available: u34jedzcq.kr.com - status_registered: academyart.kr.com -no.com: - _server: whois.centralnic.com - _subdir: no.com - status_available: u34jedzcq.no.com - # status_registered: mrsa.no.com -qc.com: - _server: whois.centralnic.com - _subdir: qc.com - status_available: u34jedzcq.qc.com - status_registered: ceo.qc.com ru.com: _server: whois.centralnic.com _subdir: ru.com status_available: u34jedzcq.ru.com status_registered: srk.ru.com -sa.com: - _server: whois.centralnic.com - _subdir: sa.com - status_available: u34jedzcq.sa.com - status_registered: fynbos.sa.com -se.com: - _server: whois.centralnic.com - _subdir: se.com - status_available: u34jedzcq.se.com - status_registered: hotel.se.com -se.net: - _server: whois.centralnic.com - _subdir: se.net - status_available: u34jedzcq.se.net - status_registered: hotel.se.net uk.com: _server: whois.centralnic.com _subdir: uk.com @@ -302,7 +248,7 @@ at: status_available: u34jedzcq.at status_registered: google.at au: - _server: whois.audns.net.au + _server: whois.auda.org.au status_available: u34jedzcq.com.au status_registered: google.com.au _status_registered_skipdiff: @@ -386,6 +332,7 @@ ca: _server: whois.cira.ca status_available: u34jedzcq.ca status_registered: google.ca + status_invalid: mediom.ca _status_available_skipdiff: - 4 _status_registered_skipdiff: @@ -640,10 +587,6 @@ hu: _server: whois.nic.hu status_available: u34jedzcq.hu status_registered: google.hu -id: - _server: whois.pandi.or.id - status_available: u34jedzcq.co.id - status_registered: google.co.id ie: _server: whois.domainregistry.ie status_available: u34jedzcq.ie @@ -843,7 +786,7 @@ mv: mw: _adapter: web mx: - _server: whois.nic.mc + _server: whois.mx status_available: u34jedzcq.mx status_registered: google.mx my: @@ -1245,7 +1188,7 @@ zw: # status_registered: nic.wed bike: - _server: whois.donuts.co + _server: whois.nic.bike _subdir: bike status_available: u34jedzcq.bike status_registered: whereismy.bike @@ -1394,7 +1337,50 @@ xn--ngbc5azd: _server: whois.nic.xn--ngbc5azd _subdir: xn--ngbc5azd +app: + _server: whois.nic.google + _subdir: app + status_available: u34jedzcq.app + status_registered: google.app + +dev: + _server: whois.nic.google + _subdir: dev + status_available: u34jedzcq.dev + status_registered: google.dev + +how: + _server: whois.nic.google + _subdir: how + status_available: u34jedzcq.how + status_registered: google.how + +page: + _server: whois.nic.google + _subdir: page + status_available: u34jedzcq.page + status_registered: google.page + +soy: + _server: whois.nic.google + _subdir: soy + status_available: u34jedzcq.soy + status_registered: google.soy + // .みんな xn--q9jyb4c: - _server: domain-registry-whois.l.google.com + _server: whois.nic.google _subdir: xn--q9jyb4c + status_available: u34jedzcq.xn--q9jyb4c + status_registered: google.xn--q9jyb4c + +systems: + _server: whois.nic.systems + status_available: u34jedzcq.systems + status_available_premium: tld.systems + status_registered: donuts.systems + status_reserved: google.systems +online: + _server: whois.nic.online + status_available: u34jedzcq.online + status_registered: google.online diff --git a/spec/whois/parser_spec.rb b/spec/whois/parser_spec.rb index d0e47e42..fbe0ced2 100644 --- a/spec/whois/parser_spec.rb +++ b/spec/whois/parser_spec.rb @@ -8,19 +8,20 @@ describe ".parser_for" do - it "returns the blank parser if the parser doesn't exist" do - expect(described_class.parser_for(Whois::Record::Part.new(host: "whois.missing.test")).class.name).to eq("Whois::Parsers::Blank") - expect(described_class.parser_for(Whois::Record::Part.new(host: "216.157.192.3")).class.name).to eq("Whois::Parsers::Blank") + it "simply instanciate the parser class returned by .parser_klass" do + expect(described_class.parser_for(Whois::Record::Part.new(host: "whois.missing.test"))).to be_a(Whois::Parsers::Blank) + expect(described_class.parser_for(Whois::Record::Part.new(host: "216.157.192.3"))).to be_a(Whois::Parsers::Blank) + expect(described_class.parser_for(Whois::Record::Part.new(host: "whois.nic.it"))).to be_a(Whois::Parsers::WhoisNicIt) end end describe ".parser_klass" do it "returns the parser hostname converted into a class" do - expect(described_class.parser_klass("whois.verisign-grs.com").name).to eq("Whois::Parsers::WhoisVerisignGrsCom") + expect(described_class.parser_klass(Whois::Record::Part.new(host: "whois.verisign-grs.com")).name).to eq("Whois::Parsers::WhoisVerisignGrsCom") end it "recognizes and lazy-loads classes" do - expect(described_class.parser_klass("whois.nic.it").name).to eq("Whois::Parsers::WhoisNicIt") + expect(described_class.parser_klass(Whois::Record::Part.new(host: "whois.nic.it"))).to eq(Whois::Parsers::WhoisNicIt) end it "recognizes preloaded classes" do @@ -28,11 +29,15 @@ class PreloadedParserTest end RUBY - expect(described_class.parser_klass("preloaded.parser.test").name).to eq("Whois::Parsers::PreloadedParserTest") + expect(described_class.parser_klass(Whois::Record::Part.new(host: "preloaded.parser.test"))).to eq(Whois::Parsers::PreloadedParserTest) + end + + it "returns the DonutsInc parser if the parser doesn't exist and the body contains Donuts disclaimer" do + expect(described_class.parser_klass(Whois::Record::Part.new(host: "whois.nic.domains", body: "Terms of Use: Identity Digital Inc."))).to eq(Whois::Parsers::DonutsInc) end - it "raises LoadError if the parser doesn't exist" do - expect { described_class.parser_klass("whois.missing.test") }.to raise_error(LoadError) + it "returns the blank parser if the parser doesn't exist" do + expect(described_class.parser_klass(Whois::Record::Part.new(host: "whois.missing.test"))).to eq(Whois::Parsers::Blank) end end diff --git a/spec/whois/parsers/base_spec.rb b/spec/whois/parsers/base_spec.rb index 173ac612..b5a38372 100644 --- a/spec/whois/parsers/base_spec.rb +++ b/spec/whois/parsers/base_spec.rb @@ -40,6 +40,18 @@ expect(described_class.parse_time("1970-01-01T00:00:00Z")).to eq(Time.at(0)) end + it "parse time in UTC by default" do + expect(described_class.parse_time("2021-11-16 08:03")).to eq(Time.utc(2021, 11, 16, 8, 3)) + end + + it "parse custom time zone if present" do + expect(described_class.parse_time("2021-11-16 08:03 JST")).to eq(Time.utc(2021, 11, 15, 23, 3)) + end + + it "allows custom default timezone" do + expect(described_class.parse_time("2021-11-16 08:03", timezone: "Tokyo")).to eq(Time.utc(2021, 11, 15, 23, 3)) + end + it "removes microseconds on parsed timestamps" do expect(described_class.parse_time("1970-01-01T00:00:00.123Z")).to eq(Time.at(0)) end diff --git a/spec/whois/parsers/responses/capetown-whois.registry.net.za/capetown/status_available_spec.rb b/spec/whois/parsers/responses/capetown-whois.registry.net.za/capetown/status_available_spec.rb index 10989ac4..6e80baf1 100644 --- a/spec/whois/parsers/responses/capetown-whois.registry.net.za/capetown/status_available_spec.rb +++ b/spec/whois/parsers/responses/capetown-whois.registry.net.za/capetown/status_available_spec.rb @@ -9,83 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/capetown-whois.registry.net.za.rb' -describe Whois::Parsers::CapetownWhoisRegistryNetZa, "status_available.expected" do +describe "capetown-whois.registry.net.za", :aggregate_failures do subject do file = fixture("responses", "capetown-whois.registry.net.za/capetown/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "capetown-whois.registry.net.za") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/capetown-whois.registry.net.za/capetown/status_registered_spec.rb b/spec/whois/parsers/responses/capetown-whois.registry.net.za/capetown/status_registered_spec.rb index 4a5b9471..58ebcc3c 100644 --- a/spec/whois/parsers/responses/capetown-whois.registry.net.za/capetown/status_registered_spec.rb +++ b/spec/whois/parsers/responses/capetown-whois.registry.net.za/capetown/status_registered_spec.rb @@ -9,143 +9,91 @@ # require 'spec_helper' -require 'whois/parsers/capetown-whois.registry.net.za.rb' -describe Whois::Parsers::CapetownWhoisRegistryNetZa, "status_registered.expected" do +describe "capetown-whois.registry.net.za", :aggregate_failures do subject do file = fixture("responses", "capetown-whois.registry.net.za/capetown/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "capetown-whois.registry.net.za") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("registry.capetown") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("dom_3K3-9999") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2015-04-01 07:41:59 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2015-05-30 09:21:00 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2016-04-01 07:41:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("1466") - expect(subject.registrar.name).to eq("Lexsynergy") - expect(subject.registrar.organization).to eq("Lexsynergy") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("LEX-7IC-235J") - expect(subject.registrant_contacts[0].name).to eq("Lucky Mokgabudi Masilela") - expect(subject.registrant_contacts[0].organization).to eq("ZA Central Registry") - expect(subject.registrant_contacts[0].address).to eq("COZA House, Gazelle Close Corporate Park South") - expect(subject.registrant_contacts[0].city).to eq("Midrand") - expect(subject.registrant_contacts[0].zip).to eq("1685") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("ZA") - expect(subject.registrant_contacts[0].phone).to eq("+27.113140077") - expect(subject.registrant_contacts[0].fax).to eq("+27.113140088") - expect(subject.registrant_contacts[0].email).to eq("legal@co.za") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("LEX-7IC-235J") - expect(subject.admin_contacts[0].name).to eq("Lucky Mokgabudi Masilela") - expect(subject.admin_contacts[0].organization).to eq("ZA Central Registry") - expect(subject.admin_contacts[0].address).to eq("COZA House, Gazelle Close Corporate Park South") - expect(subject.admin_contacts[0].city).to eq("Midrand") - expect(subject.admin_contacts[0].zip).to eq("1685") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("ZA") - expect(subject.admin_contacts[0].phone).to eq("+27.113140077") - expect(subject.admin_contacts[0].fax).to eq("+27.113140088") - expect(subject.admin_contacts[0].email).to eq("legal@co.za") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("LEX-7IC-235J") - expect(subject.technical_contacts[0].name).to eq("Lucky Mokgabudi Masilela") - expect(subject.technical_contacts[0].organization).to eq("ZA Central Registry") - expect(subject.technical_contacts[0].address).to eq("COZA House, Gazelle Close Corporate Park South") - expect(subject.technical_contacts[0].city).to eq("Midrand") - expect(subject.technical_contacts[0].zip).to eq("1685") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("ZA") - expect(subject.technical_contacts[0].phone).to eq("+27.113140077") - expect(subject.technical_contacts[0].fax).to eq("+27.113140088") - expect(subject.technical_contacts[0].email).to eq("legal@co.za") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.nic.capetown") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.dnservices.co.za") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("registry.capetown") + expect(subject.domain_id).to eq("dom_3K3-9999") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2015-04-01 07:41:59 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2015-05-30 09:21:00 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2016-04-01 07:41:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("1466") + expect(subject.registrar.name).to eq("Lexsynergy") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("LEX-7IC-235J") + expect(subject.registrant_contacts[0].name).to eq("Lucky Mokgabudi Masilela") + expect(subject.registrant_contacts[0].organization).to eq("ZA Central Registry") + expect(subject.registrant_contacts[0].address).to eq("COZA House, Gazelle Close Corporate Park South") + expect(subject.registrant_contacts[0].city).to eq("Midrand") + expect(subject.registrant_contacts[0].zip).to eq("1685") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("ZA") + expect(subject.registrant_contacts[0].phone).to eq("+27.113140077") + expect(subject.registrant_contacts[0].fax).to eq("+27.113140088") + expect(subject.registrant_contacts[0].email).to eq("legal@co.za") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("LEX-7IC-235J") + expect(subject.admin_contacts[0].name).to eq("Lucky Mokgabudi Masilela") + expect(subject.admin_contacts[0].organization).to eq("ZA Central Registry") + expect(subject.admin_contacts[0].address).to eq("COZA House, Gazelle Close Corporate Park South") + expect(subject.admin_contacts[0].city).to eq("Midrand") + expect(subject.admin_contacts[0].zip).to eq("1685") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("ZA") + expect(subject.admin_contacts[0].phone).to eq("+27.113140077") + expect(subject.admin_contacts[0].fax).to eq("+27.113140088") + expect(subject.admin_contacts[0].email).to eq("legal@co.za") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("LEX-7IC-235J") + expect(subject.technical_contacts[0].name).to eq("Lucky Mokgabudi Masilela") + expect(subject.technical_contacts[0].organization).to eq("ZA Central Registry") + expect(subject.technical_contacts[0].address).to eq("COZA House, Gazelle Close Corporate Park South") + expect(subject.technical_contacts[0].city).to eq("Midrand") + expect(subject.technical_contacts[0].zip).to eq("1685") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("ZA") + expect(subject.technical_contacts[0].phone).to eq("+27.113140077") + expect(subject.technical_contacts[0].fax).to eq("+27.113140088") + expect(subject.technical_contacts[0].email).to eq("legal@co.za") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.nic.capetown") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.dnservices.co.za") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/ccwhois.ksregistry.net/vg/status_available_spec.rb b/spec/whois/parsers/responses/ccwhois.ksregistry.net/vg/status_available_spec.rb index d8e4004b..09749568 100644 --- a/spec/whois/parsers/responses/ccwhois.ksregistry.net/vg/status_available_spec.rb +++ b/spec/whois/parsers/responses/ccwhois.ksregistry.net/vg/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/ccwhois.ksregistry.net.rb' -describe Whois::Parsers::CcwhoisKsregistryNet, "status_available.expected" do +describe "ccwhois.ksregistry.net", :aggregate_failures do subject do file = fixture("responses", "ccwhois.ksregistry.net/vg/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "ccwhois.ksregistry.net") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/ccwhois.ksregistry.net/vg/status_registered_spec.rb b/spec/whois/parsers/responses/ccwhois.ksregistry.net/vg/status_registered_spec.rb index e09f1ac5..a7374946 100644 --- a/spec/whois/parsers/responses/ccwhois.ksregistry.net/vg/status_registered_spec.rb +++ b/spec/whois/parsers/responses/ccwhois.ksregistry.net/vg/status_registered_spec.rb @@ -9,151 +9,95 @@ # require 'spec_helper' -require 'whois/parsers/ccwhois.ksregistry.net.rb' -describe Whois::Parsers::CcwhoisKsregistryNet, "status_registered.expected" do +describe "ccwhois.ksregistry.net", :aggregate_failures do subject do file = fixture("responses", "ccwhois.ksregistry.net/vg/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "ccwhois.ksregistry.net") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("The data in the WHOIS database of KSregistry GmbH is provided by KSregistry GmbH for information purposes, and to assist persons in obtaining information about or related to domain name registration records. KSregistry GmbH does not guarantee its accuracy. By submitting a WHOIS query, you agree that you will use this data only for lawful purposes and that, under no circumstances, you will use this data to 1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via E-mail (spam); or 2) enable high volume, automated, electronic processes that apply to KSregistry GmbH or its systems. KSregistry GmbH reserves the right to modify these terms. By submitting this query, you agree to abide by this policy.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.vg") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1999-06-05 00:00:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-03-01 00:02:14")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2013-06-05 00:00:00")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq("www.markmonitor.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("P-GFI26") - expect(subject.registrant_contacts[0].name).to eq("Google, Inc.") - expect(subject.registrant_contacts[0].organization).to eq("Google, Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6503300100") - expect(subject.registrant_contacts[0].fax).to eq("+1.6506181499") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("P-GFI26") - expect(subject.admin_contacts[0].name).to eq("Google, Inc.") - expect(subject.admin_contacts[0].organization).to eq("Google, Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6503300100") - expect(subject.admin_contacts[0].fax).to eq("+1.6506181499") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("P-GFI26") - expect(subject.technical_contacts[0].name).to eq("Google, Inc.") - expect(subject.technical_contacts[0].organization).to eq("Google, Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6503300100") - expect(subject.technical_contacts[0].fax).to eq("+1.6506181499") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("The data in the WHOIS database of KSregistry GmbH is provided by KSregistry GmbH for information purposes, and to assist persons in obtaining information about or related to domain name registration records. KSregistry GmbH does not guarantee its accuracy. By submitting a WHOIS query, you agree that you will use this data only for lawful purposes and that, under no circumstances, you will use this data to 1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via E-mail (spam); or 2) enable high volume, automated, electronic processes that apply to KSregistry GmbH or its systems. KSregistry GmbH reserves the right to modify these terms. By submitting this query, you agree to abide by this policy.") + expect(subject.domain).to eq("google.vg") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1999-06-05 00:00:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-03-01 00:02:14")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2013-06-05 00:00:00")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("P-GFI26") + expect(subject.registrant_contacts[0].name).to eq("Google, Inc.") + expect(subject.registrant_contacts[0].organization).to eq("Google, Inc.") + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.6503300100") + expect(subject.registrant_contacts[0].fax).to eq("+1.6506181499") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("P-GFI26") + expect(subject.admin_contacts[0].name).to eq("Google, Inc.") + expect(subject.admin_contacts[0].organization).to eq("Google, Inc.") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.6503300100") + expect(subject.admin_contacts[0].fax).to eq("+1.6506181499") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("P-GFI26") + expect(subject.technical_contacts[0].name).to eq("Google, Inc.") + expect(subject.technical_contacts[0].organization).to eq("Google, Inc.") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.6503300100") + expect(subject.technical_contacts[0].fax).to eq("+1.6506181499") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/ccwhois.verisign-grs.com/cc/property_nameserver_no_nameserver_spec.rb b/spec/whois/parsers/responses/ccwhois.verisign-grs.com/cc/property_nameserver_no_nameserver_spec.rb index 260a4390..c40c9405 100644 --- a/spec/whois/parsers/responses/ccwhois.verisign-grs.com/cc/property_nameserver_no_nameserver_spec.rb +++ b/spec/whois/parsers/responses/ccwhois.verisign-grs.com/cc/property_nameserver_no_nameserver_spec.rb @@ -9,20 +9,17 @@ # require 'spec_helper' -require 'whois/parsers/ccwhois.verisign-grs.com.rb' -describe Whois::Parsers::CcwhoisVerisignGrsCom, "property_nameserver_no_nameserver.expected" do +describe "ccwhois.verisign-grs.com", :aggregate_failures do subject do file = fixture("responses", "ccwhois.verisign-grs.com/cc/property_nameserver_no_nameserver.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "ccwhois.verisign-grs.com") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches property_nameserver_no_nameserver.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/ccwhois.verisign-grs.com/cc/status_available_spec.rb b/spec/whois/parsers/responses/ccwhois.verisign-grs.com/cc/status_available_spec.rb index 79a13c54..141237ea 100644 --- a/spec/whois/parsers/responses/ccwhois.verisign-grs.com/cc/status_available_spec.rb +++ b/spec/whois/parsers/responses/ccwhois.verisign-grs.com/cc/status_available_spec.rb @@ -9,80 +9,29 @@ # require 'spec_helper' -require 'whois/parsers/ccwhois.verisign-grs.com.rb' -describe Whois::Parsers::CcwhoisVerisignGrsCom, "status_available.expected" do +describe "ccwhois.verisign-grs.com", :aggregate_failures do subject do file = fixture("responses", "ccwhois.verisign-grs.com/cc/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "ccwhois.verisign-grs.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("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 except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign's (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign 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 that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.cc") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#referral_whois" do - it do - expect(subject.referral_whois).to eq(nil) - end - end - describe "#referral_url" do - it do - expect(subject.referral_url).to eq(nil) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("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 except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign's (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign 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 that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") + expect(subject.domain).to eq("u34jedzcq.cc") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.referral_whois).to eq(nil) + expect(subject.referral_url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/ccwhois.verisign-grs.com/cc/status_registered_spec.rb b/spec/whois/parsers/responses/ccwhois.verisign-grs.com/cc/status_registered_spec.rb index cc2ae8b5..916e842b 100644 --- a/spec/whois/parsers/responses/ccwhois.verisign-grs.com/cc/status_registered_spec.rb +++ b/spec/whois/parsers/responses/ccwhois.verisign-grs.com/cc/status_registered_spec.rb @@ -9,103 +9,51 @@ # require 'spec_helper' -require 'whois/parsers/ccwhois.verisign-grs.com.rb' -describe Whois::Parsers::CcwhoisVerisignGrsCom, "status_registered.expected" do +describe "ccwhois.verisign-grs.com", :aggregate_failures do subject do file = fixture("responses", "ccwhois.verisign-grs.com/cc/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "ccwhois.verisign-grs.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("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 except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign's (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign 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 that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.cc") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("86420657_DOMAIN_CC-VRSN") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1999-06-07 04:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2017-05-06 09:28:40 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2018-06-07 04:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MARKMONITOR INC.") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end - end - describe "#referral_whois" do - it do - expect(subject.referral_whois).to eq("whois.markmonitor.com") - end - end - describe "#referral_url" do - it do - expect(subject.referral_url).to eq("http://www.markmonitor.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("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 except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign's (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign 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 that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") + expect(subject.domain).to eq("google.cc") + expect(subject.domain_id).to eq("86420657_DOMAIN_CC-VRSN") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1999-06-07 04:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2017-05-06 09:28:40 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2018-06-07 04:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MARKMONITOR INC.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) + expect(subject.referral_whois).to eq("whois.markmonitor.com") + expect(subject.referral_url).to eq("http://www.markmonitor.com") end end diff --git a/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/property_contact_fax_empty_spec.rb b/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/property_contact_fax_empty_spec.rb index 859f31b6..c1add51a 100644 --- a/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/property_contact_fax_empty_spec.rb +++ b/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/property_contact_fax_empty_spec.rb @@ -9,34 +9,31 @@ # require 'spec_helper' -require 'whois/parsers/coza-whois.registry.net.za.rb' -describe Whois::Parsers::CozaWhoisRegistryNetZa, "property_contact_fax_empty.expected" do +describe "coza-whois.registry.net.za", :aggregate_failures do subject do file = fixture("responses", "coza-whois.registry.net.za/co.za/property_contact_fax_empty.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "coza-whois.registry.net.za") + Whois::Parser.parser_for(part) end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].name).to eq("FirstRand Bank Limited") - expect(subject.registrant_contacts[0].organization).to eq("FirstRand Bank Limited") - expect(subject.registrant_contacts[0].address).to eq("2nd floor 4 Merchant Place Cnr Rivonia and Sandton Drive") - expect(subject.registrant_contacts[0].city).to eq("Sandton") - expect(subject.registrant_contacts[0].zip).to eq("2196") - expect(subject.registrant_contacts[0].state).to eq("Gauteng") - expect(subject.registrant_contacts[0].country_code).to eq("ZA") - expect(subject.registrant_contacts[0].phone).to eq("+27.112828000") - expect(subject.registrant_contacts[0].fax).to eq("") - expect(subject.registrant_contacts[0].email).to eq("domreg.admins@firstrand.co.za") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end + it "matches property_contact_fax_empty.expected" do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].name).to eq("FirstRand Bank Limited") + expect(subject.registrant_contacts[0].organization).to eq("FirstRand Bank Limited") + expect(subject.registrant_contacts[0].address).to eq("2nd floor 4 Merchant Place Cnr Rivonia and Sandton Drive") + expect(subject.registrant_contacts[0].city).to eq("Sandton") + expect(subject.registrant_contacts[0].zip).to eq("2196") + expect(subject.registrant_contacts[0].state).to eq("Gauteng") + expect(subject.registrant_contacts[0].country_code).to eq("ZA") + expect(subject.registrant_contacts[0].phone).to eq("+27.112828000") + expect(subject.registrant_contacts[0].fax).to eq("") + expect(subject.registrant_contacts[0].email).to eq("domreg.admins@firstrand.co.za") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/response_throttled_spec.rb b/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/response_throttled_spec.rb index fb8dd099..bc76249a 100644 --- a/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/response_throttled_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/coza-whois.registry.net.za.rb' -describe Whois::Parsers::CozaWhoisRegistryNetZa, "response_throttled.expected" do +describe "coza-whois.registry.net.za", :aggregate_failures do subject do file = fixture("responses", "coza-whois.registry.net.za/co.za/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "coza-whois.registry.net.za") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/status_available_spec.rb b/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/status_available_spec.rb index 74542ff5..0f413a5d 100644 --- a/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/status_available_spec.rb +++ b/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/status_available_spec.rb @@ -9,83 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/coza-whois.registry.net.za.rb' -describe Whois::Parsers::CozaWhoisRegistryNetZa, "status_available.expected" do +describe "coza-whois.registry.net.za", :aggregate_failures do subject do file = fixture("responses", "coza-whois.registry.net.za/co.za/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "coza-whois.registry.net.za") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/status_registered_spec.rb b/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/status_registered_spec.rb index 6b438030..0c950043 100644 --- a/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/status_registered_spec.rb +++ b/spec/whois/parsers/responses/coza-whois.registry.net.za/co.za/status_registered_spec.rb @@ -9,148 +9,96 @@ # require 'spec_helper' -require 'whois/parsers/coza-whois.registry.net.za.rb' -describe Whois::Parsers::CozaWhoisRegistryNetZa, "status_registered.expected" do +describe "coza-whois.registry.net.za", :aggregate_failures do subject do file = fixture("responses", "coza-whois.registry.net.za/co.za/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "coza-whois.registry.net.za") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.co.za") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("dom_1SZMF--1") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2001-06-25 20:37:59 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2016-09-24 16:20:09 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2017-06-25 20:37:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.organization).to eq("MarkMonitor") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].name).to eq("Google Inc.") - expect(subject.registrant_contacts[0].organization).to eq("") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6506188571") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].name).to eq("Google Inc.") - expect(subject.admin_contacts[0].organization).to eq("") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") - expect(subject.admin_contacts[0].fax).to eq("+1.6506188571") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].name).to eq("Google Inc.") - expect(subject.technical_contacts[0].organization).to eq("") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") - expect(subject.technical_contacts[0].fax).to eq("+1.6506188571") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.co.za") + expect(subject.domain_id).to eq("dom_1SZMF--1") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2001-06-25 20:37:59 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2016-09-24 16:20:09 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2017-06-25 20:37:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].name).to eq("Google Inc.") + expect(subject.registrant_contacts[0].organization).to eq("") + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") + expect(subject.registrant_contacts[0].fax).to eq("+1.6506188571") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].name).to eq("Google Inc.") + expect(subject.admin_contacts[0].organization).to eq("") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") + expect(subject.admin_contacts[0].fax).to eq("+1.6506188571") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].name).to eq("Google Inc.") + expect(subject.technical_contacts[0].organization).to eq("") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") + expect(subject.technical_contacts[0].fax).to eq("+1.6506188571") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/durban-whois.registry.net.za/durban/status_available_spec.rb b/spec/whois/parsers/responses/durban-whois.registry.net.za/durban/status_available_spec.rb index 23dee378..c7944ed1 100644 --- a/spec/whois/parsers/responses/durban-whois.registry.net.za/durban/status_available_spec.rb +++ b/spec/whois/parsers/responses/durban-whois.registry.net.za/durban/status_available_spec.rb @@ -9,83 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/durban-whois.registry.net.za.rb' -describe Whois::Parsers::DurbanWhoisRegistryNetZa, "status_available.expected" do +describe "durban-whois.registry.net.za", :aggregate_failures do subject do file = fixture("responses", "durban-whois.registry.net.za/durban/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "durban-whois.registry.net.za") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/durban-whois.registry.net.za/durban/status_registered_spec.rb b/spec/whois/parsers/responses/durban-whois.registry.net.za/durban/status_registered_spec.rb index 9bd24480..336f95b7 100644 --- a/spec/whois/parsers/responses/durban-whois.registry.net.za/durban/status_registered_spec.rb +++ b/spec/whois/parsers/responses/durban-whois.registry.net.za/durban/status_registered_spec.rb @@ -9,146 +9,94 @@ # require 'spec_helper' -require 'whois/parsers/durban-whois.registry.net.za.rb' -describe Whois::Parsers::DurbanWhoisRegistryNetZa, "status_registered.expected" do +describe "durban-whois.registry.net.za", :aggregate_failures do subject do file = fixture("responses", "durban-whois.registry.net.za/durban/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "durban-whois.registry.net.za") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("wordpress.durban") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("dom_7G-9999") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2014-11-04T06:00:01Z")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-11-11T06:00:03Z")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2016-11-04T06:00:01Z")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.organization).to eq("MarkMonitor") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("mmr-132163") - expect(subject.registrant_contacts[0].name).to eq("DNStination Inc.") - expect(subject.registrant_contacts[0].organization).to eq("") - expect(subject.registrant_contacts[0].address).to eq("425 Market St 5th Floor") - expect(subject.registrant_contacts[0].city).to eq("San Francisco") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].zip).to eq("94105") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.4155319335") - expect(subject.registrant_contacts[0].fax).to eq("+1.4155319336") - expect(subject.registrant_contacts[0].email).to eq("admin@dnstinations.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("mmr-132163") - expect(subject.admin_contacts[0].name).to eq("DNStination Inc.") - expect(subject.admin_contacts[0].organization).to eq("") - expect(subject.admin_contacts[0].address).to eq("425 Market St 5th Floor") - expect(subject.admin_contacts[0].city).to eq("San Francisco") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].zip).to eq("94105") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.4155319335") - expect(subject.admin_contacts[0].fax).to eq("+1.4155319336") - expect(subject.admin_contacts[0].email).to eq("admin@dnstinations.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("mmr-132163") - expect(subject.technical_contacts[0].name).to eq("DNStination Inc.") - expect(subject.technical_contacts[0].organization).to eq("") - expect(subject.technical_contacts[0].address).to eq("425 Market St 5th Floor") - expect(subject.technical_contacts[0].city).to eq("San Francisco") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].zip).to eq("94105") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.4155319335") - expect(subject.technical_contacts[0].fax).to eq("+1.4155319336") - expect(subject.technical_contacts[0].email).to eq("admin@dnstinations.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns3.markmonitor.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.markmonitor.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("wordpress.durban") + expect(subject.domain_id).to eq("dom_7G-9999") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2014-11-04T06:00:01Z")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-11-11T06:00:03Z")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2016-11-04T06:00:01Z")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("mmr-132163") + expect(subject.registrant_contacts[0].name).to eq("DNStination Inc.") + expect(subject.registrant_contacts[0].organization).to eq("") + expect(subject.registrant_contacts[0].address).to eq("425 Market St 5th Floor") + expect(subject.registrant_contacts[0].city).to eq("San Francisco") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].zip).to eq("94105") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.4155319335") + expect(subject.registrant_contacts[0].fax).to eq("+1.4155319336") + expect(subject.registrant_contacts[0].email).to eq("admin@dnstinations.com") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("mmr-132163") + expect(subject.admin_contacts[0].name).to eq("DNStination Inc.") + expect(subject.admin_contacts[0].organization).to eq("") + expect(subject.admin_contacts[0].address).to eq("425 Market St 5th Floor") + expect(subject.admin_contacts[0].city).to eq("San Francisco") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].zip).to eq("94105") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.4155319335") + expect(subject.admin_contacts[0].fax).to eq("+1.4155319336") + expect(subject.admin_contacts[0].email).to eq("admin@dnstinations.com") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("mmr-132163") + expect(subject.technical_contacts[0].name).to eq("DNStination Inc.") + expect(subject.technical_contacts[0].organization).to eq("") + expect(subject.technical_contacts[0].address).to eq("425 Market St 5th Floor") + expect(subject.technical_contacts[0].city).to eq("San Francisco") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].zip).to eq("94105") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.4155319335") + expect(subject.technical_contacts[0].fax).to eq("+1.4155319336") + expect(subject.technical_contacts[0].email).to eq("admin@dnstinations.com") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns3.markmonitor.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.markmonitor.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/joburg-whois.registry.net.za/joburg/status_available_spec.rb b/spec/whois/parsers/responses/joburg-whois.registry.net.za/joburg/status_available_spec.rb index a5143b19..2a848fb0 100644 --- a/spec/whois/parsers/responses/joburg-whois.registry.net.za/joburg/status_available_spec.rb +++ b/spec/whois/parsers/responses/joburg-whois.registry.net.za/joburg/status_available_spec.rb @@ -9,83 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/joburg-whois.registry.net.za.rb' -describe Whois::Parsers::JoburgWhoisRegistryNetZa, "status_available.expected" do +describe "joburg-whois.registry.net.za", :aggregate_failures do subject do file = fixture("responses", "joburg-whois.registry.net.za/joburg/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "joburg-whois.registry.net.za") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/joburg-whois.registry.net.za/joburg/status_registered_spec.rb b/spec/whois/parsers/responses/joburg-whois.registry.net.za/joburg/status_registered_spec.rb index 44d361cb..36906b9a 100644 --- a/spec/whois/parsers/responses/joburg-whois.registry.net.za/joburg/status_registered_spec.rb +++ b/spec/whois/parsers/responses/joburg-whois.registry.net.za/joburg/status_registered_spec.rb @@ -9,147 +9,95 @@ # require 'spec_helper' -require 'whois/parsers/joburg-whois.registry.net.za.rb' -describe Whois::Parsers::JoburgWhoisRegistryNetZa, "status_registered.expected" do +describe "joburg-whois.registry.net.za", :aggregate_failures do subject do file = fixture("responses", "joburg-whois.registry.net.za/joburg/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "joburg-whois.registry.net.za") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("usedautos.joburg") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("dom_7P-9999") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2014-11-03 22:00:08 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-11-10 07:08:28 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-11-03 22:00:08 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("1466") - expect(subject.registrar.name).to eq("Lexsynergy") - expect(subject.registrar.organization).to eq("Lexsynergy") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("LEX-5FP-22YL") - expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") - expect(subject.registrant_contacts[0].organization).to eq("The Car Trader (Pty) Ltd") - expect(subject.registrant_contacts[0].address).to eq("154 Bram Fischer Drive Randburg") - expect(subject.registrant_contacts[0].city).to eq("Johannesburg") - expect(subject.registrant_contacts[0].zip).to eq("2194") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("ZA") - expect(subject.registrant_contacts[0].phone).to eq("+27.116860900") - expect(subject.registrant_contacts[0].fax).to eq("+27.117896449") - expect(subject.registrant_contacts[0].email).to eq("domains@autotrader.co.za") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("LEX-5FP-22YL") - expect(subject.admin_contacts[0].name).to eq("Domain Administrator") - expect(subject.admin_contacts[0].organization).to eq("The Car Trader (Pty) Ltd") - expect(subject.admin_contacts[0].address).to eq("154 Bram Fischer Drive Randburg") - expect(subject.admin_contacts[0].city).to eq("Johannesburg") - expect(subject.admin_contacts[0].zip).to eq("2194") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("ZA") - expect(subject.admin_contacts[0].phone).to eq("+27.116860900") - expect(subject.admin_contacts[0].fax).to eq("+27.117896449") - expect(subject.admin_contacts[0].email).to eq("domains@autotrader.co.za") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("LEX-5FP-22YL") - expect(subject.technical_contacts[0].name).to eq("Domain Administrator") - expect(subject.technical_contacts[0].organization).to eq("The Car Trader (Pty) Ltd") - expect(subject.technical_contacts[0].address).to eq("154 Bram Fischer Drive Randburg") - expect(subject.technical_contacts[0].city).to eq("Johannesburg") - expect(subject.technical_contacts[0].zip).to eq("2194") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("ZA") - expect(subject.technical_contacts[0].phone).to eq("+27.116860900") - expect(subject.technical_contacts[0].fax).to eq("+27.117896449") - expect(subject.technical_contacts[0].email).to eq("domains@autotrader.co.za") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.lexsynergy.net") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.lexsynergy.us") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.lexsynergy.info") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("usedautos.joburg") + expect(subject.domain_id).to eq("dom_7P-9999") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2014-11-03 22:00:08 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-11-10 07:08:28 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-11-03 22:00:08 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("1466") + expect(subject.registrar.name).to eq("Lexsynergy") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("LEX-5FP-22YL") + expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") + expect(subject.registrant_contacts[0].organization).to eq("The Car Trader (Pty) Ltd") + expect(subject.registrant_contacts[0].address).to eq("154 Bram Fischer Drive Randburg") + expect(subject.registrant_contacts[0].city).to eq("Johannesburg") + expect(subject.registrant_contacts[0].zip).to eq("2194") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("ZA") + expect(subject.registrant_contacts[0].phone).to eq("+27.116860900") + expect(subject.registrant_contacts[0].fax).to eq("+27.117896449") + expect(subject.registrant_contacts[0].email).to eq("domains@autotrader.co.za") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("LEX-5FP-22YL") + expect(subject.admin_contacts[0].name).to eq("Domain Administrator") + expect(subject.admin_contacts[0].organization).to eq("The Car Trader (Pty) Ltd") + expect(subject.admin_contacts[0].address).to eq("154 Bram Fischer Drive Randburg") + expect(subject.admin_contacts[0].city).to eq("Johannesburg") + expect(subject.admin_contacts[0].zip).to eq("2194") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("ZA") + expect(subject.admin_contacts[0].phone).to eq("+27.116860900") + expect(subject.admin_contacts[0].fax).to eq("+27.117896449") + expect(subject.admin_contacts[0].email).to eq("domains@autotrader.co.za") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("LEX-5FP-22YL") + expect(subject.technical_contacts[0].name).to eq("Domain Administrator") + expect(subject.technical_contacts[0].organization).to eq("The Car Trader (Pty) Ltd") + expect(subject.technical_contacts[0].address).to eq("154 Bram Fischer Drive Randburg") + expect(subject.technical_contacts[0].city).to eq("Johannesburg") + expect(subject.technical_contacts[0].zip).to eq("2194") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("ZA") + expect(subject.technical_contacts[0].phone).to eq("+27.116860900") + expect(subject.technical_contacts[0].fax).to eq("+27.117896449") + expect(subject.technical_contacts[0].email).to eq("domains@autotrader.co.za") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.lexsynergy.net") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.lexsynergy.us") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.lexsynergy.info") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/kero.yachay.pe/pe/response_throttled_spec.rb b/spec/whois/parsers/responses/kero.yachay.pe/pe/response_throttled_spec.rb index 7c0ca56d..b283d886 100644 --- a/spec/whois/parsers/responses/kero.yachay.pe/pe/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/kero.yachay.pe/pe/response_throttled_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/kero.yachay.pe.rb' -describe Whois::Parsers::KeroYachayPe, "response_throttled.expected" do +describe "kero.yachay.pe", :aggregate_failures do subject do file = fixture("responses", "kero.yachay.pe/pe/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "kero.yachay.pe") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/kero.yachay.pe/pe/status_available_spec.rb b/spec/whois/parsers/responses/kero.yachay.pe/pe/status_available_spec.rb index cd214b63..553beeb8 100644 --- a/spec/whois/parsers/responses/kero.yachay.pe/pe/status_available_spec.rb +++ b/spec/whois/parsers/responses/kero.yachay.pe/pe/status_available_spec.rb @@ -9,55 +9,24 @@ # require 'spec_helper' -require 'whois/parsers/kero.yachay.pe.rb' -describe Whois::Parsers::KeroYachayPe, "status_available.expected" do +describe "kero.yachay.pe", :aggregate_failures do subject do file = fixture("responses", "kero.yachay.pe/pe/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "kero.yachay.pe") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.response_throttled?).to eq(false) end end diff --git a/spec/whois/parsers/responses/kero.yachay.pe/pe/status_inactive_spec.rb b/spec/whois/parsers/responses/kero.yachay.pe/pe/status_inactive_spec.rb index 9ac5a49b..086b2803 100644 --- a/spec/whois/parsers/responses/kero.yachay.pe/pe/status_inactive_spec.rb +++ b/spec/whois/parsers/responses/kero.yachay.pe/pe/status_inactive_spec.rb @@ -9,56 +9,25 @@ # require 'spec_helper' -require 'whois/parsers/kero.yachay.pe.rb' -describe Whois::Parsers::KeroYachayPe, "status_inactive.expected" do +describe "kero.yachay.pe", :aggregate_failures do subject do file = fixture("responses", "kero.yachay.pe/pe/status_inactive.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "kero.yachay.pe") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:inactive) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(0) - expect(subject.nameservers).to eq([]) - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end + it "matches status_inactive.expected" do + expect(subject.status).to eq(:inactive) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(0) + expect(subject.nameservers).to eq([]) + expect(subject.response_throttled?).to eq(false) end end diff --git a/spec/whois/parsers/responses/kero.yachay.pe/pe/status_registered_spec.rb b/spec/whois/parsers/responses/kero.yachay.pe/pe/status_registered_spec.rb index 2faaeb2e..af29dab5 100644 --- a/spec/whois/parsers/responses/kero.yachay.pe/pe/status_registered_spec.rb +++ b/spec/whois/parsers/responses/kero.yachay.pe/pe/status_registered_spec.rb @@ -9,63 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/kero.yachay.pe.rb' -describe Whois::Parsers::KeroYachayPe, "status_registered.expected" do +describe "kero.yachay.pe", :aggregate_failures do subject do file = fixture("responses", "kero.yachay.pe/pe/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "kero.yachay.pe") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.response_throttled?).to eq(false) end end diff --git a/spec/whois/parsers/responses/kero.yachay.pe/pe/status_suspended_spec.rb b/spec/whois/parsers/responses/kero.yachay.pe/pe/status_suspended_spec.rb index b45c4bd9..8b2454ba 100644 --- a/spec/whois/parsers/responses/kero.yachay.pe/pe/status_suspended_spec.rb +++ b/spec/whois/parsers/responses/kero.yachay.pe/pe/status_suspended_spec.rb @@ -9,55 +9,24 @@ # require 'spec_helper' -require 'whois/parsers/kero.yachay.pe.rb' -describe Whois::Parsers::KeroYachayPe, "status_suspended.expected" do +describe "kero.yachay.pe", :aggregate_failures do subject do file = fixture("responses", "kero.yachay.pe/pe/status_suspended.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "kero.yachay.pe") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end + it "matches status_suspended.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.response_throttled?).to eq(false) end end diff --git a/spec/whois/parsers/responses/org-whois.registry.net.za/org.za/status_available_spec.rb b/spec/whois/parsers/responses/org-whois.registry.net.za/org.za/status_available_spec.rb index 75d92342..77b11a65 100644 --- a/spec/whois/parsers/responses/org-whois.registry.net.za/org.za/status_available_spec.rb +++ b/spec/whois/parsers/responses/org-whois.registry.net.za/org.za/status_available_spec.rb @@ -9,83 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/org-whois.registry.net.za.rb' -describe Whois::Parsers::OrgWhoisRegistryNetZa, "status_available.expected" do +describe "org-whois.registry.net.za", :aggregate_failures do subject do file = fixture("responses", "org-whois.registry.net.za/org.za/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "org-whois.registry.net.za") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/org-whois.registry.net.za/org.za/status_registered_spec.rb b/spec/whois/parsers/responses/org-whois.registry.net.za/org.za/status_registered_spec.rb index eba875c7..fc6e2bf0 100644 --- a/spec/whois/parsers/responses/org-whois.registry.net.za/org.za/status_registered_spec.rb +++ b/spec/whois/parsers/responses/org-whois.registry.net.za/org.za/status_registered_spec.rb @@ -9,148 +9,96 @@ # require 'spec_helper' -require 'whois/parsers/org-whois.registry.net.za.rb' -describe Whois::Parsers::OrgWhoisRegistryNetZa, "status_registered.expected" do +describe "org-whois.registry.net.za", :aggregate_failures do subject do file = fixture("responses", "org-whois.registry.net.za/org.za/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "org-whois.registry.net.za") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("joburg.org.za") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("dom_8VP-9999") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1997-10-03 09:46:34 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2015-02-05 08:45:51 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2999-12-31 21:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("9999") - expect(subject.registrar.name).to eq("ZA Central Registry") - expect(subject.registrar.organization).to eq("ZA Central Registry") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("jobuRant") - expect(subject.registrant_contacts[0].name).to eq("City of Johannesburg Metropolitan Municipality") - expect(subject.registrant_contacts[0].organization).to eq("") - expect(subject.registrant_contacts[0].address).to eq("P.O. Box 30757") - expect(subject.registrant_contacts[0].city).to eq("Braamfontein") - expect(subject.registrant_contacts[0].state).to eq("Gauteng") - expect(subject.registrant_contacts[0].zip).to eq("2017") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("ZA") - expect(subject.registrant_contacts[0].phone).to eq("+27.110186314") - expect(subject.registrant_contacts[0].fax).to eq("+27.113819583") - expect(subject.registrant_contacts[0].email).to eq("joelsonp@joburg.org.za") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("zacr-a0c0379446") - expect(subject.admin_contacts[0].name).to eq("Joelson Pholoha") - expect(subject.admin_contacts[0].organization).to eq("") - expect(subject.admin_contacts[0].address).to eq("Private Bag X10013, Sandton, 2146") - expect(subject.admin_contacts[0].city).to eq("-") - expect(subject.admin_contacts[0].zip).to eq("") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("--") - expect(subject.admin_contacts[0].phone).to eq("+27.110186314") - expect(subject.admin_contacts[0].fax).to eq("+27.113819583") - expect(subject.admin_contacts[0].email).to eq("Joelsonp@Joburg.org.za") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("zacr-71fff5bce2") - expect(subject.technical_contacts[0].name).to eq("Eben Jacobs") - expect(subject.technical_contacts[0].organization).to eq("") - expect(subject.technical_contacts[0].address).to eq("Accounts Payable, Vida Building, Kabelweg 57, 1014 BA Amsterdam") - expect(subject.technical_contacts[0].city).to eq("-") - expect(subject.technical_contacts[0].zip).to eq("") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("--") - expect(subject.technical_contacts[0].phone).to eq("+27.110186314") - expect(subject.technical_contacts[0].fax).to eq("+27.113819583") - expect(subject.technical_contacts[0].email).to eq("ebenj@joburg.org.za") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("demeter.is.co.za") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("jupiter.is.co.za") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("titan.is.co.za") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("joburg.org.za") + expect(subject.domain_id).to eq("dom_8VP-9999") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1997-10-03 09:46:34 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2015-02-05 08:45:51 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2999-12-31 21:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("9999") + expect(subject.registrar.name).to eq("ZA Central Registry") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("jobuRant") + expect(subject.registrant_contacts[0].name).to eq("City of Johannesburg Metropolitan Municipality") + expect(subject.registrant_contacts[0].organization).to eq("") + expect(subject.registrant_contacts[0].address).to eq("P.O. Box 30757") + expect(subject.registrant_contacts[0].city).to eq("Braamfontein") + expect(subject.registrant_contacts[0].state).to eq("Gauteng") + expect(subject.registrant_contacts[0].zip).to eq("2017") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("ZA") + expect(subject.registrant_contacts[0].phone).to eq("+27.110186314") + expect(subject.registrant_contacts[0].fax).to eq("+27.113819583") + expect(subject.registrant_contacts[0].email).to eq("joelsonp@joburg.org.za") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("zacr-a0c0379446") + expect(subject.admin_contacts[0].name).to eq("Joelson Pholoha") + expect(subject.admin_contacts[0].organization).to eq("") + expect(subject.admin_contacts[0].address).to eq("Private Bag X10013, Sandton, 2146") + expect(subject.admin_contacts[0].city).to eq("-") + expect(subject.admin_contacts[0].zip).to eq("") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("--") + expect(subject.admin_contacts[0].phone).to eq("+27.110186314") + expect(subject.admin_contacts[0].fax).to eq("+27.113819583") + expect(subject.admin_contacts[0].email).to eq("Joelsonp@Joburg.org.za") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("zacr-71fff5bce2") + expect(subject.technical_contacts[0].name).to eq("Eben Jacobs") + expect(subject.technical_contacts[0].organization).to eq("") + expect(subject.technical_contacts[0].address).to eq("Accounts Payable, Vida Building, Kabelweg 57, 1014 BA Amsterdam") + expect(subject.technical_contacts[0].city).to eq("-") + expect(subject.technical_contacts[0].zip).to eq("") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("--") + expect(subject.technical_contacts[0].phone).to eq("+27.110186314") + expect(subject.technical_contacts[0].fax).to eq("+27.113819583") + expect(subject.technical_contacts[0].email).to eq("ebenj@joburg.org.za") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("demeter.is.co.za") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("jupiter.is.co.za") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("titan.is.co.za") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/tvwhois.verisign-grs.com/tv/property_nameserver_no_nameserver_spec.rb b/spec/whois/parsers/responses/tvwhois.verisign-grs.com/tv/property_nameserver_no_nameserver_spec.rb index 971256ae..983f1699 100644 --- a/spec/whois/parsers/responses/tvwhois.verisign-grs.com/tv/property_nameserver_no_nameserver_spec.rb +++ b/spec/whois/parsers/responses/tvwhois.verisign-grs.com/tv/property_nameserver_no_nameserver_spec.rb @@ -9,20 +9,17 @@ # require 'spec_helper' -require 'whois/parsers/tvwhois.verisign-grs.com.rb' -describe Whois::Parsers::TvwhoisVerisignGrsCom, "property_nameserver_no_nameserver.expected" do +describe "tvwhois.verisign-grs.com", :aggregate_failures do subject do file = fixture("responses", "tvwhois.verisign-grs.com/tv/property_nameserver_no_nameserver.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "tvwhois.verisign-grs.com") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches property_nameserver_no_nameserver.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/tvwhois.verisign-grs.com/tv/status_available_spec.rb b/spec/whois/parsers/responses/tvwhois.verisign-grs.com/tv/status_available_spec.rb index 9a8d1129..dfcc69e0 100644 --- a/spec/whois/parsers/responses/tvwhois.verisign-grs.com/tv/status_available_spec.rb +++ b/spec/whois/parsers/responses/tvwhois.verisign-grs.com/tv/status_available_spec.rb @@ -9,80 +9,29 @@ # require 'spec_helper' -require 'whois/parsers/tvwhois.verisign-grs.com.rb' -describe Whois::Parsers::TvwhoisVerisignGrsCom, "status_available.expected" do +describe "tvwhois.verisign-grs.com", :aggregate_failures do subject do file = fixture("responses", "tvwhois.verisign-grs.com/tv/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "tvwhois.verisign-grs.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("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 except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign's (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign 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 that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.tv") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#referral_whois" do - it do - expect(subject.referral_whois).to eq(nil) - end - end - describe "#referral_url" do - it do - expect(subject.referral_url).to eq(nil) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("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 except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign's (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign 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 that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") + expect(subject.domain).to eq("u34jedzcq.tv") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.referral_whois).to eq(nil) + expect(subject.referral_url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/tvwhois.verisign-grs.com/tv/status_registered_spec.rb b/spec/whois/parsers/responses/tvwhois.verisign-grs.com/tv/status_registered_spec.rb index f453548b..624d8214 100644 --- a/spec/whois/parsers/responses/tvwhois.verisign-grs.com/tv/status_registered_spec.rb +++ b/spec/whois/parsers/responses/tvwhois.verisign-grs.com/tv/status_registered_spec.rb @@ -9,99 +9,47 @@ # require 'spec_helper' -require 'whois/parsers/tvwhois.verisign-grs.com.rb' -describe Whois::Parsers::TvwhoisVerisignGrsCom, "status_registered.expected" do +describe "tvwhois.verisign-grs.com", :aggregate_failures do subject do file = fixture("responses", "tvwhois.verisign-grs.com/tv/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "tvwhois.verisign-grs.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("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 except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign's (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign 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 that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.tv") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("87196881_DOMAIN_TV-VRSN") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2002-08-02 16:43:36 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2017-07-01 09:25:47 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2018-08-02 16:43:36 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MARKMONITOR INC.") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - end - end - describe "#referral_whois" do - it do - expect(subject.referral_whois).to eq("whois.markmonitor.com") - end - end - describe "#referral_url" do - it do - expect(subject.referral_url).to eq("http://www.markmonitor.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("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 except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign's (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign 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 that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") + expect(subject.domain).to eq("google.tv") + expect(subject.domain_id).to eq("87196881_DOMAIN_TV-VRSN") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-08-02 16:43:36 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2017-07-01 09:25:47 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2018-08-02 16:43:36 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MARKMONITOR INC.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.referral_whois).to eq("whois.markmonitor.com") + expect(subject.referral_url).to eq("http://www.markmonitor.com") end end diff --git a/spec/whois/parsers/responses/whois.1und1.info/status_available_spec.rb b/spec/whois/parsers/responses/whois.1und1.info/status_available_spec.rb index 33e36b8f..7f2cf57e 100644 --- a/spec/whois/parsers/responses/whois.1und1.info/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.1und1.info/status_available_spec.rb @@ -9,83 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.1und1.info.rb' -describe Whois::Parsers::Whois1und1Info, "status_available.expected" do +describe "whois.1und1.info", :aggregate_failures do subject do file = fixture("responses", "whois.1und1.info/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.1und1.info") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.com") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.1und1.info/status_registered_spec.rb b/spec/whois/parsers/responses/whois.1und1.info/status_registered_spec.rb index b2916ab5..343d785f 100644 --- a/spec/whois/parsers/responses/whois.1und1.info/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.1und1.info/status_registered_spec.rb @@ -9,137 +9,85 @@ # require 'spec_helper' -require 'whois/parsers/whois.1und1.info.rb' -describe Whois::Parsers::Whois1und1Info, "status_registered.expected" do +describe "whois.1und1.info", :aggregate_failures do subject do file = fixture("responses", "whois.1und1.info/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.1und1.info") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("1und1.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1998-08-12 00:00:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-08-11 00:00:00")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-08-11 00:00:00")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("83") - expect(subject.registrar.name).to eq("1&1 Internet AG") - expect(subject.registrar.organization).to eq("1&1 Internet AG") - expect(subject.registrar.url).to eq("http://1and1.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Andreas Gauger") - expect(subject.registrant_contacts[0].organization).to eq("1&1 Internet AG") - expect(subject.registrant_contacts[0].address).to eq("Elgendorfer Strasse 57") - expect(subject.registrant_contacts[0].city).to eq("Montabaur") - expect(subject.registrant_contacts[0].zip).to eq("56410") - expect(subject.registrant_contacts[0].state).to eq("") - expect(subject.registrant_contacts[0].country_code).to eq("DE") - expect(subject.registrant_contacts[0].phone).to eq("+49.2602960") - expect(subject.registrant_contacts[0].fax).to eq("+49.72191374215") - expect(subject.registrant_contacts[0].email).to eq("hostmaster@1und1.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("Andreas Gauger") - expect(subject.admin_contacts[0].organization).to eq("1&1 Internet AG") - expect(subject.admin_contacts[0].address).to eq("Elgendorfer Strasse 57") - expect(subject.admin_contacts[0].city).to eq("Montabaur") - expect(subject.admin_contacts[0].zip).to eq("56410") - expect(subject.admin_contacts[0].state).to eq("") - expect(subject.admin_contacts[0].country_code).to eq("DE") - expect(subject.admin_contacts[0].phone).to eq("+49.2602960") - expect(subject.admin_contacts[0].fax).to eq("+49.72191374215") - expect(subject.admin_contacts[0].email).to eq("hostmaster@1und1.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Andreas Gauger") - expect(subject.technical_contacts[0].organization).to eq("1&1 Internet AG") - expect(subject.technical_contacts[0].address).to eq("Elgendorfer Strasse 57") - expect(subject.technical_contacts[0].city).to eq("Montabaur") - expect(subject.technical_contacts[0].zip).to eq("56410") - expect(subject.technical_contacts[0].state).to eq("") - expect(subject.technical_contacts[0].country_code).to eq("DE") - expect(subject.technical_contacts[0].phone).to eq("+49.2602960") - expect(subject.technical_contacts[0].fax).to eq("+49.72191374215") - expect(subject.technical_contacts[0].email).to eq("hostmaster@1und1.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns-1and1.ui-dns.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns-1and1.ui-dns.org") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns-1and1.ui-dns.de") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns-1and1.ui-dns.biz") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("1und1.com") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1998-08-12 00:00:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-08-11 00:00:00")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-08-11 00:00:00")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("83") + expect(subject.registrar.name).to eq("1&1 Internet AG") + expect(subject.registrar.url).to eq("http://1and1.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Andreas Gauger") + expect(subject.registrant_contacts[0].organization).to eq("1&1 Internet AG") + expect(subject.registrant_contacts[0].address).to eq("Elgendorfer Strasse 57") + expect(subject.registrant_contacts[0].city).to eq("Montabaur") + expect(subject.registrant_contacts[0].zip).to eq("56410") + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("DE") + expect(subject.registrant_contacts[0].phone).to eq("+49.2602960") + expect(subject.registrant_contacts[0].fax).to eq("+49.72191374215") + expect(subject.registrant_contacts[0].email).to eq("hostmaster@1und1.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("Andreas Gauger") + expect(subject.admin_contacts[0].organization).to eq("1&1 Internet AG") + expect(subject.admin_contacts[0].address).to eq("Elgendorfer Strasse 57") + expect(subject.admin_contacts[0].city).to eq("Montabaur") + expect(subject.admin_contacts[0].zip).to eq("56410") + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("DE") + expect(subject.admin_contacts[0].phone).to eq("+49.2602960") + expect(subject.admin_contacts[0].fax).to eq("+49.72191374215") + expect(subject.admin_contacts[0].email).to eq("hostmaster@1und1.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Andreas Gauger") + expect(subject.technical_contacts[0].organization).to eq("1&1 Internet AG") + expect(subject.technical_contacts[0].address).to eq("Elgendorfer Strasse 57") + expect(subject.technical_contacts[0].city).to eq("Montabaur") + expect(subject.technical_contacts[0].zip).to eq("56410") + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("DE") + expect(subject.technical_contacts[0].phone).to eq("+49.2602960") + expect(subject.technical_contacts[0].fax).to eq("+49.72191374215") + expect(subject.technical_contacts[0].email).to eq("hostmaster@1und1.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns-1and1.ui-dns.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns-1and1.ui-dns.org") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns-1and1.ui-dns.de") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns-1and1.ui-dns.biz") end end diff --git a/spec/whois/parsers/responses/whois.35.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.35.com/status_registered_spec.rb index 1c0b3a1f..33258dc3 100644 --- a/spec/whois/parsers/responses/whois.35.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.35.com/status_registered_spec.rb @@ -9,130 +9,86 @@ # require 'spec_helper' -require 'whois/parsers/whois.35.com.rb' -describe Whois::Parsers::Whois35Com, "status_registered.expected" do +describe "whois.35.com", :aggregate_failures do subject do file = fixture("responses", "whois.35.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.35.com") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2010-09-10")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-08-21 23:48:59")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-09-10")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("1316") - expect(subject.registrar.name).to eq("35 Technology Co., Ltd.") - expect(subject.registrar.organization).to eq("35 Technology Co., Ltd.") - expect(subject.registrar.url).to eq("http://www.35.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("baolei") - expect(subject.registrant_contacts[0].organization).to eq("jiaxing zhongwang ad co.,ltd.") - expect(subject.registrant_contacts[0].address).to eq("126# jiyang rd.") - expect(subject.registrant_contacts[0].city).to eq("jiaxing") - expect(subject.registrant_contacts[0].zip).to eq("314000") - expect(subject.registrant_contacts[0].state).to eq("zhejiang") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("CN") - expect(subject.registrant_contacts[0].phone).to eq("+86.57382033533") - expect(subject.registrant_contacts[0].fax).to eq("+86.57382033533") - expect(subject.registrant_contacts[0].email).to eq("aaa@zjcf.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("baolei") - expect(subject.admin_contacts[0].organization).to eq("jiaxing zhongwang ad co.,ltd.") - expect(subject.admin_contacts[0].address).to eq("126# jiyang rd.") - expect(subject.admin_contacts[0].city).to eq("jiaxing") - expect(subject.admin_contacts[0].zip).to eq("314000") - expect(subject.admin_contacts[0].state).to eq("zhejiang") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("CN") - expect(subject.admin_contacts[0].phone).to eq("+86.57382033533") - expect(subject.admin_contacts[0].fax).to eq("+86.57382033533") - expect(subject.admin_contacts[0].email).to eq("aaa@zjcf.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("baolei") - expect(subject.technical_contacts[0].organization).to eq("jiaxing zhongwang ad co.,ltd.") - expect(subject.technical_contacts[0].address).to eq("126# jiyang rd.") - expect(subject.technical_contacts[0].city).to eq("jiaxing") - expect(subject.technical_contacts[0].zip).to eq("314000") - expect(subject.technical_contacts[0].state).to eq("zhejiang") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("CN") - expect(subject.technical_contacts[0].phone).to eq("+86.57382033533") - expect(subject.technical_contacts[0].fax).to eq("+86.57382033533") - expect(subject.technical_contacts[0].email).to eq("aaa@zjcf.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns3.dns-diy.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns4.dns-diy.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2010-09-10")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-08-21 23:48:59")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-09-10")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("1316") + expect(subject.registrar.name).to eq("35 Technology Co., Ltd.") + expect(subject.registrar.url).to eq("http://www.35.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("baolei") + expect(subject.registrant_contacts[0].organization).to eq("jiaxing zhongwang ad co.,ltd.") + expect(subject.registrant_contacts[0].address).to eq("126# jiyang rd.") + expect(subject.registrant_contacts[0].city).to eq("jiaxing") + expect(subject.registrant_contacts[0].zip).to eq("314000") + expect(subject.registrant_contacts[0].state).to eq("zhejiang") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("CN") + expect(subject.registrant_contacts[0].phone).to eq("+86.57382033533") + expect(subject.registrant_contacts[0].fax).to eq("+86.57382033533") + expect(subject.registrant_contacts[0].email).to eq("aaa@zjcf.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("baolei") + expect(subject.admin_contacts[0].organization).to eq("jiaxing zhongwang ad co.,ltd.") + expect(subject.admin_contacts[0].address).to eq("126# jiyang rd.") + expect(subject.admin_contacts[0].city).to eq("jiaxing") + expect(subject.admin_contacts[0].zip).to eq("314000") + expect(subject.admin_contacts[0].state).to eq("zhejiang") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("CN") + expect(subject.admin_contacts[0].phone).to eq("+86.57382033533") + expect(subject.admin_contacts[0].fax).to eq("+86.57382033533") + expect(subject.admin_contacts[0].email).to eq("aaa@zjcf.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("baolei") + expect(subject.technical_contacts[0].organization).to eq("jiaxing zhongwang ad co.,ltd.") + expect(subject.technical_contacts[0].address).to eq("126# jiyang rd.") + expect(subject.technical_contacts[0].city).to eq("jiaxing") + expect(subject.technical_contacts[0].zip).to eq("314000") + expect(subject.technical_contacts[0].state).to eq("zhejiang") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("CN") + expect(subject.technical_contacts[0].phone).to eq("+86.57382033533") + expect(subject.technical_contacts[0].fax).to eq("+86.57382033533") + expect(subject.technical_contacts[0].email).to eq("aaa@zjcf.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns3.dns-diy.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns4.dns-diy.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.aeda.net.ae/ae/status_available_spec.rb b/spec/whois/parsers/responses/whois.aeda.net.ae/ae/status_available_spec.rb index d3de9f8d..09ea1fd6 100644 --- a/spec/whois/parsers/responses/whois.aeda.net.ae/ae/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.aeda.net.ae/ae/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.aeda.net.ae.rb' -describe Whois::Parsers::WhoisAedaNetAe, "status_available.expected" do +describe "whois.aeda.net.ae", :aggregate_failures do subject do file = fixture("responses", "whois.aeda.net.ae/ae/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.aeda.net.ae") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.aeda.net.ae/ae/status_registered_spec.rb b/spec/whois/parsers/responses/whois.aeda.net.ae/ae/status_registered_spec.rb index 8a290264..8b953a18 100644 --- a/spec/whois/parsers/responses/whois.aeda.net.ae/ae/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.aeda.net.ae/ae/status_registered_spec.rb @@ -9,54 +9,27 @@ # require 'spec_helper' -require 'whois/parsers/whois.aeda.net.ae.rb' -describe Whois::Parsers::WhoisAedaNetAe, "status_registered.expected" do +describe "whois.aeda.net.ae", :aggregate_failures do subject do file = fixture("responses", "whois.aeda.net.ae/ae/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.aeda.net.ae") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.aero/status_available_spec.rb b/spec/whois/parsers/responses/whois.aero/status_available_spec.rb index 95466f58..9ae58e30 100644 --- a/spec/whois/parsers/responses/whois.aero/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.aero/status_available_spec.rb @@ -9,93 +9,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.aero.rb' -describe Whois::Parsers::WhoisAero, "status_available.expected" do +describe "whois.aero", :aggregate_failures do subject do file = fixture("responses", "whois.aero/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.aero") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.reserved?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.aero/status_registered_spec.rb b/spec/whois/parsers/responses/whois.aero/status_registered_spec.rb index d2fbd0e3..5a555323 100644 --- a/spec/whois/parsers/responses/whois.aero/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.aero/status_registered_spec.rb @@ -9,147 +9,61 @@ # require 'spec_helper' -require 'whois/parsers/whois.aero.rb' -describe Whois::Parsers::WhoisAero, "status_registered.expected" do +describe "whois.aero", :aggregate_failures do subject do file = fixture("responses", "whois.aero/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.aero") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to .AERO WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to: (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("srilankan.aero") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D246-AERO") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["OK"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2002-03-26 06:48:27 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-04-09 06:35:03 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-03-26 06:48:27 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("380") - expect(subject.registrar.name).to eq("Tuonome IT") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("C4526901-AERO") - expect(subject.registrant_contacts[0].name).to eq("Domain Name Administrator") - expect(subject.registrant_contacts[0].organization).to eq("SriLankan Airlines Ltd") - expect(subject.registrant_contacts[0].address).to eq("Admin Bldg") - expect(subject.registrant_contacts[0].city).to eq("Katunayaka") - expect(subject.registrant_contacts[0].zip).to eq("11450") - expect(subject.registrant_contacts[0].state).to eq("WP") - expect(subject.registrant_contacts[0].country_code).to eq("LK") - expect(subject.registrant_contacts[0].phone).to eq("+94.197331600") - expect(subject.registrant_contacts[0].fax).to eq("+94.197335160") - expect(subject.registrant_contacts[0].email).to eq("domregister@srilankan.aero") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("C4526901-AERO") - expect(subject.admin_contacts[0].name).to eq("Domain Name Administrator") - expect(subject.admin_contacts[0].organization).to eq("SriLankan Airlines Ltd") - expect(subject.admin_contacts[0].address).to eq("Admin Bldg") - expect(subject.admin_contacts[0].city).to eq("Katunayaka") - expect(subject.admin_contacts[0].zip).to eq("11450") - expect(subject.admin_contacts[0].state).to eq("WP") - expect(subject.admin_contacts[0].country_code).to eq("LK") - expect(subject.admin_contacts[0].phone).to eq("+94.197331600") - expect(subject.admin_contacts[0].fax).to eq("+94.197335160") - expect(subject.admin_contacts[0].email).to eq("domregister@srilankan.aero") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("C4526901-AERO") - expect(subject.technical_contacts[0].name).to eq("Domain Name Administrator") - expect(subject.technical_contacts[0].organization).to eq("SriLankan Airlines Ltd") - expect(subject.technical_contacts[0].address).to eq("Admin Bldg") - expect(subject.technical_contacts[0].city).to eq("Katunayaka") - expect(subject.technical_contacts[0].zip).to eq("11450") - expect(subject.technical_contacts[0].state).to eq("WP") - expect(subject.technical_contacts[0].country_code).to eq("LK") - expect(subject.technical_contacts[0].phone).to eq("+94.197331600") - expect(subject.technical_contacts[0].fax).to eq("+94.197335160") - expect(subject.technical_contacts[0].email).to eq("domregister@srilankan.aero") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("dns1.srilankan.aero") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("dns2.srilankan.aero") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("s2.ns.slt.lk") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("s1.ns.slt.lk") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq("srilankan.aero") + expect(subject.domain_id).to eq("D108300000000000246-AGRS") + expect(subject.status).to eq(["clientTransferProhibited https://icann.org/epp#clientTransferProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.reserved?).to eq(false) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-03-26 06:48:27 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-01-08 12:04:52 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-03-26 06:48:27 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("380") + expect(subject.registrar.name).to eq("Tuonome.it.srl d/b/a APIsrs.com") + expect(subject.registrar.url).to eq("") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("SriLankan Airlines Ltd") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("WP") + expect(subject.registrant_contacts[0].country_code).to eq("LK") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(0) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(0) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns-1046.awsdns-02.org") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns-2011.awsdns-59.co.uk") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns-133.awsdns-16.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns-877.awsdns-45.net") end end diff --git a/spec/whois/parsers/responses/whois.aero/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.aero/status_reserved_spec.rb index b27f8edf..63b915c2 100644 --- a/spec/whois/parsers/responses/whois.aero/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.aero/status_reserved_spec.rb @@ -9,93 +9,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.aero.rb' -describe Whois::Parsers::WhoisAero, "status_reserved.expected" do +describe "whois.aero", :aggregate_failures do subject do file = fixture("responses", "whois.aero/status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.aero") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_reserved.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.reserved?).to eq(true) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/bz/status_available_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/bz/status_available_spec.rb index cdb737d7..8729e86b 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/bz/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/bz/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias-grs.info.rb' -describe Whois::Parsers::WhoisAfiliasGrsInfo, "status_available.expected" do +describe "whois.afilias-grs.info", :aggregate_failures do subject do file = fixture("responses", "whois.afilias-grs.info/bz/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias-grs.info") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/bz/status_registered_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/bz/status_registered_spec.rb index 449a0f0c..befc3fa2 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/bz/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/bz/status_registered_spec.rb @@ -9,103 +9,47 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias-grs.info.rb' -describe Whois::Parsers::WhoisAfiliasGrsInfo, "status_registered.expected" do +describe "whois.afilias-grs.info", :aggregate_failures do subject do file = fixture("responses", "whois.afilias-grs.info/bz/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias-grs.info") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to CCTLD WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to: (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.bz") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D354967-LRCC") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED", "RENEWPERIOD"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-02-12 18:08:52 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-01-11 10:18:14 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-02-12 18:08:52 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("R22-LRCC") - expect(subject.registrar.name).to eq("MarkMonitor, Inc.") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(0) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(0) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(0) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq("google.bz") + expect(subject.domain_id).to eq("D105800000000354967-AGRS") + expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-02-12 18:08:52 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-01-11 10:34:48 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-02-12 18:08:52 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(0) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(0) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(0) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns4.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3.google.com") end end diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/gi/status_available_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/gi/status_available_spec.rb index 1c084009..13c6859d 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/gi/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/gi/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias-grs.info.rb' -describe Whois::Parsers::WhoisAfiliasGrsInfo, "status_available.expected" do +describe "whois.afilias-grs.info", :aggregate_failures do subject do file = fixture("responses", "whois.afilias-grs.info/gi/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias-grs.info") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/gi/status_registered_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/gi/status_registered_spec.rb index bc391228..ad73b33f 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/gi/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/gi/status_registered_spec.rb @@ -9,138 +9,56 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias-grs.info.rb' -describe Whois::Parsers::WhoisAfiliasGrsInfo, "status_registered.expected" do +describe "whois.afilias-grs.info", :aggregate_failures do subject do file = fixture("responses", "whois.afilias-grs.info/gi/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias-grs.info") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to CCTLD WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to: (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("sapphire.gi") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D68296-LRCC") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["OK"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2004-12-20 13:34:34 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2008-12-20 19:25:54 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2009-12-20 13:34:34 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("R43-LRCC") - expect(subject.registrar.name).to eq("GibNet Registrar") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("FR-1103549674779") - expect(subject.registrant_contacts[0].name).to eq("Jimmy Imossi") - expect(subject.registrant_contacts[0].organization).to eq("Broadband Gibraltar Limited") - expect(subject.registrant_contacts[0].address).to eq("Suite 951\nEuroport") - expect(subject.registrant_contacts[0].city).to eq("Gibraltar") - expect(subject.registrant_contacts[0].zip).to eq("NA") - expect(subject.registrant_contacts[0].state).to eq("") - expect(subject.registrant_contacts[0].country_code).to eq("GI") - expect(subject.registrant_contacts[0].phone).to eq("+350.47200") - expect(subject.registrant_contacts[0].fax).to eq("+350.47272") - expect(subject.registrant_contacts[0].email).to eq("jimossi@sapphire.gi") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("FR-1103549674779") - expect(subject.admin_contacts[0].name).to eq("Jimmy Imossi") - expect(subject.admin_contacts[0].organization).to eq("Broadband Gibraltar Limited") - expect(subject.admin_contacts[0].address).to eq("Suite 951\nEuroport") - expect(subject.admin_contacts[0].city).to eq("Gibraltar") - expect(subject.admin_contacts[0].zip).to eq("NA") - expect(subject.admin_contacts[0].state).to eq("") - expect(subject.admin_contacts[0].country_code).to eq("GI") - expect(subject.admin_contacts[0].phone).to eq("+350.47200") - expect(subject.admin_contacts[0].fax).to eq("+350.47272") - expect(subject.admin_contacts[0].email).to eq("jimossi@sapphire.gi") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("FR-10a223e2e4cf0") - expect(subject.technical_contacts[0].name).to eq("Tech Dept") - expect(subject.technical_contacts[0].organization).to eq("Broadband Gibraltar Ltd") - expect(subject.technical_contacts[0].address).to eq("Suite 9.5.1\nEuroport") - expect(subject.technical_contacts[0].city).to eq("N/A") - expect(subject.technical_contacts[0].zip).to eq("N/A") - expect(subject.technical_contacts[0].state).to eq("") - expect(subject.technical_contacts[0].country_code).to eq("GI") - expect(subject.technical_contacts[0].phone).to eq("+350.47200") - expect(subject.technical_contacts[0].fax).to eq("+350.47271") - expect(subject.technical_contacts[0].email).to eq("tech@sapphire.gi") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1-a.sapphire.gi") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2-a.sapphire.gi") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq("sapphire.gi") + expect(subject.domain_id).to eq("D105800000000068296-AGRS") + expect(subject.status).to eq(["ok https://icann.org/epp#ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2004-12-20 13:34:34 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2017-12-05 13:07:12 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-12-20 13:34:34 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("119") + expect(subject.registrar.name).to eq("GibNet Registrar") + expect(subject.registrar.url).to eq("") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Broadband Gibraltar Limited") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("Not Available") + expect(subject.registrant_contacts[0].country_code).to eq("GI") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(0) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(0) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1-a.sapphire.gi") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2-a.sapphire.gi") end end diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/lc/status_available_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/lc/status_available_spec.rb index c753c9ef..0ca11cb8 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/lc/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/lc/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias-grs.info.rb' -describe Whois::Parsers::WhoisAfiliasGrsInfo, "status_available.expected" do +describe "whois.afilias-grs.info", :aggregate_failures do subject do file = fixture("responses", "whois.afilias-grs.info/lc/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias-grs.info") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/lc/status_registered_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/lc/status_registered_spec.rb index 4d637c5a..eafe7671 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/lc/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/lc/status_registered_spec.rb @@ -9,138 +9,56 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias-grs.info.rb' -describe Whois::Parsers::WhoisAfiliasGrsInfo, "status_registered.expected" do +describe "whois.afilias-grs.info", :aggregate_failures do subject do file = fixture("responses", "whois.afilias-grs.info/lc/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias-grs.info") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to CCTLD WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to: (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("nic.lc") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D946482-LRCC") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["OK"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2002-12-08 00:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2008-12-08 19:25:09 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2009-12-08 00:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("R144-LRCC") - expect(subject.registrar.name).to eq("NicLc Registrar") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("LC-54921") - expect(subject.registrant_contacts[0].name).to eq("Nic LC Admin") - expect(subject.registrant_contacts[0].organization).to eq("Nic LC") - expect(subject.registrant_contacts[0].address).to eq("#4 Colony House\nJohn Compton Hwy") - expect(subject.registrant_contacts[0].city).to eq("Castries") - expect(subject.registrant_contacts[0].zip).to eq("Not Provided") - expect(subject.registrant_contacts[0].state).to eq("Not Provided") - expect(subject.registrant_contacts[0].country_code).to eq("LC") - expect(subject.registrant_contacts[0].phone).to eq("+758.4520220") - expect(subject.registrant_contacts[0].fax).to eq("") - expect(subject.registrant_contacts[0].email).to eq("nic@nic.lc") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("LC-51893") - expect(subject.admin_contacts[0].name).to eq("Nic LC Hostmaster") - expect(subject.admin_contacts[0].organization).to eq("Nic LC") - expect(subject.admin_contacts[0].address).to eq("#4 Colony House\nNot Provided") - expect(subject.admin_contacts[0].city).to eq("Castries") - expect(subject.admin_contacts[0].zip).to eq("Not Provided") - expect(subject.admin_contacts[0].state).to eq("Not Provided") - expect(subject.admin_contacts[0].country_code).to eq("LC") - expect(subject.admin_contacts[0].phone).to eq("+758.4520220") - expect(subject.admin_contacts[0].fax).to eq("") - expect(subject.admin_contacts[0].email).to eq("hostmaster@nic.lc") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("LC-53407") - expect(subject.technical_contacts[0].name).to eq("Nic LC Technical") - expect(subject.technical_contacts[0].organization).to eq("Nic LC") - expect(subject.technical_contacts[0].address).to eq("#4 Colony House\nNot Provided") - expect(subject.technical_contacts[0].city).to eq("Castries") - expect(subject.technical_contacts[0].zip).to eq("Not Provided") - expect(subject.technical_contacts[0].state).to eq("Not Provided") - expect(subject.technical_contacts[0].country_code).to eq("LC") - expect(subject.technical_contacts[0].phone).to eq("+758.4520220") - expect(subject.technical_contacts[0].fax).to eq("") - expect(subject.technical_contacts[0].email).to eq("technical@nic.lc") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.nic.ag") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns.patricklay.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq("nic.lc") + expect(subject.domain_id).to eq("D105800000000946482-AGRS") + expect(subject.status).to eq(["ok https://icann.org/epp#ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-12-08 00:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2020-12-08 22:22:29 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2021-12-08 00:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("119") + expect(subject.registrar.name).to eq("NicLc Registrar") + expect(subject.registrar.url).to eq("") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Nic LC") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("Not Provided") + expect(subject.registrant_contacts[0].country_code).to eq("LC") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(0) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(0) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.nic.ag") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns.patricklay.com") end end diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/mn/status_available_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/mn/status_available_spec.rb index 12b80151..79c17cbe 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/mn/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/mn/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias-grs.info.rb' -describe Whois::Parsers::WhoisAfiliasGrsInfo, "status_available.expected" do +describe "whois.afilias-grs.info", :aggregate_failures do subject do file = fixture("responses", "whois.afilias-grs.info/mn/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias-grs.info") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/mn/status_registered_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/mn/status_registered_spec.rb index 63f96ca2..868c6ae0 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/mn/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/mn/status_registered_spec.rb @@ -9,142 +9,86 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias-grs.info.rb' -describe Whois::Parsers::WhoisAfiliasGrsInfo, "status_registered.expected" do +describe "whois.afilias-grs.info", :aggregate_failures do subject do file = fixture("responses", "whois.afilias-grs.info/mn/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias-grs.info") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to CCTLD WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to: (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.mn") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D444956-LRCC") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-04-07 00:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-03-06 10:21:48 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-04-07 00:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("R22-LRCC") - expect(subject.registrar.name).to eq("MarkMonitor, Inc.") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("MNM-11332") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+165.03300100") - expect(subject.registrant_contacts[0].fax).to eq("+165.06188571") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("MNM-11332") - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+165.03300100") - expect(subject.admin_contacts[0].fax).to eq("+165.06188571") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("mmr-33293") - expect(subject.technical_contacts[0].name).to eq("Domain Admin") - expect(subject.technical_contacts[0].organization).to eq("MarkMonitor") - expect(subject.technical_contacts[0].address).to eq("391 N. Ancestor Place\nSuite 150") - expect(subject.technical_contacts[0].city).to eq("Boise") - expect(subject.technical_contacts[0].zip).to eq("83704") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.2083895740") - expect(subject.technical_contacts[0].fax).to eq("+1.2083895771") - expect(subject.technical_contacts[0].email).to eq("ccops@markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq("google.mn") + expect(subject.domain_id).to eq("D105800000000444956-AGRS") + expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-04-07 00:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-03-06 10:38:48 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-04-07 00:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("C40795-AGRS") + expect(subject.registrant_contacts[0].name).to eq("DNS Admin") + expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") + expect(subject.registrant_contacts[0].fax).to eq("+1.6502530001") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("C40795-AGRS") + expect(subject.admin_contacts[0].name).to eq("DNS Admin") + expect(subject.admin_contacts[0].organization).to eq("Google Inc.") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") + expect(subject.admin_contacts[0].fax).to eq("+1.6502530001") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("C40795-AGRS") + expect(subject.technical_contacts[0].name).to eq("DNS Admin") + expect(subject.technical_contacts[0].organization).to eq("Google Inc.") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") + expect(subject.technical_contacts[0].fax).to eq("+1.6502530001") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns4.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3.google.com") end end diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/sc/status_available_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/sc/status_available_spec.rb index 67210a82..21866988 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/sc/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/sc/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias-grs.info.rb' -describe Whois::Parsers::WhoisAfiliasGrsInfo, "status_available.expected" do +describe "whois.afilias-grs.info", :aggregate_failures do subject do file = fixture("responses", "whois.afilias-grs.info/sc/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias-grs.info") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/sc/status_registered_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/sc/status_registered_spec.rb index d1ef88e8..c384f262 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/sc/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/sc/status_registered_spec.rb @@ -9,141 +9,56 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias-grs.info.rb' -describe Whois::Parsers::WhoisAfiliasGrsInfo, "status_registered.expected" do +describe "whois.afilias-grs.info", :aggregate_failures do subject do file = fixture("responses", "whois.afilias-grs.info/sc/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias-grs.info") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to CCTLD WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to: (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.sc") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D47234-LRCC") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED", "RENEWPERIOD"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2004-02-03 19:19:12 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-01-02 10:20:29 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-02-03 19:19:12 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("R22-LRCC") - expect(subject.registrar.name).to eq("MarkMonitor, Inc.") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("AGRS-129819") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6506188571") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("AGRS-129293") - expect(subject.admin_contacts[0].name).to eq("CCOPS") - expect(subject.admin_contacts[0].organization).to eq("MarkMonitor") - expect(subject.admin_contacts[0].address).to eq("PMB 155\n10400 Overland Rd.") - expect(subject.admin_contacts[0].city).to eq("Boise") - expect(subject.admin_contacts[0].zip).to eq("83709-1433") - expect(subject.admin_contacts[0].state).to eq("ID") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.20838957") - expect(subject.admin_contacts[0].fax).to eq("+1.20838957") - expect(subject.admin_contacts[0].email).to eq("ccops@markmonitor.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("mmr-33293") - expect(subject.technical_contacts[0].name).to eq("Domain Admin") - expect(subject.technical_contacts[0].organization).to eq("MarkMonitor") - expect(subject.technical_contacts[0].address).to eq("391 N. Ancestor Place\nSuite 150") - expect(subject.technical_contacts[0].city).to eq("Boise") - expect(subject.technical_contacts[0].zip).to eq("83704") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.2083895740") - expect(subject.technical_contacts[0].fax).to eq("+1.2083895771") - expect(subject.technical_contacts[0].email).to eq("ccops@markmonitor.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq("google.sc") + expect(subject.domain_id).to eq("D105800000000047234-AGRS") + expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2004-02-03 19:19:12 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-01-02 10:34:05 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-02-03 19:19:12 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(0) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(0) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/vc/status_available_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/vc/status_available_spec.rb index 08c1f361..f464fdba 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/vc/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/vc/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias-grs.info.rb' -describe Whois::Parsers::WhoisAfiliasGrsInfo, "status_available.expected" do +describe "whois.afilias-grs.info", :aggregate_failures do subject do file = fixture("responses", "whois.afilias-grs.info/vc/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias-grs.info") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.afilias-grs.info/vc/status_registered_spec.rb b/spec/whois/parsers/responses/whois.afilias-grs.info/vc/status_registered_spec.rb index 8aa5395b..91460992 100644 --- a/spec/whois/parsers/responses/whois.afilias-grs.info/vc/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias-grs.info/vc/status_registered_spec.rb @@ -9,142 +9,60 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias-grs.info.rb' -describe Whois::Parsers::WhoisAfiliasGrsInfo, "status_registered.expected" do +describe "whois.afilias-grs.info", :aggregate_failures do subject do file = fixture("responses", "whois.afilias-grs.info/vc/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias-grs.info") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to CCTLD WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to: (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.vc") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D133753-LRCC") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2005-06-29 00:58:18 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2009-02-17 17:43:40 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2011-06-29 00:58:18 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("R22-LRCC") - expect(subject.registrar.name).to eq("MarkMonitor, Inc.") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("mmr-2383") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6506188571") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("mmr-2383") - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") - expect(subject.admin_contacts[0].fax).to eq("+1.6506188571") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("mmr-2383") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") - expect(subject.technical_contacts[0].fax).to eq("+1.6506188571") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq("google.vc") + expect(subject.domain_id).to eq("D105800000000133753-AGRS") + expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2005-06-29 00:58:18 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-05-28 09:37:54 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-06-29 00:58:18 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(0) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(0) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns4.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3.google.com") end end diff --git a/spec/whois/parsers/responses/whois.afilias.net/info/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.afilias.net/info/response_throttled_spec.rb new file mode 100644 index 00000000..e9296cd3 --- /dev/null +++ b/spec/whois/parsers/responses/whois.afilias.net/info/response_throttled_spec.rb @@ -0,0 +1,24 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.afilias.net/info/response_throttled.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.afilias.net", :aggregate_failures do + + subject do + file = fixture("responses", "whois.afilias.net/info/response_throttled.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias.net") + Whois::Parser.parser_for(part) + end + + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) + end +end diff --git a/spec/whois/parsers/responses/whois.afilias.net/info/status_available_spec.rb b/spec/whois/parsers/responses/whois.afilias.net/info/status_available_spec.rb index bac413f1..0d7956ae 100644 --- a/spec/whois/parsers/responses/whois.afilias.net/info/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias.net/info/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias.net.rb' -describe Whois::Parsers::WhoisAfiliasNet, "status_available.expected" do +describe "whois.afilias.net", :aggregate_failures do subject do file = fixture("responses", "whois.afilias.net/info/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias.net") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.afilias.net/info/status_registered_spec.rb b/spec/whois/parsers/responses/whois.afilias.net/info/status_registered_spec.rb index 2fa63b9a..558eca7b 100644 --- a/spec/whois/parsers/responses/whois.afilias.net/info/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias.net/info/status_registered_spec.rb @@ -9,142 +9,60 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias.net.rb' -describe Whois::Parsers::WhoisAfiliasNet, "status_registered.expected" do +describe "whois.afilias.net", :aggregate_failures do subject do file = fixture("responses", "whois.afilias.net/info/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias.net") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.info") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D37288-LRMS") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientDeleteProhibited", "clientTransferProhibited", "clientUpdateProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2001-07-31 23:57:50 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-06-29 09:26:18 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-07-31 23:57:50 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("R151-LRMS") - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("mmr-32097") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6506234000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6506188571") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("mmr-32097") - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6506234000") - expect(subject.admin_contacts[0].fax).to eq("+1.6506188571") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("mmr-32097") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6506234000") - expect(subject.technical_contacts[0].fax).to eq("+1.6506188571") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq("google.info") + expect(subject.domain_id).to eq("D37288-LRMS") + expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited", "serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited", "serverTransferProhibited https://icann.org/epp#serverTransferProhibited", "serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2001-07-31 23:57:50 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-06-29 09:31:10 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-07-31 23:57:50 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(0) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(0) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.afilias.net/info/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.afilias.net/info/status_reserved_spec.rb index 391c6ef7..a5fc86db 100644 --- a/spec/whois/parsers/responses/whois.afilias.net/info/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias.net/info/status_reserved_spec.rb @@ -9,24 +9,17 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias.net.rb' -describe Whois::Parsers::WhoisAfiliasNet, "status_reserved.expected" do +describe "whois.afilias.net", :aggregate_failures do subject do file = fixture("responses", "whois.afilias.net/info/status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias.net") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(true) - end + it "matches status_reserved.expected" do + expect(subject.status).to eq(:reserved) + expect(subject.reserved?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.afilias.net/pro/status_available_spec.rb b/spec/whois/parsers/responses/whois.afilias.net/pro/status_available_spec.rb index c1919e8f..3f25ff0c 100644 --- a/spec/whois/parsers/responses/whois.afilias.net/pro/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias.net/pro/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias.net.rb' -describe Whois::Parsers::WhoisAfiliasNet, "status_available.expected" do +describe "whois.afilias.net", :aggregate_failures do subject do file = fixture("responses", "whois.afilias.net/pro/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias.net") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.afilias.net/pro/status_registered_spec.rb b/spec/whois/parsers/responses/whois.afilias.net/pro/status_registered_spec.rb index 2365e405..7b570ada 100644 --- a/spec/whois/parsers/responses/whois.afilias.net/pro/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias.net/pro/status_registered_spec.rb @@ -9,142 +9,60 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias.net.rb' -describe Whois::Parsers::WhoisAfiliasNet, "status_registered.expected" do +describe "whois.afilias.net", :aggregate_failures do subject do file = fixture("responses", "whois.afilias.net/pro/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias.net") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.pro") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D107300000000011545-LRMS") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2008-07-22 00:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2016-02-01 15:44:03 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2016-09-08 00:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("mmr-2383") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6506188571") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("mmr-2383") - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") - expect(subject.admin_contacts[0].fax).to eq("+1.6506188571") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("mmr-2383") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") - expect(subject.technical_contacts[0].fax).to eq("+1.6506188571") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq("google.pro") + expect(subject.domain_id).to eq("D107300000000011545-LRMS") + expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2008-07-22 00:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-08-07 09:34:10 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-09-08 00:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(0) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(0) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.afilias.net/pro/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.afilias.net/pro/status_reserved_spec.rb index d2800da6..0be9c474 100644 --- a/spec/whois/parsers/responses/whois.afilias.net/pro/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.afilias.net/pro/status_reserved_spec.rb @@ -9,24 +9,17 @@ # require 'spec_helper' -require 'whois/parsers/whois.afilias.net.rb' -describe Whois::Parsers::WhoisAfiliasNet, "status_reserved.expected" do +describe "whois.afilias.net", :aggregate_failures do subject do file = fixture("responses", "whois.afilias.net/pro/status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.afilias.net") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(true) - end + it "matches status_reserved.expected" do + expect(subject.status).to eq(:reserved) + expect(subject.reserved?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.amnic.net/am/status_available_spec.rb b/spec/whois/parsers/responses/whois.amnic.net/am/status_available_spec.rb index 5629b576..05357e53 100644 --- a/spec/whois/parsers/responses/whois.amnic.net/am/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.amnic.net/am/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.amnic.net.rb' -describe Whois::Parsers::WhoisAmnicNet, "status_available.expected" do +describe "whois.amnic.net", :aggregate_failures do subject do file = fixture("responses", "whois.amnic.net/am/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.amnic.net") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.amnic.net/am/status_registered_spec.rb b/spec/whois/parsers/responses/whois.amnic.net/am/status_registered_spec.rb index 4a5ca790..12134a72 100644 --- a/spec/whois/parsers/responses/whois.amnic.net/am/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.amnic.net/am/status_registered_spec.rb @@ -9,61 +9,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.amnic.net.rb' -describe Whois::Parsers::WhoisAmnicNet, "status_registered.expected" do +describe "whois.amnic.net", :aggregate_failures do subject do file = fixture("responses", "whois.amnic.net/am/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.amnic.net") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1999-06-05")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-02-13")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-04-15")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1999-06-05")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-02-13")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-04-15")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.ascio.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.ascio.com/status_available_spec.rb index 72566dd5..8521d34c 100644 --- a/spec/whois/parsers/responses/whois.ascio.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.ascio.com/status_available_spec.rb @@ -9,83 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.ascio.com.rb' -describe Whois::Parsers::WhoisAscioCom, "status_available.expected" do +describe "whois.ascio.com", :aggregate_failures do subject do file = fixture("responses", "whois.ascio.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ascio.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.ascio.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.ascio.com/status_registered_spec.rb index 3948ddae..283380d9 100644 --- a/spec/whois/parsers/responses/whois.ascio.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.ascio.com/status_registered_spec.rb @@ -9,134 +9,82 @@ # require 'spec_helper' -require 'whois/parsers/whois.ascio.com.rb' -describe Whois::Parsers::WhoisAscioCom, "status_registered.expected" do +describe "whois.ascio.com", :aggregate_failures do subject do file = fixture("responses", "whois.ascio.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ascio.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("ascio.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2005-03-01 14:11:50 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-06-02 00:23:21 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-05-31 00:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("106") - expect(subject.registrar.name).to eq("Ascio Technologies, Inc") - expect(subject.registrar.organization).to eq("Ascio Technologies, Inc") - expect(subject.registrar.url).to eq("http://www.ascio.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].name).to eq("Hostmaster Ascio") - expect(subject.registrant_contacts[0].organization).to eq("ASCIO Technologies Inc.") - expect(subject.registrant_contacts[0].address).to eq("Islands Brygge 55") - expect(subject.registrant_contacts[0].city).to eq("Copenhagen") - expect(subject.registrant_contacts[0].zip).to eq("2300") - expect(subject.registrant_contacts[0].state).to eq("S") - expect(subject.registrant_contacts[0].country_code).to eq("DK") - expect(subject.registrant_contacts[0].phone).to eq("") - expect(subject.registrant_contacts[0].fax).to eq("") - expect(subject.registrant_contacts[0].email).to eq("") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].name).to eq("Technical Hostmaster") - expect(subject.admin_contacts[0].organization).to eq("Speednames") - expect(subject.admin_contacts[0].address).to eq("Rejsbygade 8a") - expect(subject.admin_contacts[0].city).to eq("Copenhagen") - expect(subject.admin_contacts[0].zip).to eq("1759") - expect(subject.admin_contacts[0].state).to eq("DK") - expect(subject.admin_contacts[0].country_code).to eq("DK") - expect(subject.admin_contacts[0].phone).to eq("+45.33886300") - expect(subject.admin_contacts[0].fax).to eq("+45.33886301") - expect(subject.admin_contacts[0].email).to eq("hostmaster@speednames.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].name).to eq("Netnames Hostmaster") - expect(subject.technical_contacts[0].organization).to eq("Group NBT") - expect(subject.technical_contacts[0].address).to eq("3rd Floor Prospero House, 241 Borough High St.") - expect(subject.technical_contacts[0].city).to eq("London") - expect(subject.technical_contacts[0].zip).to eq("SE1 1GA") - expect(subject.technical_contacts[0].state).to eq("") - expect(subject.technical_contacts[0].country_code).to eq("GB") - expect(subject.technical_contacts[0].phone).to eq("+44.2070159370") - expect(subject.technical_contacts[0].fax).to eq("+44.2070159375") - expect(subject.technical_contacts[0].email).to eq("hostmaster@netnames.net") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.ascio.net") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.ascio.net") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.ascio.net") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.ascio.net") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("ascio.com") + expect(subject.domain_id).to eq("") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2005-03-01 14:11:50 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-06-02 00:23:21 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-05-31 00:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("106") + expect(subject.registrar.name).to eq("Ascio Technologies, Inc") + expect(subject.registrar.url).to eq("http://www.ascio.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].name).to eq("Hostmaster Ascio") + expect(subject.registrant_contacts[0].organization).to eq("ASCIO Technologies Inc.") + expect(subject.registrant_contacts[0].address).to eq("Islands Brygge 55") + expect(subject.registrant_contacts[0].city).to eq("Copenhagen") + expect(subject.registrant_contacts[0].zip).to eq("2300") + expect(subject.registrant_contacts[0].state).to eq("S") + expect(subject.registrant_contacts[0].country_code).to eq("DK") + expect(subject.registrant_contacts[0].phone).to eq("") + expect(subject.registrant_contacts[0].fax).to eq("") + expect(subject.registrant_contacts[0].email).to eq("") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].name).to eq("Technical Hostmaster") + expect(subject.admin_contacts[0].organization).to eq("Speednames") + expect(subject.admin_contacts[0].address).to eq("Rejsbygade 8a") + expect(subject.admin_contacts[0].city).to eq("Copenhagen") + expect(subject.admin_contacts[0].zip).to eq("1759") + expect(subject.admin_contacts[0].state).to eq("DK") + expect(subject.admin_contacts[0].country_code).to eq("DK") + expect(subject.admin_contacts[0].phone).to eq("+45.33886300") + expect(subject.admin_contacts[0].fax).to eq("+45.33886301") + expect(subject.admin_contacts[0].email).to eq("hostmaster@speednames.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].name).to eq("Netnames Hostmaster") + expect(subject.technical_contacts[0].organization).to eq("Group NBT") + expect(subject.technical_contacts[0].address).to eq("3rd Floor Prospero House, 241 Borough High St.") + expect(subject.technical_contacts[0].city).to eq("London") + expect(subject.technical_contacts[0].zip).to eq("SE1 1GA") + expect(subject.technical_contacts[0].state).to eq("") + expect(subject.technical_contacts[0].country_code).to eq("GB") + expect(subject.technical_contacts[0].phone).to eq("+44.2070159370") + expect(subject.technical_contacts[0].fax).to eq("+44.2070159375") + expect(subject.technical_contacts[0].email).to eq("hostmaster@netnames.net") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.ascio.net") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.ascio.net") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.ascio.net") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.ascio.net") end end diff --git a/spec/whois/parsers/responses/whois.ati.tn/tn/property_contact_updated_none_spec.rb b/spec/whois/parsers/responses/whois.ati.tn/tn/property_contact_updated_none_spec.rb index 8c744e8a..c8017242 100644 --- a/spec/whois/parsers/responses/whois.ati.tn/tn/property_contact_updated_none_spec.rb +++ b/spec/whois/parsers/responses/whois.ati.tn/tn/property_contact_updated_none_spec.rb @@ -9,25 +9,22 @@ # require 'spec_helper' -require 'whois/parsers/whois.ati.tn.rb' -describe Whois::Parsers::WhoisAtiTn, "property_contact_updated_none.expected" do +describe "whois.ati.tn", :aggregate_failures do subject do file = fixture("responses", "whois.ati.tn/tn/property_contact_updated_none.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ati.tn") + Whois::Parser.parser_for(part) end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].name).to eq("MAISON DE BIEN HOTELIERS ET EQ Farhat Riadh") - expect(subject.registrant_contacts[0].created_on).to eq(Time.parse("2013-12-13 20:00:57")) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end + it "matches property_contact_updated_none.expected" do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].name).to eq("MAISON DE BIEN HOTELIERS ET EQ Farhat Riadh") + expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2013-12-13 20:00:57")) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.ati.tn/tn/status_available_spec.rb b/spec/whois/parsers/responses/whois.ati.tn/tn/status_available_spec.rb index 148b2b99..606ee8d4 100644 --- a/spec/whois/parsers/responses/whois.ati.tn/tn/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.ati.tn/tn/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.ati.tn.rb' -describe Whois::Parsers::WhoisAtiTn, "status_available.expected" do +describe "whois.ati.tn", :aggregate_failures do subject do file = fixture("responses", "whois.ati.tn/tn/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ati.tn") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("All rights reserved.\nCopyright \"Tunisian Internet Agency - http://whois.tn\"") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("All rights reserved.\nCopyright \"Tunisian Internet Agency - http://whois.tn\"") + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.ati.tn/tn/status_registered_spec.rb b/spec/whois/parsers/responses/whois.ati.tn/tn/status_registered_spec.rb index 11c0d9ed..45da51f7 100644 --- a/spec/whois/parsers/responses/whois.ati.tn/tn/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.ati.tn/tn/status_registered_spec.rb @@ -9,153 +9,97 @@ # require 'spec_helper' -require 'whois/parsers/whois.ati.tn.rb' -describe Whois::Parsers::WhoisAtiTn, "status_registered.expected" do +describe "whois.ati.tn", :aggregate_failures do subject do file = fixture("responses", "whois.ati.tn/tn/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ati.tn") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("All rights reserved.\nCopyright \"Tunisian Internet Agency - http://whois.tn\"") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.tn") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2009-05-14 00:00:00")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("3S Global Net") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("GOOGLE Inc") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("PO BOX 2050 Moutain view CA 94042 USA") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq("+1 925 685 9600") - expect(subject.registrant_contacts[0].fax).to eq("+1 925 685 9620") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.registrant_contacts[0].created_on).to eq(Time.parse("2009-05-14 00:00:00")) - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2010-07-18 00:00:00")) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("GOOGLE Inc") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq("PO BOX 2050 Moutain view CA 94042 USA") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq("+1 925 685 9600") - expect(subject.admin_contacts[0].fax).to eq("+1 925 685 9620") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.admin_contacts[0].created_on).to eq(Time.parse("2009-05-14 00:00:00")) - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2010-07-18 00:00:00")) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("GOOGLE Inc") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq("PO BOX 2050 Moutain view CA 94042 USA") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq("+1 925 685 9600") - expect(subject.technical_contacts[0].fax).to eq("+1 925 685 9620") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.technical_contacts[0].created_on).to eq(Time.parse("2009-05-14 00:00:00")) - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2010-07-18 00:00:00")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq("216.239.32.10") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq("216.239.34.10") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq("216.239.36.10") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - expect(subject.nameservers[3].ipv4).to eq("216.239.38.10") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("All rights reserved.\nCopyright \"Tunisian Internet Agency - http://whois.tn\"") + expect(subject.domain).to eq("google.tn") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2009-05-14 00:00:00")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("3S Global Net") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("GOOGLE Inc") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("PO BOX 2050 Moutain view CA 94042 USA") + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq("+1 925 685 9600") + expect(subject.registrant_contacts[0].fax).to eq("+1 925 685 9620") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2009-05-14 00:00:00")) + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2010-07-18 00:00:00")) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("GOOGLE Inc") + expect(subject.admin_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts[0].address).to eq("PO BOX 2050 Moutain view CA 94042 USA") + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq("+1 925 685 9600") + expect(subject.admin_contacts[0].fax).to eq("+1 925 685 9620") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts[0].created_on).to eq(DateTime.parse("2009-05-14 00:00:00")) + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2010-07-18 00:00:00")) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("GOOGLE Inc") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq("PO BOX 2050 Moutain view CA 94042 USA") + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq("+1 925 685 9600") + expect(subject.technical_contacts[0].fax).to eq("+1 925 685 9620") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2009-05-14 00:00:00")) + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2010-07-18 00:00:00")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq("216.239.32.10") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq("216.239.34.10") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].ipv4).to eq("216.239.36.10") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.nameservers[3].ipv4).to eq("216.239.38.10") end end diff --git a/spec/whois/parsers/responses/whois.auda.org.au/au/property_status_with_multiple_spec.rb b/spec/whois/parsers/responses/whois.auda.org.au/au/property_status_with_multiple_spec.rb new file mode 100644 index 00000000..1d886978 --- /dev/null +++ b/spec/whois/parsers/responses/whois.auda.org.au/au/property_status_with_multiple_spec.rb @@ -0,0 +1,24 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.auda.org.au/au/property_status_with_multiple.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.auda.org.au", :aggregate_failures do + + subject do + file = fixture("responses", "whois.auda.org.au/au/property_status_with_multiple.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.auda.org.au") + Whois::Parser.parser_for(part) + end + + it "matches property_status_with_multiple.expected" do + expect(subject.status).to eq(["serverRenewProhibited https://afilias.com.au/get-au/whois-status-codes#serverRenewProhibited"]) + end +end diff --git a/spec/whois/parsers/responses/whois.auda.org.au/au/status_available_spec.rb b/spec/whois/parsers/responses/whois.auda.org.au/au/status_available_spec.rb new file mode 100644 index 00000000..44d3a3db --- /dev/null +++ b/spec/whois/parsers/responses/whois.auda.org.au/au/status_available_spec.rb @@ -0,0 +1,40 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.auda.org.au/au/status_available.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.auda.org.au", :aggregate_failures do + + subject do + file = fixture("responses", "whois.auda.org.au/au/status_available.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.auda.org.au") + Whois::Parser.parser_for(part) + end + + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Afilias Australia Pty Ltd (Afilias), for itself and on behalf of .au Domain Administration Limited (auDA), makes the WHOIS registration data directory service (WHOIS Service) available solely for the purposes of:\n(a) querying the availability of a domain name licence;\n(b) identifying the holder of a domain name licence; and/or\n(c) contacting the holder of a domain name licence in relation to that domain name and its use.\nThe WHOIS Service must not be used for any other purpose (even if that purpose is lawful), including:\n(a) aggregating, collecting or compiling information from the WHOIS database, whether for personal or commercial purposes;\n(b) enabling the sending of unsolicited electronic communications; and / or\n(c) enabling high volume, automated, electronic processes that send queries or data to the systems of Afilias, any registrar, any domain name licence holder, or auDA.\nThe WHOIS Service is provided for information purposes only. By using the WHOIS Service, you agree to be bound by these terms and conditions. The WHOIS Service is operated in accordance with the auDA WHOIS Policy (available at https://www.auda.org.au/policies/index-of-published-policies/2014/2014-07/ ).") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end +end diff --git a/spec/whois/parsers/responses/whois.auda.org.au/au/status_registered_spec.rb b/spec/whois/parsers/responses/whois.auda.org.au/au/status_registered_spec.rb new file mode 100644 index 00000000..017dadff --- /dev/null +++ b/spec/whois/parsers/responses/whois.auda.org.au/au/status_registered_spec.rb @@ -0,0 +1,83 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.auda.org.au/au/status_registered.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.auda.org.au", :aggregate_failures do + + subject do + file = fixture("responses", "whois.auda.org.au/au/status_registered.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.auda.org.au") + Whois::Parser.parser_for(part) + end + + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Afilias Australia Pty Ltd (Afilias), for itself and on behalf of .au Domain Administration Limited (auDA), makes the WHOIS registration data directory service (WHOIS Service) available solely for the purposes of:\n(a) querying the availability of a domain name licence;\n(b) identifying the holder of a domain name licence; and/or\n(c) contacting the holder of a domain name licence in relation to that domain name and its use.\nThe WHOIS Service must not be used for any other purpose (even if that purpose is lawful), including:\n(a) aggregating, collecting or compiling information from the WHOIS database, whether for personal or commercial purposes;\n(b) enabling the sending of unsolicited electronic communications; and / or\n(c) enabling high volume, automated, electronic processes that send queries or data to the systems of Afilias, any registrar, any domain name licence holder, or auDA.\nThe WHOIS Service is provided for information purposes only. By using the WHOIS Service, you agree to be bound by these terms and conditions. The WHOIS Service is operated in accordance with the auDA WHOIS Policy (available at https://www.auda.org.au/policies/index-of-published-policies/2014/2014-07/ ).") + expect(subject.domain).to eq("GOOGLE.COM.AU") + expect(subject.domain_id).to eq("D407400000001774763-AU") + expect(subject.status).to eq(["clientDeleteProhibited https://afilias.com.au/get-au/whois-status-codes#clientDeleteProhibited", "clientUpdateProhibited https://afilias.com.au/get-au/whois-status-codes#clientUpdateProhibited", "serverDeleteProhibited https://afilias.com.au/get-au/whois-status-codes#serverDeleteProhibited", "serverRenewProhibited https://afilias.com.au/get-au/whois-status-codes#serverRenewProhibited", "serverTransferProhibited https://afilias.com.au/get-au/whois-status-codes#serverTransferProhibited", "serverUpdateProhibited https://afilias.com.au/get-au/whois-status-codes#serverUpdateProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-08-05 15:18:41 UTC")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.name).to eq("MarkMonitor Corporate Services Inc") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("MMR-174095") + expect(subject.registrant_contacts[0].name).to eq("Domain Admin") + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("MMR-171195") + expect(subject.technical_contacts[0].name).to eq("Domain Administrator") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq(nil) + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq(nil) + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq(nil) + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("NS1.GOOGLE.COM") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("NS2.GOOGLE.COM") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("NS3.GOOGLE.COM") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("NS4.GOOGLE.COM") + end +end diff --git a/spec/whois/parsers/responses/whois.audns.net.au/au/property_status_with_multiple_spec.rb b/spec/whois/parsers/responses/whois.audns.net.au/au/property_status_with_multiple_spec.rb deleted file mode 100644 index 10dcb173..00000000 --- a/spec/whois/parsers/responses/whois.audns.net.au/au/property_status_with_multiple_spec.rb +++ /dev/null @@ -1,27 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.audns.net.au/au/property_status_with_multiple.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.audns.net.au.rb' - -describe Whois::Parsers::WhoisAudnsNetAu, "property_status_with_multiple.expected" do - - subject do - file = fixture("responses", "whois.audns.net.au/au/property_status_with_multiple.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(["serverHold (Expired)", "serverUpdateProhibited (Expired)"]) - end - end -end diff --git a/spec/whois/parsers/responses/whois.audns.net.au/au/status_available_spec.rb b/spec/whois/parsers/responses/whois.audns.net.au/au/status_available_spec.rb deleted file mode 100644 index 5cb143d0..00000000 --- a/spec/whois/parsers/responses/whois.audns.net.au/au/status_available_spec.rb +++ /dev/null @@ -1,95 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.audns.net.au/au/status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.audns.net.au.rb' - -describe Whois::Parsers::WhoisAudnsNetAu, "status_available.expected" do - - subject do - file = fixture("responses", "whois.audns.net.au/au/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end -end diff --git a/spec/whois/parsers/responses/whois.audns.net.au/au/status_registered_spec.rb b/spec/whois/parsers/responses/whois.audns.net.au/au/status_registered_spec.rb deleted file mode 100644 index 0fd4caa8..00000000 --- a/spec/whois/parsers/responses/whois.audns.net.au/au/status_registered_spec.rb +++ /dev/null @@ -1,139 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.audns.net.au/au/status_registered.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.audns.net.au.rb' - -describe Whois::Parsers::WhoisAudnsNetAu, "status_registered.expected" do - - subject do - file = fixture("responses", "whois.audns.net.au/au/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.com.au") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientDeleteProhibited", "clientUpdateProhibited", "serverDeleteProhibited (Protected by .auLOCKDOWN)", "serverUpdateProhibited (Protected by .auLOCKDOWN)"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-11-05 10:35:59 UTC")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("MMR-122026") - expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") - expect(subject.registrant_contacts[0].organization).to eq("Google INC") - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("Visit whois.ausregistry.com.au for Web based WhoIs") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("MMR-87489") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq(nil) - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq(nil) - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("Visit whois.ausregistry.com.au for Web based WhoIs") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end - end -end diff --git a/spec/whois/parsers/responses/whois.ax/ax/status_available_spec.rb b/spec/whois/parsers/responses/whois.ax/ax/status_available_spec.rb index 0f90be9e..62cf6d90 100644 --- a/spec/whois/parsers/responses/whois.ax/ax/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.ax/ax/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.ax.rb' -describe Whois::Parsers::WhoisAx, "status_available.expected" do +describe "whois.ax", :aggregate_failures do subject do file = fixture("responses", "whois.ax/ax/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ax") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.ax/ax/status_registered_spec.rb b/spec/whois/parsers/responses/whois.ax/ax/status_registered_spec.rb index 548f0893..dca31055 100644 --- a/spec/whois/parsers/responses/whois.ax/ax/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.ax/ax/status_registered_spec.rb @@ -9,59 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.ax.rb' -describe Whois::Parsers::WhoisAx, "status_registered.expected" do +describe "whois.ax", :aggregate_failures do subject do file = fixture("responses", "whois.ax/ax/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ax") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-08-03")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns.regeringen.ax") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.regeringen.ax") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.alcom.aland.fi") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.alcom.aland.fi") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-08-03")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns.regeringen.ax") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.regeringen.ax") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns2.alcom.aland.fi") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3.alcom.aland.fi") end end diff --git a/spec/whois/parsers/responses/whois.biz/biz/status_available_spec.rb b/spec/whois/parsers/responses/whois.biz/biz/status_available_spec.rb index 4e2e7017..07dc52bf 100644 --- a/spec/whois/parsers/responses/whois.biz/biz/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.biz/biz/status_available_spec.rb @@ -9,83 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.biz.rb' -describe Whois::Parsers::WhoisBiz, "status_available.expected" do +describe "whois.biz", :aggregate_failures do subject do file = fixture("responses", "whois.biz/biz/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.biz") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.biz/biz/status_registered_spec.rb b/spec/whois/parsers/responses/whois.biz/biz/status_registered_spec.rb index fefeabc0..3f8cb1c5 100644 --- a/spec/whois/parsers/responses/whois.biz/biz/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.biz/biz/status_registered_spec.rb @@ -9,138 +9,87 @@ # require 'spec_helper' -require 'whois/parsers/whois.biz.rb' -describe Whois::Parsers::WhoisBiz, "status_registered.expected" do +describe "whois.biz", :aggregate_failures do subject do file = fixture("responses", "whois.biz/biz/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.biz") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.biz") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D2835288-BIZ") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2002-03-27T16:03:44Z")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2017-02-22T10:27:42Z")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2018-03-26T23:59:59Z")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor, Inc.") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("C42709140-BIZ") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6502530001") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("C42709140-BIZ") - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") - expect(subject.admin_contacts[0].fax).to eq("+1.6502530001") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("C42709140-BIZ") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") - expect(subject.technical_contacts[0].fax).to eq("+1.6502530001") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns4.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.biz") + expect(subject.domain_id).to eq("D2835288-BIZ") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-03-27T16:03:44Z")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2017-02-22T10:27:42Z")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2018-03-26T23:59:59Z")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor, Inc.") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("C42709140-BIZ") + expect(subject.registrant_contacts[0].name).to eq("DNS Admin") + expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") + expect(subject.registrant_contacts[0].fax).to eq("+1.6502530001") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("C42709140-BIZ") + expect(subject.admin_contacts[0].name).to eq("DNS Admin") + expect(subject.admin_contacts[0].organization).to eq("Google Inc.") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") + expect(subject.admin_contacts[0].fax).to eq("+1.6502530001") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("C42709140-BIZ") + expect(subject.technical_contacts[0].name).to eq("DNS Admin") + expect(subject.technical_contacts[0].organization).to eq("Google Inc.") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") + expect(subject.technical_contacts[0].fax).to eq("+1.6502530001") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns4.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3.google.com") end end diff --git a/spec/whois/parsers/responses/whois.bnnic.bn/bn/status_available_spec.rb b/spec/whois/parsers/responses/whois.bnnic.bn/bn/status_available_spec.rb index 31283968..c8a57e7c 100644 --- a/spec/whois/parsers/responses/whois.bnnic.bn/bn/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.bnnic.bn/bn/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.bnnic.bn.rb' -describe Whois::Parsers::WhoisBnnicBn, "status_available.expected" do +describe "whois.bnnic.bn", :aggregate_failures do subject do file = fixture("responses", "whois.bnnic.bn/bn/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.bnnic.bn") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.bnnic.bn/bn/status_registered_spec.rb b/spec/whois/parsers/responses/whois.bnnic.bn/bn/status_registered_spec.rb index 8e019c72..43df2f5d 100644 --- a/spec/whois/parsers/responses/whois.bnnic.bn/bn/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.bnnic.bn/bn/status_registered_spec.rb @@ -9,69 +9,42 @@ # require 'spec_helper' -require 'whois/parsers/whois.bnnic.bn.rb' -describe Whois::Parsers::WhoisBnnicBn, "status_registered.expected" do +describe "whois.bnnic.bn", :aggregate_failures do subject do file = fixture("responses", "whois.bnnic.bn/bn/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.bnnic.bn") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2014-10-07 00:00:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-12-17 18:07:42")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-10-07 00:00:00")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("dns.brunet.bn") - expect(subject.nameservers[0].ipv4).to eq("61.6.254.147") - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("dns2.brunet.bn") - expect(subject.nameservers[1].ipv4).to eq("61.6.254.148") - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("dns3.brunet.bn") - expect(subject.nameservers[2].ipv4).to eq("61.6.254.166") - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("dns4.brunet.bn") - expect(subject.nameservers[3].ipv4).to eq("61.6.254.168") - expect(subject.nameservers[3].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2014-10-07 00:00:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-12-17 18:07:42")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-10-07 00:00:00")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("dns.brunet.bn") + expect(subject.nameservers[0].ipv4).to eq("61.6.254.147") + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("dns2.brunet.bn") + expect(subject.nameservers[1].ipv4).to eq("61.6.254.148") + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("dns3.brunet.bn") + expect(subject.nameservers[2].ipv4).to eq("61.6.254.166") + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("dns4.brunet.bn") + expect(subject.nameservers[3].ipv4).to eq("61.6.254.168") + expect(subject.nameservers[3].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.cat/cat/property_status_missing_spec.rb b/spec/whois/parsers/responses/whois.cat/cat/property_status_missing_spec.rb index 13e2c50c..9a9bd234 100644 --- a/spec/whois/parsers/responses/whois.cat/cat/property_status_missing_spec.rb +++ b/spec/whois/parsers/responses/whois.cat/cat/property_status_missing_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.cat.rb' -describe Whois::Parsers::WhoisCat, "property_status_missing.expected" do +describe "whois.cat", :aggregate_failures do subject do file = fixture("responses", "whois.cat/cat/property_status_missing.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cat") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(nil) - end + it "matches property_status_missing.expected" do + expect(subject.status).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.cat/cat/property_status_multiple_spec.rb b/spec/whois/parsers/responses/whois.cat/cat/property_status_multiple_spec.rb index 7244645a..d707a157 100644 --- a/spec/whois/parsers/responses/whois.cat/cat/property_status_multiple_spec.rb +++ b/spec/whois/parsers/responses/whois.cat/cat/property_status_multiple_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.cat.rb' -describe Whois::Parsers::WhoisCat, "property_status_multiple.expected" do +describe "whois.cat", :aggregate_failures do subject do file = fixture("responses", "whois.cat/cat/property_status_multiple.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cat") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(["clientTransferProhibited", "clientDeleteProhibited"]) - end + it "matches property_status_multiple.expected" do + expect(subject.status).to eq(["clientTransferProhibited", "clientDeleteProhibited"]) end end diff --git a/spec/whois/parsers/responses/whois.cat/cat/property_status_ok_spec.rb b/spec/whois/parsers/responses/whois.cat/cat/property_status_ok_spec.rb index 000925f1..24335854 100644 --- a/spec/whois/parsers/responses/whois.cat/cat/property_status_ok_spec.rb +++ b/spec/whois/parsers/responses/whois.cat/cat/property_status_ok_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.cat.rb' -describe Whois::Parsers::WhoisCat, "property_status_ok.expected" do +describe "whois.cat", :aggregate_failures do subject do file = fixture("responses", "whois.cat/cat/property_status_ok.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cat") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end + it "matches property_status_ok.expected" do + expect(subject.status).to eq(["ok"]) end end diff --git a/spec/whois/parsers/responses/whois.cat/cat/status_available_spec.rb b/spec/whois/parsers/responses/whois.cat/cat/status_available_spec.rb index 47ad8b72..6498c54d 100644 --- a/spec/whois/parsers/responses/whois.cat/cat/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.cat/cat/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.cat.rb' -describe Whois::Parsers::WhoisCat, "status_available.expected" do +describe "whois.cat", :aggregate_failures do subject do file = fixture("responses", "whois.cat/cat/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cat") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(nil) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(nil) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.cat/cat/status_registered_spec.rb b/spec/whois/parsers/responses/whois.cat/cat/status_registered_spec.rb index 97394460..b06390f0 100644 --- a/spec/whois/parsers/responses/whois.cat/cat/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.cat/cat/status_registered_spec.rb @@ -9,61 +9,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.cat.rb' -describe Whois::Parsers::WhoisCat, "status_registered.expected" do +describe "whois.cat", :aggregate_failures do subject do file = fixture("responses", "whois.cat/cat/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cat") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-02-14 09:12:37 GMT")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-11-27 17:30:59 GMT")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2020-02-14 09:12:37 GMT")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("dns.gencat.net") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("dns2.gencat.cat") - expect(subject.nameservers[1].ipv4).to eq("83.247.132.4") - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(["ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-02-14 09:12:37 GMT")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-11-27 17:30:59 GMT")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-02-14 09:12:37 GMT")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("dns.gencat.net") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("dns2.gencat.cat") + expect(subject.nameservers[1].ipv4).to eq("83.247.132.4") + expect(subject.nameservers[1].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.cctld.by/by/status_available_spec.rb b/spec/whois/parsers/responses/whois.cctld.by/by/status_available_spec.rb index cd923375..c672c4a3 100644 --- a/spec/whois/parsers/responses/whois.cctld.by/by/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.cctld.by/by/status_available_spec.rb @@ -9,85 +9,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.cctld.by.rb' -describe Whois::Parsers::WhoisCctldBy, "status_available.expected" do +describe "whois.cctld.by", :aggregate_failures do subject do file = fixture("responses", "whois.cctld.by/by/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cctld.by") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.cctld.by/by/status_registered_spec.rb b/spec/whois/parsers/responses/whois.cctld.by/by/status_registered_spec.rb index 556c084d..a1f0bc10 100644 --- a/spec/whois/parsers/responses/whois.cctld.by/by/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.cctld.by/by/status_registered_spec.rb @@ -9,95 +9,39 @@ # require 'spec_helper' -require 'whois/parsers/whois.cctld.by.rb' -describe Whois::Parsers::WhoisCctldBy, "status_registered.expected" do +describe "whois.cctld.by", :aggregate_failures do subject do file = fixture("responses", "whois.cctld.by/by/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cctld.by") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("active.by") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-02-02")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-12-16")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-12-21")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("Active Technologies LLC") - expect(subject.registrar.name).to eq("Active Technologies LLC") - expect(subject.registrar.organization).to eq("Active Technologies LLC") - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.activeby.net") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.activeby.net") - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("active.by") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-02-02")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-12-16")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-12-21")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("Active Technologies LLC") + expect(subject.registrar.name).to eq("Active Technologies LLC") + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.activeby.net") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.activeby.net") end end diff --git a/spec/whois/parsers/responses/whois.cctld.uz/uz/property_expires_on_dash_spec.rb b/spec/whois/parsers/responses/whois.cctld.uz/uz/property_expires_on_dash_spec.rb index e52e6ee4..39961865 100644 --- a/spec/whois/parsers/responses/whois.cctld.uz/uz/property_expires_on_dash_spec.rb +++ b/spec/whois/parsers/responses/whois.cctld.uz/uz/property_expires_on_dash_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.cctld.uz.rb' -describe Whois::Parsers::WhoisCctldUz, "property_expires_on_dash.expected" do +describe "whois.cctld.uz", :aggregate_failures do subject do file = fixture("responses", "whois.cctld.uz/uz/property_expires_on_dash.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cctld.uz") + Whois::Parser.parser_for(part) end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end + it "matches property_expires_on_dash.expected" do + expect(subject.expires_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.cctld.uz/uz/property_status_reserved_spec.rb b/spec/whois/parsers/responses/whois.cctld.uz/uz/property_status_reserved_spec.rb index 5e49beb0..e8ecc8ec 100644 --- a/spec/whois/parsers/responses/whois.cctld.uz/uz/property_status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.cctld.uz/uz/property_status_reserved_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.cctld.uz.rb' -describe Whois::Parsers::WhoisCctldUz, "property_status_reserved.expected" do +describe "whois.cctld.uz", :aggregate_failures do subject do file = fixture("responses", "whois.cctld.uz/uz/property_status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cctld.uz") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_reserved.expected" do + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.cctld.uz/uz/status_available_spec.rb b/spec/whois/parsers/responses/whois.cctld.uz/uz/status_available_spec.rb index ad24cb12..edf960fd 100644 --- a/spec/whois/parsers/responses/whois.cctld.uz/uz/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.cctld.uz/uz/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.cctld.uz.rb' -describe Whois::Parsers::WhoisCctldUz, "status_available.expected" do +describe "whois.cctld.uz", :aggregate_failures do subject do file = fixture("responses", "whois.cctld.uz/uz/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cctld.uz") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.cctld.uz/uz/status_registered_spec.rb b/spec/whois/parsers/responses/whois.cctld.uz/uz/status_registered_spec.rb index f755f625..e6f7fd05 100644 --- a/spec/whois/parsers/responses/whois.cctld.uz/uz/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.cctld.uz/uz/status_registered_spec.rb @@ -9,57 +9,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.cctld.uz.rb' -describe Whois::Parsers::WhoisCctldUz, "status_registered.expected" do +describe "whois.cctld.uz", :aggregate_failures do subject do file = fixture("responses", "whois.cctld.uz/uz/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cctld.uz") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-04-13")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2010-03-26")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2011-05-01")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-04-13")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2010-03-26")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2011-05-01")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.cdmon.com/com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.cdmon.com/com/status_registered_spec.rb index 4af6bb7f..4b67db6e 100644 --- a/spec/whois/parsers/responses/whois.cdmon.com/com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.cdmon.com/com/status_registered_spec.rb @@ -9,131 +9,87 @@ # require 'spec_helper' -require 'whois/parsers/whois.cdmon.com.rb' -describe Whois::Parsers::WhoisCdmonCom, "status_registered.expected" do +describe "whois.cdmon.com", :aggregate_failures do subject do file = fixture("responses", "whois.cdmon.com/com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cdmon.com") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2001-08-12T15:02:57Z")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2009-12-16T11:40:44Z")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2024-08-12T15:02:53Z")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("1403") - expect(subject.registrar.name).to eq("10DENCEHISPAHARD, S.L") - expect(subject.registrar.organization).to eq("10DENCEHISPAHARD, S.L") - expect(subject.registrar.url).to eq("https://www.cdmon.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("10dencehispahard,s.l.") - expect(subject.registrant_contacts[0].organization).to eq("10dencehispahard,s.l.") - expect(subject.registrant_contacts[0].address).to eq("Girona 81-83 local 6") - expect(subject.registrant_contacts[0].city).to eq("Malgrat de Mar") - expect(subject.registrant_contacts[0].zip).to eq("08380") - expect(subject.registrant_contacts[0].state).to eq("") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("ES") - expect(subject.registrant_contacts[0].phone).to eq("+34.902364138") - expect(subject.registrant_contacts[0].email).to eq("info@cdmon.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("10dencehispahard,s.l.") - expect(subject.admin_contacts[0].organization).to eq("10dencehispahard,s.l.") - expect(subject.admin_contacts[0].address).to eq("Girona 81-83 local 6") - expect(subject.admin_contacts[0].city).to eq("Malgrat de Mar") - expect(subject.admin_contacts[0].zip).to eq("08380") - expect(subject.admin_contacts[0].state).to eq("") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("ES") - expect(subject.admin_contacts[0].phone).to eq("+34.902364138") - expect(subject.admin_contacts[0].email).to eq("info@cdmon.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("10dencehispahard,s.l.") - expect(subject.technical_contacts[0].organization).to eq("10dencehispahard,s.l.") - expect(subject.technical_contacts[0].address).to eq("Girona 81-83 local 6") - expect(subject.technical_contacts[0].city).to eq("Malgrat de Mar") - expect(subject.technical_contacts[0].zip).to eq("08380") - expect(subject.technical_contacts[0].state).to eq("") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("ES") - expect(subject.technical_contacts[0].phone).to eq("+34.902364138") - expect(subject.technical_contacts[0].email).to eq("info@cdmon.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.cdmon.es") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns3.cdmon.es") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns1.cdmon.es") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2001-08-12T15:02:57Z")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2009-12-16T11:40:44Z")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2024-08-12T15:02:53Z")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("1403") + expect(subject.registrar.name).to eq("10DENCEHISPAHARD, S.L") + expect(subject.registrar.url).to eq("https://www.cdmon.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("10dencehispahard,s.l.") + expect(subject.registrant_contacts[0].organization).to eq("10dencehispahard,s.l.") + expect(subject.registrant_contacts[0].address).to eq("Girona 81-83 local 6") + expect(subject.registrant_contacts[0].city).to eq("Malgrat de Mar") + expect(subject.registrant_contacts[0].zip).to eq("08380") + expect(subject.registrant_contacts[0].state).to eq("") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("ES") + expect(subject.registrant_contacts[0].phone).to eq("+34.902364138") + expect(subject.registrant_contacts[0].email).to eq("info@cdmon.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("10dencehispahard,s.l.") + expect(subject.admin_contacts[0].organization).to eq("10dencehispahard,s.l.") + expect(subject.admin_contacts[0].address).to eq("Girona 81-83 local 6") + expect(subject.admin_contacts[0].city).to eq("Malgrat de Mar") + expect(subject.admin_contacts[0].zip).to eq("08380") + expect(subject.admin_contacts[0].state).to eq("") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("ES") + expect(subject.admin_contacts[0].phone).to eq("+34.902364138") + expect(subject.admin_contacts[0].email).to eq("info@cdmon.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("10dencehispahard,s.l.") + expect(subject.technical_contacts[0].organization).to eq("10dencehispahard,s.l.") + expect(subject.technical_contacts[0].address).to eq("Girona 81-83 local 6") + expect(subject.technical_contacts[0].city).to eq("Malgrat de Mar") + expect(subject.technical_contacts[0].zip).to eq("08380") + expect(subject.technical_contacts[0].state).to eq("") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("ES") + expect(subject.technical_contacts[0].phone).to eq("+34.902364138") + expect(subject.technical_contacts[0].email).to eq("info@cdmon.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2.cdmon.es") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns3.cdmon.es") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns1.cdmon.es") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_available_spec.rb index 184d55fb..697c1235 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/ae.org/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_purged_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_purged_spec.rb new file mode 100644 index 00000000..a7df682b --- /dev/null +++ b/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_purged_spec.rb @@ -0,0 +1,41 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.centralnic.com/ae.org/status_purged.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.centralnic.com", :aggregate_failures do + + subject do + file = fixture("responses", "whois.centralnic.com/ae.org/status_purged.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) + end + + it "matches status_purged.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end +end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_registered_spec.rb index b5b2654a..d0f05d13 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/ae.org/status_registered_spec.rb @@ -9,145 +9,85 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/ae.org/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("kidzlink.ae.org") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO887354") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientTransferProhibited", "serverTransferProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2012-08-03 15:37:33 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-06-09 00:12:37 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-08-03 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H65658") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("101Domain, Inc.") - expect(subject.registrar.url).to eq("http://www.101domain.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("RWG000000003DA24") - expect(subject.registrant_contacts[0].name).to eq("IPC C/O Clarenter") - expect(subject.registrant_contacts[0].organization).to eq("Clarenter") - expect(subject.registrant_contacts[0].address).to eq("110 E Broward Blvd\nSte. 1720") - expect(subject.registrant_contacts[0].city).to eq("Fort Lauderdale") - expect(subject.registrant_contacts[0].zip).to eq("33301") - expect(subject.registrant_contacts[0].state).to eq("FL") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.18888443911") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("patricia@internationalpreschoolcurriculum.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("RWG000000003DA24") - expect(subject.admin_contacts[0].name).to eq("IPC C/O Clarenter") - expect(subject.admin_contacts[0].organization).to eq("Clarenter") - expect(subject.admin_contacts[0].address).to eq("110 E Broward Blvd\nSte. 1720") - expect(subject.admin_contacts[0].city).to eq("Fort Lauderdale") - expect(subject.admin_contacts[0].zip).to eq("33301") - expect(subject.admin_contacts[0].state).to eq("FL") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.18888443911") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("patricia@internationalpreschoolcurriculum.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("RWG000000003DA24") - expect(subject.technical_contacts[0].name).to eq("IPC C/O Clarenter") - expect(subject.technical_contacts[0].organization).to eq("Clarenter") - expect(subject.technical_contacts[0].address).to eq("110 E Broward Blvd\nSte. 1720") - expect(subject.technical_contacts[0].city).to eq("Fort Lauderdale") - expect(subject.technical_contacts[0].zip).to eq("33301") - expect(subject.technical_contacts[0].state).to eq("FL") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.18888443911") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("patricia@internationalpreschoolcurriculum.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns37.domaincontrol.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns38.domaincontrol.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq("greenflame.ae.org") + expect(subject.domain_id).to eq("D220363148-CNIC") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2021-02-04 08:51:08 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-03-24 15:08:42 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-02-04 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("1647") + expect(subject.registrar.name).to eq("Hosting Concepts B.V. d/b/a Registrar.eu") + expect(subject.registrar.url).to eq("https://www.openprovider.com/") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("https://whois.centralnic.com/contact/greenflame.ae.org/registrant") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq(nil) + expect(subject.admin_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts[0].address).to eq(nil) + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq(nil) + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("https://whois.centralnic.com/contact/greenflame.ae.org/admin") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq(nil) + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq(nil) + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq(nil) + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("https://whois.centralnic.com/contact/greenflame.ae.org/tech") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.dns-parking.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.dns-parking.com") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/ar.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/ar.com/status_available_spec.rb deleted file mode 100644 index ff0dafee..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/ar.com/status_available_spec.rb +++ /dev/null @@ -1,96 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/ar.com/status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' - -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do - - subject do - file = fixture("responses", "whois.centralnic.com/ar.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/ar.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/ar.com/status_registered_spec.rb deleted file mode 100644 index e5990022..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/ar.com/status_registered_spec.rb +++ /dev/null @@ -1,157 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/ar.com/status_registered.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' - -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do - - subject do - file = fixture("responses", "whois.centralnic.com/ar.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("hotel.ar.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO557730") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2008-04-25 16:22:13 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-04-26 00:15:40 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-04-25 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H1323241") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("CentralNic Ltd") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H1323241") - expect(subject.registrant_contacts[0].name).to eq("Reserved Domains") - expect(subject.registrant_contacts[0].organization).to eq("CentralNic Ltd") - expect(subject.registrant_contacts[0].address).to eq("35-39 Moorgate") - expect(subject.registrant_contacts[0].city).to eq("London") - expect(subject.registrant_contacts[0].zip).to eq("EC2R 6AR") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("GB") - expect(subject.registrant_contacts[0].phone).to eq("+44.8700170900") - expect(subject.registrant_contacts[0].fax).to eq("+44.8700170901") - expect(subject.registrant_contacts[0].email).to eq("domains@centralnic.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H1323241") - expect(subject.admin_contacts[0].name).to eq("Reserved Domains") - expect(subject.admin_contacts[0].organization).to eq("CentralNic Ltd") - expect(subject.admin_contacts[0].address).to eq("35-39 Moorgate") - expect(subject.admin_contacts[0].city).to eq("London") - expect(subject.admin_contacts[0].zip).to eq("EC2R 6AR") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("GB") - expect(subject.admin_contacts[0].phone).to eq("+44.8700170900") - expect(subject.admin_contacts[0].fax).to eq("+44.8700170901") - expect(subject.admin_contacts[0].email).to eq("domains@centralnic.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("H1323241") - expect(subject.technical_contacts[0].name).to eq("Reserved Domains") - expect(subject.technical_contacts[0].organization).to eq("CentralNic Ltd") - expect(subject.technical_contacts[0].address).to eq("35-39 Moorgate") - expect(subject.technical_contacts[0].city).to eq("London") - expect(subject.technical_contacts[0].zip).to eq("EC2R 6AR") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("GB") - expect(subject.technical_contacts[0].phone).to eq("+44.8700170900") - expect(subject.technical_contacts[0].fax).to eq("+44.8700170901") - expect(subject.technical_contacts[0].email).to eq("domains@centralnic.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(6) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns0.centralnic-dns.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.centralnic-dns.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.centralnic-dns.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.centralnic-dns.com") - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("ns4.centralnic-dns.com") - expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[5].name).to eq("ns5.centralnic-dns.com") - end - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/br.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/br.com/status_available_spec.rb index 4ca32774..e3d6c44c 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/br.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/br.com/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/br.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/br.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/br.com/status_registered_spec.rb index e1792775..c9543cb7 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/br.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/br.com/status_registered_spec.rb @@ -9,145 +9,56 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/br.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("billboard.br.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO624205") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientTransferProhibited", "serverTransferProhibited", "renewPeriod"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2009-04-17 12:22:49 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-01-16 16:23:18 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2017-04-17 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H292913") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("Network Solutions LLC") - expect(subject.registrar.url).to eq("http://www.networksolutions.com/") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("36542943") - expect(subject.registrant_contacts[0].name).to eq("Antonio Camarotti Pinto") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("Rua Urussui, 238\n#22") - expect(subject.registrant_contacts[0].city).to eq("Sao Paulo") - expect(subject.registrant_contacts[0].zip).to eq("04542-050") - expect(subject.registrant_contacts[0].state).to eq("Sao Paulo") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("BR") - expect(subject.registrant_contacts[0].phone).to eq("+1.551130787711") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("ac@bpp.bz") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("36542943") - expect(subject.admin_contacts[0].name).to eq("Antonio Camarotti Pinto") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq("Rua Urussui, 238\n#22") - expect(subject.admin_contacts[0].city).to eq("Sao Paulo") - expect(subject.admin_contacts[0].zip).to eq("04542-050") - expect(subject.admin_contacts[0].state).to eq("Sao Paulo") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("BR") - expect(subject.admin_contacts[0].phone).to eq("+1.551130787711") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("ac@bpp.bz") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("36542943") - expect(subject.technical_contacts[0].name).to eq("Antonio Camarotti Pinto") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq("Rua Urussui, 238\n#22") - expect(subject.technical_contacts[0].city).to eq("Sao Paulo") - expect(subject.technical_contacts[0].zip).to eq("04542-050") - expect(subject.technical_contacts[0].state).to eq("Sao Paulo") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("BR") - expect(subject.technical_contacts[0].phone).to eq("+1.551130787711") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("ac@bpp.bz") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.locaweb.com.br") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.locaweb.com.br") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq("linet.br.com") + expect(subject.domain_id).to eq("D1656506-CNIC") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2013-11-28 13:16:50 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-03-11 11:49:22 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-11-28 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("1387") + expect(subject.registrar.name).to eq("1API GmbH") + expect(subject.registrar.url).to eq("http://www.1api.net") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].email).to eq("https://whois.centralnic.com/contact/linet.br.com/registrant") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].email).to eq("https://whois.centralnic.com/contact/linet.br.com/admin") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].email).to eq("https://whois.centralnic.com/contact/linet.br.com/tech") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.iwantmyname.net") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.iwantmyname.net") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.iwantmyname.net") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.iwantmyname.net") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/cn.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/cn.com/status_available_spec.rb index b6ef4cba..3800666d 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/cn.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/cn.com/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/cn.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/cn.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/cn.com/status_registered_spec.rb index e6ff1c62..013f5705 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/cn.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/cn.com/status_registered_spec.rb @@ -9,141 +9,56 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/cn.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("gsn.cn.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO323367") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientTransferProhibited", "serverTransferProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2005-11-23 15:44:03 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-11-26 12:16:45 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-11-23 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H67436") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("united-domains AG") - expect(subject.registrar.url).to eq("http://www.united-domains.de") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H1062079") - expect(subject.registrant_contacts[0].name).to eq("GSN Electronics Incorporation Pte Ltd") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("Straits Trading Building 9 Battery Road 16-08\nSingapore") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq("049910") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("SG") - expect(subject.registrant_contacts[0].phone).to eq("+65.62336919") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("abuse@gsn.in") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("AUTO-DRZK-SNVHSY") - expect(subject.admin_contacts[0].name).to eq("Pauline Ang") - expect(subject.admin_contacts[0].organization).to eq("GSN Electronics Incorporation Pte Ltd") - expect(subject.admin_contacts[0].address).to eq("Straits Trading Building 9 Battery Road 16-08") - expect(subject.admin_contacts[0].city).to eq("Singapore") - expect(subject.admin_contacts[0].zip).to eq("049910") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("SG") - expect(subject.admin_contacts[0].phone).to eq("+65.62336919") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("abuse@gsn.in") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("C-UHM65D7-TJGULR") - expect(subject.technical_contacts[0].name).to eq("Host Master") - expect(subject.technical_contacts[0].organization).to eq("united-domains AG") - expect(subject.technical_contacts[0].address).to eq("Gautinger Str. 10") - expect(subject.technical_contacts[0].city).to eq("Starnberg") - expect(subject.technical_contacts[0].zip).to eq("82319") - expect(subject.technical_contacts[0].state).to eq("Bayern") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("DE") - expect(subject.technical_contacts[0].phone).to eq("+49.8151368670") - expect(subject.technical_contacts[0].fax).to eq("+49.81513686777") - expect(subject.technical_contacts[0].email).to eq("hostmaster@united-domains.de") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.meteos.it") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.meteos.it") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq("gsn.cn.com") + expect(subject.domain_id).to eq("D323367-CNIC") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2005-11-23 15:44:03 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-11-11 02:14:17 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-11-23 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("1408") + expect(subject.registrar.name).to eq("united-domains AG") + expect(subject.registrar.url).to eq("https://www.united-domains.de/") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].email).to eq("https://whois.centralnic.com/contact/gsn.cn.com/registrant") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].email).to eq("https://whois.centralnic.com/contact/gsn.cn.com/admin") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].email).to eq("https://whois.centralnic.com/contact/gsn.cn.com/tech") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1045.ui-dns.biz") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1045.ui-dns.de") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns1045.ui-dns.org") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns1045.ui-dns.com") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/de.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/de.com/status_available_spec.rb index 6bda8012..17e04038 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/de.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/de.com/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/de.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/de.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/de.com/status_registered_spec.rb index ec653ca3..136a6477 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/de.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/de.com/status_registered_spec.rb @@ -9,145 +9,54 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/de.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("autopoint.de.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO578833") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientTransferProhibited", "serverTransferProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2008-07-04 20:30:08 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-07-12 10:03:56 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-07-04 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H67436") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("united-domains AG") - expect(subject.registrar.url).to eq("http://www.united-domains.de") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H1102323") - expect(subject.registrant_contacts[0].name).to eq("Stefan Von Gehlen") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("Muelgaustr. 292-294, Moenchengladbach") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq("41238") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("DE") - expect(subject.registrant_contacts[0].phone).to eq("+49.2166120626") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("s.vongehlen@arcor.de") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H402505") - expect(subject.admin_contacts[0].name).to eq("Stefan Von Gehlen") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq("Muelgaustr. 292-294, Moenchengladbach") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq("41238") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("DE") - expect(subject.admin_contacts[0].phone).to eq("+49.2166120626") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("s.vongehlen@arcor.de") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("C-UHM65D7-TJGULR") - expect(subject.technical_contacts[0].name).to eq("Host Master") - expect(subject.technical_contacts[0].organization).to eq("united-domains AG") - expect(subject.technical_contacts[0].address).to eq("Gautinger Str. 10") - expect(subject.technical_contacts[0].city).to eq("Starnberg") - expect(subject.technical_contacts[0].zip).to eq("82319") - expect(subject.technical_contacts[0].state).to eq("Bayern") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("DE") - expect(subject.technical_contacts[0].phone).to eq("+49.8151368670") - expect(subject.technical_contacts[0].fax).to eq("+49.81513686777") - expect(subject.technical_contacts[0].email).to eq("hostmaster@united-domains.de") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns.udagdns.net") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns.udagdns.de") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq("autopoint.de.com") + expect(subject.domain_id).to eq("D578833-CNIC") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2008-07-04 20:30:08 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-11-11 15:12:54 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-07-04 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("1408") + expect(subject.registrar.name).to eq("united-domains AG") + expect(subject.registrar.url).to eq("https://www.united-domains.de/") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].email).to eq("https://whois.centralnic.com/contact/autopoint.de.com/registrant") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].email).to eq("https://whois.centralnic.com/contact/autopoint.de.com/admin") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].email).to eq("https://whois.centralnic.com/contact/autopoint.de.com/tech") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns.udag.org") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns.udag.de") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns.udag.net") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/eu.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/eu.com/status_available_spec.rb index bbc681db..9ff700a4 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/eu.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/eu.com/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/eu.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/eu.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/eu.com/status_registered_spec.rb index 0a0d26a7..33091965 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/eu.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/eu.com/status_registered_spec.rb @@ -9,151 +9,62 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/eu.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("walkabout.eu.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO85080") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2001-08-14 10:14:41 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-08-15 11:25:43 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-08-14 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H126914") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("iTransact Ltd") - expect(subject.registrar.url).to eq("www.itransact.ltd.uk") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H1045382") - expect(subject.registrant_contacts[0].name).to eq("Regent Inns Plc") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("77 Muswell Hill\nLondon") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq("N10 3PJ") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("GB") - expect(subject.registrant_contacts[0].phone).to eq("+44.2083753155") - expect(subject.registrant_contacts[0].fax).to eq("+44.2083753001") - expect(subject.registrant_contacts[0].email).to eq("john.boyle@regent-inns.plc.uk") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H64717") - expect(subject.admin_contacts[0].name).to eq("John Boyle") - expect(subject.admin_contacts[0].organization).to eq("Regent Inns Plc") - expect(subject.admin_contacts[0].address).to eq("77 Muswell Hill\nLondon") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq("N10 3PJ") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("GB") - expect(subject.admin_contacts[0].phone).to eq("+44.2083753155") - expect(subject.admin_contacts[0].fax).to eq("+44.2083753001") - expect(subject.admin_contacts[0].email).to eq("john.boyle@regent-inns.plc.uk") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("H126914") - expect(subject.technical_contacts[0].name).to eq("Constantine Pagonis") - expect(subject.technical_contacts[0].organization).to eq("iTransact Ltd") - expect(subject.technical_contacts[0].address).to eq("PO Box 430\nCambridge\nCambs") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq("CB1 2WE") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("GB") - expect(subject.technical_contacts[0].phone).to eq("+44.1223700322") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("constantine@itransact.ltd.uk") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns-1146.awsdns-15.org") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns-1741.awsdns-25.co.uk") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2].name).to eq("ns-374.awsdns-46.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3].name).to eq("ns-914.awsdns-50.net") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq("walkabout.eu.com") + expect(subject.domain_id).to eq("D93652968-CNIC") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2019-02-14 09:07:09 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-08-11 10:15:35 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-02-14 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("470") + expect(subject.registrar.name).to eq("Nom-iq Ltd. dba Com Laude") + expect(subject.registrar.url).to eq("http://www.comlaude.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].email).to eq("https://whois.centralnic.com/contact/walkabout.eu.com/registrant") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].email).to eq("https://whois.centralnic.com/contact/walkabout.eu.com/admin") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].email).to eq("https://whois.centralnic.com/contact/walkabout.eu.com/tech") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(7) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns0.demysdns.net") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.demysdns.net") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns2.demysdns.net") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3.demysdns.net") + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("ns4.demysdns.co.uk") + expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[5].name).to eq("ns5.demysdns.co.uk") + expect(subject.nameservers[6]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[6].name).to eq("ns6.demysdns.co.uk") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/gb.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/gb.com/status_available_spec.rb deleted file mode 100644 index 586d5c68..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/gb.com/status_available_spec.rb +++ /dev/null @@ -1,96 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/gb.com/status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' - -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do - - subject do - file = fixture("responses", "whois.centralnic.com/gb.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/gb.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/gb.com/status_registered_spec.rb deleted file mode 100644 index 17c31e80..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/gb.com/status_registered_spec.rb +++ /dev/null @@ -1,157 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/gb.com/status_registered.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' - -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do - - subject do - file = fixture("responses", "whois.centralnic.com/gb.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("hotel.gb.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO403461") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["serverTransferProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-04-23 06:26:11 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-02-12 09:45:17 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2016-04-23 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H386560") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("Wind Internethaus GMBH") - expect(subject.registrar.url).to eq("www.windinternethaus.de") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H1049605") - expect(subject.registrant_contacts[0].name).to eq("Robert Ragge, Hotel Reservation Service Robert Ragge GmbH") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("Blaubach 32") - expect(subject.registrant_contacts[0].city).to eq("Koeln") - expect(subject.registrant_contacts[0].zip).to eq("50676") - expect(subject.registrant_contacts[0].state).to eq("NRW") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("DE") - expect(subject.registrant_contacts[0].phone).to eq("+49.2212077222") - expect(subject.registrant_contacts[0].fax).to eq("+49.2212077394") - expect(subject.registrant_contacts[0].email).to eq("domains@hrs.de") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H393781") - expect(subject.admin_contacts[0].name).to eq("Robert Ragge") - expect(subject.admin_contacts[0].organization).to eq("Hotel Reservation Service Robert Ragge GmbH") - expect(subject.admin_contacts[0].address).to eq("Blaubach 32") - expect(subject.admin_contacts[0].city).to eq("Koeln") - expect(subject.admin_contacts[0].zip).to eq("50676") - expect(subject.admin_contacts[0].state).to eq("NRW") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("DE") - expect(subject.admin_contacts[0].phone).to eq("+49.2212077222") - expect(subject.admin_contacts[0].fax).to eq("+49.2212077394") - expect(subject.admin_contacts[0].email).to eq("domains@hrs.de") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("H1103064") - expect(subject.technical_contacts[0].name).to eq("Uwe Watzek, Wind Internethaus GMBH") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq("Am Krebsgraben 15\nHaus 2") - expect(subject.technical_contacts[0].city).to eq("Villingen-Schwenningen") - expect(subject.technical_contacts[0].zip).to eq("78048") - expect(subject.technical_contacts[0].state).to eq("Baden-Wuerttemberg") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("DE") - expect(subject.technical_contacts[0].phone).to eq("+49.77214070740") - expect(subject.technical_contacts[0].fax).to eq("+49.77214070741") - expect(subject.technical_contacts[0].email).to eq("info@windinternethaus.de") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.hrs.de") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.hrs.de") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.surfbrett.de") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - end - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/gb.net/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/gb.net/status_available_spec.rb deleted file mode 100644 index b800ff60..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/gb.net/status_available_spec.rb +++ /dev/null @@ -1,96 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/gb.net/status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' - -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do - - subject do - file = fixture("responses", "whois.centralnic.com/gb.net/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/gb.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/gb.net/status_registered_spec.rb deleted file mode 100644 index 30231321..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/gb.net/status_registered_spec.rb +++ /dev/null @@ -1,163 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/gb.net/status_registered.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' - -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do - - subject do - file = fixture("responses", "whois.centralnic.com/gb.net/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("hotel.gb.net") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO1423750") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientTransferProhibited", "serverTransferProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2013-08-25 12:36:24 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-08-30 12:42:09 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-08-25 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H1167922") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("Gandi SAS") - expect(subject.registrar.url).to eq("http://www.gandi.net/") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("R1149-GANDI-PRYP") - expect(subject.registrant_contacts[0].name).to eq("Heinz Pierre Roeser") - expect(subject.registrant_contacts[0].organization).to eq("Roevertrieb") - expect(subject.registrant_contacts[0].address).to eq("Friedensstr. 77") - expect(subject.registrant_contacts[0].city).to eq("Grevenbroich") - expect(subject.registrant_contacts[0].zip).to eq("41517") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("DE") - expect(subject.registrant_contacts[0].phone).to eq("+49.218145077") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("roevertrieb@aol.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("R1149-GANDI-PRYP") - expect(subject.admin_contacts[0].name).to eq("Heinz Pierre Roeser") - expect(subject.admin_contacts[0].organization).to eq("Roevertrieb") - expect(subject.admin_contacts[0].address).to eq("Friedensstr. 77") - expect(subject.admin_contacts[0].city).to eq("Grevenbroich") - expect(subject.admin_contacts[0].zip).to eq("41517") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("DE") - expect(subject.admin_contacts[0].phone).to eq("+49.218145077") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("roevertrieb@aol.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("R1149-GANDI-PRYP") - expect(subject.technical_contacts[0].name).to eq("Heinz Pierre Roeser") - expect(subject.technical_contacts[0].organization).to eq("Roevertrieb") - expect(subject.technical_contacts[0].address).to eq("Friedensstr. 77") - expect(subject.technical_contacts[0].city).to eq("Grevenbroich") - expect(subject.technical_contacts[0].zip).to eq("41517") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("DE") - expect(subject.technical_contacts[0].phone).to eq("+49.218145077") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("roevertrieb@aol.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("b.dns.gandi.net") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("c.dns.gandi.net") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("a.dns.gandi.net") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - end - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/gr.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/gr.com/status_available_spec.rb index c03c3916..cfcf4d6a 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/gr.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/gr.com/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/gr.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/gr.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/gr.com/status_registered_spec.rb index 9ec563c9..95c33252 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/gr.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/gr.com/status_registered_spec.rb @@ -9,123 +9,52 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/gr.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.gr.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO735168") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2011-02-07 13:10:14 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-06-23 10:38:02 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-02-07 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H1346485") - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(0) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("H1346485") - expect(subject.technical_contacts[0].name).to eq(nil) - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq(nil) - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq(nil) - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("f1g1ns1.dnspod.net") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("f1g1ns2.dnspod.net") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq("google.gr.com") + expect(subject.domain_id).to eq("D67028804-CNIC") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2018-05-07 07:21:24 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-06-05 01:20:51 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-05-07 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("1861") + expect(subject.registrar.name).to eq("Porkbun, LLC") + expect(subject.registrar.url).to eq("https://porkbun.com/") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].email).to eq("https://whois.centralnic.com/contact/google.gr.com/registrant") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].email).to eq("https://whois.centralnic.com/contact/google.gr.com/admin") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].email).to eq("https://whois.centralnic.com/contact/google.gr.com/tech") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.67hosting.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.67hosting.com") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/hu.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/hu.com/status_available_spec.rb deleted file mode 100644 index c129a285..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/hu.com/status_available_spec.rb +++ /dev/null @@ -1,96 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/hu.com/status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' - -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do - - subject do - file = fixture("responses", "whois.centralnic.com/hu.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/hu.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/hu.com/status_registered_spec.rb deleted file mode 100644 index fee76ed1..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/hu.com/status_registered_spec.rb +++ /dev/null @@ -1,149 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/hu.com/status_registered.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' - -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do - - subject do - file = fixture("responses", "whois.centralnic.com/hu.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("porn.hu.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO970405") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["pendingDelete", "pendingDelete"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2012-11-28 17:46:03 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-02-11 00:16:13 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2013-11-28 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H65658") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("101Domain, Inc.") - expect(subject.registrar.url).to eq("http://www.101domain.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("RWG000000004273D") - expect(subject.registrant_contacts[0].name).to eq("Gintautas Liaskus") - expect(subject.registrant_contacts[0].organization).to eq("G.Liaskaus firma INFOMEGA") - expect(subject.registrant_contacts[0].address).to eq("Kapsu 32-53") - expect(subject.registrant_contacts[0].city).to eq("Vilnius") - expect(subject.registrant_contacts[0].zip).to eq("02167") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("LT") - expect(subject.registrant_contacts[0].phone).to eq("+370.52711457") - expect(subject.registrant_contacts[0].fax).to eq("+370.52784278") - expect(subject.registrant_contacts[0].email).to eq("infotau@infotau.lt") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("RWG000000004273D") - expect(subject.admin_contacts[0].name).to eq("Gintautas Liaskus") - expect(subject.admin_contacts[0].organization).to eq("G.Liaskaus firma INFOMEGA") - expect(subject.admin_contacts[0].address).to eq("Kapsu 32-53") - expect(subject.admin_contacts[0].city).to eq("Vilnius") - expect(subject.admin_contacts[0].zip).to eq("02167") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("LT") - expect(subject.admin_contacts[0].phone).to eq("+370.52711457") - expect(subject.admin_contacts[0].fax).to eq("+370.52784278") - expect(subject.admin_contacts[0].email).to eq("infotau@infotau.lt") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("RWG000000004273D") - expect(subject.technical_contacts[0].name).to eq("Gintautas Liaskus") - expect(subject.technical_contacts[0].organization).to eq("G.Liaskaus firma INFOMEGA") - expect(subject.technical_contacts[0].address).to eq("Kapsu 32-53") - expect(subject.technical_contacts[0].city).to eq("Vilnius") - expect(subject.technical_contacts[0].zip).to eq("02167") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("LT") - expect(subject.technical_contacts[0].phone).to eq("+370.52711457") - expect(subject.technical_contacts[0].fax).to eq("+370.52784278") - expect(subject.technical_contacts[0].email).to eq("infotau@infotau.lt") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.sedoparking.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.sedoparking.com") - end - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/jp.net/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/jp.net/status_available_spec.rb index f8a39c28..333c8038 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/jp.net/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/jp.net/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/jp.net/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/jp.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/jp.net/status_registered_spec.rb index 5eb20459..4a21264d 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/jp.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/jp.net/status_registered_spec.rb @@ -9,141 +9,52 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/jp.net/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("ntt.jp.net") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO846061") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2012-03-16 11:47:23 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-01-24 16:57:19 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2018-03-16 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H1605993") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("GMO") - expect(subject.registrar.url).to eq("http://www.onamae.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("136151BCEFE") - expect(subject.registrant_contacts[0].name).to eq("zhijian xia") - expect(subject.registrant_contacts[0].organization).to eq("zhijian xia") - expect(subject.registrant_contacts[0].address).to eq("Chuo\n3-23-20") - expect(subject.registrant_contacts[0].city).to eq("Warabi-shi") - expect(subject.registrant_contacts[0].zip).to eq("335-0004") - expect(subject.registrant_contacts[0].state).to eq("Saitama") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("JP") - expect(subject.registrant_contacts[0].phone).to eq("+81.08037215656") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("xia@ingame.jp") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("136151BD1A1") - expect(subject.admin_contacts[0].name).to eq("zhijian xia") - expect(subject.admin_contacts[0].organization).to eq("zhijian xia") - expect(subject.admin_contacts[0].address).to eq("Chuo\n3-23-20") - expect(subject.admin_contacts[0].city).to eq("Warabi-shi") - expect(subject.admin_contacts[0].zip).to eq("335-0004") - expect(subject.admin_contacts[0].state).to eq("Saitama") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("JP") - expect(subject.admin_contacts[0].phone).to eq("+81.08037215656") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("xia@ingame.jp") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("136151BD459") - expect(subject.technical_contacts[0].name).to eq("Technical Contact") - expect(subject.technical_contacts[0].organization).to eq("GMO Internet Inc.") - expect(subject.technical_contacts[0].address).to eq("26-1 Sakuragaoka-cho\nCerulean Tower 11F") - expect(subject.technical_contacts[0].city).to eq("Shibuya-ku") - expect(subject.technical_contacts[0].zip).to eq("150-8512") - expect(subject.technical_contacts[0].state).to eq("Tokyo") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("JP") - expect(subject.technical_contacts[0].phone).to eq("+81.0354562555") - expect(subject.technical_contacts[0].fax).to eq("+81.0354562556") - expect(subject.technical_contacts[0].email).to eq("admin@onamae.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("dns1.onamae.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("dns2.onamae.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq("ntt.jp.net") + expect(subject.domain_id).to eq("D195732259-CNIC") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2020-08-06 08:41:29 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2020-09-04 04:22:52 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-08-06 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("1387") + expect(subject.registrar.name).to eq("1API GmbH") + expect(subject.registrar.url).to eq("http://www.1api.net") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].email).to eq("https://whois.centralnic.com/contact/ntt.jp.net/registrant") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].email).to eq("https://whois.centralnic.com/contact/ntt.jp.net/admin") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].email).to eq("https://whois.centralnic.com/contact/ntt.jp.net/tech") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("f1g1ns1.dnspod.net") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("f1g1ns2.dnspod.net") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/jpn.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/jpn.com/status_available_spec.rb deleted file mode 100644 index e250fb4b..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/jpn.com/status_available_spec.rb +++ /dev/null @@ -1,96 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/jpn.com/status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' - -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do - - subject do - file = fixture("responses", "whois.centralnic.com/jpn.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/jpn.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/jpn.com/status_registered_spec.rb deleted file mode 100644 index 9f732d3e..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/jpn.com/status_registered_spec.rb +++ /dev/null @@ -1,153 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/jpn.com/status_registered.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' - -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do - - subject do - file = fixture("responses", "whois.centralnic.com/jpn.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("koi.jpn.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO492866") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2007-06-29 13:42:35 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-07-01 00:18:14 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-06-29 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("I6467") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("Webfusion") - expect(subject.registrar.url).to eq("http://www.123-reg.co.uk/domain-names/") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("MNT78E22765897") - expect(subject.registrant_contacts[0].name).to eq("Identity Protection Service") - expect(subject.registrant_contacts[0].organization).to eq("Identity Protect Limited") - expect(subject.registrant_contacts[0].address).to eq("PO Box 795") - expect(subject.registrant_contacts[0].city).to eq("Godalming") - expect(subject.registrant_contacts[0].zip).to eq("GU7 9GA") - expect(subject.registrant_contacts[0].state).to eq("Surrey") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("GB") - expect(subject.registrant_contacts[0].phone).to eq("+44.1483307527") - expect(subject.registrant_contacts[0].fax).to eq("+44.1483304031") - expect(subject.registrant_contacts[0].email).to eq("koi.jpn.com@identity-protect.org") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("MNT78E22765897") - expect(subject.admin_contacts[0].name).to eq("Identity Protection Service") - expect(subject.admin_contacts[0].organization).to eq("Identity Protect Limited") - expect(subject.admin_contacts[0].address).to eq("PO Box 795") - expect(subject.admin_contacts[0].city).to eq("Godalming") - expect(subject.admin_contacts[0].zip).to eq("GU7 9GA") - expect(subject.admin_contacts[0].state).to eq("Surrey") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("GB") - expect(subject.admin_contacts[0].phone).to eq("+44.1483307527") - expect(subject.admin_contacts[0].fax).to eq("+44.1483304031") - expect(subject.admin_contacts[0].email).to eq("koi.jpn.com@identity-protect.org") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("MNT78E22765897") - expect(subject.technical_contacts[0].name).to eq("Identity Protection Service") - expect(subject.technical_contacts[0].organization).to eq("Identity Protect Limited") - expect(subject.technical_contacts[0].address).to eq("PO Box 795") - expect(subject.technical_contacts[0].city).to eq("Godalming") - expect(subject.technical_contacts[0].zip).to eq("GU7 9GA") - expect(subject.technical_contacts[0].state).to eq("Surrey") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("GB") - expect(subject.technical_contacts[0].phone).to eq("+44.1483307527") - expect(subject.technical_contacts[0].fax).to eq("+44.1483304031") - expect(subject.technical_contacts[0].email).to eq("koi.jpn.com@identity-protect.org") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.chaoshosting.co.uk") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.chaoshosting.co.uk") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/kr.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/kr.com/status_available_spec.rb deleted file mode 100644 index 9501e8c6..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/kr.com/status_available_spec.rb +++ /dev/null @@ -1,96 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/kr.com/status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' - -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do - - subject do - file = fixture("responses", "whois.centralnic.com/kr.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/kr.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/kr.com/status_registered_spec.rb deleted file mode 100644 index b9027e3d..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/kr.com/status_registered_spec.rb +++ /dev/null @@ -1,165 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/kr.com/status_registered.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' - -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do - - subject do - file = fixture("responses", "whois.centralnic.com/kr.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("academyart.kr.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO569707") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientTransferProhibited", "serverTransferProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2008-06-11 21:25:43 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-01-16 16:25:41 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-06-11 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H292913") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("Network Solutions LLC") - expect(subject.registrar.url).to eq("http://www.networksolutions.com/") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("41619876") - expect(subject.registrant_contacts[0].name).to eq("Academy of Art College") - expect(subject.registrant_contacts[0].organization).to eq("Academy of Art College") - expect(subject.registrant_contacts[0].address).to eq("79 NEW MONTGOMERY ST") - expect(subject.registrant_contacts[0].city).to eq("SAN FRANCISCO") - expect(subject.registrant_contacts[0].zip).to eq("94105") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.415618350") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("clefferts@academyart.edu") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("41619876") - expect(subject.admin_contacts[0].name).to eq("Academy of Art College") - expect(subject.admin_contacts[0].organization).to eq("Academy of Art College") - expect(subject.admin_contacts[0].address).to eq("79 NEW MONTGOMERY ST") - expect(subject.admin_contacts[0].city).to eq("SAN FRANCISCO") - expect(subject.admin_contacts[0].zip).to eq("94105") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.415618350") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("clefferts@academyart.edu") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("41619876") - expect(subject.technical_contacts[0].name).to eq("Academy of Art College") - expect(subject.technical_contacts[0].organization).to eq("Academy of Art College") - expect(subject.technical_contacts[0].address).to eq("79 NEW MONTGOMERY ST") - expect(subject.technical_contacts[0].city).to eq("SAN FRANCISCO") - expect(subject.technical_contacts[0].zip).to eq("94105") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.415618350") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("clefferts@academyart.edu") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(5) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.academyart.edu") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("dbru.br.ns.els-gms.att.net") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("dmtu.mt.ns.els-gms.att.net") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("cbru.br.ns.els-gms.att.net") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("cmtu.mt.ns.els-gms.att.net") - expect(subject.nameservers[4].ipv4).to eq(nil) - expect(subject.nameservers[4].ipv6).to eq(nil) - end - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/no.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/no.com/status_available_spec.rb deleted file mode 100644 index 40276c5f..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/no.com/status_available_spec.rb +++ /dev/null @@ -1,96 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/no.com/status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' - -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do - - subject do - file = fixture("responses", "whois.centralnic.com/no.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/qc.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/qc.com/status_available_spec.rb deleted file mode 100644 index fd8dd535..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/qc.com/status_available_spec.rb +++ /dev/null @@ -1,96 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/qc.com/status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' - -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do - - subject do - file = fixture("responses", "whois.centralnic.com/qc.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/qc.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/qc.com/status_registered_spec.rb deleted file mode 100644 index efc27480..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/qc.com/status_registered_spec.rb +++ /dev/null @@ -1,153 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/qc.com/status_registered.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' - -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do - - subject do - file = fixture("responses", "whois.centralnic.com/qc.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("ceo.qc.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO327026") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2004-10-08 02:12:49 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-11-23 18:03:55 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-10-08 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("7065-EN") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("eNom, Inc.") - expect(subject.registrar.url).to eq("http://www.enom.com/") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H1062277") - expect(subject.registrant_contacts[0].name).to eq("helene") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("309 Laurendeau, Magog Qc") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq("J1X 3W4") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("CA") - expect(subject.registrant_contacts[0].phone).to eq("+1.8198438380") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("docjgs@videotron.ca") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H114589") - expect(subject.admin_contacts[0].name).to eq("helene viens") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq("309 Laurendeau, Magog Qc") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq("J1X 3W4") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("CA") - expect(subject.admin_contacts[0].phone).to eq("+1.8198438380") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("docjgs@videotron.ca") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("H114590") - expect(subject.technical_contacts[0].name).to eq("helene viens") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq("309 Laurendeau, Magog Qc") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq("J1X 3W4") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("CA") - expect(subject.technical_contacts[0].phone).to eq("+1.8198438380") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("docjgs@videotron.ca") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns12.zoneedit.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("t1.zoneedit.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/ru.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/ru.com/status_available_spec.rb index 99c5072b..88048435 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/ru.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/ru.com/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/ru.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/ru.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/ru.com/status_registered_spec.rb index 0ac603ef..c2dc213a 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/ru.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/ru.com/status_registered_spec.rb @@ -9,137 +9,52 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/ru.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("srk.ru.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO450826") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-07-31 10:06:04 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-07-10 08:16:19 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-07-31 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H1037013") - expect(subject.registrant_contacts[0].name).to eq("Anthony Lloyd, SRK Consulting (UK) Limited") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("5th Floor\nChurchill House\n17 Churchill Way") - expect(subject.registrant_contacts[0].city).to eq("Cardiff") - expect(subject.registrant_contacts[0].zip).to eq("CF10 2HH") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("GB") - expect(subject.registrant_contacts[0].phone).to eq("+44.2920348150") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("alloyd@srk.co.uk") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H265405") - expect(subject.admin_contacts[0].name).to eq("Anthony Lloyd") - expect(subject.admin_contacts[0].organization).to eq("SRK Consulting (UK) Limited") - expect(subject.admin_contacts[0].address).to eq("5th Floor\nChurchill House\n17 Churchill Way") - expect(subject.admin_contacts[0].city).to eq("Cardiff") - expect(subject.admin_contacts[0].zip).to eq("CF10 2HH") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("GB") - expect(subject.admin_contacts[0].phone).to eq("+44.2920348150") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("alloyd@srk.co.uk") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("H265405") - expect(subject.technical_contacts[0].name).to eq("Anthony Lloyd") - expect(subject.technical_contacts[0].organization).to eq("SRK Consulting (UK) Limited") - expect(subject.technical_contacts[0].address).to eq("5th Floor\nChurchill House\n17 Churchill Way") - expect(subject.technical_contacts[0].city).to eq("Cardiff") - expect(subject.technical_contacts[0].zip).to eq("CF10 2HH") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("GB") - expect(subject.technical_contacts[0].phone).to eq("+44.2920348150") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("alloyd@srk.co.uk") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns7.zoneedit.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns12.zoneedit.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq("srk.ru.com") + expect(subject.domain_id).to eq("D450826-CNIC") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-07-31 10:06:04 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-04-19 15:40:48 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2025-07-31 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("1376") + expect(subject.registrar.name).to eq("Instra Corporation Pty Ltd") + expect(subject.registrar.url).to eq("https://instra.com/") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].email).to eq("https://whois.centralnic.com/contact/srk.ru.com/registrant") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].email).to eq("https://whois.centralnic.com/contact/srk.ru.com/admin") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].email).to eq("https://whois.centralnic.com/contact/srk.ru.com/tech") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns7.zoneedit.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns11.zoneedit.com") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/sa.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/sa.com/status_available_spec.rb deleted file mode 100644 index 26304efb..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/sa.com/status_available_spec.rb +++ /dev/null @@ -1,96 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/sa.com/status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' - -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do - - subject do - file = fixture("responses", "whois.centralnic.com/sa.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/sa.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/sa.com/status_registered_spec.rb deleted file mode 100644 index cbb582c5..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/sa.com/status_registered_spec.rb +++ /dev/null @@ -1,149 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/sa.com/status_registered.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' - -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do - - subject do - file = fixture("responses", "whois.centralnic.com/sa.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("fynbos.sa.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO501005") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2007-09-27 18:14:53 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-11-02 13:42:11 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-09-27 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("C30342") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("Paragon Internet Group") - expect(subject.registrar.url).to eq("http://www.paragon.net.uk") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H323273") - expect(subject.registrant_contacts[0].name).to eq("Maarten Groos") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("farm 215 fynbos reserve\nPO Box 1314") - expect(subject.registrant_contacts[0].city).to eq("Gansbaai") - expect(subject.registrant_contacts[0].zip).to eq("7220") - expect(subject.registrant_contacts[0].state).to eq("Western Cape") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("ZA") - expect(subject.registrant_contacts[0].phone).to eq("+27.283880920") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("maarten@farm215.co.za") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H323273") - expect(subject.admin_contacts[0].name).to eq("Maarten Groos") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq("farm 215 fynbos reserve\nPO Box 1314") - expect(subject.admin_contacts[0].city).to eq("Gansbaai") - expect(subject.admin_contacts[0].zip).to eq("7220") - expect(subject.admin_contacts[0].state).to eq("Western Cape") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("ZA") - expect(subject.admin_contacts[0].phone).to eq("+27.283880920") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("maarten@farm215.co.za") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("C30342") - expect(subject.technical_contacts[0].name).to eq("Seb de Lemos") - expect(subject.technical_contacts[0].organization).to eq("Paragon Internet Group") - expect(subject.technical_contacts[0].address).to eq("St Andrew's House\nSt Mary's Walk") - expect(subject.technical_contacts[0].city).to eq("Maidenhead") - expect(subject.technical_contacts[0].zip).to eq("SL6 1QZ") - expect(subject.technical_contacts[0].state).to eq("Berkshire") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("GB") - expect(subject.technical_contacts[0].phone).to eq("+44.2031377651") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("domains@paragon.net.uk") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1191.websitewelcome.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1192.websitewelcome.com") - end - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/se.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/se.com/status_available_spec.rb deleted file mode 100644 index d7b5764f..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/se.com/status_available_spec.rb +++ /dev/null @@ -1,96 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/se.com/status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' - -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do - - subject do - file = fixture("responses", "whois.centralnic.com/se.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/se.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/se.com/status_registered_spec.rb deleted file mode 100644 index 6c25c751..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/se.com/status_registered_spec.rb +++ /dev/null @@ -1,157 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/se.com/status_registered.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' - -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do - - subject do - file = fixture("responses", "whois.centralnic.com/se.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("hotel.se.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO561053") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2008-05-10 05:17:32 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-06-03 10:33:46 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-05-10 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("7145-IX") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("InternetX GmbH") - expect(subject.registrar.url).to eq("http://www.internetx.de/") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("INX-10599082com") - expect(subject.registrant_contacts[0].name).to eq("Hotel Reservation Service Robert Ragge GmbH") - expect(subject.registrant_contacts[0].organization).to eq("Hotel Reservation Service Robert Ragge GmbH") - expect(subject.registrant_contacts[0].address).to eq("Blaubach 32") - expect(subject.registrant_contacts[0].city).to eq("Koeln") - expect(subject.registrant_contacts[0].zip).to eq("50676") - expect(subject.registrant_contacts[0].state).to eq("NRW") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("DE") - expect(subject.registrant_contacts[0].phone).to eq("+49.2212077222") - expect(subject.registrant_contacts[0].fax).to eq("+49.2212077394") - expect(subject.registrant_contacts[0].email).to eq("domains@hrs.de") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("INX-201727com") - expect(subject.admin_contacts[0].name).to eq("Robert Ragge") - expect(subject.admin_contacts[0].organization).to eq("Hotel Reservation Service Robert Ragge GmbH") - expect(subject.admin_contacts[0].address).to eq("Blaubach 32") - expect(subject.admin_contacts[0].city).to eq("Koeln") - expect(subject.admin_contacts[0].zip).to eq("50676") - expect(subject.admin_contacts[0].state).to eq("DE") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("DE") - expect(subject.admin_contacts[0].phone).to eq("+49.2212077222") - expect(subject.admin_contacts[0].fax).to eq("+49.2212077394") - expect(subject.admin_contacts[0].email).to eq("domains@hrs.de") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("INX-201728com") - expect(subject.technical_contacts[0].name).to eq("Uwe Watzek") - expect(subject.technical_contacts[0].organization).to eq("Wind Internethaus GmbH") - expect(subject.technical_contacts[0].address).to eq("Am Krebsgraben 15\nHaus 2") - expect(subject.technical_contacts[0].city).to eq("Villingen-Schwenningen") - expect(subject.technical_contacts[0].zip).to eq("78048") - expect(subject.technical_contacts[0].state).to eq("Baden-Wuerttemberg") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("DE") - expect(subject.technical_contacts[0].phone).to eq("+49.77214070740") - expect(subject.technical_contacts[0].fax).to eq("+49.77214070741") - expect(subject.technical_contacts[0].email).to eq("info@windinternethaus.de") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.hrs.de") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.hrs.de") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.surfbrett.de") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - end - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/se.net/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/se.net/status_available_spec.rb deleted file mode 100644 index 5439cbdc..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/se.net/status_available_spec.rb +++ /dev/null @@ -1,96 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/se.net/status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' - -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do - - subject do - file = fixture("responses", "whois.centralnic.com/se.net/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/se.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/se.net/status_registered_spec.rb deleted file mode 100644 index 4e0d8f4e..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/se.net/status_registered_spec.rb +++ /dev/null @@ -1,159 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/se.net/status_registered.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' - -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do - - subject do - file = fixture("responses", "whois.centralnic.com/se.net/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("hotel.se.net") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO1617446") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2013-11-13 10:35:03 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-11-28 11:49:39 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-11-13 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H2307235") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("Soluciones Corporativas IP, S.L.U.") - expect(subject.registrar.url).to eq("www.scip.es") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("scipr000323588") - expect(subject.registrant_contacts[0].name).to eq("Christoph Donath") - expect(subject.registrant_contacts[0].organization).to eq("Christoph Donath") - expect(subject.registrant_contacts[0].address).to eq("C. Tijarafe 24, 2c") - expect(subject.registrant_contacts[0].city).to eq("Cruce de Arinaga") - expect(subject.registrant_contacts[0].zip).to eq("35118") - expect(subject.registrant_contacts[0].state).to eq("Palmas (Las)") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("ES") - expect(subject.registrant_contacts[0].phone).to eq("+34.667889082") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("info@christophdonath.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("scipa000323588") - expect(subject.admin_contacts[0].name).to eq("Christoph Donath") - expect(subject.admin_contacts[0].organization).to eq("Christoph Donath") - expect(subject.admin_contacts[0].address).to eq("C. Tijarafe 24, 2c") - expect(subject.admin_contacts[0].city).to eq("Cruce de Arinaga") - expect(subject.admin_contacts[0].zip).to eq("35118") - expect(subject.admin_contacts[0].state).to eq("Palmas (Las)") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("ES") - expect(subject.admin_contacts[0].phone).to eq("+34.667889082") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("info@christophdonath.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("scipt000323588") - expect(subject.technical_contacts[0].name).to eq("Christoph Donath") - expect(subject.technical_contacts[0].organization).to eq("Christoph Donath") - expect(subject.technical_contacts[0].address).to eq("C. Tijarafe 24, 2c") - expect(subject.technical_contacts[0].city).to eq("Cruce de Arinaga") - expect(subject.technical_contacts[0].zip).to eq("35118") - expect(subject.technical_contacts[0].state).to eq("Palmas (Las)") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("ES") - expect(subject.technical_contacts[0].phone).to eq("+34.667889082") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("info@christophdonath.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns8261.hostgator.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns8262.hostgator.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/uk.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/uk.com/status_available_spec.rb index 1a86336b..93e834c0 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/uk.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/uk.com/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/uk.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/uk.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/uk.com/status_registered_spec.rb index 74311d83..6404f630 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/uk.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/uk.com/status_registered_spec.rb @@ -9,145 +9,52 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/uk.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("history.uk.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO86293") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2001-08-31 11:50:57 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-09-03 10:36:47 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-08-31 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H78362") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("E-VELOCITY LTD") - expect(subject.registrar.url).to eq("http://www.e-velocity.co.uk/") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H1045821") - expect(subject.registrant_contacts[0].name).to eq("Mr. Ray Hatley") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("Tallow House\n65-66 Lower Galdeford") - expect(subject.registrant_contacts[0].city).to eq("Ludlow") - expect(subject.registrant_contacts[0].zip).to eq("SY8 1RU") - expect(subject.registrant_contacts[0].state).to eq("Shropshire") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("GB") - expect(subject.registrant_contacts[0].phone).to eq("+44.1584873633") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("ray@hatley.co.uk") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H305798") - expect(subject.admin_contacts[0].name).to eq("Mr. Ray Hatley") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq("Tallow House\n65-66 Lower Galdeford") - expect(subject.admin_contacts[0].city).to eq("Ludlow") - expect(subject.admin_contacts[0].zip).to eq("SY8 1RU") - expect(subject.admin_contacts[0].state).to eq("Shropshire") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("GB") - expect(subject.admin_contacts[0].phone).to eq("+44.1584873633") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("ray@hatley.co.uk") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("H78362") - expect(subject.technical_contacts[0].name).to eq("Mr Simon Williams") - expect(subject.technical_contacts[0].organization).to eq("E-VELOCITY LTD") - expect(subject.technical_contacts[0].address).to eq("P.O Box 3295\nBrighton") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq("BN50 9EY") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("GB") - expect(subject.technical_contacts[0].phone).to eq("+44.1273684969") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("simon@e-velocity.co.uk") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns37.eukdns.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns38.eukdns.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq("history.uk.com") + expect(subject.domain_id).to eq("D64550744-CNIC") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2018-03-27 13:46:06 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-06-29 01:17:20 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-03-27 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("1861") + expect(subject.registrar.name).to eq("Porkbun, LLC") + expect(subject.registrar.url).to eq("https://porkbun.com/") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].email).to eq("https://whois.centralnic.com/contact/history.uk.com/registrant") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].email).to eq("https://whois.centralnic.com/contact/history.uk.com/admin") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].email).to eq("https://whois.centralnic.com/contact/history.uk.com/tech") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns15.stlbg.net") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns16.stlbg.net") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/uk.net/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/uk.net/status_available_spec.rb index 8d98faab..81c7917e 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/uk.net/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/uk.net/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/uk.net/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/uk.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/uk.net/status_registered_spec.rb index 6affb141..f803f1b4 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/uk.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/uk.net/status_registered_spec.rb @@ -9,145 +9,52 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/uk.net/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("paramount.uk.net") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO393884") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-02-28 12:17:01 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-04-03 12:59:45 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-02-28 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("I6467") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("Webfusion") - expect(subject.registrar.url).to eq("http://www.123-reg.co.uk/domain-names/") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("MNT60424953041") - expect(subject.registrant_contacts[0].name).to eq("Identity Protection Service") - expect(subject.registrant_contacts[0].organization).to eq("Identity Protect Limited") - expect(subject.registrant_contacts[0].address).to eq("PO Box 795") - expect(subject.registrant_contacts[0].city).to eq("Godalming") - expect(subject.registrant_contacts[0].zip).to eq("GU7 9GA") - expect(subject.registrant_contacts[0].state).to eq("Surrey") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("GB") - expect(subject.registrant_contacts[0].phone).to eq("+44.1483307527") - expect(subject.registrant_contacts[0].fax).to eq("+44.1483304031") - expect(subject.registrant_contacts[0].email).to eq("paramount.uk.net@identity-protect.org") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("MNT60424953041") - expect(subject.admin_contacts[0].name).to eq("Identity Protection Service") - expect(subject.admin_contacts[0].organization).to eq("Identity Protect Limited") - expect(subject.admin_contacts[0].address).to eq("PO Box 795") - expect(subject.admin_contacts[0].city).to eq("Godalming") - expect(subject.admin_contacts[0].zip).to eq("GU7 9GA") - expect(subject.admin_contacts[0].state).to eq("Surrey") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("GB") - expect(subject.admin_contacts[0].phone).to eq("+44.1483307527") - expect(subject.admin_contacts[0].fax).to eq("+44.1483304031") - expect(subject.admin_contacts[0].email).to eq("paramount.uk.net@identity-protect.org") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("MNT60424953041") - expect(subject.technical_contacts[0].name).to eq("Identity Protection Service") - expect(subject.technical_contacts[0].organization).to eq("Identity Protect Limited") - expect(subject.technical_contacts[0].address).to eq("PO Box 795") - expect(subject.technical_contacts[0].city).to eq("Godalming") - expect(subject.technical_contacts[0].zip).to eq("GU7 9GA") - expect(subject.technical_contacts[0].state).to eq("Surrey") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("GB") - expect(subject.technical_contacts[0].phone).to eq("+44.1483307527") - expect(subject.technical_contacts[0].fax).to eq("+44.1483304031") - expect(subject.technical_contacts[0].email).to eq("paramount.uk.net@identity-protect.org") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.myhostcp.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.myhostcp.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq("paramount.uk.net") + expect(subject.domain_id).to eq("D123061216-CNIC") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2019-09-03 15:47:37 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-08-12 04:46:26 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-09-03 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("1564") + expect(subject.registrar.name).to eq("TLD Registrar Solutions Ltd") + expect(subject.registrar.url).to eq("http://www.tldregistrarsolutions.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].email).to eq("https://whois.centralnic.com/contact/paramount.uk.net/registrant") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].email).to eq("https://whois.centralnic.com/contact/paramount.uk.net/admin") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].email).to eq("https://whois.centralnic.com/contact/paramount.uk.net/tech") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.gsgp1001.siteground.asia") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.gsgp1001.siteground.asia") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/us.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/us.com/status_available_spec.rb index ff1ed02f..72e46927 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/us.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/us.com/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/us.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/us.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/us.com/status_registered_spec.rb index 87794996..ca9ee8bd 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/us.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/us.com/status_registered_spec.rb @@ -9,149 +9,52 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/us.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("college.us.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO275307") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-10-20 10:03:28 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-01-16 16:27:26 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-10-20 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H1044037") - expect(subject.registrant_contacts[0].name).to eq("Vantage Media Corporation") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("2101 Rosecrans Ave.\nSuite 2000") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq("90245") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.3102196200") - expect(subject.registrant_contacts[0].fax).to eq("+1.8665897214") - expect(subject.registrant_contacts[0].email).to eq("domainadmin@vantagemedia.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H143205") - expect(subject.admin_contacts[0].name).to eq("Domain Administrator") - expect(subject.admin_contacts[0].organization).to eq("Vantage Media LLC") - expect(subject.admin_contacts[0].address).to eq("2101 Rosecrans Ave.\nSuite 2000") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq("90245") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.3102196200") - expect(subject.admin_contacts[0].fax).to eq("+1.8665897214") - expect(subject.admin_contacts[0].email).to eq("domainadmin@vantagemedia.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("H143205") - expect(subject.technical_contacts[0].name).to eq("Domain Administrator") - expect(subject.technical_contacts[0].organization).to eq("Vantage Media LLC") - expect(subject.technical_contacts[0].address).to eq("2101 Rosecrans Ave.\nSuite 2000") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq("90245") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.3102196200") - expect(subject.technical_contacts[0].fax).to eq("+1.8665897214") - expect(subject.technical_contacts[0].email).to eq("domainadmin@vantagemedia.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.p17.dynect.net") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.p17.dynect.net") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.p17.dynect.net") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.p17.dynect.net") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq("college.us.com") + expect(subject.domain_id).to eq("D189945299-CNIC") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2020-06-17 23:31:11 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-07-27 13:34:05 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-06-17 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("1564") + expect(subject.registrar.name).to eq("TLD Registrar Solutions Ltd") + expect(subject.registrar.url).to eq("http://www.tldregistrarsolutions.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].email).to eq("https://whois.centralnic.com/contact/college.us.com/registrant") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].email).to eq("https://whois.centralnic.com/contact/college.us.com/admin") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].email).to eq("https://whois.centralnic.com/contact/college.us.com/tech") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("elinore.ns.cloudflare.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("frank.ns.cloudflare.com") end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/us.org/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/us.org/status_available_spec.rb deleted file mode 100644 index ad7022b9..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/us.org/status_available_spec.rb +++ /dev/null @@ -1,96 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/us.org/status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' - -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do - - subject do - file = fixture("responses", "whois.centralnic.com/us.org/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/uy.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/uy.com/status_available_spec.rb deleted file mode 100644 index 2be71c52..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/uy.com/status_available_spec.rb +++ /dev/null @@ -1,96 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/uy.com/status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' - -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do - - subject do - file = fixture("responses", "whois.centralnic.com/uy.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/uy.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/uy.com/status_registered_spec.rb deleted file mode 100644 index 5e0faad7..00000000 --- a/spec/whois/parsers/responses/whois.centralnic.com/uy.com/status_registered_spec.rb +++ /dev/null @@ -1,149 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.centralnic.com/uy.com/status_registered.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' - -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do - - subject do - file = fixture("responses", "whois.centralnic.com/uy.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("bestb.uy.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO493832") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2007-07-12 13:49:25 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-07-10 00:27:20 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-07-12 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("I6467") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("Webfusion") - expect(subject.registrar.url).to eq("http://www.123-reg.co.uk/domain-names/") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("MNT32524959440") - expect(subject.registrant_contacts[0].name).to eq("Identity Protection Service") - expect(subject.registrant_contacts[0].organization).to eq("Identity Protect Limited") - expect(subject.registrant_contacts[0].address).to eq("PO Box 795") - expect(subject.registrant_contacts[0].city).to eq("Godalming") - expect(subject.registrant_contacts[0].zip).to eq("GU7 9GA") - expect(subject.registrant_contacts[0].state).to eq("Surrey") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("GB") - expect(subject.registrant_contacts[0].phone).to eq("+44.1483307527") - expect(subject.registrant_contacts[0].fax).to eq("+44.1483304031") - expect(subject.registrant_contacts[0].email).to eq("bestb.uy.com@identity-protect.org") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("MNT32524959440") - expect(subject.admin_contacts[0].name).to eq("Identity Protection Service") - expect(subject.admin_contacts[0].organization).to eq("Identity Protect Limited") - expect(subject.admin_contacts[0].address).to eq("PO Box 795") - expect(subject.admin_contacts[0].city).to eq("Godalming") - expect(subject.admin_contacts[0].zip).to eq("GU7 9GA") - expect(subject.admin_contacts[0].state).to eq("Surrey") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("GB") - expect(subject.admin_contacts[0].phone).to eq("+44.1483307527") - expect(subject.admin_contacts[0].fax).to eq("+44.1483304031") - expect(subject.admin_contacts[0].email).to eq("bestb.uy.com@identity-protect.org") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("MNT32524959440") - expect(subject.technical_contacts[0].name).to eq("Identity Protection Service") - expect(subject.technical_contacts[0].organization).to eq("Identity Protect Limited") - expect(subject.technical_contacts[0].address).to eq("PO Box 795") - expect(subject.technical_contacts[0].city).to eq("Godalming") - expect(subject.technical_contacts[0].zip).to eq("GU7 9GA") - expect(subject.technical_contacts[0].state).to eq("Surrey") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("GB") - expect(subject.technical_contacts[0].phone).to eq("+44.1483307527") - expect(subject.technical_contacts[0].fax).to eq("+44.1483304031") - expect(subject.technical_contacts[0].email).to eq("bestb.uy.com@identity-protect.org") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.123-reg.co.uk") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns.123-reg.co.uk") - end - end -end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/za.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/za.com/status_available_spec.rb index 5292a14f..8703b126 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/za.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/za.com/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_available.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/za.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.centralnic.com/za.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.centralnic.com/za.com/status_registered_spec.rb index 4082ef3e..594a3dd6 100644 --- a/spec/whois/parsers/responses/whois.centralnic.com/za.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.centralnic.com/za.com/status_registered_spec.rb @@ -9,141 +9,52 @@ # require 'spec_helper' -require 'whois/parsers/whois.centralnic.com.rb' -describe Whois::Parsers::WhoisCentralnicCom, "status_registered.expected" do +describe "whois.centralnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.centralnic.com/za.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.centralnic.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("siyenza.za.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO333077") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2004-11-17 11:47:29 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-12-03 12:33:13 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-11-17 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("C12112") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("Megaweb Internet Services") - expect(subject.registrar.url).to eq("http://www.megaweb.co.za/") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H1063006") - expect(subject.registrant_contacts[0].name).to eq("MegaWeb Internet Services cc") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("PO Box 3738\nCramerview") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq("2060") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("ZA") - expect(subject.registrant_contacts[0].phone).to eq("+27.0114851984") - expect(subject.registrant_contacts[0].fax).to eq("+27.0114855999") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@megaweb.co.za") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H119106") - expect(subject.admin_contacts[0].name).to eq("Liz Hart") - expect(subject.admin_contacts[0].organization).to eq("Siyenza Management") - expect(subject.admin_contacts[0].address).to eq("PO Box 3738\nCramerview") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq("2060") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("ZA") - expect(subject.admin_contacts[0].phone).to eq("+27.0114851984") - expect(subject.admin_contacts[0].fax).to eq("+27.0114855999") - expect(subject.admin_contacts[0].email).to eq("dns-admin@megaweb.co.za") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("C12112") - expect(subject.technical_contacts[0].name).to eq("Laida Peters") - expect(subject.technical_contacts[0].organization).to eq("Megaweb Internet Services") - expect(subject.technical_contacts[0].address).to eq(nil) - expect(subject.technical_contacts[0].city).to eq("Gauteng") - expect(subject.technical_contacts[0].zip).to eq("2192") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("ZA") - expect(subject.technical_contacts[0].phone).to eq("+27.027114851984") - expect(subject.technical_contacts[0].fax).to eq("+27.027114851986") - expect(subject.technical_contacts[0].email).to eq("dns-admin@megaweb.co.za") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1a.your-server.co.za") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("nsa.second-ns.co.za") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq("siyenza.za.com") + expect(subject.domain_id).to eq("D333077-CNIC") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2004-11-17 11:47:29 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2019-01-30 08:43:57 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-11-17 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("") + expect(subject.registrar.name).to eq("Megaweb Internet Services") + expect(subject.registrar.url).to eq("http://www.megaweb.co.za/") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].email).to eq("https://whois.centralnic.com/contact/siyenza.za.com/registrant") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].email).to eq("https://whois.centralnic.com/contact/siyenza.za.com/admin") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].email).to eq("https://whois.centralnic.com/contact/siyenza.za.com/tech") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1a.your-server.co.za") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("nsa.second-ns.co.za") end end diff --git a/spec/whois/parsers/responses/whois.cira.ca/ca/field_without_value_spec.rb b/spec/whois/parsers/responses/whois.cira.ca/ca/field_without_value_spec.rb deleted file mode 100644 index 17e2349a..00000000 --- a/spec/whois/parsers/responses/whois.cira.ca/ca/field_without_value_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.cira.ca/ca/field_without_value.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.cira.ca.rb' - -describe Whois::Parsers::WhoisCiraCa, "field_without_value.expected" do - - subject do - file = fixture("responses", "whois.cira.ca/ca/field_without_value.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Ross Vito") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq("405 Queen Street South, P.O. Box 75004\nBolton ON L7E2B5 Canada") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq("1 (647) 964-4544") - expect(subject.technical_contacts[0].fax).to eq("") - expect(subject.technical_contacts[0].email).to eq("mail@sanamato.com") - end - end -end diff --git a/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_autorenew_grace_spec.rb b/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_autorenew_grace_spec.rb deleted file mode 100644 index dc5ac9e1..00000000 --- a/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_autorenew_grace_spec.rb +++ /dev/null @@ -1,37 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.cira.ca/ca/property_status_autorenew_grace.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.cira.ca.rb' - -describe Whois::Parsers::WhoisCiraCa, "property_status_autorenew_grace.expected" do - - subject do - file = fixture("responses", "whois.cira.ca/ca/property_status_autorenew_grace.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end -end diff --git a/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_available_spec.rb b/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_available_spec.rb deleted file mode 100644 index a189335c..00000000 --- a/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_available_spec.rb +++ /dev/null @@ -1,37 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.cira.ca/ca/property_status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.cira.ca.rb' - -describe Whois::Parsers::WhoisCiraCa, "property_status_available.expected" do - - subject do - file = fixture("responses", "whois.cira.ca/ca/property_status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end -end diff --git a/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_pendingdelete_spec.rb b/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_pendingdelete_spec.rb deleted file mode 100644 index b6ef4aa5..00000000 --- a/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_pendingdelete_spec.rb +++ /dev/null @@ -1,37 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.cira.ca/ca/property_status_pendingdelete.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.cira.ca.rb' - -describe Whois::Parsers::WhoisCiraCa, "property_status_pendingdelete.expected" do - - subject do - file = fixture("responses", "whois.cira.ca/ca/property_status_pendingdelete.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end -end diff --git a/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_redemption_spec.rb b/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_redemption_spec.rb deleted file mode 100644 index 8397f6dd..00000000 --- a/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_redemption_spec.rb +++ /dev/null @@ -1,37 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.cira.ca/ca/property_status_redemption.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.cira.ca.rb' - -describe Whois::Parsers::WhoisCiraCa, "property_status_redemption.expected" do - - subject do - file = fixture("responses", "whois.cira.ca/ca/property_status_redemption.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end -end diff --git a/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_registered_spec.rb b/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_registered_spec.rb deleted file mode 100644 index 1bb2a71c..00000000 --- a/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_registered_spec.rb +++ /dev/null @@ -1,37 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.cira.ca/ca/property_status_registered.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.cira.ca.rb' - -describe Whois::Parsers::WhoisCiraCa, "property_status_registered.expected" do - - subject do - file = fixture("responses", "whois.cira.ca/ca/property_status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end -end diff --git a/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_tobereleased_spec.rb b/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_tobereleased_spec.rb deleted file mode 100644 index 0e11013d..00000000 --- a/spec/whois/parsers/responses/whois.cira.ca/ca/property_status_tobereleased_spec.rb +++ /dev/null @@ -1,37 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.cira.ca/ca/property_status_tobereleased.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.cira.ca.rb' - -describe Whois::Parsers::WhoisCiraCa, "property_status_tobereleased.expected" do - - subject do - file = fixture("responses", "whois.cira.ca/ca/property_status_tobereleased.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end -end diff --git a/spec/whois/parsers/responses/whois.cira.ca/ca/status_available_spec.rb b/spec/whois/parsers/responses/whois.cira.ca/ca/status_available_spec.rb index 7ee05e6a..8cfa75eb 100644 --- a/spec/whois/parsers/responses/whois.cira.ca/ca/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.cira.ca/ca/status_available_spec.rb @@ -9,98 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.cira.ca.rb' -describe Whois::Parsers::WhoisCiraCa, "status_available.expected" do +describe "whois.cira.ca", :aggregate_failures do subject do file = fixture("responses", "whois.cira.ca/ca/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cira.ca") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal\nNotice, available at http://www.cira.ca/legal-notice/?lang=en\n\n(c) 2014 Canadian Internet Registration Authority, (http://www.cira.ca/)") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.ca") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#valid?" do - it do - expect(subject.valid?).to eq(true) - end - end - describe "#invalid?" do - it do - expect(subject.invalid?).to eq(false) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal Notice, available at http://www.cira.ca/legal-notice/?lang=en (c) 2021 Canadian Internet Registration Authority, (http://www.cira.ca/)") + expect(subject.domain).to eq("u34jedzcq.ca") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.cira.ca/ca/status_invalid_spec.rb b/spec/whois/parsers/responses/whois.cira.ca/ca/status_invalid_spec.rb deleted file mode 100644 index e13f6af3..00000000 --- a/spec/whois/parsers/responses/whois.cira.ca/ca/status_invalid_spec.rb +++ /dev/null @@ -1,37 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.cira.ca/ca/status_invalid.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.cira.ca.rb' - -describe Whois::Parsers::WhoisCiraCa, "status_invalid.expected" do - - subject do - file = fixture("responses", "whois.cira.ca/ca/status_invalid.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(:invalid) - end - end - describe "#valid?" do - it do - expect(subject.valid?).to eq(false) - end - end - describe "#invalid?" do - it do - expect(subject.invalid?).to eq(true) - end - end -end diff --git a/spec/whois/parsers/responses/whois.cira.ca/ca/status_registered_spec.rb b/spec/whois/parsers/responses/whois.cira.ca/ca/status_registered_spec.rb index b107dc54..aadba50e 100644 --- a/spec/whois/parsers/responses/whois.cira.ca/ca/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.cira.ca/ca/status_registered_spec.rb @@ -9,152 +9,86 @@ # require 'spec_helper' -require 'whois/parsers/whois.cira.ca.rb' -describe Whois::Parsers::WhoisCiraCa, "status_registered.expected" do +describe "whois.cira.ca", :aggregate_failures do subject do file = fixture("responses", "whois.cira.ca/ca/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cira.ca") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal\nNotice, available at http://www.cira.ca/legal-notice/?lang=en\n\n(c) 2014 Canadian Internet Registration Authority, (http://www.cira.ca/)") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.ca") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2000-10-03 00:00:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-02-13 00:00:00")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-04-28 00:00:00")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("5000040") - expect(subject.registrar.name).to eq("MarkMonitor International Canada Ltd.") - expect(subject.registrar.organization).to eq("MarkMonitor International Canada Ltd.") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Google Inc.") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("Christina Chiou") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq("130 King St. W., Suite 1800,\nToronto ON M5X1E3 Canada") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq("+1.4168653361x") - expect(subject.admin_contacts[0].fax).to eq("+1.4169456616") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Matt Serlin") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq("Domain Provisioning,10400 Overland Rd. PMB 155\nBoise ID 83709 United States") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq("+1.2083895740x") - expect(subject.technical_contacts[0].fax).to eq("+1.2083895771") - expect(subject.technical_contacts[0].email).to eq("ccops@markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end - end - describe "#valid?" do - it do - expect(subject.valid?).to eq(true) - end - end - describe "#invalid?" do - it do - expect(subject.invalid?).to eq(false) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal Notice, available at http://www.cira.ca/legal-notice/?lang=en (c) 2021 Canadian Internet Registration Authority, (http://www.cira.ca/)") + expect(subject.domain).to eq("google.ca") + expect(subject.domain_id).to eq("D73081-CIRA") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2000-10-04 02:21:23 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-04-28 04:04:12 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-04-28 04:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("not applicable") + expect(subject.registrar.name).to eq("MarkMonitor International Canada Ltd.") + expect(subject.registrar.url).to eq("Markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("59969059-CIRA") + expect(subject.registrant_contacts[0].name).to eq("Google LLC - TMA868122") + expect(subject.registrant_contacts[0].organization).to eq("") + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") + expect(subject.registrant_contacts[0].fax).to eq("") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("59969161-CIRA") + expect(subject.admin_contacts[0].name).to eq("Lauren Johnston") + expect(subject.admin_contacts[0].organization).to eq("Google LLC") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") + expect(subject.admin_contacts[0].fax).to eq("") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("59969161-CIRA") + expect(subject.technical_contacts[0].name).to eq("Lauren Johnston") + expect(subject.technical_contacts[0].organization).to eq("Google LLC") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") + expect(subject.technical_contacts[0].fax).to eq("") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.cira.ca/ca/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.cira.ca/ca/status_reserved_spec.rb new file mode 100644 index 00000000..694027e8 --- /dev/null +++ b/spec/whois/parsers/responses/whois.cira.ca/ca/status_reserved_spec.rb @@ -0,0 +1,41 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.cira.ca/ca/status_reserved.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.cira.ca", :aggregate_failures do + + subject do + file = fixture("responses", "whois.cira.ca/ca/status_reserved.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cira.ca") + Whois::Parser.parser_for(part) + end + + it "matches status_reserved.expected" do + expect(subject.disclaimer).to eq("Use of CIRA's WHOIS service is governed by the Terms of Use in its Legal Notice, available at http://www.cira.ca/legal-notice/?lang=en (c) 2021 Canadian Internet Registration Authority, (http://www.cira.ca/)") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end +end diff --git a/spec/whois/parsers/responses/whois.cmc.iq/iq/status_available_spec.rb b/spec/whois/parsers/responses/whois.cmc.iq/iq/status_available_spec.rb index afcc8377..2e809202 100644 --- a/spec/whois/parsers/responses/whois.cmc.iq/iq/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.cmc.iq/iq/status_available_spec.rb @@ -9,65 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.cmc.iq.rb' -describe Whois::Parsers::WhoisCmcIq, "status_available.expected" do +describe "whois.cmc.iq", :aggregate_failures do subject do file = fixture("responses", "whois.cmc.iq/iq/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cmc.iq") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.iq") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.iq") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.cmc.iq/iq/status_registered_spec.rb b/spec/whois/parsers/responses/whois.cmc.iq/iq/status_registered_spec.rb index 6973267d..7d4da8a0 100644 --- a/spec/whois/parsers/responses/whois.cmc.iq/iq/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.cmc.iq/iq/status_registered_spec.rb @@ -9,88 +9,48 @@ # require 'spec_helper' -require 'whois/parsers/whois.cmc.iq.rb' -describe Whois::Parsers::WhoisCmcIq, "status_registered.expected" do +describe "whois.cmc.iq", :aggregate_failures do subject do file = fixture("responses", "whois.cmc.iq/iq/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cmc.iq") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.iq") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("895-CoCCA") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2010-10-03 21:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-09-29 05:19:04 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-10-02 21:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("CMC Registrar") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.iq") + expect(subject.domain_id).to eq("895-CoCCA") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2010-10-03 21:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-09-29 05:19:04 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-10-02 21:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("CMC Registrar") + expect(subject.registrar.url).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.cnnic.cn/cn/property_status_ok_spec.rb b/spec/whois/parsers/responses/whois.cnnic.cn/cn/property_status_ok_spec.rb index cbea48c3..79d2e717 100644 --- a/spec/whois/parsers/responses/whois.cnnic.cn/cn/property_status_ok_spec.rb +++ b/spec/whois/parsers/responses/whois.cnnic.cn/cn/property_status_ok_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.cnnic.cn.rb' -describe Whois::Parsers::WhoisCnnicCn, "property_status_ok.expected" do +describe "whois.cnnic.cn", :aggregate_failures do subject do file = fixture("responses", "whois.cnnic.cn/cn/property_status_ok.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cnnic.cn") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_ok.expected" do + expect(subject.status).to eq(["ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.cnnic.cn/cn/property_status_reserved_list_spec.rb b/spec/whois/parsers/responses/whois.cnnic.cn/cn/property_status_reserved_list_spec.rb index ed078c67..3fee1b72 100644 --- a/spec/whois/parsers/responses/whois.cnnic.cn/cn/property_status_reserved_list_spec.rb +++ b/spec/whois/parsers/responses/whois.cnnic.cn/cn/property_status_reserved_list_spec.rb @@ -9,34 +9,19 @@ # require 'spec_helper' -require 'whois/parsers/whois.cnnic.cn.rb' -describe Whois::Parsers::WhoisCnnicCn, "property_status_reserved_list.expected" do +describe "whois.cnnic.cn", :aggregate_failures do subject do file = fixture("responses", "whois.cnnic.cn/cn/property_status_reserved_list.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cnnic.cn") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(true) - end + it "matches property_status_reserved_list.expected" do + expect(subject.status).to eq([]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(false) + expect(subject.reserved?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.cnnic.cn/cn/status_available_spec.rb b/spec/whois/parsers/responses/whois.cnnic.cn/cn/status_available_spec.rb index 1da592d0..30629b0f 100644 --- a/spec/whois/parsers/responses/whois.cnnic.cn/cn/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.cnnic.cn/cn/status_available_spec.rb @@ -9,92 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.cnnic.cn.rb' -describe Whois::Parsers::WhoisCnnicCn, "status_available.expected" do +describe "whois.cnnic.cn", :aggregate_failures do subject do file = fixture("responses", "whois.cnnic.cn/cn/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cnnic.cn") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(false) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.reserved?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.cnnic.cn/cn/status_registered_spec.rb b/spec/whois/parsers/responses/whois.cnnic.cn/cn/status_registered_spec.rb index b35d73ac..3244a802 100644 --- a/spec/whois/parsers/responses/whois.cnnic.cn/cn/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.cnnic.cn/cn/status_registered_spec.rb @@ -9,110 +9,50 @@ # require 'spec_helper' -require 'whois/parsers/whois.cnnic.cn.rb' -describe Whois::Parsers::WhoisCnnicCn, "status_registered.expected" do +describe "whois.cnnic.cn", :aggregate_failures do subject do file = fixture("responses", "whois.cnnic.cn/cn/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cnnic.cn") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.cn") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("20030311s10001s00033735-cn") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientDeleteProhibited", "serverDeleteProhibited", "clientUpdateProhibited", "serverUpdateProhibited", "clientTransferProhibited", "serverTransferProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-03-17 12:20:05")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2017-03-17 12:48:36")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("MarkMonitor Inc.") - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.organization).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("cnnic-zdmd-022") - expect(subject.registrant_contacts[0].name).to eq("Google Ireland Holdings") - expect(subject.registrant_contacts[0].organization).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(false) - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("google.cn") + expect(subject.domain_id).to eq("20030311s10001s00033735-cn") + expect(subject.status).to eq(["clientDeleteProhibited", "serverDeleteProhibited", "clientUpdateProhibited", "serverUpdateProhibited", "clientTransferProhibited", "serverTransferProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-03-17 12:20:05")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2017-03-17 12:48:36")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("MarkMonitor Inc.") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("cnnic-zdmd-022") + expect(subject.registrant_contacts[0].name).to eq("Google Ireland Holdings") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.reserved?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.cnnic.cn/cn/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.cnnic.cn/cn/status_reserved_spec.rb index 8ab68b37..d4f77b06 100644 --- a/spec/whois/parsers/responses/whois.cnnic.cn/cn/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.cnnic.cn/cn/status_reserved_spec.rb @@ -9,34 +9,19 @@ # require 'spec_helper' -require 'whois/parsers/whois.cnnic.cn.rb' -describe Whois::Parsers::WhoisCnnicCn, "status_reserved.expected" do +describe "whois.cnnic.cn", :aggregate_failures do subject do file = fixture("responses", "whois.cnnic.cn/cn/status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.cnnic.cn") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(true) - end + it "matches status_reserved.expected" do + expect(subject.status).to eq([]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(false) + expect(subject.reserved?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.co.ca/co.ca/status_available_spec.rb b/spec/whois/parsers/responses/whois.co.ca/co.ca/status_available_spec.rb index f191563c..45a50907 100644 --- a/spec/whois/parsers/responses/whois.co.ca/co.ca/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.co.ca/co.ca/status_available_spec.rb @@ -9,55 +9,24 @@ # require 'spec_helper' -require 'whois/parsers/whois.co.ca.rb' -describe Whois::Parsers::WhoisCoCa, "status_available.expected" do +describe "whois.co.ca", :aggregate_failures do subject do file = fixture("responses", "whois.co.ca/co.ca/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.co.ca") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(false) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.reserved?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.co.ca/co.ca/status_registered_spec.rb b/spec/whois/parsers/responses/whois.co.ca/co.ca/status_registered_spec.rb index e050c5f5..0daece94 100644 --- a/spec/whois/parsers/responses/whois.co.ca/co.ca/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.co.ca/co.ca/status_registered_spec.rb @@ -9,61 +9,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.co.ca.rb' -describe Whois::Parsers::WhoisCoCa, "status_registered.expected" do +describe "whois.co.ca", :aggregate_failures do subject do file = fixture("responses", "whois.co.ca/co.ca/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.co.ca") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2005-06-25 16:03:30")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-06-25")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.canadawebhosting.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.canadawebhosting.com") - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(false) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2005-06-25 16:03:30")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-06-25")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.canadawebhosting.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.canadawebhosting.com") + expect(subject.reserved?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.co.ca/co.ca/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.co.ca/co.ca/status_reserved_spec.rb index 64a85dec..12f7cb3a 100644 --- a/spec/whois/parsers/responses/whois.co.ca/co.ca/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.co.ca/co.ca/status_reserved_spec.rb @@ -9,34 +9,19 @@ # require 'spec_helper' -require 'whois/parsers/whois.co.ca.rb' -describe Whois::Parsers::WhoisCoCa, "status_reserved.expected" do +describe "whois.co.ca", :aggregate_failures do subject do file = fixture("responses", "whois.co.ca/co.ca/status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.co.ca") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(true) - end + it "matches status_reserved.expected" do + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.reserved?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.co.pl/co.pl/status_available_spec.rb b/spec/whois/parsers/responses/whois.co.pl/co.pl/status_available_spec.rb index 7747ed45..1adf675b 100644 --- a/spec/whois/parsers/responses/whois.co.pl/co.pl/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.co.pl/co.pl/status_available_spec.rb @@ -9,85 +9,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.co.pl.rb' -describe Whois::Parsers::WhoisCoPl, "status_available.expected" do +describe "whois.co.pl", :aggregate_failures do subject do file = fixture("responses", "whois.co.pl/co.pl/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.co.pl") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.co.pl/co.pl/status_registered_spec.rb b/spec/whois/parsers/responses/whois.co.pl/co.pl/status_registered_spec.rb index 94faeebe..3cc21103 100644 --- a/spec/whois/parsers/responses/whois.co.pl/co.pl/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.co.pl/co.pl/status_registered_spec.rb @@ -9,90 +9,35 @@ # require 'spec_helper' -require 'whois/parsers/whois.co.pl.rb' -describe Whois::Parsers::WhoisCoPl, "status_registered.expected" do +describe "whois.co.pl", :aggregate_failures do subject do file = fixture("responses", "whois.co.pl/co.pl/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.co.pl") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("coco.co.pl") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2010-06-23 09:41:50")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.co.pl") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.co.pl") - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("coco.co.pl") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2010-06-23 09:41:50")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.co.pl") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.co.pl") end end diff --git a/spec/whois/parsers/responses/whois.co.ug/ug/property_status_active_spec.rb b/spec/whois/parsers/responses/whois.co.ug/ug/property_status_active_spec.rb index aedfbc85..5e6fcf82 100644 --- a/spec/whois/parsers/responses/whois.co.ug/ug/property_status_active_spec.rb +++ b/spec/whois/parsers/responses/whois.co.ug/ug/property_status_active_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.co.ug.rb' -describe Whois::Parsers::WhoisCoUg, "property_status_active.expected" do +describe "whois.co.ug", :aggregate_failures do subject do file = fixture("responses", "whois.co.ug/ug/property_status_active.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.co.ug") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_active.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.co.ug/ug/property_status_unconfirmed_spec.rb b/spec/whois/parsers/responses/whois.co.ug/ug/property_status_unconfirmed_spec.rb index d3c76379..b94daf05 100644 --- a/spec/whois/parsers/responses/whois.co.ug/ug/property_status_unconfirmed_spec.rb +++ b/spec/whois/parsers/responses/whois.co.ug/ug/property_status_unconfirmed_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.co.ug.rb' -describe Whois::Parsers::WhoisCoUg, "property_status_unconfirmed.expected" do +describe "whois.co.ug", :aggregate_failures do subject do file = fixture("responses", "whois.co.ug/ug/property_status_unconfirmed.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.co.ug") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_unconfirmed.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.co.ug/ug/status_available_spec.rb b/spec/whois/parsers/responses/whois.co.ug/ug/status_available_spec.rb index 031410ae..a041b7d3 100644 --- a/spec/whois/parsers/responses/whois.co.ug/ug/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.co.ug/ug/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.co.ug.rb' -describe Whois::Parsers::WhoisCoUg, "status_available.expected" do +describe "whois.co.ug", :aggregate_failures do subject do file = fixture("responses", "whois.co.ug/ug/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.co.ug") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.co.ug/ug/status_registered_spec.rb b/spec/whois/parsers/responses/whois.co.ug/ug/status_registered_spec.rb index b114302d..8e34238b 100644 --- a/spec/whois/parsers/responses/whois.co.ug/ug/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.co.ug/ug/status_registered_spec.rb @@ -9,59 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.co.ug.rb' -describe Whois::Parsers::WhoisCoUg, "status_registered.expected" do +describe "whois.co.ug", :aggregate_failures do subject do file = fixture("responses", "whois.co.ug/ug/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.co.ug") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2001-04-02 00:00:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2009-11-10 14:06:58 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2018-04-07 00:00:00")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.cfi.co.ug") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.cfi.co.ug") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.cfi.co.ug") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2001-04-02 00:00:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2009-11-10 14:06:58 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2018-04-07 00:00:00")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.cfi.co.ug") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.cfi.co.ug") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.cfi.co.ug") end end diff --git a/spec/whois/parsers/responses/whois.comlaude.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.comlaude.com/status_registered_spec.rb index d1ee25d9..8776bf27 100644 --- a/spec/whois/parsers/responses/whois.comlaude.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.comlaude.com/status_registered_spec.rb @@ -9,122 +9,79 @@ # require 'spec_helper' -require 'whois/parsers/whois.comlaude.com.rb' -describe Whois::Parsers::WhoisComlaudeCom, "status_registered.expected" do +describe "whois.comlaude.com", :aggregate_failures do subject do file = fixture("responses", "whois.comlaude.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.comlaude.com") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect { subject.status }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2005-01-30")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2020-01-30")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("NOM IQ LTD (DBA COM LAUDE)") - expect(subject.registrar.url).to eq("http://www.comlaude.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].name).to eq("Domain Manager") - expect(subject.registrant_contacts[0].organization).to eq("Nom-IQ Ltd dba Com Laude") - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq("+44.2078360070") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("admin@comlaude.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].name).to eq("Domain Manager") - expect(subject.admin_contacts[0].organization).to eq("Nom-IQ Ltd dba Com Laude") - expect(subject.admin_contacts[0].address).to eq(nil) - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq("+44.2078360070") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("admin@comlaude.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].name).to eq("Technical Manager") - expect(subject.technical_contacts[0].organization).to eq("Com Laude") - expect(subject.technical_contacts[0].address).to eq(nil) - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq("+44.2074218250") - expect(subject.technical_contacts[0].fax).to eq("+44.8700118187") - expect(subject.technical_contacts[0].email).to eq("hostmaster@comlaude.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("dns1.comlaude-dns.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("dns2.comlaude-dns.net") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("dns3.comlaude-dns.co.uk") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("dns4.comlaude-dns.eu") - end + it "matches status_registered.expected" do + expect { subject.status }.to raise_error(Whois::AttributeNotSupported) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2005-01-30")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-01-30")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("NOM IQ LTD (DBA COM LAUDE)") + expect(subject.registrar.url).to eq("http://www.comlaude.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].name).to eq("Domain Manager") + expect(subject.registrant_contacts[0].organization).to eq("Nom-IQ Ltd dba Com Laude") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq("+44.2078360070") + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("admin@comlaude.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].name).to eq("Domain Manager") + expect(subject.admin_contacts[0].organization).to eq("Nom-IQ Ltd dba Com Laude") + expect(subject.admin_contacts[0].address).to eq(nil) + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq("+44.2078360070") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("admin@comlaude.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].name).to eq("Technical Manager") + expect(subject.technical_contacts[0].organization).to eq("Com Laude") + expect(subject.technical_contacts[0].address).to eq(nil) + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq("+44.2074218250") + expect(subject.technical_contacts[0].fax).to eq("+44.8700118187") + expect(subject.technical_contacts[0].email).to eq("hostmaster@comlaude.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("dns1.comlaude-dns.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("dns2.comlaude-dns.net") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("dns3.comlaude-dns.co.uk") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("dns4.comlaude-dns.eu") end end diff --git a/spec/whois/parsers/responses/whois.corporatedomains.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.corporatedomains.com/status_available_spec.rb index 92686405..92055cd0 100644 --- a/spec/whois/parsers/responses/whois.corporatedomains.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.corporatedomains.com/status_available_spec.rb @@ -9,83 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.corporatedomains.com.rb' -describe Whois::Parsers::WhoisCorporatedomainsCom, "status_available.expected" do +describe "whois.corporatedomains.com", :aggregate_failures do subject do file = fixture("responses", "whois.corporatedomains.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.corporatedomains.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.corporatedomains.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.corporatedomains.com/status_registered_spec.rb index f0a44d2b..c6fe2825 100644 --- a/spec/whois/parsers/responses/whois.corporatedomains.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.corporatedomains.com/status_registered_spec.rb @@ -9,148 +9,96 @@ # require 'spec_helper' -require 'whois/parsers/whois.corporatedomains.com.rb' -describe Whois::Parsers::WhoisCorporatedomainsCom, "status_registered.expected" do +describe "whois.corporatedomains.com", :aggregate_failures do subject do file = fixture("responses", "whois.corporatedomains.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.corporatedomains.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1992-11-24 00:00:00 -0500")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-05-16 09:28:56 -0400")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2013-11-23 00:00:00 -0500")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("299") - expect(subject.registrar.name).to eq("CORPORATE DOMAINS, INC.") - expect(subject.registrar.organization).to eq("CORPORATE DOMAINS, INC.") - expect(subject.registrar.url).to eq("www.cscprotectsbrands.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].name).to eq("Dns Admin") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("Please contact contact-admin@google.com, 1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6506188571") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6506234000") - expect(subject.admin_contacts[0].fax).to eq("+1.6506188571") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("2400 E. Bayshore Pkwy") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6503300100") - expect(subject.technical_contacts[0].fax).to eq("+1.6506181499") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.com") + expect(subject.domain_id).to eq("") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1992-11-24 00:00:00 -0500")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-05-16 09:28:56 -0400")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2013-11-23 00:00:00 -0500")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("299") + expect(subject.registrar.name).to eq("CORPORATE DOMAINS, INC.") + expect(subject.registrar.url).to eq("www.cscprotectsbrands.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].name).to eq("Dns Admin") + expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq("Please contact contact-admin@google.com, 1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") + expect(subject.registrant_contacts[0].fax).to eq("+1.6506188571") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].name).to eq("DNS Admin") + expect(subject.admin_contacts[0].organization).to eq("Google Inc.") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.6506234000") + expect(subject.admin_contacts[0].fax).to eq("+1.6506188571") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].name).to eq("DNS Admin") + expect(subject.technical_contacts[0].organization).to eq("Google Inc.") + expect(subject.technical_contacts[0].address).to eq("2400 E. Bayshore Pkwy") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.6503300100") + expect(subject.technical_contacts[0].fax).to eq("+1.6506181499") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.denic.de/de/property_nameservers_with_ip_spec.rb b/spec/whois/parsers/responses/whois.denic.de/de/property_nameservers_with_ip_spec.rb index 37c58037..d4cdd8ec 100644 --- a/spec/whois/parsers/responses/whois.denic.de/de/property_nameservers_with_ip_spec.rb +++ b/spec/whois/parsers/responses/whois.denic.de/de/property_nameservers_with_ip_spec.rb @@ -9,40 +9,37 @@ # require 'spec_helper' -require 'whois/parsers/whois.denic.de.rb' -describe Whois::Parsers::WhoisDenicDe, "property_nameservers_with_ip.expected" do +describe "whois.denic.de", :aggregate_failures do subject do file = fixture("responses", "whois.denic.de/de/property_nameservers_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.denic.de") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(5) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.prodns.de") - expect(subject.nameservers[0].ipv4).to eq("91.233.85.99") - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.prodns.eu") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.prodns.de") - expect(subject.nameservers[2].ipv4).to eq("91.233.86.99") - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.prodns.eu") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("ns5.prodns.de") - expect(subject.nameservers[4].ipv4).to eq("65.18.172.184") - expect(subject.nameservers[4].ipv6).to eq(nil) - end + it "matches property_nameservers_with_ip.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(5) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.prodns.de") + expect(subject.nameservers[0].ipv4).to eq("91.233.85.99") + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.prodns.eu") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.prodns.de") + expect(subject.nameservers[2].ipv4).to eq("91.233.86.99") + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.prodns.eu") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("ns5.prodns.de") + expect(subject.nameservers[4].ipv4).to eq("65.18.172.184") + expect(subject.nameservers[4].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.denic.de/de/response_error_55000000010_spec.rb b/spec/whois/parsers/responses/whois.denic.de/de/response_error_55000000010_spec.rb index 9918d931..6462855e 100644 --- a/spec/whois/parsers/responses/whois.denic.de/de/response_error_55000000010_spec.rb +++ b/spec/whois/parsers/responses/whois.denic.de/de/response_error_55000000010_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.denic.de.rb' -describe Whois::Parsers::WhoisDenicDe, "response_error_55000000010.expected" do +describe "whois.denic.de", :aggregate_failures do subject do file = fixture("responses", "whois.denic.de/de/response_error_55000000010.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.denic.de") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:invalid) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches response_error_55000000010.expected" do + expect(subject.status).to eq(:invalid) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.denic.de/de/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.denic.de/de/response_throttled_spec.rb index 1410fbfd..0b206e0e 100644 --- a/spec/whois/parsers/responses/whois.denic.de/de/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/whois.denic.de/de/response_throttled_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.denic.de.rb' -describe Whois::Parsers::WhoisDenicDe, "response_throttled.expected" do +describe "whois.denic.de", :aggregate_failures do subject do file = fixture("responses", "whois.denic.de/de/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.denic.de") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.denic.de/de/status_available_spec.rb b/spec/whois/parsers/responses/whois.denic.de/de/status_available_spec.rb index baaa4389..b866e41a 100644 --- a/spec/whois/parsers/responses/whois.denic.de/de/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.denic.de/de/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.denic.de.rb' -describe Whois::Parsers::WhoisDenicDe, "status_available.expected" do +describe "whois.denic.de", :aggregate_failures do subject do file = fixture("responses", "whois.denic.de/de/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.denic.de") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.de") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq("u34jedzcq.de") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.denic.de/de/status_failed_ace_spec.rb b/spec/whois/parsers/responses/whois.denic.de/de/status_failed_ace_spec.rb index b297042d..2383bad9 100644 --- a/spec/whois/parsers/responses/whois.denic.de/de/status_failed_ace_spec.rb +++ b/spec/whois/parsers/responses/whois.denic.de/de/status_failed_ace_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.denic.de.rb' -describe Whois::Parsers::WhoisDenicDe, "status_failed_ace.expected" do +describe "whois.denic.de", :aggregate_failures do subject do file = fixture("responses", "whois.denic.de/de/status_failed_ace.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.denic.de") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end + it "matches status_failed_ace.expected" do + expect(subject.status).to eq(:registered) + expect(subject.registered?).to eq(true) + expect(subject.available?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.denic.de/de/status_failed_spec.rb b/spec/whois/parsers/responses/whois.denic.de/de/status_failed_spec.rb index 2ee190a2..e413da75 100644 --- a/spec/whois/parsers/responses/whois.denic.de/de/status_failed_spec.rb +++ b/spec/whois/parsers/responses/whois.denic.de/de/status_failed_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.denic.de.rb' -describe Whois::Parsers::WhoisDenicDe, "status_failed.expected" do +describe "whois.denic.de", :aggregate_failures do subject do file = fixture("responses", "whois.denic.de/de/status_failed.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.denic.de") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end + it "matches status_failed.expected" do + expect(subject.status).to eq(:registered) + expect(subject.registered?).to eq(true) + expect(subject.available?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.denic.de/de/status_invalid_spec.rb b/spec/whois/parsers/responses/whois.denic.de/de/status_invalid_spec.rb index a7d736ad..8f37715c 100644 --- a/spec/whois/parsers/responses/whois.denic.de/de/status_invalid_spec.rb +++ b/spec/whois/parsers/responses/whois.denic.de/de/status_invalid_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.denic.de.rb' -describe Whois::Parsers::WhoisDenicDe, "status_invalid.expected" do +describe "whois.denic.de", :aggregate_failures do subject do file = fixture("responses", "whois.denic.de/de/status_invalid.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.denic.de") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("googlededewdedewdewde.foo.de") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:invalid) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_invalid.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq("googlededewdedewdewde.foo.de") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:invalid) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.denic.de/de/status_registered_spec.rb b/spec/whois/parsers/responses/whois.denic.de/de/status_registered_spec.rb index 5030a633..907a7d4c 100644 --- a/spec/whois/parsers/responses/whois.denic.de/de/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.denic.de/de/status_registered_spec.rb @@ -9,119 +9,59 @@ # require 'spec_helper' -require 'whois/parsers/whois.denic.de.rb' -describe Whois::Parsers::WhoisDenicDe, "status_registered.expected" do +describe "whois.denic.de", :aggregate_failures do subject do file = fixture("responses", "whois.denic.de/de/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.denic.de") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("The data in this record is provided by DENIC for informational purposes only. DENIC does not guarantee its accuracy and cannot, under any circumstances, be held liable in case the stored information would prove to be wrong, incomplete or not accurate in any sense. All the domain data that is visible in the whois service is protected by law. It is not permitted to use it for any purpose other than technical or administrative requirements associated with the operation of the Internet. It is explicitly forbidden to extract, copy and/or use or re-utilise in any form and by any means (electronically or not) the whole or a quantitatively or qualitatively substantial part of the contents of the whois database without prior and explicit written permission by DENIC. It is prohibited, in particular, to use it for transmission of unsolicited and/or commercial and/or advertising by phone, fax, e-mail or for any similar purposes. By maintaining the connection you assure that you have a legitimate interest in the data and that you will only use it for the stated purposes. You are aware that DENIC maintains the right to initiate legal proceedings against you in the event of any breach of this assurance and to bar you from using its whois service. The DENIC whois service on port 43 never discloses any information concerning the domain holder/administrative contact. Information concerning the domain holder/administrative contact can be obtained through use of our web-based whois service available at the DENIC website: http://www.denic.de/en/domains/whois-service/web-whois.html") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.de") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2011-03-30 19:36:27 +0200")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("Domain Admin") - expect(subject.registrar.organization).to eq("MarkMonitor Inc") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") - expect(subject.technical_contacts[0].fax).to eq("+1.6506188571") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("The data in this record is provided by DENIC for informational purposes only. DENIC does not guarantee its accuracy and cannot, under any circumstances, be held liable in case the stored information would prove to be wrong, incomplete or not accurate in any sense. All the domain data that is visible in the whois service is protected by law. It is not permitted to use it for any purpose other than technical or administrative requirements associated with the operation of the Internet. It is explicitly forbidden to extract, copy and/or use or re-utilise in any form and by any means (electronically or not) the whole or a quantitatively or qualitatively substantial part of the contents of the whois database without prior and explicit written permission by DENIC. It is prohibited, in particular, to use it for transmission of unsolicited and/or commercial and/or advertising by phone, fax, e-mail or for any similar purposes. By maintaining the connection you assure that you have a legitimate interest in the data and that you will only use it for the stated purposes. You are aware that DENIC maintains the right to initiate legal proceedings against you in the event of any breach of this assurance and to bar you from using its whois service. The DENIC whois service on port 43 never discloses any information concerning the domain holder/administrative contact. Information concerning the domain holder/administrative contact can be obtained through use of our web-based whois service available at the DENIC website: http://www.denic.de/en/domains/whois-service/web-whois.html") + expect(subject.domain).to eq("google.de") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2011-03-30 19:36:27 +0200")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("Domain Admin") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("DNS Admin") + expect(subject.technical_contacts[0].organization).to eq("Google Inc.") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") + expect(subject.technical_contacts[0].fax).to eq("+1.6506188571") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.response_throttled?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/property_status_deactivated_spec.rb b/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/property_status_deactivated_spec.rb index b3e726e8..81551654 100644 --- a/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/property_status_deactivated_spec.rb +++ b/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/property_status_deactivated_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.dk-hostmaster.dk.rb' -describe Whois::Parsers::WhoisDkHostmasterDk, "property_status_deactivated.expected" do +describe "whois.dk-hostmaster.dk", :aggregate_failures do subject do file = fixture("responses", "whois.dk-hostmaster.dk/dk/property_status_deactivated.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dk-hostmaster.dk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:expired) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_deactivated.expected" do + expect(subject.status).to eq(:expired) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/property_status_reserved_spec.rb b/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/property_status_reserved_spec.rb index 1bf56943..b837254a 100644 --- a/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/property_status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/property_status_reserved_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.dk-hostmaster.dk.rb' -describe Whois::Parsers::WhoisDkHostmasterDk, "property_status_reserved.expected" do +describe "whois.dk-hostmaster.dk", :aggregate_failures do subject do file = fixture("responses", "whois.dk-hostmaster.dk/dk/property_status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dk-hostmaster.dk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_reserved.expected" do + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/status_available_spec.rb b/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/status_available_spec.rb index 42dffec9..9f2c4ddb 100644 --- a/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/status_available_spec.rb @@ -9,55 +9,24 @@ # require 'spec_helper' -require 'whois/parsers/whois.dk-hostmaster.dk.rb' -describe Whois::Parsers::WhoisDkHostmasterDk, "status_available.expected" do +describe "whois.dk-hostmaster.dk", :aggregate_failures do subject do file = fixture("responses", "whois.dk-hostmaster.dk/dk/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dk-hostmaster.dk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.response_throttled?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/status_registered_spec.rb index 7c10b8fa..115b8c4f 100644 --- a/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dk-hostmaster.dk/dk/status_registered_spec.rb @@ -9,65 +9,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.dk-hostmaster.dk.rb' -describe Whois::Parsers::WhoisDkHostmasterDk, "status_registered.expected" do +describe "whois.dk-hostmaster.dk", :aggregate_failures do subject do file = fixture("responses", "whois.dk-hostmaster.dk/dk/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dk-hostmaster.dk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1999-01-10")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2010-03-31")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1999-01-10")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2010-03-31")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.response_throttled?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.dns.be/be/property_nameservers_with_ip_spec.rb b/spec/whois/parsers/responses/whois.dns.be/be/property_nameservers_with_ip_spec.rb index d72fee7c..26dae7c5 100644 --- a/spec/whois/parsers/responses/whois.dns.be/be/property_nameservers_with_ip_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.be/be/property_nameservers_with_ip_spec.rb @@ -9,29 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.be.rb' -describe Whois::Parsers::WhoisDnsBe, "property_nameservers_with_ip.expected" do +describe "whois.dns.be", :aggregate_failures do subject do file = fixture("responses", "whois.dns.be/be/property_nameservers_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.be") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns3.register.be") - expect(subject.nameservers[0].ipv4).to eq("91.121.5.186") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.register.be") - expect(subject.nameservers[1].ipv4).to eq("80.169.63.207") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.register.be") - expect(subject.nameservers[2].ipv4).to eq("217.21.176.34") - end + it "matches property_nameservers_with_ip.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns3.register.be") + expect(subject.nameservers[0].ipv4).to eq("91.121.5.186") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.register.be") + expect(subject.nameservers[1].ipv4).to eq("80.169.63.207") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns2.register.be") + expect(subject.nameservers[2].ipv4).to eq("217.21.176.34") end end diff --git a/spec/whois/parsers/responses/whois.dns.be/be/property_status_available_spec.rb b/spec/whois/parsers/responses/whois.dns.be/be/property_status_available_spec.rb index 50184e94..4819507a 100644 --- a/spec/whois/parsers/responses/whois.dns.be/be/property_status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.be/be/property_status_available_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.be.rb' -describe Whois::Parsers::WhoisDnsBe, "property_status_available.expected" do +describe "whois.dns.be", :aggregate_failures do subject do file = fixture("responses", "whois.dns.be/be/property_status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.be") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches property_status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.dns.be/be/property_status_not_available_spec.rb b/spec/whois/parsers/responses/whois.dns.be/be/property_status_not_available_spec.rb index 7a7f859f..e0101508 100644 --- a/spec/whois/parsers/responses/whois.dns.be/be/property_status_not_available_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.be/be/property_status_not_available_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.be.rb' -describe Whois::Parsers::WhoisDnsBe, "property_status_not_available.expected" do +describe "whois.dns.be", :aggregate_failures do subject do file = fixture("responses", "whois.dns.be/be/property_status_not_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.be") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_not_available.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.dns.be/be/property_status_notallowed_spec.rb b/spec/whois/parsers/responses/whois.dns.be/be/property_status_notallowed_spec.rb index cc99c79e..5899fb77 100644 --- a/spec/whois/parsers/responses/whois.dns.be/be/property_status_notallowed_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.be/be/property_status_notallowed_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.be.rb' -describe Whois::Parsers::WhoisDnsBe, "property_status_notallowed.expected" do +describe "whois.dns.be", :aggregate_failures do subject do file = fixture("responses", "whois.dns.be/be/property_status_notallowed.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.be") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:invalid) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches property_status_notallowed.expected" do + expect(subject.status).to eq(:invalid) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.dns.be/be/property_status_outofservice_spec.rb b/spec/whois/parsers/responses/whois.dns.be/be/property_status_outofservice_spec.rb index 93324b58..563e00f5 100644 --- a/spec/whois/parsers/responses/whois.dns.be/be/property_status_outofservice_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.be/be/property_status_outofservice_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.be.rb' -describe Whois::Parsers::WhoisDnsBe, "property_status_outofservice.expected" do +describe "whois.dns.be", :aggregate_failures do subject do file = fixture("responses", "whois.dns.be/be/property_status_outofservice.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.be") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:redemption) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_outofservice.expected" do + expect(subject.status).to eq(:redemption) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.dns.be/be/property_status_quarantine_spec.rb b/spec/whois/parsers/responses/whois.dns.be/be/property_status_quarantine_spec.rb index e45f6b37..5e96fe16 100644 --- a/spec/whois/parsers/responses/whois.dns.be/be/property_status_quarantine_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.be/be/property_status_quarantine_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.be.rb' -describe Whois::Parsers::WhoisDnsBe, "property_status_quarantine.expected" do +describe "whois.dns.be", :aggregate_failures do subject do file = fixture("responses", "whois.dns.be/be/property_status_quarantine.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.be") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:redemption) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_quarantine.expected" do + expect(subject.status).to eq(:redemption) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.dns.be/be/response_blocked_spec.rb b/spec/whois/parsers/responses/whois.dns.be/be/response_blocked_spec.rb index b005664a..e814aa6a 100644 --- a/spec/whois/parsers/responses/whois.dns.be/be/response_blocked_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.be/be/response_blocked_spec.rb @@ -9,24 +9,17 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.be.rb' -describe Whois::Parsers::WhoisDnsBe, "response_blocked.expected" do +describe "whois.dns.be", :aggregate_failures do subject do file = fixture("responses", "whois.dns.be/be/response_blocked.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.be") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end - end - describe "#response_blocked?" do - it do - expect(subject.response_blocked?).to eq(true) - end + it "matches response_blocked.expected" do + expect(subject.response_throttled?).to eq(true) + expect(subject.response_blocked?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.dns.be/be/response_throttled_hourly_spec.rb b/spec/whois/parsers/responses/whois.dns.be/be/response_throttled_hourly_spec.rb index 4d80dd5a..52049a26 100644 --- a/spec/whois/parsers/responses/whois.dns.be/be/response_throttled_hourly_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.be/be/response_throttled_hourly_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.be.rb' -describe Whois::Parsers::WhoisDnsBe, "response_throttled_hourly.expected" do +describe "whois.dns.be", :aggregate_failures do subject do file = fixture("responses", "whois.dns.be/be/response_throttled_hourly.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.be") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled_hourly.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.dns.be/be/response_throttled_limit_spec.rb b/spec/whois/parsers/responses/whois.dns.be/be/response_throttled_limit_spec.rb index 034699f2..8482a529 100644 --- a/spec/whois/parsers/responses/whois.dns.be/be/response_throttled_limit_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.be/be/response_throttled_limit_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.be.rb' -describe Whois::Parsers::WhoisDnsBe, "response_throttled_limit.expected" do +describe "whois.dns.be", :aggregate_failures do subject do file = fixture("responses", "whois.dns.be/be/response_throttled_limit.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.be") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled_limit.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.dns.be/be/status_available_spec.rb b/spec/whois/parsers/responses/whois.dns.be/be/status_available_spec.rb index c897edc2..4e79efb7 100644 --- a/spec/whois/parsers/responses/whois.dns.be/be/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.be/be/status_available_spec.rb @@ -9,70 +9,27 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.be.rb' -describe Whois::Parsers::WhoisDnsBe, "status_available.expected" do +describe "whois.dns.be", :aggregate_failures do subject do file = fixture("responses", "whois.dns.be/be/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.be") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.be") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end - end - describe "#invalid?" do - it do - expect(subject.invalid?).to eq(false) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.be") + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.response_throttled?).to eq(false) + expect(subject.invalid?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.dns.be/be/status_invalid_spec.rb b/spec/whois/parsers/responses/whois.dns.be/be/status_invalid_spec.rb index f9deede4..daad90df 100644 --- a/spec/whois/parsers/responses/whois.dns.be/be/status_invalid_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.be/be/status_invalid_spec.rb @@ -9,70 +9,27 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.be.rb' -describe Whois::Parsers::WhoisDnsBe, "status_invalid.expected" do +describe "whois.dns.be", :aggregate_failures do subject do file = fixture("responses", "whois.dns.be/be/status_invalid.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.be") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("www.kimdemolenaer.be") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:invalid) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end - end - describe "#invalid?" do - it do - expect(subject.invalid?).to eq(true) - end + it "matches status_invalid.expected" do + expect(subject.domain).to eq("www.kimdemolenaer.be") + expect(subject.status).to eq(:invalid) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.response_throttled?).to eq(false) + expect(subject.invalid?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.dns.be/be/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dns.be/be/status_registered_spec.rb index ca37adf1..0acf56a7 100644 --- a/spec/whois/parsers/responses/whois.dns.be/be/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.be/be/status_registered_spec.rb @@ -9,82 +9,39 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.be.rb' -describe Whois::Parsers::WhoisDnsBe, "status_registered.expected" do +describe "whois.dns.be", :aggregate_failures do subject do file = fixture("responses", "whois.dns.be/be/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.be") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.be") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2000-12-12 00:00:00")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns4.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns3.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns1.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns2.google.com") - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end - end - describe "#invalid?" do - it do - expect(subject.invalid?).to eq(false) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.be") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2000-12-12 00:00:00")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns4.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns3.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns1.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns2.google.com") + expect(subject.response_throttled?).to eq(false) + expect(subject.invalid?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.dns.hr/hr/status_available_spec.rb b/spec/whois/parsers/responses/whois.dns.hr/hr/status_available_spec.rb index 36b04c0c..3dcded0f 100644 --- a/spec/whois/parsers/responses/whois.dns.hr/hr/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.hr/hr/status_available_spec.rb @@ -9,85 +9,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.hr.rb' -describe Whois::Parsers::WhoisDnsHr, "status_available.expected" do +describe "whois.dns.hr", :aggregate_failures do subject do file = fixture("responses", "whois.dns.hr/hr/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.hr") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.dns.hr/hr/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dns.hr/hr/status_registered_spec.rb index 85336e10..580d5d5b 100644 --- a/spec/whois/parsers/responses/whois.dns.hr/hr/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.hr/hr/status_registered_spec.rb @@ -9,100 +9,45 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.hr.rb' -describe Whois::Parsers::WhoisDnsHr, "status_registered.expected" do +describe "whois.dns.hr", :aggregate_failures do subject do file = fixture("responses", "whois.dns.hr/hr/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.hr") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.hr") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-09-21")) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Google Hrvatska d.o.o.") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("Ulica Petra Hektorovića 2") - expect(subject.registrant_contacts[0].city).to eq("Zagreb") - expect(subject.registrant_contacts[0].zip).to eq("10 000") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("google.hr") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-09-21")) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Google Hrvatska d.o.o.") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("Ulica Petra Hektorovića 2") + expect(subject.registrant_contacts[0].city).to eq("Zagreb") + expect(subject.registrant_contacts[0].zip).to eq("10 000") + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.dns.lu/lu/property_nameservers_with_ip_spec.rb b/spec/whois/parsers/responses/whois.dns.lu/lu/property_nameservers_with_ip_spec.rb index 673945b2..04e9f375 100644 --- a/spec/whois/parsers/responses/whois.dns.lu/lu/property_nameservers_with_ip_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.lu/lu/property_nameservers_with_ip_spec.rb @@ -9,29 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.lu.rb' -describe Whois::Parsers::WhoisDnsLu, "property_nameservers_with_ip.expected" do +describe "whois.dns.lu", :aggregate_failures do subject do file = fixture("responses", "whois.dns.lu/lu/property_nameservers_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.lu") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.arbed.lu") - expect(subject.nameservers[0].ipv4).to eq("194.154.218.10") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.pt.lu") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.arbed.lu") - expect(subject.nameservers[2].ipv4).to eq("194.154.218.12") - end + it "matches property_nameservers_with_ip.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.arbed.lu") + expect(subject.nameservers[0].ipv4).to eq("194.154.218.10") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.pt.lu") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns2.arbed.lu") + expect(subject.nameservers[2].ipv4).to eq("194.154.218.12") end end diff --git a/spec/whois/parsers/responses/whois.dns.lu/lu/status_available_spec.rb b/spec/whois/parsers/responses/whois.dns.lu/lu/status_available_spec.rb index c5a1ad9e..ddb2b008 100644 --- a/spec/whois/parsers/responses/whois.dns.lu/lu/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.lu/lu/status_available_spec.rb @@ -9,73 +9,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.lu.rb' -describe Whois::Parsers::WhoisDnsLu, "status_available.expected" do +describe "whois.dns.lu", :aggregate_failures do subject do file = fixture("responses", "whois.dns.lu/lu/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.lu") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.dns.lu/lu/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dns.lu/lu/status_registered_spec.rb index 95f1dc86..dfb7c636 100644 --- a/spec/whois/parsers/responses/whois.dns.lu/lu/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.lu/lu/status_registered_spec.rb @@ -9,107 +9,64 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.lu.rb' -describe Whois::Parsers::WhoisDnsLu, "status_registered.expected" do +describe "whois.dns.lu", :aggregate_failures do subject do file = fixture("responses", "whois.dns.lu/lu/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.lu") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-06-04 00:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.name).to eq("Markmonitor") - expect(subject.registrar.url).to eq("http://www.markmonitor.com/") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].name).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].country_code).to eq("US") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].address).to eq("Google Inc., 1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].address).to eq("Google Inc., 1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-06-04 00:00:00 UTC")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.name).to eq("Markmonitor") + expect(subject.registrar.url).to eq("http://www.markmonitor.com/") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].name).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].name).to eq("DNS Admin") + expect(subject.admin_contacts[0].address).to eq("Google Inc., 1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].name).to eq("DNS Admin") + expect(subject.technical_contacts[0].address).to eq("Google Inc., 1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.dns.pl/pl/property_expires_on_not_defined_spec.rb b/spec/whois/parsers/responses/whois.dns.pl/pl/property_expires_on_not_defined_spec.rb index b9d0571a..e9d93825 100644 --- a/spec/whois/parsers/responses/whois.dns.pl/pl/property_expires_on_not_defined_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.pl/pl/property_expires_on_not_defined_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.pl.rb' -describe Whois::Parsers::WhoisDnsPl, "property_expires_on_not_defined.expected" do +describe "whois.dns.pl", :aggregate_failures do subject do file = fixture("responses", "whois.dns.pl/pl/property_expires_on_not_defined.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.pl") + Whois::Parser.parser_for(part) end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end + it "matches property_expires_on_not_defined.expected" do + expect(subject.expires_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.dns.pl/pl/property_nameservers_with_ip_spec.rb b/spec/whois/parsers/responses/whois.dns.pl/pl/property_nameservers_with_ip_spec.rb index 846bb55d..4f28bdf7 100644 --- a/spec/whois/parsers/responses/whois.dns.pl/pl/property_nameservers_with_ip_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.pl/pl/property_nameservers_with_ip_spec.rb @@ -9,26 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.pl.rb' -describe Whois::Parsers::WhoisDnsPl, "property_nameservers_with_ip.expected" do +describe "whois.dns.pl", :aggregate_failures do subject do file = fixture("responses", "whois.dns.pl/pl/property_nameservers_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.pl") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("dns1.pentex.pl") - expect(subject.nameservers[0].ipv4).to eq("188.165.232.46") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("dns2.pentex.pl") - expect(subject.nameservers[1].ipv4).to eq("83.142.46.21") - end + it "matches property_nameservers_with_ip.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("dns1.pentex.pl") + expect(subject.nameservers[0].ipv4).to eq("188.165.232.46") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("dns2.pentex.pl") + expect(subject.nameservers[1].ipv4).to eq("83.142.46.21") end end diff --git a/spec/whois/parsers/responses/whois.dns.pl/pl/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.dns.pl/pl/response_throttled_spec.rb index 2790aa6f..3f16c573 100644 --- a/spec/whois/parsers/responses/whois.dns.pl/pl/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.pl/pl/response_throttled_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.pl.rb' -describe Whois::Parsers::WhoisDnsPl, "response_throttled.expected" do +describe "whois.dns.pl", :aggregate_failures do subject do file = fixture("responses", "whois.dns.pl/pl/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.pl") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.dns.pl/pl/status_available_spec.rb b/spec/whois/parsers/responses/whois.dns.pl/pl/status_available_spec.rb index ab9c6730..ca27e183 100644 --- a/spec/whois/parsers/responses/whois.dns.pl/pl/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.pl/pl/status_available_spec.rb @@ -9,81 +9,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.pl.rb' -describe Whois::Parsers::WhoisDnsPl, "status_available.expected" do +describe "whois.dns.pl", :aggregate_failures do subject do file = fixture("responses", "whois.dns.pl/pl/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.pl") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.dns.pl/pl/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dns.pl/pl/status_registered_spec.rb index d89d049f..9ef10550 100644 --- a/spec/whois/parsers/responses/whois.dns.pl/pl/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.pl/pl/status_registered_spec.rb @@ -9,111 +9,55 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.pl.rb' -describe Whois::Parsers::WhoisDnsPl, "status_registered.expected" do +describe "whois.dns.pl", :aggregate_failures do subject do file = fixture("responses", "whois.dns.pl/pl/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.pl") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.pl") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2002-09-19 13:00:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-08-17 11:21:09")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2013-09-18 14:00:00")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("Markmonitor, Inc.") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("ks_5271013") - expect(subject.technical_contacts[0].name).to eq(nil) - expect(subject.technical_contacts[0].organization).to eq("DNS Admin\nGoogle Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6503300100") - expect(subject.technical_contacts[0].fax).to eq("+1.6506188571") - expect(subject.technical_contacts[0].email).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.google.com") - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.pl") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-09-19 13:00:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-08-17 11:21:09")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2013-09-18 14:00:00")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("Markmonitor, Inc.") + expect(subject.registrar.url).to eq(nil) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("ks_5271013") + expect(subject.technical_contacts[0].name).to eq(nil) + expect(subject.technical_contacts[0].organization).to eq("DNS Admin\nGoogle Inc.") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.6503300100") + expect(subject.technical_contacts[0].fax).to eq("+1.6506188571") + expect(subject.technical_contacts[0].email).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.google.com") + expect(subject.response_throttled?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.dns.pt/pt/property_nameservers_spec.rb b/spec/whois/parsers/responses/whois.dns.pt/pt/property_nameservers_spec.rb deleted file mode 100644 index 34172f40..00000000 --- a/spec/whois/parsers/responses/whois.dns.pt/pt/property_nameservers_spec.rb +++ /dev/null @@ -1,36 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.dns.pt/pt/property_nameservers.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.dns.pt.rb' - -describe Whois::Parsers::WhoisDnsPt, "property_nameservers.expected" do - - subject do - file = fixture("responses", "whois.dns.pt/pt/property_nameservers.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns4.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns1.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.google.com") - end - end -end diff --git a/spec/whois/parsers/responses/whois.dns.pt/pt/property_status_techpro_spec.rb b/spec/whois/parsers/responses/whois.dns.pt/pt/property_status_techpro_spec.rb deleted file mode 100644 index 1918930a..00000000 --- a/spec/whois/parsers/responses/whois.dns.pt/pt/property_status_techpro_spec.rb +++ /dev/null @@ -1,37 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.dns.pt/pt/property_status_techpro.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.dns.pt.rb' - -describe Whois::Parsers::WhoisDnsPt, "property_status_techpro.expected" do - - subject do - file = fixture("responses", "whois.dns.pt/pt/property_status_techpro.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(:inactive) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end -end diff --git a/spec/whois/parsers/responses/whois.dns.pt/pt/status_available_spec.rb b/spec/whois/parsers/responses/whois.dns.pt/pt/status_available_spec.rb index 4ef43855..300dbe50 100644 --- a/spec/whois/parsers/responses/whois.dns.pt/pt/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.pt/pt/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.pt.rb' -describe Whois::Parsers::WhoisDnsPt, "status_available.expected" do +describe "whois.dns.pt", :aggregate_failures do subject do file = fixture("responses", "whois.dns.pt/pt/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.pt") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.dns.pt/pt/status_inactive_spec.rb b/spec/whois/parsers/responses/whois.dns.pt/pt/status_inactive_spec.rb deleted file mode 100644 index 69dda557..00000000 --- a/spec/whois/parsers/responses/whois.dns.pt/pt/status_inactive_spec.rb +++ /dev/null @@ -1,60 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.dns.pt/pt/status_inactive.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.dns.pt.rb' - -describe Whois::Parsers::WhoisDnsPt, "status_inactive.expected" do - - subject do - file = fixture("responses", "whois.dns.pt/pt/status_inactive.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(:inactive) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2009-02-09 00:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-03-01 00:00:00 UTC")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(0) - end - end -end diff --git a/spec/whois/parsers/responses/whois.dns.pt/pt/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dns.pt/pt/status_registered_spec.rb index 5a5d50a8..e6a2f996 100644 --- a/spec/whois/parsers/responses/whois.dns.pt/pt/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.pt/pt/status_registered_spec.rb @@ -9,60 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.pt.rb' -describe Whois::Parsers::WhoisDnsPt, "status_registered.expected" do +describe "whois.dns.pt", :aggregate_failures do subject do file = fixture("responses", "whois.dns.pt/pt/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.pt") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-01-09 00:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-02-28 00:00:00 UTC")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns4.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns1.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-01-09 00:00:00 UTC")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2023-02-28 23:59:00 UTC")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns3.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns4.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns1.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.dns.pt/pt/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.dns.pt/pt/status_reserved_spec.rb index a83df2d4..d7327ef3 100644 --- a/spec/whois/parsers/responses/whois.dns.pt/pt/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.dns.pt/pt/status_reserved_spec.rb @@ -9,51 +9,25 @@ # require 'spec_helper' -require 'whois/parsers/whois.dns.pt.rb' -describe Whois::Parsers::WhoisDnsPt, "status_reserved.expected" do +describe "whois.dns.pt", :aggregate_failures do subject do file = fixture("responses", "whois.dns.pt/pt/status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dns.pt") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2009-02-09 00:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_reserved.expected" do + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2015-05-07 23:40:09 UTC")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2026-05-06 23:59:09 UTC")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.domain-registry.nl/nl/property_nameservers_with_ip_spec.rb b/spec/whois/parsers/responses/whois.domain-registry.nl/nl/property_nameservers_with_ip_spec.rb index efc7e3d2..b580fe6d 100644 --- a/spec/whois/parsers/responses/whois.domain-registry.nl/nl/property_nameservers_with_ip_spec.rb +++ b/spec/whois/parsers/responses/whois.domain-registry.nl/nl/property_nameservers_with_ip_spec.rb @@ -9,26 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.domain-registry.nl.rb' -describe Whois::Parsers::WhoisDomainRegistryNl, "property_nameservers_with_ip.expected" do +describe "whois.domain-registry.nl", :aggregate_failures do subject do file = fixture("responses", "whois.domain-registry.nl/nl/property_nameservers_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.domain-registry.nl") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.tntpost.nl") - expect(subject.nameservers[0].ipv4).to eq("145.78.21.10") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.tntpost.nl") - expect(subject.nameservers[1].ipv4).to eq("80.69.76.10") - end + it "matches property_nameservers_with_ip.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.tntpost.nl") + expect(subject.nameservers[0].ipv4).to eq("145.78.21.10") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.tntpost.nl") + expect(subject.nameservers[1].ipv4).to eq("80.69.76.10") end end diff --git a/spec/whois/parsers/responses/whois.domain-registry.nl/nl/property_status_inactive_spec.rb b/spec/whois/parsers/responses/whois.domain-registry.nl/nl/property_status_inactive_spec.rb index 1caa56de..b9b83124 100644 --- a/spec/whois/parsers/responses/whois.domain-registry.nl/nl/property_status_inactive_spec.rb +++ b/spec/whois/parsers/responses/whois.domain-registry.nl/nl/property_status_inactive_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.domain-registry.nl.rb' -describe Whois::Parsers::WhoisDomainRegistryNl, "property_status_inactive.expected" do +describe "whois.domain-registry.nl", :aggregate_failures do subject do file = fixture("responses", "whois.domain-registry.nl/nl/property_status_inactive.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.domain-registry.nl") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:inactive) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_inactive.expected" do + expect(subject.status).to eq(:inactive) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.domain-registry.nl/nl/response_throttled_daily_spec.rb b/spec/whois/parsers/responses/whois.domain-registry.nl/nl/response_throttled_daily_spec.rb index c7dd7e7c..ff48e4ae 100644 --- a/spec/whois/parsers/responses/whois.domain-registry.nl/nl/response_throttled_daily_spec.rb +++ b/spec/whois/parsers/responses/whois.domain-registry.nl/nl/response_throttled_daily_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.domain-registry.nl.rb' -describe Whois::Parsers::WhoisDomainRegistryNl, "response_throttled_daily.expected" do +describe "whois.domain-registry.nl", :aggregate_failures do subject do file = fixture("responses", "whois.domain-registry.nl/nl/response_throttled_daily.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.domain-registry.nl") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled_daily.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.domain-registry.nl/nl/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.domain-registry.nl/nl/response_throttled_spec.rb index 3d059d3b..107286d8 100644 --- a/spec/whois/parsers/responses/whois.domain-registry.nl/nl/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/whois.domain-registry.nl/nl/response_throttled_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.domain-registry.nl.rb' -describe Whois::Parsers::WhoisDomainRegistryNl, "response_throttled.expected" do +describe "whois.domain-registry.nl", :aggregate_failures do subject do file = fixture("responses", "whois.domain-registry.nl/nl/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.domain-registry.nl") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.domain-registry.nl/nl/response_unavailable_spec.rb b/spec/whois/parsers/responses/whois.domain-registry.nl/nl/response_unavailable_spec.rb index 3b0ba208..d2acc7b6 100644 --- a/spec/whois/parsers/responses/whois.domain-registry.nl/nl/response_unavailable_spec.rb +++ b/spec/whois/parsers/responses/whois.domain-registry.nl/nl/response_unavailable_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.domain-registry.nl.rb' -describe Whois::Parsers::WhoisDomainRegistryNl, "response_unavailable.expected" do +describe "whois.domain-registry.nl", :aggregate_failures do subject do file = fixture("responses", "whois.domain-registry.nl/nl/response_unavailable.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.domain-registry.nl") + Whois::Parser.parser_for(part) end - describe "#response_unavailable?" do - it do - expect(subject.response_unavailable?).to eq(true) - end + it "matches response_unavailable.expected" do + expect(subject.response_unavailable?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.domain-registry.nl/nl/status_available_spec.rb b/spec/whois/parsers/responses/whois.domain-registry.nl/nl/status_available_spec.rb index 480028cc..57b100e9 100644 --- a/spec/whois/parsers/responses/whois.domain-registry.nl/nl/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.domain-registry.nl/nl/status_available_spec.rb @@ -9,60 +9,25 @@ # require 'spec_helper' -require 'whois/parsers/whois.domain-registry.nl.rb' -describe Whois::Parsers::WhoisDomainRegistryNl, "status_available.expected" do +describe "whois.domain-registry.nl", :aggregate_failures do subject do file = fixture("responses", "whois.domain-registry.nl/nl/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.domain-registry.nl") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end - end - describe "#response_unavailable?" do - it do - expect(subject.response_unavailable?).to eq(false) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.response_throttled?).to eq(false) + expect(subject.response_unavailable?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.domain-registry.nl/nl/status_redemption_spec.rb b/spec/whois/parsers/responses/whois.domain-registry.nl/nl/status_redemption_spec.rb index dbdb02bb..fa8869b3 100644 --- a/spec/whois/parsers/responses/whois.domain-registry.nl/nl/status_redemption_spec.rb +++ b/spec/whois/parsers/responses/whois.domain-registry.nl/nl/status_redemption_spec.rb @@ -9,60 +9,25 @@ # require 'spec_helper' -require 'whois/parsers/whois.domain-registry.nl.rb' -describe Whois::Parsers::WhoisDomainRegistryNl, "status_redemption.expected" do +describe "whois.domain-registry.nl", :aggregate_failures do subject do file = fixture("responses", "whois.domain-registry.nl/nl/status_redemption.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.domain-registry.nl") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:redemption) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end - end - describe "#response_unavailable?" do - it do - expect(subject.response_unavailable?).to eq(false) - end + it "matches status_redemption.expected" do + expect(subject.status).to eq(:redemption) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.response_throttled?).to eq(false) + expect(subject.response_unavailable?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.domain-registry.nl/nl/status_registered_spec.rb b/spec/whois/parsers/responses/whois.domain-registry.nl/nl/status_registered_spec.rb index 0c4f424b..b0639c64 100644 --- a/spec/whois/parsers/responses/whois.domain-registry.nl/nl/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.domain-registry.nl/nl/status_registered_spec.rb @@ -9,70 +9,35 @@ # require 'spec_helper' -require 'whois/parsers/whois.domain-registry.nl.rb' -describe Whois::Parsers::WhoisDomainRegistryNl, "status_registered.expected" do +describe "whois.domain-registry.nl", :aggregate_failures do subject do file = fixture("responses", "whois.domain-registry.nl/nl/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.domain-registry.nl") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1999-05-27")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2009-02-11")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end - end - describe "#response_unavailable?" do - it do - expect(subject.response_unavailable?).to eq(false) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1999-05-27")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2009-02-11")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.response_throttled?).to eq(false) + expect(subject.response_unavailable?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.domainregistry.ie/ie/case_token_application_pending_spec.rb b/spec/whois/parsers/responses/whois.domainregistry.ie/ie/case_token_application_pending_spec.rb index 7dabf472..5c9fb936 100644 --- a/spec/whois/parsers/responses/whois.domainregistry.ie/ie/case_token_application_pending_spec.rb +++ b/spec/whois/parsers/responses/whois.domainregistry.ie/ie/case_token_application_pending_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.domainregistry.ie.rb' -describe Whois::Parsers::WhoisDomainregistryIe, "case_token_application_pending.expected" do +describe "whois.domainregistry.ie", :aggregate_failures do subject do file = fixture("responses", "whois.domainregistry.ie/ie/case_token_application_pending.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.domainregistry.ie") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end + it "matches case_token_application_pending.expected" do + expect(subject.status).to eq(:registered) end end diff --git a/spec/whois/parsers/responses/whois.domainregistry.ie/ie/property_contacts_multiple_spec.rb b/spec/whois/parsers/responses/whois.domainregistry.ie/ie/property_contacts_multiple_spec.rb index d05b207c..1646bf1b 100644 --- a/spec/whois/parsers/responses/whois.domainregistry.ie/ie/property_contacts_multiple_spec.rb +++ b/spec/whois/parsers/responses/whois.domainregistry.ie/ie/property_contacts_multiple_spec.rb @@ -9,38 +9,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.domainregistry.ie.rb' -describe Whois::Parsers::WhoisDomainregistryIe, "property_contacts_multiple.expected" do +describe "whois.domainregistry.ie", :aggregate_failures do subject do file = fixture("responses", "whois.domainregistry.ie/ie/property_contacts_multiple.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.domainregistry.ie") + Whois::Parser.parser_for(part) end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(2) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("JL241-IEDR") - expect(subject.admin_contacts[0].name).to eq("Jonathan Lundberg") - expect(subject.admin_contacts[1]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[1].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[1].id).to eq("JM474-IEDR") - expect(subject.admin_contacts[1].name).to eq("John Moylan") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("JM474-IEDR") - expect(subject.technical_contacts[0].name).to eq("John Moylan") - end + it "matches property_contacts_multiple.expected" do + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(2) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("JL241-IEDR") + expect(subject.admin_contacts[0].name).to eq("Jonathan Lundberg") + expect(subject.admin_contacts[1]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[1].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[1].id).to eq("JM474-IEDR") + expect(subject.admin_contacts[1].name).to eq("John Moylan") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("JM474-IEDR") + expect(subject.technical_contacts[0].name).to eq("John Moylan") end end diff --git a/spec/whois/parsers/responses/whois.domainregistry.ie/ie/property_contacts_not_matching_id_spec.rb b/spec/whois/parsers/responses/whois.domainregistry.ie/ie/property_contacts_not_matching_id_spec.rb index 2928c6df..54aa45b5 100644 --- a/spec/whois/parsers/responses/whois.domainregistry.ie/ie/property_contacts_not_matching_id_spec.rb +++ b/spec/whois/parsers/responses/whois.domainregistry.ie/ie/property_contacts_not_matching_id_spec.rb @@ -9,24 +9,21 @@ # require 'spec_helper' -require 'whois/parsers/whois.domainregistry.ie.rb' -describe Whois::Parsers::WhoisDomainregistryIe, "property_contacts_not_matching_id.expected" do +describe "whois.domainregistry.ie", :aggregate_failures do subject do file = fixture("responses", "whois.domainregistry.ie/ie/property_contacts_not_matching_id.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.domainregistry.ie") + Whois::Parser.parser_for(part) end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("KG37-IEDR") - expect(subject.technical_contacts[0].name).to eq("Michael McGovern") - end + it "matches property_contacts_not_matching_id.expected" do + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("KG37-IEDR") + expect(subject.technical_contacts[0].name).to eq("Michael McGovern") end end diff --git a/spec/whois/parsers/responses/whois.domainregistry.ie/ie/property_nameservers_with_ip_spec.rb b/spec/whois/parsers/responses/whois.domainregistry.ie/ie/property_nameservers_with_ip_spec.rb index 958fef92..d3176801 100644 --- a/spec/whois/parsers/responses/whois.domainregistry.ie/ie/property_nameservers_with_ip_spec.rb +++ b/spec/whois/parsers/responses/whois.domainregistry.ie/ie/property_nameservers_with_ip_spec.rb @@ -9,38 +9,35 @@ # require 'spec_helper' -require 'whois/parsers/whois.domainregistry.ie.rb' -describe Whois::Parsers::WhoisDomainregistryIe, "property_nameservers_with_ip.expected" do +describe "whois.domainregistry.ie", :aggregate_failures do subject do file = fixture("responses", "whois.domainregistry.ie/ie/property_nameservers_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.domainregistry.ie") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(6) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.dns.ie") - expect(subject.nameservers[0].ipv4).to eq("208.94.148.4") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.dns.ie") - expect(subject.nameservers[1].ipv4).to eq("208.80.124.4") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.dns.ie") - expect(subject.nameservers[2].ipv4).to eq("208.80.126.4") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.dns.ie") - expect(subject.nameservers[3].ipv4).to eq("208.80.125.4") - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("ns5.dns.ie") - expect(subject.nameservers[4].ipv4).to eq("208.80.127.4") - expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[5].name).to eq("ns6.dns.ie") - expect(subject.nameservers[5].ipv4).to eq("208.94.149.4") - end + it "matches property_nameservers_with_ip.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(6) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.dns.ie") + expect(subject.nameservers[0].ipv4).to eq("208.94.148.4") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.dns.ie") + expect(subject.nameservers[1].ipv4).to eq("208.80.124.4") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.dns.ie") + expect(subject.nameservers[2].ipv4).to eq("208.80.126.4") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.dns.ie") + expect(subject.nameservers[3].ipv4).to eq("208.80.125.4") + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("ns5.dns.ie") + expect(subject.nameservers[4].ipv4).to eq("208.80.127.4") + expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[5].name).to eq("ns6.dns.ie") + expect(subject.nameservers[5].ipv4).to eq("208.94.149.4") end end diff --git a/spec/whois/parsers/responses/whois.domainregistry.ie/ie/status_available_spec.rb b/spec/whois/parsers/responses/whois.domainregistry.ie/ie/status_available_spec.rb index 10d0855e..85e72c8c 100644 --- a/spec/whois/parsers/responses/whois.domainregistry.ie/ie/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.domainregistry.ie/ie/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.domainregistry.ie.rb' -describe Whois::Parsers::WhoisDomainregistryIe, "status_available.expected" do +describe "whois.domainregistry.ie", :aggregate_failures do subject do file = fixture("responses", "whois.domainregistry.ie/ie/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.domainregistry.ie") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Rights restricted by copyright; http://iedr.ie/index.php/mnudomregs/mnudnssearch/96\nDo not remove this notice") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Rights restricted by copyright; http://iedr.ie/index.php/mnudomregs/mnudnssearch/96\nDo not remove this notice") + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.domainregistry.ie/ie/status_registered_spec.rb b/spec/whois/parsers/responses/whois.domainregistry.ie/ie/status_registered_spec.rb index ad40df2a..3804e9a9 100644 --- a/spec/whois/parsers/responses/whois.domainregistry.ie/ie/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.domainregistry.ie/ie/status_registered_spec.rb @@ -9,108 +9,53 @@ # require 'spec_helper' -require 'whois/parsers/whois.domainregistry.ie.rb' -describe Whois::Parsers::WhoisDomainregistryIe, "status_registered.expected" do +describe "whois.domainregistry.ie", :aggregate_failures do subject do file = fixture("responses", "whois.domainregistry.ie/ie/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.domainregistry.ie") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Rights restricted by copyright; http://iedr.ie/index.php/mnudomregs/mnudnssearch/96\nDo not remove this notice") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.ie") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2002-03-21")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-03-21")) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Google, Inc") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("AAV410-IEDR") - expect(subject.admin_contacts[0].name).to eq("Christina Chiou") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("CCA7-IEDR") - expect(subject.technical_contacts[0].name).to eq("Markmonitor Inc") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Rights restricted by copyright; http://iedr.ie/index.php/mnudomregs/mnudnssearch/96\nDo not remove this notice") + expect(subject.domain).to eq("google.ie") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-03-21")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-03-21")) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Google, Inc") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("AAV410-IEDR") + expect(subject.admin_contacts[0].name).to eq("Christina Chiou") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("CCA7-IEDR") + expect(subject.technical_contacts[0].name).to eq("Markmonitor Inc") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") end end diff --git a/spec/whois/parsers/responses/whois.domreg.lt/lt/property_nameservers_with_ip_spec.rb b/spec/whois/parsers/responses/whois.domreg.lt/lt/property_nameservers_with_ip_spec.rb index 459032b7..acbd07db 100644 --- a/spec/whois/parsers/responses/whois.domreg.lt/lt/property_nameservers_with_ip_spec.rb +++ b/spec/whois/parsers/responses/whois.domreg.lt/lt/property_nameservers_with_ip_spec.rb @@ -9,32 +9,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.domreg.lt.rb' -describe Whois::Parsers::WhoisDomregLt, "property_nameservers_with_ip.expected" do +describe "whois.domreg.lt", :aggregate_failures do subject do file = fixture("responses", "whois.domreg.lt/lt/property_nameservers_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.domreg.lt") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.serveriai.lt") - expect(subject.nameservers[0].ipv4).to eq("79.98.25.142") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.serveriai.lt") - expect(subject.nameservers[1].ipv4).to eq("174.36.250.192") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.serveriai.lt") - expect(subject.nameservers[2].ipv4).to eq("79.98.29.142") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.serveriai.lt") - expect(subject.nameservers[3].ipv4).to eq("67.228.39.192") - end + it "matches property_nameservers_with_ip.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.serveriai.lt") + expect(subject.nameservers[0].ipv4).to eq("79.98.25.142") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.serveriai.lt") + expect(subject.nameservers[1].ipv4).to eq("174.36.250.192") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.serveriai.lt") + expect(subject.nameservers[2].ipv4).to eq("79.98.29.142") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.serveriai.lt") + expect(subject.nameservers[3].ipv4).to eq("67.228.39.192") end end diff --git a/spec/whois/parsers/responses/whois.domreg.lt/lt/status_available_spec.rb b/spec/whois/parsers/responses/whois.domreg.lt/lt/status_available_spec.rb index 512ccaf1..23011136 100644 --- a/spec/whois/parsers/responses/whois.domreg.lt/lt/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.domreg.lt/lt/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.domreg.lt.rb' -describe Whois::Parsers::WhoisDomregLt, "status_available.expected" do +describe "whois.domreg.lt", :aggregate_failures do subject do file = fixture("responses", "whois.domreg.lt/lt/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.domreg.lt") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.domreg.lt/lt/status_registered_spec.rb b/spec/whois/parsers/responses/whois.domreg.lt/lt/status_registered_spec.rb index 47d81804..32517a02 100644 --- a/spec/whois/parsers/responses/whois.domreg.lt/lt/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.domreg.lt/lt/status_registered_spec.rb @@ -9,57 +9,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.domreg.lt.rb' -describe Whois::Parsers::WhoisDomregLt, "status_registered.expected" do +describe "whois.domreg.lt", :aggregate_failures do subject do file = fixture("responses", "whois.domreg.lt/lt/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.domreg.lt") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1999-06-06")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1999-06-06")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") end end diff --git a/spec/whois/parsers/responses/whois.donuts.co/bike/status_available_spec.rb b/spec/whois/parsers/responses/whois.donuts.co/bike/status_available_spec.rb deleted file mode 100644 index dd1777c1..00000000 --- a/spec/whois/parsers/responses/whois.donuts.co/bike/status_available_spec.rb +++ /dev/null @@ -1,91 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.donuts.co/bike/status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.donuts.co.rb' - -describe Whois::Parsers::WhoisDonutsCo, "status_available.expected" do - - subject do - file = fixture("responses", "whois.donuts.co/bike/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end -end diff --git a/spec/whois/parsers/responses/whois.donuts.co/bike/status_registered_spec.rb b/spec/whois/parsers/responses/whois.donuts.co/bike/status_registered_spec.rb deleted file mode 100644 index 0a872487..00000000 --- a/spec/whois/parsers/responses/whois.donuts.co/bike/status_registered_spec.rb +++ /dev/null @@ -1,154 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.donuts.co/bike/status_registered.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.donuts.co.rb' - -describe Whois::Parsers::WhoisDonutsCo, "status_registered.expected" do - - subject do - file = fixture("responses", "whois.donuts.co/bike/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#domain" do - it do - expect(subject.domain).to eq("whereismy.bike") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("e25432d5c94440c4a8ca0e5ecbc13904-DONUTS") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2016-02-26 16:49:10 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2017-04-12 16:49:41 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2018-02-26 16:49:10 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("146") - expect(subject.registrar.name).to eq("GoDaddy.com, LLC") - expect(subject.registrar.organization).to eq("GoDaddy.com, LLC") - expect(subject.registrar.url).to eq("http://www.godaddy.com/domains/search.aspx?ci=8990") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("2a94fd50b2ca42c685828dfa8c07e23d-DONUTS") - expect(subject.registrant_contacts[0].name).to eq("Marko Matenda") - expect(subject.registrant_contacts[0].organization).to eq("") - expect(subject.registrant_contacts[0].address).to eq("Ante Starcevica 9.") - expect(subject.registrant_contacts[0].city).to eq("Bjelovar") - expect(subject.registrant_contacts[0].zip).to eq("43000") - expect(subject.registrant_contacts[0].state).to eq("Croatia") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("HR") - expect(subject.registrant_contacts[0].phone).to eq("+385.916283632") - expect(subject.registrant_contacts[0].fax).to eq("") - expect(subject.registrant_contacts[0].email).to eq("marko.matenda@gmail.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("a627ad7dc57343858c4397b9e3f9a530-DONUTS") - expect(subject.admin_contacts[0].name).to eq("Marko Matenda") - expect(subject.admin_contacts[0].organization).to eq("") - expect(subject.admin_contacts[0].address).to eq("Ante Starcevica 9.") - expect(subject.admin_contacts[0].city).to eq("Bjelovar") - expect(subject.admin_contacts[0].zip).to eq("43000") - expect(subject.admin_contacts[0].state).to eq("Croatia") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("HR") - expect(subject.admin_contacts[0].phone).to eq("+385.916283632") - expect(subject.admin_contacts[0].fax).to eq("") - expect(subject.admin_contacts[0].email).to eq("marko.matenda@gmail.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("08094e7dd78143d6b83338c5c59a8160-DONUTS") - expect(subject.technical_contacts[0].name).to eq("Marko Matenda") - expect(subject.technical_contacts[0].organization).to eq("") - expect(subject.technical_contacts[0].address).to eq("Ante Starcevica 9.") - expect(subject.technical_contacts[0].city).to eq("Bjelovar") - expect(subject.technical_contacts[0].zip).to eq("43000") - expect(subject.technical_contacts[0].state).to eq("Croatia") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("HR") - expect(subject.technical_contacts[0].phone).to eq("+385.916283632") - expect(subject.technical_contacts[0].fax).to eq("") - expect(subject.technical_contacts[0].email).to eq("marko.matenda@gmail.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns68.domaincontrol.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns67.domaincontrol.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end - end -end diff --git a/spec/whois/parsers/responses/whois.dot.cf/cf/property_expires_on_blank_spec.rb b/spec/whois/parsers/responses/whois.dot.cf/cf/property_expires_on_blank_spec.rb index a6adf062..85deef42 100644 --- a/spec/whois/parsers/responses/whois.dot.cf/cf/property_expires_on_blank_spec.rb +++ b/spec/whois/parsers/responses/whois.dot.cf/cf/property_expires_on_blank_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.dot.cf.rb' -describe Whois::Parsers::WhoisDotCf, "property_expires_on_blank.expected" do +describe "whois.dot.cf", :aggregate_failures do subject do file = fixture("responses", "whois.dot.cf/cf/property_expires_on_blank.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dot.cf") + Whois::Parser.parser_for(part) end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end + it "matches property_expires_on_blank.expected" do + expect(subject.expires_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.dot.cf/cf/status_available_spec.rb b/spec/whois/parsers/responses/whois.dot.cf/cf/status_available_spec.rb index fe0370bb..79b1eb70 100644 --- a/spec/whois/parsers/responses/whois.dot.cf/cf/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.dot.cf/cf/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.dot.cf.rb' -describe Whois::Parsers::WhoisDotCf, "status_available.expected" do +describe "whois.dot.cf", :aggregate_failures do subject do file = fixture("responses", "whois.dot.cf/cf/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dot.cf") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.dot.cf/cf/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dot.cf/cf/status_registered_spec.rb index f3d64b87..f14a3b31 100644 --- a/spec/whois/parsers/responses/whois.dot.cf/cf/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dot.cf/cf/status_registered_spec.rb @@ -9,61 +9,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.dot.cf.rb' -describe Whois::Parsers::WhoisDotCf, "status_registered.expected" do +describe "whois.dot.cf", :aggregate_failures do subject do file = fixture("responses", "whois.dot.cf/cf/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dot.cf") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2013-03-28 00:00:00")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(5) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("dns5.nettica.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("dns1.nettica.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("dns2.nettica.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("dns3.nettica.com") - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("dns4.nettica.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2013-03-28 00:00:00")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(5) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("dns5.nettica.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("dns1.nettica.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("dns2.nettica.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("dns3.nettica.com") + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("dns4.nettica.com") end end diff --git a/spec/whois/parsers/responses/whois.dot.tk/tk/status_available_spec.rb b/spec/whois/parsers/responses/whois.dot.tk/tk/status_available_spec.rb index 6fd85f32..9d78fe2e 100644 --- a/spec/whois/parsers/responses/whois.dot.tk/tk/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.dot.tk/tk/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.dot.tk.rb' -describe Whois::Parsers::WhoisDotTk, "status_available.expected" do +describe "whois.dot.tk", :aggregate_failures do subject do file = fixture("responses", "whois.dot.tk/tk/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dot.tk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.dot.tk/tk/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dot.tk/tk/status_registered_spec.rb index de4d3597..89a1e861 100644 --- a/spec/whois/parsers/responses/whois.dot.tk/tk/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dot.tk/tk/status_registered_spec.rb @@ -9,60 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.dot.tk.rb' -describe Whois::Parsers::WhoisDotTk, "status_registered.expected" do +describe "whois.dot.tk", :aggregate_failures do subject do file = fixture("responses", "whois.dot.tk/tk/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dot.tk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2001-12-18 00:00:00")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2012-03-02 00:00:00")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2001-12-18 00:00:00")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2012-03-02 00:00:00")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.dotgov.gov/gov/status_available_spec.rb b/spec/whois/parsers/responses/whois.dotgov.gov/gov/status_available_spec.rb index 3fbfd976..300092f4 100644 --- a/spec/whois/parsers/responses/whois.dotgov.gov/gov/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.dotgov.gov/gov/status_available_spec.rb @@ -9,49 +9,22 @@ # require 'spec_helper' -require 'whois/parsers/whois.dotgov.gov.rb' -describe Whois::Parsers::WhoisDotgovGov, "status_available.expected" do +describe "whois.dotgov.gov", :aggregate_failures do subject do file = fixture("responses", "whois.dotgov.gov/gov/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dotgov.gov") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.dotgov.gov/gov/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dotgov.gov/gov/status_registered_spec.rb index a5074021..4424303a 100644 --- a/spec/whois/parsers/responses/whois.dotgov.gov/gov/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dotgov.gov/gov/status_registered_spec.rb @@ -9,49 +9,22 @@ # require 'spec_helper' -require 'whois/parsers/whois.dotgov.gov.rb' -describe Whois::Parsers::WhoisDotgovGov, "status_registered.expected" do +describe "whois.dotgov.gov", :aggregate_failures do subject do file = fixture("responses", "whois.dotgov.gov/gov/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dotgov.gov") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/response_throttled_spec.rb new file mode 100644 index 00000000..1fcf65c0 --- /dev/null +++ b/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/response_throttled_spec.rb @@ -0,0 +1,24 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.dotmobiregistry.net/mobi/response_throttled.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.dotmobiregistry.net", :aggregate_failures do + + subject do + file = fixture("responses", "whois.dotmobiregistry.net/mobi/response_throttled.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dotmobiregistry.net") + Whois::Parser.parser_for(part) + end + + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) + end +end diff --git a/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/status_available_spec.rb b/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/status_available_spec.rb index 8cdea497..3c343516 100644 --- a/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.dotmobiregistry.net.rb' -describe Whois::Parsers::WhoisDotmobiregistryNet, "status_available.expected" do +describe "whois.dotmobiregistry.net", :aggregate_failures do subject do file = fixture("responses", "whois.dotmobiregistry.net/mobi/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dotmobiregistry.net") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/status_registered_spec.rb index b5c85c4e..0fcd4faf 100644 --- a/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dotmobiregistry.net/mobi/status_registered_spec.rb @@ -9,142 +9,60 @@ # require 'spec_helper' -require 'whois/parsers/whois.dotmobiregistry.net.rb' -describe Whois::Parsers::WhoisDotmobiregistryNet, "status_registered.expected" do +describe "whois.dotmobiregistry.net", :aggregate_failures do subject do file = fixture("responses", "whois.dotmobiregistry.net/mobi/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dotmobiregistry.net") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("mTLD WHOIS LEGAL STATEMENT AND TERMS & CONDITIONS: The WHOIS service offered by mTLD and the access to the records in the mTLD WHOIS database are provided for information purposes only. It allows persons to check whether a specific domain name is still available or not and to obtain information related to the registration records of existing domain names. mTLD cannot, under any circumstances, be held liable in case the stored information would prove to be wrong, incomplete, or not accurate in any sense. By submitting a query you agree not to use the information made available to: allow, enable or otherwise support the transmission of unsolicited, commercial advertising or other solicitations whether via email or otherwise; target advertising in any possible way; or to cause nuisance in any possible way to the registrants by sending (whether by automated, electronic processes capable of enabling high volumes or other possible means) messages to them. Without prejudice to the above, it is explicitly forbidden to extract, copy and/or use or re-utilise in any form and by any means (electronically or not) the whole or a quantitatively or qualitatively substantial part of the contents of the WHOIS database without prior and explicit permission by mTLD, nor in any attempt hereof, or to apply automated, electronic processes to mTLD (or its systems). You agree that any reproduction and/or transmission of data for commercial purposes will always be considered as the extraction of a substantial part of the content of the WHOIS database. By submitting the query you agree to abide by this policy and accept that mTLD can take measures to limit the use of its WHOIS services in order to protect the privacy of its registrants or the integrity of the database.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.mobi") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D117-MOBI") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-05-11 21:08:42 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-04-09 09:24:02 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-05-11 21:08:42 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("mmr-14290820") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6506234000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6506188571") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("mmr-14290820") - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6506234000") - expect(subject.admin_contacts[0].fax).to eq("+1.6506188571") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("mmr-14290820") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6506234000") - expect(subject.technical_contacts[0].fax).to eq("+1.6506188571") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to AFILIAS WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq("google.mobi") + expect(subject.domain_id).to eq("D102500000000000117-LRMS") + expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-05-11 21:08:42 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-04-09 09:29:29 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-05-11 21:08:42 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(0) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(0) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.dotpostregistry.net/post/status_available_spec.rb b/spec/whois/parsers/responses/whois.dotpostregistry.net/post/status_available_spec.rb index c0afdc32..bd465928 100644 --- a/spec/whois/parsers/responses/whois.dotpostregistry.net/post/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.dotpostregistry.net/post/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.dotpostregistry.net.rb' -describe Whois::Parsers::WhoisDotpostregistryNet, "status_available.expected" do +describe "whois.dotpostregistry.net", :aggregate_failures do subject do file = fixture("responses", "whois.dotpostregistry.net/post/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dotpostregistry.net") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.dotpostregistry.net/post/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dotpostregistry.net/post/status_registered_spec.rb index 91b7cf53..3ed2bd2e 100644 --- a/spec/whois/parsers/responses/whois.dotpostregistry.net/post/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dotpostregistry.net/post/status_registered_spec.rb @@ -9,138 +9,82 @@ # require 'spec_helper' -require 'whois/parsers/whois.dotpostregistry.net.rb' -describe Whois::Parsers::WhoisDotpostregistryNet, "status_registered.expected" do +describe "whois.dotpostregistry.net", :aggregate_failures do subject do file = fixture("responses", "whois.dotpostregistry.net/post/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dotpostregistry.net") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to .POST REGISTRY WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the .POST Registry registry database. The data in this record is provided by .POST Registry for informational purposes only, and .POST Registry does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to: (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. .POST Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("posteitaliane.post") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D19482-POST") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["TRANSFER PROHIBITED"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2012-09-21 12:03:07 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-09-21 12:07:40 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-09-21 12:03:07 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("R4947-POST") - expect(subject.registrar.name).to eq("Universal Postal Union") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("ITPI30001") - expect(subject.registrant_contacts[0].name).to eq("Poste Italiane") - expect(subject.registrant_contacts[0].organization).to eq("Poste Italiane") - expect(subject.registrant_contacts[0].address).to eq("Viale Europa 190") - expect(subject.registrant_contacts[0].city).to eq("Rome") - expect(subject.registrant_contacts[0].zip).to eq("00144") - expect(subject.registrant_contacts[0].state).to eq("") - expect(subject.registrant_contacts[0].country_code).to eq("IT") - expect(subject.registrant_contacts[0].phone).to eq("+39.0659581") - expect(subject.registrant_contacts[0].fax).to eq("+39.065942298") - expect(subject.registrant_contacts[0].email).to eq("info@poste.it") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("UPU_C1002") - expect(subject.admin_contacts[0].name).to eq("Giovanni Brardinoni") - expect(subject.admin_contacts[0].organization).to eq("Poste Italiane") - expect(subject.admin_contacts[0].address).to eq("Viale Europa 175") - expect(subject.admin_contacts[0].city).to eq("Rome") - expect(subject.admin_contacts[0].zip).to eq("00144") - expect(subject.admin_contacts[0].state).to eq("") - expect(subject.admin_contacts[0].country_code).to eq("IT") - expect(subject.admin_contacts[0].phone).to eq("+39.0659583671") - expect(subject.admin_contacts[0].fax).to eq("+39.0698688651") - expect(subject.admin_contacts[0].email).to eq("Giovanni.Brardinoni@Postecom.it") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("UPU_C1001") - expect(subject.technical_contacts[0].name).to eq("Andrea Speranza") - expect(subject.technical_contacts[0].organization).to eq("Poste Italiane") - expect(subject.technical_contacts[0].address).to eq("Viale Europa 175") - expect(subject.technical_contacts[0].city).to eq("Rome") - expect(subject.technical_contacts[0].zip).to eq("00144") - expect(subject.technical_contacts[0].state).to eq("") - expect(subject.technical_contacts[0].country_code).to eq("IT") - expect(subject.technical_contacts[0].phone).to eq("+39.0659583086") - expect(subject.technical_contacts[0].fax).to eq("+39.0659582032") - expect(subject.technical_contacts[0].email).to eq("netsecurity@postecom.it") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("dns.poste.it") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("dns2.poste.it") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq("posteitaliane.post") + expect(subject.domain_id).to eq("D108700000000019482-AGRS") + expect(subject.status).to eq(["ok https://icann.org/epp#ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2012-09-21 12:03:07 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-09-21 22:31:15 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-09-21 12:03:07 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("9999") + expect(subject.registrar.name).to eq("Universal Postal Union") + expect(subject.registrar.url).to eq("") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("C19309314-AGRS") + expect(subject.registrant_contacts[0].name).to eq("Poste Italiane") + expect(subject.registrant_contacts[0].organization).to eq("Poste Italiane") + expect(subject.registrant_contacts[0].address).to eq("Viale Europa 190") + expect(subject.registrant_contacts[0].city).to eq("Rome") + expect(subject.registrant_contacts[0].zip).to eq("00144") + expect(subject.registrant_contacts[0].state).to eq("") + expect(subject.registrant_contacts[0].country_code).to eq("IT") + expect(subject.registrant_contacts[0].phone).to eq("+39.0659581") + expect(subject.registrant_contacts[0].fax).to eq("+39.065942298") + expect(subject.registrant_contacts[0].email).to eq("info@poste.it") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("C19309312-AGRS") + expect(subject.admin_contacts[0].name).to eq("Giovanni Brardinoni") + expect(subject.admin_contacts[0].organization).to eq("Poste Italiane") + expect(subject.admin_contacts[0].address).to eq("Viale Europa 175") + expect(subject.admin_contacts[0].city).to eq("Rome") + expect(subject.admin_contacts[0].zip).to eq("00144") + expect(subject.admin_contacts[0].state).to eq("") + expect(subject.admin_contacts[0].country_code).to eq("IT") + expect(subject.admin_contacts[0].phone).to eq("+39.0659583671") + expect(subject.admin_contacts[0].fax).to eq("+39.0698688651") + expect(subject.admin_contacts[0].email).to eq("Giovanni.Brardinoni@Postecom.it") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("C19309311-AGRS") + expect(subject.technical_contacts[0].name).to eq("Andrea Speranza") + expect(subject.technical_contacts[0].organization).to eq("Poste Italiane") + expect(subject.technical_contacts[0].address).to eq("Viale Europa 175") + expect(subject.technical_contacts[0].city).to eq("Rome") + expect(subject.technical_contacts[0].zip).to eq("00144") + expect(subject.technical_contacts[0].state).to eq("") + expect(subject.technical_contacts[0].country_code).to eq("IT") + expect(subject.technical_contacts[0].phone).to eq("+39.0659583086") + expect(subject.technical_contacts[0].fax).to eq("+39.0659582032") + expect(subject.technical_contacts[0].email).to eq("netsecurity@postecom.it") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("dns.poste.it") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("dns2.poste.it") end end diff --git a/spec/whois/parsers/responses/whois.dreamhost.com/property_contact_private_spec.rb b/spec/whois/parsers/responses/whois.dreamhost.com/property_contact_private_spec.rb index 7faefeef..b737de48 100644 --- a/spec/whois/parsers/responses/whois.dreamhost.com/property_contact_private_spec.rb +++ b/spec/whois/parsers/responses/whois.dreamhost.com/property_contact_private_spec.rb @@ -9,68 +9,57 @@ # require 'spec_helper' -require 'whois/parsers/whois.dreamhost.com.rb' -describe Whois::Parsers::WhoisDreamhostCom, "property_contact_private.expected" do +describe "whois.dreamhost.com", :aggregate_failures do subject do file = fixture("responses", "whois.dreamhost.com/property_contact_private.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dreamhost.com") + Whois::Parser.parser_for(part) end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].name).to eq("PRIVATE REGISTRANT") - expect(subject.registrant_contacts[0].organization).to eq("A HAPPY DREAMHOST CUSTOMER") - expect(subject.registrant_contacts[0].address).to eq("417 ASSOCIATED RD #324, C/O ADEQUATEHQ.COM") - expect(subject.registrant_contacts[0].city).to eq("BREA") - expect(subject.registrant_contacts[0].zip).to eq("92821") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.7147064182") - expect(subject.registrant_contacts[0].fax).to eq("") - expect(subject.registrant_contacts[0].email).to eq("ADEQUATEHQ.COM@PROXY.DREAMHOST.COM") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].name).to eq("PRIVATE REGISTRANT") - expect(subject.admin_contacts[0].organization).to eq("A HAPPY DREAMHOST CUSTOMER") - expect(subject.admin_contacts[0].address).to eq("417 ASSOCIATED RD #324, C/O ADEQUATEHQ.COM") - expect(subject.admin_contacts[0].city).to eq("BREA") - expect(subject.admin_contacts[0].zip).to eq("92821") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.7147064182") - expect(subject.admin_contacts[0].fax).to eq("") - expect(subject.admin_contacts[0].email).to eq("ADEQUATEHQ.COM@PROXY.DREAMHOST.COM") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].name).to eq("PRIVATE REGISTRANT") - expect(subject.technical_contacts[0].organization).to eq("A HAPPY DREAMHOST CUSTOMER") - expect(subject.technical_contacts[0].address).to eq("417 ASSOCIATED RD #324, C/O ADEQUATEHQ.COM") - expect(subject.technical_contacts[0].city).to eq("BREA") - expect(subject.technical_contacts[0].zip).to eq("92821") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.7147064182") - expect(subject.technical_contacts[0].fax).to eq("") - expect(subject.technical_contacts[0].email).to eq("ADEQUATEHQ.COM@PROXY.DREAMHOST.COM") - end + it "matches property_contact_private.expected" do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].name).to eq("PRIVATE REGISTRANT") + expect(subject.registrant_contacts[0].organization).to eq("A HAPPY DREAMHOST CUSTOMER") + expect(subject.registrant_contacts[0].address).to eq("417 ASSOCIATED RD #324, C/O ADEQUATEHQ.COM") + expect(subject.registrant_contacts[0].city).to eq("BREA") + expect(subject.registrant_contacts[0].zip).to eq("92821") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.7147064182") + expect(subject.registrant_contacts[0].fax).to eq("") + expect(subject.registrant_contacts[0].email).to eq("ADEQUATEHQ.COM@PROXY.DREAMHOST.COM") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].name).to eq("PRIVATE REGISTRANT") + expect(subject.admin_contacts[0].organization).to eq("A HAPPY DREAMHOST CUSTOMER") + expect(subject.admin_contacts[0].address).to eq("417 ASSOCIATED RD #324, C/O ADEQUATEHQ.COM") + expect(subject.admin_contacts[0].city).to eq("BREA") + expect(subject.admin_contacts[0].zip).to eq("92821") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.7147064182") + expect(subject.admin_contacts[0].fax).to eq("") + expect(subject.admin_contacts[0].email).to eq("ADEQUATEHQ.COM@PROXY.DREAMHOST.COM") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].name).to eq("PRIVATE REGISTRANT") + expect(subject.technical_contacts[0].organization).to eq("A HAPPY DREAMHOST CUSTOMER") + expect(subject.technical_contacts[0].address).to eq("417 ASSOCIATED RD #324, C/O ADEQUATEHQ.COM") + expect(subject.technical_contacts[0].city).to eq("BREA") + expect(subject.technical_contacts[0].zip).to eq("92821") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.7147064182") + expect(subject.technical_contacts[0].fax).to eq("") + expect(subject.technical_contacts[0].email).to eq("ADEQUATEHQ.COM@PROXY.DREAMHOST.COM") end end diff --git a/spec/whois/parsers/responses/whois.dreamhost.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.dreamhost.com/status_registered_spec.rb index 56f986d4..1061e404 100644 --- a/spec/whois/parsers/responses/whois.dreamhost.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.dreamhost.com/status_registered_spec.rb @@ -9,122 +9,78 @@ # require 'spec_helper' -require 'whois/parsers/whois.dreamhost.com.rb' -describe Whois::Parsers::WhoisDreamhostCom, "status_registered.expected" do +describe "whois.dreamhost.com", :aggregate_failures do subject do file = fixture("responses", "whois.dreamhost.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.dreamhost.com") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1997-09-22 21:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-12-14 16:53:27 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-09-22 04:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("431") - expect(subject.registrar.name).to eq("DREAMHOST") - expect(subject.registrar.organization).to eq("DREAMHOST") - expect(subject.registrar.url).to eq("www.dreamhost.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].name).to eq("PRIVATE REGISTRANT") - expect(subject.registrant_contacts[0].organization).to eq("A HAPPY DREAMHOST CUSTOMER") - expect(subject.registrant_contacts[0].address).to eq("417 ASSOCIATED RD #324, C/O DREAMHOST.COM") - expect(subject.registrant_contacts[0].city).to eq("BREA") - expect(subject.registrant_contacts[0].zip).to eq("92821") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.7147064182") - expect(subject.registrant_contacts[0].fax).to eq("") - expect(subject.registrant_contacts[0].email).to eq("YW3GAZMC77BTMTF@PROXY.DREAMHOST.COM") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].name).to eq("PRIVATE REGISTRANT") - expect(subject.admin_contacts[0].organization).to eq("A HAPPY DREAMHOST CUSTOMER") - expect(subject.admin_contacts[0].address).to eq("417 ASSOCIATED RD #324, C/O DREAMHOST.COM") - expect(subject.admin_contacts[0].city).to eq("BREA") - expect(subject.admin_contacts[0].zip).to eq("92821") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.7147064182") - expect(subject.admin_contacts[0].fax).to eq("") - expect(subject.admin_contacts[0].email).to eq("YW3GAZMC77BTMTF@PROXY.DREAMHOST.COM") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].name).to eq("PRIVATE REGISTRANT") - expect(subject.technical_contacts[0].organization).to eq("A HAPPY DREAMHOST CUSTOMER") - expect(subject.technical_contacts[0].address).to eq("417 ASSOCIATED RD #324, C/O DREAMHOST.COM") - expect(subject.technical_contacts[0].city).to eq("BREA") - expect(subject.technical_contacts[0].zip).to eq("92821") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.7147064182") - expect(subject.technical_contacts[0].fax).to eq("") - expect(subject.technical_contacts[0].email).to eq("YW3GAZMC77BTMTF@PROXY.DREAMHOST.COM") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.dreamhost.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.dreamhost.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.dreamhost.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1997-09-22 21:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-12-14 16:53:27 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-09-22 04:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("431") + expect(subject.registrar.name).to eq("DREAMHOST") + expect(subject.registrar.url).to eq("www.dreamhost.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].name).to eq("PRIVATE REGISTRANT") + expect(subject.registrant_contacts[0].organization).to eq("A HAPPY DREAMHOST CUSTOMER") + expect(subject.registrant_contacts[0].address).to eq("417 ASSOCIATED RD #324, C/O DREAMHOST.COM") + expect(subject.registrant_contacts[0].city).to eq("BREA") + expect(subject.registrant_contacts[0].zip).to eq("92821") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.7147064182") + expect(subject.registrant_contacts[0].fax).to eq("") + expect(subject.registrant_contacts[0].email).to eq("YW3GAZMC77BTMTF@PROXY.DREAMHOST.COM") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].name).to eq("PRIVATE REGISTRANT") + expect(subject.admin_contacts[0].organization).to eq("A HAPPY DREAMHOST CUSTOMER") + expect(subject.admin_contacts[0].address).to eq("417 ASSOCIATED RD #324, C/O DREAMHOST.COM") + expect(subject.admin_contacts[0].city).to eq("BREA") + expect(subject.admin_contacts[0].zip).to eq("92821") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.7147064182") + expect(subject.admin_contacts[0].fax).to eq("") + expect(subject.admin_contacts[0].email).to eq("YW3GAZMC77BTMTF@PROXY.DREAMHOST.COM") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].name).to eq("PRIVATE REGISTRANT") + expect(subject.technical_contacts[0].organization).to eq("A HAPPY DREAMHOST CUSTOMER") + expect(subject.technical_contacts[0].address).to eq("417 ASSOCIATED RD #324, C/O DREAMHOST.COM") + expect(subject.technical_contacts[0].city).to eq("BREA") + expect(subject.technical_contacts[0].zip).to eq("92821") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.7147064182") + expect(subject.technical_contacts[0].fax).to eq("") + expect(subject.technical_contacts[0].email).to eq("YW3GAZMC77BTMTF@PROXY.DREAMHOST.COM") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.dreamhost.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.dreamhost.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.dreamhost.com") end end diff --git a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contact_registrant_spec.rb b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contact_registrant_spec.rb index d4b0bca7..414e31b3 100644 --- a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contact_registrant_spec.rb +++ b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contact_registrant_spec.rb @@ -9,34 +9,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.educause.edu.rb' -describe Whois::Parsers::WhoisEducauseEdu, "property_contact_registrant.expected" do +describe "whois.educause.edu", :aggregate_failures do subject do file = fixture("responses", "whois.educause.edu/edu/property_contact_registrant.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.educause.edu") + Whois::Parser.parser_for(part) end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("North Idaho College") - expect(subject.registrant_contacts[0].address).to eq("1000 W. Garden Avenue") - expect(subject.registrant_contacts[0].city).to eq("Coeur d'Alene") - expect(subject.registrant_contacts[0].zip).to eq("83814") - expect(subject.registrant_contacts[0].state).to eq("ID") - expect(subject.registrant_contacts[0].country).to eq("UNITED STATES") - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end + it "matches property_contact_registrant.expected" do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("North Idaho College") + expect(subject.registrant_contacts[0].address).to eq("1000 W. Garden Avenue") + expect(subject.registrant_contacts[0].city).to eq("Coeur d'Alene") + expect(subject.registrant_contacts[0].zip).to eq("83814") + expect(subject.registrant_contacts[0].state).to eq("ID") + expect(subject.registrant_contacts[0].country).to eq("UNITED STATES") + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contact_registrant_with_additional_organization_spec.rb b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contact_registrant_with_additional_organization_spec.rb index d7de2ada..827ca3a5 100644 --- a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contact_registrant_with_additional_organization_spec.rb +++ b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contact_registrant_with_additional_organization_spec.rb @@ -9,34 +9,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.educause.edu.rb' -describe Whois::Parsers::WhoisEducauseEdu, "property_contact_registrant_with_additional_organization.expected" do +describe "whois.educause.edu", :aggregate_failures do subject do file = fixture("responses", "whois.educause.edu/edu/property_contact_registrant_with_additional_organization.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.educause.edu") + Whois::Parser.parser_for(part) end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("Harvard University") - expect(subject.registrant_contacts[0].address).to eq("HUIT Network Services\n60 Oxford Street") - expect(subject.registrant_contacts[0].city).to eq("Cambridge") - expect(subject.registrant_contacts[0].zip).to eq("02138") - expect(subject.registrant_contacts[0].state).to eq("MA") - expect(subject.registrant_contacts[0].country).to eq("UNITED STATES") - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end + it "matches property_contact_registrant_with_additional_organization.expected" do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Harvard University") + expect(subject.registrant_contacts[0].address).to eq("HUIT Network Services\n60 Oxford Street") + expect(subject.registrant_contacts[0].city).to eq("Cambridge") + expect(subject.registrant_contacts[0].zip).to eq("02138") + expect(subject.registrant_contacts[0].state).to eq("MA") + expect(subject.registrant_contacts[0].country).to eq("UNITED STATES") + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contact_registrant_without_address_spec.rb b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contact_registrant_without_address_spec.rb index 55197618..32405427 100644 --- a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contact_registrant_without_address_spec.rb +++ b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contact_registrant_without_address_spec.rb @@ -9,34 +9,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.educause.edu.rb' -describe Whois::Parsers::WhoisEducauseEdu, "property_contact_registrant_without_address.expected" do +describe "whois.educause.edu", :aggregate_failures do subject do file = fixture("responses", "whois.educause.edu/edu/property_contact_registrant_without_address.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.educause.edu") + Whois::Parser.parser_for(part) end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("Massachusetts Institute of Technology") - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq("Cambridge") - expect(subject.registrant_contacts[0].zip).to eq("02139") - expect(subject.registrant_contacts[0].state).to eq("MA") - expect(subject.registrant_contacts[0].country).to eq("UNITED STATES") - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end + it "matches property_contact_registrant_without_address.expected" do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Massachusetts Institute of Technology") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq("Cambridge") + expect(subject.registrant_contacts[0].zip).to eq("02139") + expect(subject.registrant_contacts[0].state).to eq("MA") + expect(subject.registrant_contacts[0].country).to eq("UNITED STATES") + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contact_registrant_without_zip_spec.rb b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contact_registrant_without_zip_spec.rb index 2b6f7114..9fd32351 100644 --- a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contact_registrant_without_zip_spec.rb +++ b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contact_registrant_without_zip_spec.rb @@ -9,34 +9,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.educause.edu.rb' -describe Whois::Parsers::WhoisEducauseEdu, "property_contact_registrant_without_zip.expected" do +describe "whois.educause.edu", :aggregate_failures do subject do file = fixture("responses", "whois.educause.edu/edu/property_contact_registrant_without_zip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.educause.edu") + Whois::Parser.parser_for(part) end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("The American University of the Caribbean School of Medicine") - expect(subject.registrant_contacts[0].address).to eq("c/o Campbell Corporate Services, Ltd.\nScotiabank Building, P. O. Box 268") - expect(subject.registrant_contacts[0].city).to eq("Grand Cayman") - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq("CAYMAN ISLANDS") - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end + it "matches property_contact_registrant_without_zip.expected" do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("The American University of the Caribbean School of Medicine") + expect(subject.registrant_contacts[0].address).to eq("c/o Campbell Corporate Services, Ltd.\nScotiabank Building, P. O. Box 268") + expect(subject.registrant_contacts[0].city).to eq("Grand Cayman") + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq("CAYMAN ISLANDS") + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_case1_spec.rb b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_case1_spec.rb index 630a574e..5e7f07e4 100644 --- a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_case1_spec.rb +++ b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_case1_spec.rb @@ -9,33 +9,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.educause.edu.rb' -describe Whois::Parsers::WhoisEducauseEdu, "property_contacts_case1.expected" do +describe "whois.educause.edu", :aggregate_failures do subject do file = fixture("responses", "whois.educause.edu/edu/property_contacts_case1.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.educause.edu") + Whois::Parser.parser_for(part) end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Information Technology\nEDUCAUSE") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq("4772 Walnut Street\nSte 206") - expect(subject.technical_contacts[0].city).to eq("Boulder") - expect(subject.technical_contacts[0].zip).to eq("80301") - expect(subject.technical_contacts[0].state).to eq("CO") - expect(subject.technical_contacts[0].country).to eq("UNITED STATES") - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq("(303) 449-4430") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("netadmin@educause.edu") - end + it "matches property_contacts_case1.expected" do + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Information Technology\nEDUCAUSE") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq("4772 Walnut Street\nSte 206") + expect(subject.technical_contacts[0].city).to eq("Boulder") + expect(subject.technical_contacts[0].zip).to eq("80301") + expect(subject.technical_contacts[0].state).to eq("CO") + expect(subject.technical_contacts[0].country).to eq("UNITED STATES") + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq("(303) 449-4430") + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("netadmin@educause.edu") end end diff --git a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_case2_spec.rb b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_case2_spec.rb index f9c0ef16..0a599ebc 100644 --- a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_case2_spec.rb +++ b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_case2_spec.rb @@ -9,33 +9,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.educause.edu.rb' -describe Whois::Parsers::WhoisEducauseEdu, "property_contacts_case2.expected" do +describe "whois.educause.edu", :aggregate_failures do subject do file = fixture("responses", "whois.educause.edu/edu/property_contacts_case2.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.educause.edu") + Whois::Parser.parser_for(part) end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Domain Admin\nStanford University") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq("241 Panama Street Pine Hall, Room 115") - expect(subject.technical_contacts[0].city).to eq("Stanford") - expect(subject.technical_contacts[0].zip).to eq("94305-4122") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country).to eq("UNITED STATES") - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq("(650) 723-4328") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("sunet-admin@stanford.edu") - end + it "matches property_contacts_case2.expected" do + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Domain Admin\nStanford University") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq("241 Panama Street Pine Hall, Room 115") + expect(subject.technical_contacts[0].city).to eq("Stanford") + expect(subject.technical_contacts[0].zip).to eq("94305-4122") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country).to eq("UNITED STATES") + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq("(650) 723-4328") + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("sunet-admin@stanford.edu") end end diff --git a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_case3_spec.rb b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_case3_spec.rb index 4d1e8bb1..92d789ea 100644 --- a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_case3_spec.rb +++ b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_case3_spec.rb @@ -9,33 +9,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.educause.edu.rb' -describe Whois::Parsers::WhoisEducauseEdu, "property_contacts_case3.expected" do +describe "whois.educause.edu", :aggregate_failures do subject do file = fixture("responses", "whois.educause.edu/edu/property_contacts_case3.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.educause.edu") + Whois::Parser.parser_for(part) end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("Tracy L. Smith\nUniversity of Illinois at Urbana-Champaign\nCITES 2105 Digital Computer Laboratory") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq("1304 West Springfield Avenue") - expect(subject.admin_contacts[0].city).to eq("Urbana") - expect(subject.admin_contacts[0].zip).to eq("61801-4399") - expect(subject.admin_contacts[0].state).to eq("IL") - expect(subject.admin_contacts[0].country).to eq("UNITED STATES") - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq("(217) 244-2032") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("edu-admin@listserv.illinois.edu") - end + it "matches property_contacts_case3.expected" do + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("Tracy L. Smith\nUniversity of Illinois at Urbana-Champaign\nCITES 2105 Digital Computer Laboratory") + expect(subject.admin_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts[0].address).to eq("1304 West Springfield Avenue") + expect(subject.admin_contacts[0].city).to eq("Urbana") + expect(subject.admin_contacts[0].zip).to eq("61801-4399") + expect(subject.admin_contacts[0].state).to eq("IL") + expect(subject.admin_contacts[0].country).to eq("UNITED STATES") + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq("(217) 244-2032") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("edu-admin@listserv.illinois.edu") end end diff --git a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_case4_spec.rb b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_case4_spec.rb index 5bdbb404..1f9771b3 100644 --- a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_case4_spec.rb +++ b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_case4_spec.rb @@ -9,33 +9,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.educause.edu.rb' -describe Whois::Parsers::WhoisEducauseEdu, "property_contacts_case4.expected" do +describe "whois.educause.edu", :aggregate_failures do subject do file = fixture("responses", "whois.educause.edu/edu/property_contacts_case4.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.educause.edu") + Whois::Parser.parser_for(part) end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("ITS Business Office\nSyracuse University\nInformation Technology and Services\nCenter for Science and Technology") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq(nil) - expect(subject.admin_contacts[0].city).to eq("Syracuse") - expect(subject.admin_contacts[0].zip).to eq("13244") - expect(subject.admin_contacts[0].state).to eq("NY") - expect(subject.admin_contacts[0].country).to eq("UNITED STATES") - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq("(315) 443-6189") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("itsoffice@syr.edu") - end + it "matches property_contacts_case4.expected" do + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("ITS Business Office\nSyracuse University\nInformation Technology and Services\nCenter for Science and Technology") + expect(subject.admin_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts[0].address).to eq(nil) + expect(subject.admin_contacts[0].city).to eq("Syracuse") + expect(subject.admin_contacts[0].zip).to eq("13244") + expect(subject.admin_contacts[0].state).to eq("NY") + expect(subject.admin_contacts[0].country).to eq("UNITED STATES") + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq("(315) 443-6189") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("itsoffice@syr.edu") end end diff --git a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_spec.rb b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_spec.rb index f9c4e1b1..4c997bfb 100644 --- a/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_spec.rb +++ b/spec/whois/parsers/responses/whois.educause.edu/edu/property_contacts_spec.rb @@ -9,33 +9,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.educause.edu.rb' -describe Whois::Parsers::WhoisEducauseEdu, "property_contacts.expected" do +describe "whois.educause.edu", :aggregate_failures do subject do file = fixture("responses", "whois.educause.edu/edu/property_contacts.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.educause.edu") + Whois::Parser.parser_for(part) end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Dennis L Noordam\nWindows System Administrator\nNorth Idaho College") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq("1000 W. Garden Avenue") - expect(subject.technical_contacts[0].city).to eq("Coeur d Alene") - expect(subject.technical_contacts[0].zip).to eq("83814") - expect(subject.technical_contacts[0].state).to eq("ID") - expect(subject.technical_contacts[0].country).to eq("UNITED STATES") - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq("(208) 769-7860") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("dlnoordam@nic.edu") - end + it "matches property_contacts.expected" do + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Dennis L Noordam\nWindows System Administrator\nNorth Idaho College") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq("1000 W. Garden Avenue") + expect(subject.technical_contacts[0].city).to eq("Coeur d Alene") + expect(subject.technical_contacts[0].zip).to eq("83814") + expect(subject.technical_contacts[0].state).to eq("ID") + expect(subject.technical_contacts[0].country).to eq("UNITED STATES") + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq("(208) 769-7860") + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("dlnoordam@nic.edu") end end diff --git a/spec/whois/parsers/responses/whois.educause.edu/edu/property_updated_on_unknown_spec.rb b/spec/whois/parsers/responses/whois.educause.edu/edu/property_updated_on_unknown_spec.rb index 840667f4..26810ecb 100644 --- a/spec/whois/parsers/responses/whois.educause.edu/edu/property_updated_on_unknown_spec.rb +++ b/spec/whois/parsers/responses/whois.educause.edu/edu/property_updated_on_unknown_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.educause.edu.rb' -describe Whois::Parsers::WhoisEducauseEdu, "property_updated_on_unknown.expected" do +describe "whois.educause.edu", :aggregate_failures do subject do file = fixture("responses", "whois.educause.edu/edu/property_updated_on_unknown.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.educause.edu") + Whois::Parser.parser_for(part) end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end + it "matches property_updated_on_unknown.expected" do + expect(subject.updated_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.educause.edu/edu/status_available_spec.rb b/spec/whois/parsers/responses/whois.educause.edu/edu/status_available_spec.rb index 27a9c808..4a2c7c63 100644 --- a/spec/whois/parsers/responses/whois.educause.edu/edu/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.educause.edu/edu/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.educause.edu.rb' -describe Whois::Parsers::WhoisEducauseEdu, "status_available.expected" do +describe "whois.educause.edu", :aggregate_failures do subject do file = fixture("responses", "whois.educause.edu/edu/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.educause.edu") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("\nThis Registry database contains ONLY .EDU domains. \nThe data in the EDUCAUSE Whois database is provided \nby EDUCAUSE for information purposes in order to \nassist in the process of obtaining information about \nor related to .edu domain registration records. \n\nThe EDUCAUSE Whois database is authoritative for the \n.EDU domain. \n\nA Web interface for the .EDU EDUCAUSE Whois Server is \navailable at: http://whois.educause.net \n\nBy submitting a Whois query, you agree that this information \nwill not be used to allow, enable, or otherwise support \nthe transmission of unsolicited commercial advertising or \nsolicitations via e-mail. The use of electronic processes to \nharvest information from this server is generally prohibited \nexcept as reasonably necessary to register or modify .edu \ndomain names.\n\nYou may use \"%\" as a wildcard in your search. For further \ninformation regarding the use of this WHOIS server, please \ntype: help \n") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("\nThis Registry database contains ONLY .EDU domains. \nThe data in the EDUCAUSE Whois database is provided \nby EDUCAUSE for information purposes in order to \nassist in the process of obtaining information about \nor related to .edu domain registration records. \n\nThe EDUCAUSE Whois database is authoritative for the \n.EDU domain. \n\nA Web interface for the .EDU EDUCAUSE Whois Server is \navailable at: http://whois.educause.net \n\nBy submitting a Whois query, you agree that this information \nwill not be used to allow, enable, or otherwise support \nthe transmission of unsolicited commercial advertising or \nsolicitations via e-mail. The use of electronic processes to \nharvest information from this server is generally prohibited \nexcept as reasonably necessary to register or modify .edu \ndomain names.\n\nYou may use \"%\" as a wildcard in your search. For further \ninformation regarding the use of this WHOIS server, please \ntype: help \n") + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.educause.edu/edu/status_registered_spec.rb b/spec/whois/parsers/responses/whois.educause.edu/edu/status_registered_spec.rb index 277fa4d2..fe811f28 100644 --- a/spec/whois/parsers/responses/whois.educause.edu/edu/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.educause.edu/edu/status_registered_spec.rb @@ -9,141 +9,86 @@ # require 'spec_helper' -require 'whois/parsers/whois.educause.edu.rb' -describe Whois::Parsers::WhoisEducauseEdu, "status_registered.expected" do +describe "whois.educause.edu", :aggregate_failures do subject do file = fixture("responses", "whois.educause.edu/edu/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.educause.edu") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("\nThis Registry database contains ONLY .EDU domains. \nThe data in the EDUCAUSE Whois database is provided \nby EDUCAUSE for information purposes in order to \nassist in the process of obtaining information about \nor related to .edu domain registration records. \n\nThe EDUCAUSE Whois database is authoritative for the \n.EDU domain. \n\nA Web interface for the .EDU EDUCAUSE Whois Server is \navailable at: http://whois.educause.net \n\nBy submitting a Whois query, you agree that this information \nwill not be used to allow, enable, or otherwise support \nthe transmission of unsolicited commercial advertising or \nsolicitations via e-mail. The use of electronic processes to \nharvest information from this server is generally prohibited \nexcept as reasonably necessary to register or modify .edu \ndomain names.\n\nYou may use \"%\" as a wildcard in your search. For further \ninformation regarding the use of this WHOIS server, please \ntype: help \n") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("academia.edu") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1999-05-10")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-04-04")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-07-31")) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("Academia") - expect(subject.registrant_contacts[0].address).to eq("251 Kearny St\nsuite 520") - expect(subject.registrant_contacts[0].city).to eq("San Francisco") - expect(subject.registrant_contacts[0].zip).to eq("94108") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country).to eq("UNITED STATES") - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("Academia, Inc.") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq("251 Kearny St\nsuite 520") - expect(subject.admin_contacts[0].city).to eq("San Francisco") - expect(subject.admin_contacts[0].zip).to eq("94108") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country).to eq("UNITED STATES") - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq("(415) 829-2341") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("helpdesk@academia.edu") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Academia, Inc.") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq("251 Kearny St\nsuite 520") - expect(subject.technical_contacts[0].city).to eq("San Francisco") - expect(subject.technical_contacts[0].zip).to eq("94108") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country).to eq("UNITED STATES") - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq("(415) 829-2341") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("helpdesk@academia.edu") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns-1484.awsdns-57.org") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns-225.awsdns-28.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns-1850.awsdns-39.co.uk") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns-629.awsdns-14.net") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("\nThis Registry database contains ONLY .EDU domains. \nThe data in the EDUCAUSE Whois database is provided \nby EDUCAUSE for information purposes in order to \nassist in the process of obtaining information about \nor related to .edu domain registration records. \n\nThe EDUCAUSE Whois database is authoritative for the \n.EDU domain. \n\nA Web interface for the .EDU EDUCAUSE Whois Server is \navailable at: http://whois.educause.net \n\nBy submitting a Whois query, you agree that this information \nwill not be used to allow, enable, or otherwise support \nthe transmission of unsolicited commercial advertising or \nsolicitations via e-mail. The use of electronic processes to \nharvest information from this server is generally prohibited \nexcept as reasonably necessary to register or modify .edu \ndomain names.\n\nYou may use \"%\" as a wildcard in your search. For further \ninformation regarding the use of this WHOIS server, please \ntype: help \n") + expect(subject.domain).to eq("academia.edu") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1999-05-10")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-04-04")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-07-31")) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Academia") + expect(subject.registrant_contacts[0].address).to eq("251 Kearny St\nsuite 520") + expect(subject.registrant_contacts[0].city).to eq("San Francisco") + expect(subject.registrant_contacts[0].zip).to eq("94108") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country).to eq("UNITED STATES") + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("Academia, Inc.") + expect(subject.admin_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts[0].address).to eq("251 Kearny St\nsuite 520") + expect(subject.admin_contacts[0].city).to eq("San Francisco") + expect(subject.admin_contacts[0].zip).to eq("94108") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country).to eq("UNITED STATES") + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq("(415) 829-2341") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("helpdesk@academia.edu") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Academia, Inc.") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq("251 Kearny St\nsuite 520") + expect(subject.technical_contacts[0].city).to eq("San Francisco") + expect(subject.technical_contacts[0].zip).to eq("94108") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country).to eq("UNITED STATES") + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq("(415) 829-2341") + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("helpdesk@academia.edu") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns-1484.awsdns-57.org") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns-225.awsdns-28.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns-1850.awsdns-39.co.uk") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns-629.awsdns-14.net") end end diff --git a/spec/whois/parsers/responses/whois.eenet.ee/ee/status_available_spec.rb b/spec/whois/parsers/responses/whois.eenet.ee/ee/status_available_spec.rb index 1633b89f..be801d74 100644 --- a/spec/whois/parsers/responses/whois.eenet.ee/ee/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.eenet.ee/ee/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.eenet.ee.rb' -describe Whois::Parsers::WhoisEenetEe, "status_available.expected" do +describe "whois.eenet.ee", :aggregate_failures do subject do file = fixture("responses", "whois.eenet.ee/ee/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.eenet.ee") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.eenet.ee/ee/status_registered_spec.rb b/spec/whois/parsers/responses/whois.eenet.ee/ee/status_registered_spec.rb index 2b1dfbf6..7e71dc59 100644 --- a/spec/whois/parsers/responses/whois.eenet.ee/ee/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.eenet.ee/ee/status_registered_spec.rb @@ -9,56 +9,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.eenet.ee.rb' -describe Whois::Parsers::WhoisEenetEe, "status_registered.expected" do +describe "whois.eenet.ee", :aggregate_failures do subject do file = fixture("responses", "whois.eenet.ee/ee/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.eenet.ee") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-04-22")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2010-05-28")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-04-22")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2010-05-28")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.enom.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.enom.com/status_available_spec.rb index 5fdf05b2..11f1e275 100644 --- a/spec/whois/parsers/responses/whois.enom.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.enom.com/status_available_spec.rb @@ -9,83 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.enom.com.rb' -describe Whois::Parsers::WhoisEnomCom, "status_available.expected" do +describe "whois.enom.com", :aggregate_failures do subject do file = fixture("responses", "whois.enom.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.enom.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.enom.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.enom.com/status_registered_spec.rb index 9952b5a3..29fa03f6 100644 --- a/spec/whois/parsers/responses/whois.enom.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.enom.com/status_registered_spec.rb @@ -9,148 +9,96 @@ # require 'spec_helper' -require 'whois/parsers/whois.enom.com.rb' -describe Whois::Parsers::WhoisEnomCom, "status_registered.expected" do +describe "whois.enom.com", :aggregate_failures do subject do file = fixture("responses", "whois.enom.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.enom.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("enom.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1997-10-24 00:00:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("eNom, Inc.") - expect(subject.registrar.organization).to eq("eNom, Inc.") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("DNS MANAGER") - expect(subject.registrant_contacts[0].organization).to eq("ENOM, INC.") - expect(subject.registrant_contacts[0].address).to eq("P.O. BOX 7449, 5808 LAKE WASHINGTON BLVD. NE, SUITE 300") - expect(subject.registrant_contacts[0].city).to eq("KIRKLAND") - expect(subject.registrant_contacts[0].zip).to eq("98033") - expect(subject.registrant_contacts[0].state).to eq("WA") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("") - expect(subject.registrant_contacts[0].fax).to eq("") - expect(subject.registrant_contacts[0].email).to eq("") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("DNS MANAGER") - expect(subject.admin_contacts[0].organization).to eq("ENOM, INC.") - expect(subject.admin_contacts[0].address).to eq("P.O. BOX 7449, 5808 LAKE WASHINGTON BLVD. NE, SUITE 300") - expect(subject.admin_contacts[0].city).to eq("KIRKLAND") - expect(subject.admin_contacts[0].zip).to eq("98033") - expect(subject.admin_contacts[0].state).to eq("WA") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.4259744689") - expect(subject.admin_contacts[0].fax).to eq("+1.4259744791") - expect(subject.admin_contacts[0].email).to eq("DOMAINS@DEMANDMEDIA.COM") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("DNS MANAGER") - expect(subject.technical_contacts[0].organization).to eq("ENOM, INC.") - expect(subject.technical_contacts[0].address).to eq("P.O. BOX 7449, 5808 LAKE WASHINGTON BLVD. NE, SUITE 300") - expect(subject.technical_contacts[0].city).to eq("KIRKLAND") - expect(subject.technical_contacts[0].zip).to eq("98033") - expect(subject.technical_contacts[0].state).to eq("WA") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.4259744689") - expect(subject.technical_contacts[0].fax).to eq("+1.4259744791") - expect(subject.technical_contacts[0].email).to eq("DOMAINS@DEMANDMEDIA.COM") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("dns11.enom.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("dns12.enom.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("dns13.enom.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("enom.com") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1997-10-24 00:00:00")) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("eNom, Inc.") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("DNS MANAGER") + expect(subject.registrant_contacts[0].organization).to eq("ENOM, INC.") + expect(subject.registrant_contacts[0].address).to eq("P.O. BOX 7449, 5808 LAKE WASHINGTON BLVD. NE, SUITE 300") + expect(subject.registrant_contacts[0].city).to eq("KIRKLAND") + expect(subject.registrant_contacts[0].zip).to eq("98033") + expect(subject.registrant_contacts[0].state).to eq("WA") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("DNS MANAGER") + expect(subject.admin_contacts[0].organization).to eq("ENOM, INC.") + expect(subject.admin_contacts[0].address).to eq("P.O. BOX 7449, 5808 LAKE WASHINGTON BLVD. NE, SUITE 300") + expect(subject.admin_contacts[0].city).to eq("KIRKLAND") + expect(subject.admin_contacts[0].zip).to eq("98033") + expect(subject.admin_contacts[0].state).to eq("WA") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.4259744689") + expect(subject.admin_contacts[0].fax).to eq("+1.4259744791") + expect(subject.admin_contacts[0].email).to eq("DOMAINS@DEMANDMEDIA.COM") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("DNS MANAGER") + expect(subject.technical_contacts[0].organization).to eq("ENOM, INC.") + expect(subject.technical_contacts[0].address).to eq("P.O. BOX 7449, 5808 LAKE WASHINGTON BLVD. NE, SUITE 300") + expect(subject.technical_contacts[0].city).to eq("KIRKLAND") + expect(subject.technical_contacts[0].zip).to eq("98033") + expect(subject.technical_contacts[0].state).to eq("WA") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.4259744689") + expect(subject.technical_contacts[0].fax).to eq("+1.4259744791") + expect(subject.technical_contacts[0].email).to eq("DOMAINS@DEMANDMEDIA.COM") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("dns11.enom.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("dns12.enom.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("dns13.enom.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.enom.com/status_registered_with_blank_updated_date_spec.rb b/spec/whois/parsers/responses/whois.enom.com/status_registered_with_blank_updated_date_spec.rb index a354b2e5..47906af8 100644 --- a/spec/whois/parsers/responses/whois.enom.com/status_registered_with_blank_updated_date_spec.rb +++ b/spec/whois/parsers/responses/whois.enom.com/status_registered_with_blank_updated_date_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.enom.com.rb' -describe Whois::Parsers::WhoisEnomCom, "status_registered_with_blank_updated_date.expected" do +describe "whois.enom.com", :aggregate_failures do subject do file = fixture("responses", "whois.enom.com/status_registered_with_blank_updated_date.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.enom.com") + Whois::Parser.parser_for(part) end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end + it "matches status_registered_with_blank_updated_date.expected" do + expect(subject.updated_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.eu.org/eu.org/status_available_spec.rb b/spec/whois/parsers/responses/whois.eu.org/eu.org/status_available_spec.rb index be28d7e5..07c89844 100644 --- a/spec/whois/parsers/responses/whois.eu.org/eu.org/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.eu.org/eu.org/status_available_spec.rb @@ -9,49 +9,22 @@ # require 'spec_helper' -require 'whois/parsers/whois.eu.org.rb' -describe Whois::Parsers::WhoisEuOrg, "status_available.expected" do +describe "whois.eu.org", :aggregate_failures do subject do file = fixture("responses", "whois.eu.org/eu.org/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.eu.org") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.eu.org/eu.org/status_registered_spec.rb b/spec/whois/parsers/responses/whois.eu.org/eu.org/status_registered_spec.rb index f14000e1..21df4cfc 100644 --- a/spec/whois/parsers/responses/whois.eu.org/eu.org/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.eu.org/eu.org/status_registered_spec.rb @@ -9,49 +9,22 @@ # require 'spec_helper' -require 'whois/parsers/whois.eu.org.rb' -describe Whois::Parsers::WhoisEuOrg, "status_registered.expected" do +describe "whois.eu.org", :aggregate_failures do subject do file = fixture("responses", "whois.eu.org/eu.org/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.eu.org") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.eu/eu/property_nameservers_spec.rb b/spec/whois/parsers/responses/whois.eu/eu/property_nameservers_spec.rb index 32f0a1e4..f6261aac 100644 --- a/spec/whois/parsers/responses/whois.eu/eu/property_nameservers_spec.rb +++ b/spec/whois/parsers/responses/whois.eu/eu/property_nameservers_spec.rb @@ -9,34 +9,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.eu.rb' -describe Whois::Parsers::WhoisEu, "property_nameservers.expected" do +describe "whois.eu", :aggregate_failures do subject do file = fixture("responses", "whois.eu/eu/property_nameservers.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.eu") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(5) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("a.nic.eu") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("l.nic.eu") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("p.nic.eu") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns1.eurid.eu") - expect(subject.nameservers[3].ipv4).to eq("91.220.191.220") - expect(subject.nameservers[3].ipv6).to eq(nil) - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("ns2.eurid.eu") - expect(subject.nameservers[4].ipv4).to eq("195.234.53.220") - expect(subject.nameservers[4].ipv6).to eq(nil) - end + it "matches property_nameservers.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(5) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("a.nic.eu") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("l.nic.eu") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("p.nic.eu") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns1.eurid.eu") + expect(subject.nameservers[3].ipv4).to eq("91.220.191.220") + expect(subject.nameservers[3].ipv6).to eq(nil) + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("ns2.eurid.eu") + expect(subject.nameservers[4].ipv4).to eq("195.234.53.220") + expect(subject.nameservers[4].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.eu/eu/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.eu/eu/response_throttled_spec.rb index 4ce903b5..e5c0b508 100644 --- a/spec/whois/parsers/responses/whois.eu/eu/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/whois.eu/eu/response_throttled_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.eu.rb' -describe Whois::Parsers::WhoisEu, "response_throttled.expected" do +describe "whois.eu", :aggregate_failures do subject do file = fixture("responses", "whois.eu/eu/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.eu") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.eu/eu/status_available_spec.rb b/spec/whois/parsers/responses/whois.eu/eu/status_available_spec.rb index 01418739..2143d16e 100644 --- a/spec/whois/parsers/responses/whois.eu/eu/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.eu/eu/status_available_spec.rb @@ -9,86 +9,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.eu.rb' -describe Whois::Parsers::WhoisEu, "status_available.expected" do +describe "whois.eu", :aggregate_failures do subject do file = fixture("responses", "whois.eu/eu/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.eu") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.eu") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.eu") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to eq(nil) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.response_throttled?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.eu/eu/status_registered_spec.rb b/spec/whois/parsers/responses/whois.eu/eu/status_registered_spec.rb index 39c62814..20d8e21c 100644 --- a/spec/whois/parsers/responses/whois.eu/eu/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.eu/eu/status_registered_spec.rb @@ -9,106 +9,50 @@ # require 'spec_helper' -require 'whois/parsers/whois.eu.rb' -describe Whois::Parsers::WhoisEu, "status_registered.expected" do +describe "whois.eu", :aggregate_failures do subject do file = fixture("responses", "whois.eu/eu/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.eu") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.eu") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq("https://www.markmonitor.com/") - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(0) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns3.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns4.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns1.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns2.google.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.eu") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("https://www.markmonitor.com/") + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(0) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns3.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns4.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns1.google.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns2.google.com") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) + expect(subject.response_throttled?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.fi/fi/property_status_graceperiod_spec.rb b/spec/whois/parsers/responses/whois.fi/fi/property_status_graceperiod_spec.rb index 7476866f..3719493a 100644 --- a/spec/whois/parsers/responses/whois.fi/fi/property_status_graceperiod_spec.rb +++ b/spec/whois/parsers/responses/whois.fi/fi/property_status_graceperiod_spec.rb @@ -9,109 +9,72 @@ # require 'spec_helper' -require 'whois/parsers/whois.fi.rb' -describe Whois::Parsers::WhoisFi, "property_status_graceperiod.expected" do +describe "whois.fi", :aggregate_failures do subject do file = fixture("responses", "whois.fi/fi/property_status_graceperiod.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.fi") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("More information is available at https://domain.fi/\nCopyright (c) Finnish Communications Regulatory Authority") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("oogle.fi") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2012-06-21")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-06-22")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2013-06-21")) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("NURMI") - expect(subject.registrant_contacts[0].name).to eq("-") - expect(subject.registrant_contacts[0].organization).to eq("Minna") - expect(subject.registrant_contacts[0].address).to eq("Huovitie 3") - expect(subject.registrant_contacts[0].city).to eq("HELSINKI") - expect(subject.registrant_contacts[0].zip).to eq("00400") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq("+358201599789") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("a.ns.netim.net") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("b.ns.netim.net") - end + it "matches property_status_graceperiod.expected" do + expect(subject.disclaimer).to eq("Copyright (c) Finnish Transport and Communications Agency Traficom") + expect(subject.domain).to eq("kalatalousministeri.fi") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2018-03-14 17:47:42")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2019-11-06")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-03-14 17:47:42")) + expect(subject.registrar.name).to eq("Gandi SAS") + expect(subject.registrar.url).to eq("www.gandi.net") + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("2823344-7") + expect(subject.admin_contacts[0].name).to eq("Digiteam Oy") + expect(subject.admin_contacts[0].address).to eq("Myllyniityntie 71") + expect(subject.admin_contacts[0].city).to eq("Lohja") + expect(subject.admin_contacts[0].zip).to eq("08100") + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq("Finland") + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq("+358.503716096") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Seravo Oy") + expect(subject.technical_contacts[0].address).to eq(nil) + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq(nil) + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("hostmaster@seravo.com") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns-184-c.gandi.net") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns-196-a.gandi.net") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns-73-b.gandi.net") end end diff --git a/spec/whois/parsers/responses/whois.fi/fi/status_available_spec.rb b/spec/whois/parsers/responses/whois.fi/fi/status_available_spec.rb index f5bc9f4d..8672c61c 100644 --- a/spec/whois/parsers/responses/whois.fi/fi/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.fi/fi/status_available_spec.rb @@ -9,86 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.fi.rb' -describe Whois::Parsers::WhoisFi, "status_available.expected" do +describe "whois.fi", :aggregate_failures do subject do file = fixture("responses", "whois.fi/fi/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.fi") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("More information is available at https://domain.fi/\nCopyright (c) Finnish Communications Regulatory Authority") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Copyright (c) Finnish Transport and Communications Agency Traficom") + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.fi/fi/status_registered_spec.rb b/spec/whois/parsers/responses/whois.fi/fi/status_registered_spec.rb index a75af274..3f0b22fe 100644 --- a/spec/whois/parsers/responses/whois.fi/fi/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.fi/fi/status_registered_spec.rb @@ -9,113 +9,77 @@ # require 'spec_helper' -require 'whois/parsers/whois.fi.rb' -describe Whois::Parsers::WhoisFi, "status_registered.expected" do +describe "whois.fi", :aggregate_failures do subject do file = fixture("responses", "whois.fi/fi/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.fi") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("More information is available at https://domain.fi/\nCopyright (c) Finnish Communications Regulatory Authority") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.fi") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-06-30")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-06-07")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-07-04")) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("09073468") - expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") - expect(subject.registrant_contacts[0].organization).to eq("Google Finland Oy") - expect(subject.registrant_contacts[0].address).to eq("Mannerheimintie 12 B") - expect(subject.registrant_contacts[0].city).to eq("HELSINKI") - expect(subject.registrant_contacts[0].zip).to eq("00100") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq("35896966890") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Copyright (c) Finnish Transport and Communications Agency Traficom") + expect(subject.domain).to eq("google.fi") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-06-30")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2019-06-02")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-07-04 10:15:55")) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("www.markmonitor.com") + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("3582691") + expect(subject.admin_contacts[0].name).to eq("Google LLC") + expect(subject.admin_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq("United States of America") + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Google LLC") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq(nil) + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq(nil) + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("ccops@markmonitor.com") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns3.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns4.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns1.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.fi/fi/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.fi/fi/status_reserved_spec.rb index 3e268607..5e8b1333 100644 --- a/spec/whois/parsers/responses/whois.fi/fi/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.fi/fi/status_reserved_spec.rb @@ -9,86 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.fi.rb' -describe Whois::Parsers::WhoisFi, "status_reserved.expected" do +describe "whois.fi", :aggregate_failures do subject do file = fixture("responses", "whois.fi/fi/status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.fi") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("More information is available at https://domain.fi/\nCopyright (c) Finnish Communications Regulatory Authority") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_reserved.expected" do + expect(subject.disclaimer).to eq("Copyright (c) Finnish Transport and Communications Agency Traficom") + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.reserved?).to eq(true) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.gandi.net/status_available_spec.rb b/spec/whois/parsers/responses/whois.gandi.net/status_available_spec.rb index 96a3bfbc..f1c20d1a 100644 --- a/spec/whois/parsers/responses/whois.gandi.net/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.gandi.net/status_available_spec.rb @@ -9,83 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.gandi.net.rb' -describe Whois::Parsers::WhoisGandiNet, "status_available.expected" do +describe "whois.gandi.net", :aggregate_failures do subject do file = fixture("responses", "whois.gandi.net/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.gandi.net") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.gandi.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.gandi.net/status_registered_spec.rb index 1291eebc..da81fbd4 100644 --- a/spec/whois/parsers/responses/whois.gandi.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.gandi.net/status_registered_spec.rb @@ -9,151 +9,99 @@ # require 'spec_helper' -require 'whois/parsers/whois.gandi.net.rb' -describe Whois::Parsers::WhoisGandiNet, "status_registered.expected" do +describe "whois.gandi.net", :aggregate_failures do subject do file = fixture("responses", "whois.gandi.net/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.gandi.net") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("gandi.net") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("6683836_DOMAIN_NET-VRSN") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2000-02-23 12:12:59 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-10-23 18:42:52 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2023-05-21 14:09:56 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("81") - expect(subject.registrar.name).to eq("GANDI SAS") - expect(subject.registrar.organization).to eq("GANDI SAS") - expect(subject.registrar.url).to eq("http://www.gandi.net") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Stephan RAMOIN") - expect(subject.registrant_contacts[0].organization).to eq("Gandi SAS") - expect(subject.registrant_contacts[0].address).to eq("63-65 Boulevard Massena") - expect(subject.registrant_contacts[0].city).to eq("Paris") - expect(subject.registrant_contacts[0].zip).to eq("75013") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("FR") - expect(subject.registrant_contacts[0].phone).to eq("+33.143737851") - expect(subject.registrant_contacts[0].fax).to eq("+33.143731851") - expect(subject.registrant_contacts[0].email).to eq("61ebd5b3df9f45f2b3f67f6dd01e1049-523678@contact.gandi.net") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("Noc GANDI") - expect(subject.admin_contacts[0].organization).to eq("GANDI SAS") - expect(subject.admin_contacts[0].address).to eq("63-65 Boulevard MASSENA") - expect(subject.admin_contacts[0].city).to eq("Paris") - expect(subject.admin_contacts[0].zip).to eq("75013") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("FR") - expect(subject.admin_contacts[0].phone).to eq("+33.143737851") - expect(subject.admin_contacts[0].fax).to eq("+33.143731851") - expect(subject.admin_contacts[0].email).to eq("12e7da77f638acdf8d9f4d0b828ca80c-248842@contact.gandi.net") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Noc GANDI") - expect(subject.technical_contacts[0].organization).to eq("GANDI SAS") - expect(subject.technical_contacts[0].address).to eq("63-65 Boulevard MASSENA") - expect(subject.technical_contacts[0].city).to eq("Paris") - expect(subject.technical_contacts[0].zip).to eq("75013") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("FR") - expect(subject.technical_contacts[0].phone).to eq("+33.143737851") - expect(subject.technical_contacts[0].fax).to eq("+33.143731851") - expect(subject.technical_contacts[0].email).to eq("12e7da77f638acdf8d9f4d0b828ca80c-248842@contact.gandi.net") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("dns0.gandi.net") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("dns1.gandi.net") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("dns2.gandi.net") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("dns3.gandi.net") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("gandi.net") + expect(subject.domain_id).to eq("6683836_DOMAIN_NET-VRSN") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2000-02-23 12:12:59 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-10-23 18:42:52 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2023-05-21 14:09:56 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("81") + expect(subject.registrar.name).to eq("GANDI SAS") + expect(subject.registrar.url).to eq("http://www.gandi.net") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Stephan RAMOIN") + expect(subject.registrant_contacts[0].organization).to eq("Gandi SAS") + expect(subject.registrant_contacts[0].address).to eq("63-65 Boulevard Massena") + expect(subject.registrant_contacts[0].city).to eq("Paris") + expect(subject.registrant_contacts[0].zip).to eq("75013") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("FR") + expect(subject.registrant_contacts[0].phone).to eq("+33.143737851") + expect(subject.registrant_contacts[0].fax).to eq("+33.143731851") + expect(subject.registrant_contacts[0].email).to eq("61ebd5b3df9f45f2b3f67f6dd01e1049-523678@contact.gandi.net") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("Noc GANDI") + expect(subject.admin_contacts[0].organization).to eq("GANDI SAS") + expect(subject.admin_contacts[0].address).to eq("63-65 Boulevard MASSENA") + expect(subject.admin_contacts[0].city).to eq("Paris") + expect(subject.admin_contacts[0].zip).to eq("75013") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("FR") + expect(subject.admin_contacts[0].phone).to eq("+33.143737851") + expect(subject.admin_contacts[0].fax).to eq("+33.143731851") + expect(subject.admin_contacts[0].email).to eq("12e7da77f638acdf8d9f4d0b828ca80c-248842@contact.gandi.net") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Noc GANDI") + expect(subject.technical_contacts[0].organization).to eq("GANDI SAS") + expect(subject.technical_contacts[0].address).to eq("63-65 Boulevard MASSENA") + expect(subject.technical_contacts[0].city).to eq("Paris") + expect(subject.technical_contacts[0].zip).to eq("75013") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("FR") + expect(subject.technical_contacts[0].phone).to eq("+33.143737851") + expect(subject.technical_contacts[0].fax).to eq("+33.143731851") + expect(subject.technical_contacts[0].email).to eq("12e7da77f638acdf8d9f4d0b828ca80c-248842@contact.gandi.net") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("dns0.gandi.net") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("dns1.gandi.net") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("dns2.gandi.net") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("dns3.gandi.net") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.gg/gg/status_available_spec.rb b/spec/whois/parsers/responses/whois.gg/gg/status_available_spec.rb index 2046e225..922530ea 100644 --- a/spec/whois/parsers/responses/whois.gg/gg/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.gg/gg/status_available_spec.rb @@ -9,65 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.gg.rb' -describe Whois::Parsers::WhoisGg, "status_available.expected" do +describe "whois.gg", :aggregate_failures do subject do file = fixture("responses", "whois.gg/gg/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.gg") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.gg") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.gg") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.gg/gg/status_registered_spec.rb b/spec/whois/parsers/responses/whois.gg/gg/status_registered_spec.rb index 5420cf73..31c19380 100644 --- a/spec/whois/parsers/responses/whois.gg/gg/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.gg/gg/status_registered_spec.rb @@ -9,69 +9,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.gg.rb' -describe Whois::Parsers::WhoisGg, "status_registered.expected" do +describe "whois.gg", :aggregate_failures do subject do file = fixture("responses", "whois.gg/gg/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.gg") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.gg") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("24221-CI") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-04-30 00:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns4.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.gg") + expect(subject.domain_id).to eq("24221-CI") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-04-30 00:00:00 UTC")) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns4.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3.google.com") end end diff --git a/spec/whois/parsers/responses/whois.godaddy.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.godaddy.com/status_registered_spec.rb index 3888268f..147d1877 100644 --- a/spec/whois/parsers/responses/whois.godaddy.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.godaddy.com/status_registered_spec.rb @@ -9,177 +9,125 @@ # require 'spec_helper' -require 'whois/parsers/whois.godaddy.com.rb' -describe Whois::Parsers::WhoisGodaddyCom, "status_registered.expected" do +describe "whois.godaddy.com", :aggregate_failures do subject do file = fixture("responses", "whois.godaddy.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.godaddy.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("godaddy.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("4013247_DOMAIN_COM-VRSN") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1999-03-02 05:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-06-02 12:16:24 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2021-11-01 11:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("146") - expect(subject.registrar.name).to eq("GoDaddy.com, LLC") - expect(subject.registrar.organization).to eq("GoDaddy.com, LLC") - expect(subject.registrar.url).to eq("http://www.godaddy.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("Not Available From Registry") - expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") - expect(subject.registrant_contacts[0].organization).to eq("Go Daddy Operating Company, LLC") - expect(subject.registrant_contacts[0].address).to eq("14455 N Hayden Rd Suite 219") - expect(subject.registrant_contacts[0].city).to eq("Scottsdale") - expect(subject.registrant_contacts[0].zip).to eq("85260") - expect(subject.registrant_contacts[0].state).to eq("Arizona") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.4805058800") - expect(subject.registrant_contacts[0].fax).to eq("+1.4805058844") - expect(subject.registrant_contacts[0].email).to eq("companynames@godaddy.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("Not Available From Registry") - expect(subject.admin_contacts[0].name).to eq("Domain Administrator") - expect(subject.admin_contacts[0].organization).to eq("Go Daddy Operating Company, LLC") - expect(subject.admin_contacts[0].address).to eq("14455 N Hayden Rd Suite 219") - expect(subject.admin_contacts[0].city).to eq("Scottsdale") - expect(subject.admin_contacts[0].zip).to eq("85260") - expect(subject.admin_contacts[0].state).to eq("Arizona") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.4805058800") - expect(subject.admin_contacts[0].fax).to eq("+1.4805058844") - expect(subject.admin_contacts[0].email).to eq("companynames@godaddy.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("Not Available From Registry") - expect(subject.technical_contacts[0].name).to eq("Domain Administrator") - expect(subject.technical_contacts[0].organization).to eq("Go Daddy Operating Company, LLC") - expect(subject.technical_contacts[0].address).to eq("14455 N Hayden Rd Suite 219") - expect(subject.technical_contacts[0].city).to eq("Scottsdale") - expect(subject.technical_contacts[0].zip).to eq("85260") - expect(subject.technical_contacts[0].state).to eq("Arizona") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.4805058800") - expect(subject.technical_contacts[0].fax).to eq("+1.4805058844") - expect(subject.technical_contacts[0].email).to eq("companynames@godaddy.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(9) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("cns1.godaddy.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("cns2.godaddy.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("cns3.godaddy.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("a11-64.akam.net") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("a1-245.akam.net") - expect(subject.nameservers[4].ipv4).to eq(nil) - expect(subject.nameservers[4].ipv6).to eq(nil) - expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[5].name).to eq("a20-65.akam.net") - expect(subject.nameservers[5].ipv4).to eq(nil) - expect(subject.nameservers[5].ipv6).to eq(nil) - expect(subject.nameservers[6]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[6].name).to eq("a6-66.akam.net") - expect(subject.nameservers[6].ipv4).to eq(nil) - expect(subject.nameservers[6].ipv6).to eq(nil) - expect(subject.nameservers[7]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[7].name).to eq("a8-67.akam.net") - expect(subject.nameservers[7].ipv4).to eq(nil) - expect(subject.nameservers[7].ipv6).to eq(nil) - expect(subject.nameservers[8]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[8].name).to eq("a9-67.akam.net") - expect(subject.nameservers[8].ipv4).to eq(nil) - expect(subject.nameservers[8].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("godaddy.com") + expect(subject.domain_id).to eq("4013247_DOMAIN_COM-VRSN") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1999-03-02 05:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-06-02 12:16:24 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2021-11-01 11:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("146") + expect(subject.registrar.name).to eq("GoDaddy.com, LLC") + expect(subject.registrar.url).to eq("http://www.godaddy.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("Not Available From Registry") + expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") + expect(subject.registrant_contacts[0].organization).to eq("Go Daddy Operating Company, LLC") + expect(subject.registrant_contacts[0].address).to eq("14455 N Hayden Rd Suite 219") + expect(subject.registrant_contacts[0].city).to eq("Scottsdale") + expect(subject.registrant_contacts[0].zip).to eq("85260") + expect(subject.registrant_contacts[0].state).to eq("Arizona") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.4805058800") + expect(subject.registrant_contacts[0].fax).to eq("+1.4805058844") + expect(subject.registrant_contacts[0].email).to eq("companynames@godaddy.com") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("Not Available From Registry") + expect(subject.admin_contacts[0].name).to eq("Domain Administrator") + expect(subject.admin_contacts[0].organization).to eq("Go Daddy Operating Company, LLC") + expect(subject.admin_contacts[0].address).to eq("14455 N Hayden Rd Suite 219") + expect(subject.admin_contacts[0].city).to eq("Scottsdale") + expect(subject.admin_contacts[0].zip).to eq("85260") + expect(subject.admin_contacts[0].state).to eq("Arizona") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.4805058800") + expect(subject.admin_contacts[0].fax).to eq("+1.4805058844") + expect(subject.admin_contacts[0].email).to eq("companynames@godaddy.com") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("Not Available From Registry") + expect(subject.technical_contacts[0].name).to eq("Domain Administrator") + expect(subject.technical_contacts[0].organization).to eq("Go Daddy Operating Company, LLC") + expect(subject.technical_contacts[0].address).to eq("14455 N Hayden Rd Suite 219") + expect(subject.technical_contacts[0].city).to eq("Scottsdale") + expect(subject.technical_contacts[0].zip).to eq("85260") + expect(subject.technical_contacts[0].state).to eq("Arizona") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.4805058800") + expect(subject.technical_contacts[0].fax).to eq("+1.4805058844") + expect(subject.technical_contacts[0].email).to eq("companynames@godaddy.com") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(9) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("cns1.godaddy.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("cns2.godaddy.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("cns3.godaddy.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("a11-64.akam.net") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("a1-245.akam.net") + expect(subject.nameservers[4].ipv4).to eq(nil) + expect(subject.nameservers[4].ipv6).to eq(nil) + expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[5].name).to eq("a20-65.akam.net") + expect(subject.nameservers[5].ipv4).to eq(nil) + expect(subject.nameservers[5].ipv6).to eq(nil) + expect(subject.nameservers[6]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[6].name).to eq("a6-66.akam.net") + expect(subject.nameservers[6].ipv4).to eq(nil) + expect(subject.nameservers[6].ipv6).to eq(nil) + expect(subject.nameservers[7]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[7].name).to eq("a8-67.akam.net") + expect(subject.nameservers[7].ipv4).to eq(nil) + expect(subject.nameservers[7].ipv6).to eq(nil) + expect(subject.nameservers[8]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[8].name).to eq("a9-67.akam.net") + expect(subject.nameservers[8].ipv4).to eq(nil) + expect(subject.nameservers[8].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.gov.za/gov.za/status_available_spec.rb b/spec/whois/parsers/responses/whois.gov.za/gov.za/status_available_spec.rb index 049321a5..1ad5346f 100644 --- a/spec/whois/parsers/responses/whois.gov.za/gov.za/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.gov.za/gov.za/status_available_spec.rb @@ -9,49 +9,22 @@ # require 'spec_helper' -require 'whois/parsers/whois.gov.za.rb' -describe Whois::Parsers::WhoisGovZa, "status_available.expected" do +describe "whois.gov.za", :aggregate_failures do subject do file = fixture("responses", "whois.gov.za/gov.za/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.gov.za") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.gov.za/gov.za/status_registered_spec.rb b/spec/whois/parsers/responses/whois.gov.za/gov.za/status_registered_spec.rb index ab3af59e..8f9bed6f 100644 --- a/spec/whois/parsers/responses/whois.gov.za/gov.za/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.gov.za/gov.za/status_registered_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.gov.za.rb' -describe Whois::Parsers::WhoisGovZa, "status_registered.expected" do +describe "whois.gov.za", :aggregate_failures do subject do file = fixture("responses", "whois.gov.za/gov.za/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.gov.za") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2012-09-03")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2012-09-03")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.hkirc.hk/hk/property_expires_on_null_spec.rb b/spec/whois/parsers/responses/whois.hkirc.hk/hk/property_expires_on_null_spec.rb index be5e0cbf..2a8b4f82 100644 --- a/spec/whois/parsers/responses/whois.hkirc.hk/hk/property_expires_on_null_spec.rb +++ b/spec/whois/parsers/responses/whois.hkirc.hk/hk/property_expires_on_null_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.hkirc.hk.rb' -describe Whois::Parsers::WhoisHkircHk, "property_expires_on_null.expected" do +describe "whois.hkirc.hk", :aggregate_failures do subject do file = fixture("responses", "whois.hkirc.hk/hk/property_expires_on_null.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.hkirc.hk") + Whois::Parser.parser_for(part) end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end + it "matches property_expires_on_null.expected" do + expect(subject.expires_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.hkirc.hk/hk/status_available_spec.rb b/spec/whois/parsers/responses/whois.hkirc.hk/hk/status_available_spec.rb index d6a93f1d..c1f8c1b0 100644 --- a/spec/whois/parsers/responses/whois.hkirc.hk/hk/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.hkirc.hk/hk/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.hkirc.hk.rb' -describe Whois::Parsers::WhoisHkircHk, "status_available.expected" do +describe "whois.hkirc.hk", :aggregate_failures do subject do file = fixture("responses", "whois.hkirc.hk/hk/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.hkirc.hk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.hkirc.hk/hk/status_registered_spec.rb b/spec/whois/parsers/responses/whois.hkirc.hk/hk/status_registered_spec.rb index e67e2a03..7da8f38c 100644 --- a/spec/whois/parsers/responses/whois.hkirc.hk/hk/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.hkirc.hk/hk/status_registered_spec.rb @@ -9,60 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.hkirc.hk.rb' -describe Whois::Parsers::WhoisHkircHk, "status_registered.expected" do +describe "whois.hkirc.hk", :aggregate_failures do subject do file = fixture("responses", "whois.hkirc.hk/hk/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.hkirc.hk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2004-04-06")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-03-31")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2004-04-06")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-03-31")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.iana.org/int/status_available_spec.rb b/spec/whois/parsers/responses/whois.iana.org/int/status_available_spec.rb index cc819aec..491eae2f 100644 --- a/spec/whois/parsers/responses/whois.iana.org/int/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.iana.org/int/status_available_spec.rb @@ -9,68 +9,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.iana.org.rb' -describe Whois::Parsers::WhoisIanaOrg, "status_available.expected" do +describe "whois.iana.org", :aggregate_failures do subject do file = fixture("responses", "whois.iana.org/int/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.iana.org") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.iana.org/int/status_registered_spec.rb b/spec/whois/parsers/responses/whois.iana.org/int/status_registered_spec.rb index 44828c93..98ea3cc7 100644 --- a/spec/whois/parsers/responses/whois.iana.org/int/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.iana.org/int/status_registered_spec.rb @@ -9,136 +9,97 @@ # require 'spec_helper' -require 'whois/parsers/whois.iana.org.rb' -describe Whois::Parsers::WhoisIanaOrg, "status_registered.expected" do +describe "whois.iana.org", :aggregate_failures do subject do file = fixture("responses", "whois.iana.org/int/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.iana.org") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1997-08-26")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-08-07")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("North Atlantic Treaty Organization") - expect(subject.registrant_contacts[0].address).to eq("Blvd Leopold III") - expect(subject.registrant_contacts[0].city).to eq("1110 Brussels") - expect(subject.registrant_contacts[0].zip).to eq("Brussels") - expect(subject.registrant_contacts[0].country).to eq("Belgium") - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("Aidan Murdock") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq("SHAPE") - expect(subject.admin_contacts[0].city).to eq("NCIA SP SDD SAS NAR") - expect(subject.admin_contacts[0].zip).to eq("Mons Hainaut 7010") - expect(subject.admin_contacts[0].country).to eq("Belgium") - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq("+32 65 44 9168") - expect(subject.admin_contacts[0].fax).to eq("+32 65 44 9480") - expect(subject.admin_contacts[0].email).to eq("aidan.murdock@ncia.nato.int") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Francesco Conserva") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq("SHAPE") - expect(subject.technical_contacts[0].city).to eq("NCIA SP SMD ENT EMA") - expect(subject.technical_contacts[0].zip).to eq("Mons Hainaut 7010") - expect(subject.technical_contacts[0].country).to eq("Belgium") - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq("+32 65 44 7534") - expect(subject.technical_contacts[0].fax).to eq("+32 65 44 7556") - expect(subject.technical_contacts[0].email).to eq("francesco.conserva@ncia.nato.int") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(7) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("globe.nc3a.nato.int") - expect(subject.nameservers[0].ipv4).to eq("192.41.140.178") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("max.nra.nato.int") - expect(subject.nameservers[1].ipv4).to eq("192.101.252.69") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("maxima.nra.nato.int") - expect(subject.nameservers[2].ipv4).to eq("193.110.130.68") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns.namsa.nato.int") - expect(subject.nameservers[3].ipv4).to eq("193.168.11.15") - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("ns.saclantc.nato.int") - expect(subject.nameservers[4].ipv4).to eq("192.106.197.1") - expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[5].name).to eq("ns1.cs.ucl.ac.uk") - expect(subject.nameservers[5].ipv4).to eq("128.16.5.32") - expect(subject.nameservers[6]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[6].name).to eq("ns1.drenet.dnd.ca") - expect(subject.nameservers[6].ipv4).to eq("131.136.242.3") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1997-08-26")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-08-07")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("North Atlantic Treaty Organization") + expect(subject.registrant_contacts[0].address).to eq("Blvd Leopold III") + expect(subject.registrant_contacts[0].city).to eq("1110 Brussels") + expect(subject.registrant_contacts[0].zip).to eq("Brussels") + expect(subject.registrant_contacts[0].country).to eq("Belgium") + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("Aidan Murdock") + expect(subject.admin_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts[0].address).to eq("SHAPE") + expect(subject.admin_contacts[0].city).to eq("NCIA SP SDD SAS NAR") + expect(subject.admin_contacts[0].zip).to eq("Mons Hainaut 7010") + expect(subject.admin_contacts[0].country).to eq("Belgium") + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq("+32 65 44 9168") + expect(subject.admin_contacts[0].fax).to eq("+32 65 44 9480") + expect(subject.admin_contacts[0].email).to eq("aidan.murdock@ncia.nato.int") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Francesco Conserva") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq("SHAPE") + expect(subject.technical_contacts[0].city).to eq("NCIA SP SMD ENT EMA") + expect(subject.technical_contacts[0].zip).to eq("Mons Hainaut 7010") + expect(subject.technical_contacts[0].country).to eq("Belgium") + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq("+32 65 44 7534") + expect(subject.technical_contacts[0].fax).to eq("+32 65 44 7556") + expect(subject.technical_contacts[0].email).to eq("francesco.conserva@ncia.nato.int") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(7) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("globe.nc3a.nato.int") + expect(subject.nameservers[0].ipv4).to eq("192.41.140.178") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("max.nra.nato.int") + expect(subject.nameservers[1].ipv4).to eq("192.101.252.69") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("maxima.nra.nato.int") + expect(subject.nameservers[2].ipv4).to eq("193.110.130.68") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns.namsa.nato.int") + expect(subject.nameservers[3].ipv4).to eq("193.168.11.15") + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("ns.saclantc.nato.int") + expect(subject.nameservers[4].ipv4).to eq("192.106.197.1") + expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[5].name).to eq("ns1.cs.ucl.ac.uk") + expect(subject.nameservers[5].ipv4).to eq("128.16.5.32") + expect(subject.nameservers[6]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[6].name).to eq("ns1.drenet.dnd.ca") + expect(subject.nameservers[6].ipv4).to eq("131.136.242.3") end end diff --git a/spec/whois/parsers/responses/whois.iana.org/tld/status_not_assigned_spec.rb b/spec/whois/parsers/responses/whois.iana.org/tld/status_not_assigned_spec.rb index 8f8183a5..d33a7a8e 100644 --- a/spec/whois/parsers/responses/whois.iana.org/tld/status_not_assigned_spec.rb +++ b/spec/whois/parsers/responses/whois.iana.org/tld/status_not_assigned_spec.rb @@ -9,69 +9,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.iana.org.rb' -describe Whois::Parsers::WhoisIanaOrg, "status_not_assigned.expected" do +describe "whois.iana.org", :aggregate_failures do subject do file = fixture("responses", "whois.iana.org/tld/status_not_assigned.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.iana.org") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("1999-09-27")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_not_assigned.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("1999-09-27")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.iis.nu/nu/status_available_spec.rb b/spec/whois/parsers/responses/whois.iis.nu/nu/status_available_spec.rb index 97cbedbe..ad3cd6a9 100644 --- a/spec/whois/parsers/responses/whois.iis.nu/nu/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.iis.nu/nu/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.iis.nu.rb' -describe Whois::Parsers::WhoisIisNu, "status_available.expected" do +describe "whois.iis.nu", :aggregate_failures do subject do file = fixture("responses", "whois.iis.nu/nu/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.iis.nu") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Copyright (c) 1997- .SE (The Internet Infrastructure Foundation). All rights reserved. The information obtained through searches, or otherwise, is protected by the Swedish Copyright Act (1960:729) and international conventions. It is also subject to database protection according to the Swedish Copyright Act. # Any use of this material to target advertising or similar activities is forbidden and will be prosecuted. If any of the information below is transferred to a third party, it must be done in its entirety. This server must not be used as a backend for a search engine. Result of search for registered domain names under the .nu top level domain. This whois printout is printed with UTF-8 encoding.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Copyright (c) 1997- .SE (The Internet Infrastructure Foundation). All rights reserved. The information obtained through searches, or otherwise, is protected by the Swedish Copyright Act (1960:729) and international conventions. It is also subject to database protection according to the Swedish Copyright Act. # Any use of this material to target advertising or similar activities is forbidden and will be prosecuted. If any of the information below is transferred to a third party, it must be done in its entirety. This server must not be used as a backend for a search engine. Result of search for registered domain names under the .nu top level domain. This whois printout is printed with UTF-8 encoding.") + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.iis.nu/nu/status_registered_spec.rb b/spec/whois/parsers/responses/whois.iis.nu/nu/status_registered_spec.rb index 5677ad45..50865270 100644 --- a/spec/whois/parsers/responses/whois.iis.nu/nu/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.iis.nu/nu/status_registered_spec.rb @@ -9,113 +9,58 @@ # require 'spec_helper' -require 'whois/parsers/whois.iis.nu.rb' -describe Whois::Parsers::WhoisIisNu, "status_registered.expected" do +describe "whois.iis.nu", :aggregate_failures do subject do file = fixture("responses", "whois.iis.nu/nu/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.iis.nu") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Copyright (c) 1997- .SE (The Internet Infrastructure Foundation). All rights reserved. The information obtained through searches, or otherwise, is protected by the Swedish Copyright Act (1960:729) and international conventions. It is also subject to database protection according to the Swedish Copyright Act. # Any use of this material to target advertising or similar activities is forbidden and will be prosecuted. If any of the information below is transferred to a third party, it must be done in its entirety. This server must not be used as a backend for a search engine. Result of search for registered domain names under the .nu top level domain. This whois printout is printed with UTF-8 encoding.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.nu") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1999-06-07")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-05-06")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-06-07")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("mmr-142621") - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Copyright (c) 1997- .SE (The Internet Infrastructure Foundation). All rights reserved. The information obtained through searches, or otherwise, is protected by the Swedish Copyright Act (1960:729) and international conventions. It is also subject to database protection according to the Swedish Copyright Act. # Any use of this material to target advertising or similar activities is forbidden and will be prosecuted. If any of the information below is transferred to a third party, it must be done in its entirety. This server must not be used as a backend for a search engine. Result of search for registered domain names under the .nu top level domain. This whois printout is printed with UTF-8 encoding.") + expect(subject.domain).to eq("google.nu") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1999-06-07")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-05-06")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-06-07")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("mmr-142621") + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.iis.se/se/property_datetime_is_dash_spec.rb b/spec/whois/parsers/responses/whois.iis.se/se/property_datetime_is_dash_spec.rb index a5bb2881..a41919a7 100644 --- a/spec/whois/parsers/responses/whois.iis.se/se/property_datetime_is_dash_spec.rb +++ b/spec/whois/parsers/responses/whois.iis.se/se/property_datetime_is_dash_spec.rb @@ -9,31 +9,20 @@ # require 'spec_helper' -require 'whois/parsers/whois.iis.se.rb' -describe Whois::Parsers::WhoisIisSe, "property_datetime_is_dash.expected" do +describe "whois.iis.se", :aggregate_failures do subject do file = fixture("responses", "whois.iis.se/se/property_datetime_is_dash.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.iis.se") + Whois::Parser.parser_for(part) end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2010-08-05")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2011-08-05")) - end + it "matches property_datetime_is_dash.expected" do + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2010-08-05")) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2011-08-05")) end end diff --git a/spec/whois/parsers/responses/whois.iis.se/se/property_nameservers_single_spec.rb b/spec/whois/parsers/responses/whois.iis.se/se/property_nameservers_single_spec.rb index 67d4f65d..0d4203e6 100644 --- a/spec/whois/parsers/responses/whois.iis.se/se/property_nameservers_single_spec.rb +++ b/spec/whois/parsers/responses/whois.iis.se/se/property_nameservers_single_spec.rb @@ -9,24 +9,21 @@ # require 'spec_helper' -require 'whois/parsers/whois.iis.se.rb' -describe Whois::Parsers::WhoisIisSe, "property_nameservers_single.expected" do +describe "whois.iis.se", :aggregate_failures do subject do file = fixture("responses", "whois.iis.se/se/property_nameservers_single.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.iis.se") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(1) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("freja.nhv.se") - expect(subject.nameservers[0].ipv4).to eq("82.96.40.83") - expect(subject.nameservers[0].ipv6).to eq(nil) - end + it "matches property_nameservers_single.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(1) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("freja.nhv.se") + expect(subject.nameservers[0].ipv4).to eq("82.96.40.83") + expect(subject.nameservers[0].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.iis.se/se/property_nameservers_with_ip_spec.rb b/spec/whois/parsers/responses/whois.iis.se/se/property_nameservers_with_ip_spec.rb index a2524b0f..4dac7501 100644 --- a/spec/whois/parsers/responses/whois.iis.se/se/property_nameservers_with_ip_spec.rb +++ b/spec/whois/parsers/responses/whois.iis.se/se/property_nameservers_with_ip_spec.rb @@ -9,32 +9,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.iis.se.rb' -describe Whois::Parsers::WhoisIisSe, "property_nameservers_with_ip.expected" do +describe "whois.iis.se", :aggregate_failures do subject do file = fixture("responses", "whois.iis.se/se/property_nameservers_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.iis.se") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.loopia.se") - expect(subject.nameservers[0].ipv4).to eq("93.188.0.21") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns4.loopia.se") - expect(subject.nameservers[1].ipv4).to eq("93.188.0.20") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.loopia.se") - expect(subject.nameservers[2].ipv4).to eq("93.188.0.21") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns1.loopia.se") - expect(subject.nameservers[3].ipv4).to eq("93.188.0.20") - end + it "matches property_nameservers_with_ip.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2.loopia.se") + expect(subject.nameservers[0].ipv4).to eq("93.188.0.21") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns4.loopia.se") + expect(subject.nameservers[1].ipv4).to eq("93.188.0.20") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.loopia.se") + expect(subject.nameservers[2].ipv4).to eq("93.188.0.21") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns1.loopia.se") + expect(subject.nameservers[3].ipv4).to eq("93.188.0.20") end end diff --git a/spec/whois/parsers/responses/whois.iis.se/se/property_status_inactive_spec.rb b/spec/whois/parsers/responses/whois.iis.se/se/property_status_inactive_spec.rb index 0364e9b0..93560601 100644 --- a/spec/whois/parsers/responses/whois.iis.se/se/property_status_inactive_spec.rb +++ b/spec/whois/parsers/responses/whois.iis.se/se/property_status_inactive_spec.rb @@ -9,68 +9,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.iis.se.rb' -describe Whois::Parsers::WhoisIisSe, "property_status_inactive.expected" do +describe "whois.iis.se", :aggregate_failures do subject do file = fixture("responses", "whois.iis.se/se/property_status_inactive.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.iis.se") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(Time.parse("2000-11-01")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(Time.parse("2006-04-18")) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.name).to eq("CoreRegistry") - end + it "matches property_status_inactive.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to eq(DateTime.parse("2000-11-01")) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(DateTime.parse("2006-04-18")) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.name).to eq("CoreRegistry") end end diff --git a/spec/whois/parsers/responses/whois.iis.se/se/property_status_ok_spec.rb b/spec/whois/parsers/responses/whois.iis.se/se/property_status_ok_spec.rb index 7f3df6cf..d367342f 100644 --- a/spec/whois/parsers/responses/whois.iis.se/se/property_status_ok_spec.rb +++ b/spec/whois/parsers/responses/whois.iis.se/se/property_status_ok_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.iis.se.rb' -describe Whois::Parsers::WhoisIisSe, "property_status_ok.expected" do +describe "whois.iis.se", :aggregate_failures do subject do file = fixture("responses", "whois.iis.se/se/property_status_ok.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.iis.se") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_ok.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.iis.se/se/property_status_serverhold_spec.rb b/spec/whois/parsers/responses/whois.iis.se/se/property_status_serverhold_spec.rb index 1550be9b..c6eb4560 100644 --- a/spec/whois/parsers/responses/whois.iis.se/se/property_status_serverhold_spec.rb +++ b/spec/whois/parsers/responses/whois.iis.se/se/property_status_serverhold_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.iis.se.rb' -describe Whois::Parsers::WhoisIisSe, "property_status_serverhold.expected" do +describe "whois.iis.se", :aggregate_failures do subject do file = fixture("responses", "whois.iis.se/se/property_status_serverhold.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.iis.se") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_serverhold.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.iis.se/se/status_available_spec.rb b/spec/whois/parsers/responses/whois.iis.se/se/status_available_spec.rb index da36658b..36ba0a33 100644 --- a/spec/whois/parsers/responses/whois.iis.se/se/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.iis.se/se/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.iis.se.rb' -describe Whois::Parsers::WhoisIisSe, "status_available.expected" do +describe "whois.iis.se", :aggregate_failures do subject do file = fixture("responses", "whois.iis.se/se/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.iis.se") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Copyright (c) 1997- .SE (The Internet Infrastructure Foundation). All rights reserved. The information obtained through searches, or otherwise, is protected by the Swedish Copyright Act (1960:729) and international conventions. It is also subject to database protection according to the Swedish Copyright Act. Any use of this material to target advertising or similar activities is forbidden and will be prosecuted. If any of the information below is transferred to a third party, it must be done in its entirety. This server must not be used as a backend for a search engine. Result of search for registered domain names under the .SE top level domain. This whois printout is printed with UTF-8 encoding.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Copyright (c) 1997- .SE (The Internet Infrastructure Foundation). All rights reserved. The information obtained through searches, or otherwise, is protected by the Swedish Copyright Act (1960:729) and international conventions. It is also subject to database protection according to the Swedish Copyright Act. Any use of this material to target advertising or similar activities is forbidden and will be prosecuted. If any of the information below is transferred to a third party, it must be done in its entirety. This server must not be used as a backend for a search engine. Result of search for registered domain names under the .SE top level domain. This whois printout is printed with UTF-8 encoding.") + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.iis.se/se/status_registered_spec.rb b/spec/whois/parsers/responses/whois.iis.se/se/status_registered_spec.rb index 069d8b75..a1e521e6 100644 --- a/spec/whois/parsers/responses/whois.iis.se/se/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.iis.se/se/status_registered_spec.rb @@ -9,113 +9,58 @@ # require 'spec_helper' -require 'whois/parsers/whois.iis.se.rb' -describe Whois::Parsers::WhoisIisSe, "status_registered.expected" do +describe "whois.iis.se", :aggregate_failures do subject do file = fixture("responses", "whois.iis.se/se/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.iis.se") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Copyright (c) 1997- .SE (The Internet Infrastructure Foundation). All rights reserved. The information obtained through searches, or otherwise, is protected by the Swedish Copyright Act (1960:729) and international conventions. It is also subject to database protection according to the Swedish Copyright Act. Any use of this material to target advertising or similar activities is forbidden and will be prosecuted. If any of the information below is transferred to a third party, it must be done in its entirety. This server must not be used as a backend for a search engine. Result of search for registered domain names under the .SE top level domain. This whois printout is printed with UTF-8 encoding.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.se") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2008-10-20")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-09-18")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-10-20")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.name).to eq("MarkMonitor Inc") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("mmr8008-53808") - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Copyright (c) 1997- .SE (The Internet Infrastructure Foundation). All rights reserved. The information obtained through searches, or otherwise, is protected by the Swedish Copyright Act (1960:729) and international conventions. It is also subject to database protection according to the Swedish Copyright Act. Any use of this material to target advertising or similar activities is forbidden and will be prosecuted. If any of the information below is transferred to a third party, it must be done in its entirety. This server must not be used as a backend for a search engine. Result of search for registered domain names under the .SE top level domain. This whois printout is printed with UTF-8 encoding.") + expect(subject.domain).to eq("google.se") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2008-10-20")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-09-18")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-10-20")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.name).to eq("MarkMonitor Inc") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("mmr8008-53808") + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.in.ua/in.ua/status_available_spec.rb b/spec/whois/parsers/responses/whois.in.ua/in.ua/status_available_spec.rb index e0ce531b..9a78e17f 100644 --- a/spec/whois/parsers/responses/whois.in.ua/in.ua/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.in.ua/in.ua/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.in.ua.rb' -describe Whois::Parsers::WhoisInUa, "status_available.expected" do +describe "whois.in.ua", :aggregate_failures do subject do file = fixture("responses", "whois.in.ua/in.ua/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.in.ua") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.in.ua/in.ua/status_registered_spec.rb b/spec/whois/parsers/responses/whois.in.ua/in.ua/status_registered_spec.rb index b84551b7..44d3402c 100644 --- a/spec/whois/parsers/responses/whois.in.ua/in.ua/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.in.ua/in.ua/status_registered_spec.rb @@ -9,58 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.in.ua.rb' -describe Whois::Parsers::WhoisInUa, "status_registered.expected" do +describe "whois.in.ua", :aggregate_failures do subject do file = fixture("responses", "whois.in.ua/in.ua/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.in.ua") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-12-16 13:41:04")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2013-12-18 00:00:00")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns12.uadns.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns11.uadns.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns10.uadns.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2007-12-18 20:12:35 +02:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2019-12-03 11:15:10 +02:00")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-12-20 00:00:00 +02:00")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns10.uadns.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns12.uadns.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns11.uadns.com") end end diff --git a/spec/whois/parsers/responses/whois.inregistry.net/in/property_status_missing_spec.rb b/spec/whois/parsers/responses/whois.inregistry.net/in/property_status_missing_spec.rb deleted file mode 100644 index 889c9358..00000000 --- a/spec/whois/parsers/responses/whois.inregistry.net/in/property_status_missing_spec.rb +++ /dev/null @@ -1,27 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.inregistry.net/in/property_status_missing.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.inregistry.net.rb' - -describe Whois::Parsers::WhoisInregistryNet, "property_status_missing.expected" do - - subject do - file = fixture("responses", "whois.inregistry.net/in/property_status_missing.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end -end diff --git a/spec/whois/parsers/responses/whois.inregistry.net/in/property_status_multiple_spec.rb b/spec/whois/parsers/responses/whois.inregistry.net/in/property_status_multiple_spec.rb deleted file mode 100644 index e5ed3709..00000000 --- a/spec/whois/parsers/responses/whois.inregistry.net/in/property_status_multiple_spec.rb +++ /dev/null @@ -1,27 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.inregistry.net/in/property_status_multiple.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.inregistry.net.rb' - -describe Whois::Parsers::WhoisInregistryNet, "property_status_multiple.expected" do - - subject do - file = fixture("responses", "whois.inregistry.net/in/property_status_multiple.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(["CLIENT DELETE PROHIBITED", "CLIENT RENEW PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED"]) - end - end -end diff --git a/spec/whois/parsers/responses/whois.inregistry.net/in/property_status_ok_spec.rb b/spec/whois/parsers/responses/whois.inregistry.net/in/property_status_ok_spec.rb deleted file mode 100644 index 2634fdb6..00000000 --- a/spec/whois/parsers/responses/whois.inregistry.net/in/property_status_ok_spec.rb +++ /dev/null @@ -1,27 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.inregistry.net/in/property_status_ok.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.inregistry.net.rb' - -describe Whois::Parsers::WhoisInregistryNet, "property_status_ok.expected" do - - subject do - file = fixture("responses", "whois.inregistry.net/in/property_status_ok.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(["OK"]) - end - end -end diff --git a/spec/whois/parsers/responses/whois.inregistry.net/in/status_available_spec.rb b/spec/whois/parsers/responses/whois.inregistry.net/in/status_available_spec.rb deleted file mode 100644 index a04ac066..00000000 --- a/spec/whois/parsers/responses/whois.inregistry.net/in/status_available_spec.rb +++ /dev/null @@ -1,96 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.inregistry.net/in/status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.inregistry.net.rb' - -describe Whois::Parsers::WhoisInregistryNet, "status_available.expected" do - - subject do - file = fixture("responses", "whois.inregistry.net/in/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end -end diff --git a/spec/whois/parsers/responses/whois.inregistry.net/in/status_registered_spec.rb b/spec/whois/parsers/responses/whois.inregistry.net/in/status_registered_spec.rb deleted file mode 100644 index 840c18a5..00000000 --- a/spec/whois/parsers/responses/whois.inregistry.net/in/status_registered_spec.rb +++ /dev/null @@ -1,155 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.inregistry.net/in/status_registered.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.inregistry.net.rb' - -describe Whois::Parsers::WhoisInregistryNet, "status_registered.expected" do - - subject do - file = fixture("responses", "whois.inregistry.net/in/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to .IN WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the .IN registry database. The data in this record is provided by .IN Registry for informational purposes only, and .IN does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. .IN reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.in") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D21089-AFIN") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(Time.parse("2005-02-14 20:35:14 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(Time.parse("2015-01-13 10:22:36 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(Time.parse("2016-02-14 20:35:14 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("R84-AFIN") - expect(subject.registrar.name).to eq("Mark Monitor") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("mmr-108695") - expect(subject.registrant_contacts[0].name).to eq("Christina Chiou") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6502530001") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("mmr-108695") - expect(subject.admin_contacts[0].name).to eq("Christina Chiou") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") - expect(subject.admin_contacts[0].fax).to eq("+1.6502530001") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("mmr-108695") - expect(subject.technical_contacts[0].name).to eq("Christina Chiou") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") - expect(subject.technical_contacts[0].fax).to eq("+1.6502530001") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end - end -end diff --git a/spec/whois/parsers/responses/whois.isnic.is/is/status_available_spec.rb b/spec/whois/parsers/responses/whois.isnic.is/is/status_available_spec.rb index 3e4a4010..9313fa70 100644 --- a/spec/whois/parsers/responses/whois.isnic.is/is/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.isnic.is/is/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.isnic.is.rb' -describe Whois::Parsers::WhoisIsnicIs, "status_available.expected" do +describe "whois.isnic.is", :aggregate_failures do subject do file = fixture("responses", "whois.isnic.is/is/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.isnic.is") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.isnic.is/is/status_registered_spec.rb b/spec/whois/parsers/responses/whois.isnic.is/is/status_registered_spec.rb index d114fd4c..43357263 100644 --- a/spec/whois/parsers/responses/whois.isnic.is/is/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.isnic.is/is/status_registered_spec.rb @@ -9,56 +9,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.isnic.is.rb' -describe Whois::Parsers::WhoisIsnicIs, "status_registered.expected" do +describe "whois.isnic.is", :aggregate_failures do subject do file = fixture("responses", "whois.isnic.is/is/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.isnic.is") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2002-05-22")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-05-22")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-05-22")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-05-22")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.isoc.org.il/il/property_status_missing_spec.rb b/spec/whois/parsers/responses/whois.isoc.org.il/il/property_status_missing_spec.rb index e0087a7c..0ed494e5 100644 --- a/spec/whois/parsers/responses/whois.isoc.org.il/il/property_status_missing_spec.rb +++ b/spec/whois/parsers/responses/whois.isoc.org.il/il/property_status_missing_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.isoc.org.il.rb' -describe Whois::Parsers::WhoisIsocOrgIl, "property_status_missing.expected" do +describe "whois.isoc.org.il", :aggregate_failures do subject do file = fixture("responses", "whois.isoc.org.il/il/property_status_missing.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.isoc.org.il") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches property_status_missing.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.isoc.org.il/il/property_status_transfer_allowed_spec.rb b/spec/whois/parsers/responses/whois.isoc.org.il/il/property_status_transfer_allowed_spec.rb index a377dfe3..1f524857 100644 --- a/spec/whois/parsers/responses/whois.isoc.org.il/il/property_status_transfer_allowed_spec.rb +++ b/spec/whois/parsers/responses/whois.isoc.org.il/il/property_status_transfer_allowed_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.isoc.org.il.rb' -describe Whois::Parsers::WhoisIsocOrgIl, "property_status_transfer_allowed.expected" do +describe "whois.isoc.org.il", :aggregate_failures do subject do file = fixture("responses", "whois.isoc.org.il/il/property_status_transfer_allowed.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.isoc.org.il") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_transfer_allowed.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.isoc.org.il/il/property_status_transfer_locked_spec.rb b/spec/whois/parsers/responses/whois.isoc.org.il/il/property_status_transfer_locked_spec.rb index 2c51c575..6ef9f45f 100644 --- a/spec/whois/parsers/responses/whois.isoc.org.il/il/property_status_transfer_locked_spec.rb +++ b/spec/whois/parsers/responses/whois.isoc.org.il/il/property_status_transfer_locked_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.isoc.org.il.rb' -describe Whois::Parsers::WhoisIsocOrgIl, "property_status_transfer_locked.expected" do +describe "whois.isoc.org.il", :aggregate_failures do subject do file = fixture("responses", "whois.isoc.org.il/il/property_status_transfer_locked.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.isoc.org.il") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_transfer_locked.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.isoc.org.il/il/status_available_spec.rb b/spec/whois/parsers/responses/whois.isoc.org.il/il/status_available_spec.rb index 09f3312a..080f30d4 100644 --- a/spec/whois/parsers/responses/whois.isoc.org.il/il/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.isoc.org.il/il/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.isoc.org.il.rb' -describe Whois::Parsers::WhoisIsocOrgIl, "status_available.expected" do +describe "whois.isoc.org.il", :aggregate_failures do subject do file = fixture("responses", "whois.isoc.org.il/il/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.isoc.org.il") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.isoc.org.il/il/status_registered_spec.rb b/spec/whois/parsers/responses/whois.isoc.org.il/il/status_registered_spec.rb index c0122d35..58dd4541 100644 --- a/spec/whois/parsers/responses/whois.isoc.org.il/il/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.isoc.org.il/il/status_registered_spec.rb @@ -9,63 +9,36 @@ # require 'spec_helper' -require 'whois/parsers/whois.isoc.org.il.rb' -describe Whois::Parsers::WhoisIsocOrgIl, "status_registered.expected" do +describe "whois.isoc.org.il", :aggregate_failures do subject do file = fixture("responses", "whois.isoc.org.il/il/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.isoc.org.il") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-01-16")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(6) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns.isoc.org.il") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("grappa.isoc.org.il") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("aristo.tau.ac.il") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("relay.huji.ac.il") - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("drns.isoc.org.il") - expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[5].name).to eq("sns-pb.isc.org") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-01-16")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(6) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns.isoc.org.il") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("grappa.isoc.org.il") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("aristo.tau.ac.il") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("relay.huji.ac.il") + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("drns.isoc.org.il") + expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[5].name).to eq("sns-pb.isc.org") end end diff --git a/spec/whois/parsers/responses/whois.ja.net/ac.uk/status_available_spec.rb b/spec/whois/parsers/responses/whois.ja.net/ac.uk/status_available_spec.rb index d065f2e3..321476c7 100644 --- a/spec/whois/parsers/responses/whois.ja.net/ac.uk/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.ja.net/ac.uk/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.ja.net.rb' -describe Whois::Parsers::WhoisJaNet, "status_available.expected" do +describe "whois.ja.net", :aggregate_failures do subject do file = fixture("responses", "whois.ja.net/ac.uk/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ja.net") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.ja.net/ac.uk/status_registered_spec.rb b/spec/whois/parsers/responses/whois.ja.net/ac.uk/status_registered_spec.rb index a00851d6..aa91d256 100644 --- a/spec/whois/parsers/responses/whois.ja.net/ac.uk/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.ja.net/ac.uk/status_registered_spec.rb @@ -9,65 +9,38 @@ # require 'spec_helper' -require 'whois/parsers/whois.ja.net.rb' -describe Whois::Parsers::WhoisJaNet, "status_registered.expected" do +describe "whois.ja.net", :aggregate_failures do subject do file = fixture("responses", "whois.ja.net/ac.uk/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ja.net") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-11-07")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-03-20")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-06-16")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("agate.lut.ac.uk") - expect(subject.nameservers[0].ipv4).to eq("158.125.1.100") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("bgate.lut.ac.uk") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("cgate.lut.ac.uk") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.ja.net") - expect(subject.nameservers[3].ipv4).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-11-07")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-03-20")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-06-16")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("agate.lut.ac.uk") + expect(subject.nameservers[0].ipv4).to eq("158.125.1.100") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("bgate.lut.ac.uk") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("cgate.lut.ac.uk") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3.ja.net") + expect(subject.nameservers[3].ipv4).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.ja.net/gov.uk/status_available_spec.rb b/spec/whois/parsers/responses/whois.ja.net/gov.uk/status_available_spec.rb index 251cf883..6794b1a1 100644 --- a/spec/whois/parsers/responses/whois.ja.net/gov.uk/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.ja.net/gov.uk/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.ja.net.rb' -describe Whois::Parsers::WhoisJaNet, "status_available.expected" do +describe "whois.ja.net", :aggregate_failures do subject do file = fixture("responses", "whois.ja.net/gov.uk/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ja.net") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.ja.net/gov.uk/status_registered_spec.rb b/spec/whois/parsers/responses/whois.ja.net/gov.uk/status_registered_spec.rb index 0c910399..71d359be 100644 --- a/spec/whois/parsers/responses/whois.ja.net/gov.uk/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.ja.net/gov.uk/status_registered_spec.rb @@ -9,69 +9,42 @@ # require 'spec_helper' -require 'whois/parsers/whois.ja.net.rb' -describe Whois::Parsers::WhoisJaNet, "status_registered.expected" do +describe "whois.ja.net", :aggregate_failures do subject do file = fixture("responses", "whois.ja.net/gov.uk/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ja.net") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-09-17")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2010-01-13")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2011-03-30")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(8) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("eur5.akam.net") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("eur6.akam.net") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns1-173.akam.net") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns1-31.akam.net") - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("usc4.akam.net") - expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[5].name).to eq("use10.akam.net") - expect(subject.nameservers[6]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[6].name).to eq("usw2.akam.net") - expect(subject.nameservers[7]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[7].name).to eq("usw4.akam.net") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-09-17")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2010-01-13")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2011-03-30")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(8) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("eur5.akam.net") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("eur6.akam.net") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns1-173.akam.net") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns1-31.akam.net") + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("usc4.akam.net") + expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[5].name).to eq("use10.akam.net") + expect(subject.nameservers[6]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[6].name).to eq("usw2.akam.net") + expect(subject.nameservers[7]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[7].name).to eq("usw4.akam.net") end end diff --git a/spec/whois/parsers/responses/whois.je/je/status_available_spec.rb b/spec/whois/parsers/responses/whois.je/je/status_available_spec.rb index 95e12069..63fb5af1 100644 --- a/spec/whois/parsers/responses/whois.je/je/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.je/je/status_available_spec.rb @@ -9,65 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.je.rb' -describe Whois::Parsers::WhoisJe, "status_available.expected" do +describe "whois.je", :aggregate_failures do subject do file = fixture("responses", "whois.je/je/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.je") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.je") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.je") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.je/je/status_registered_spec.rb b/spec/whois/parsers/responses/whois.je/je/status_registered_spec.rb index e4802205..0c01ab67 100644 --- a/spec/whois/parsers/responses/whois.je/je/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.je/je/status_registered_spec.rb @@ -9,69 +9,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.je.rb' -describe Whois::Parsers::WhoisJe, "status_registered.expected" do +describe "whois.je", :aggregate_failures do subject do file = fixture("responses", "whois.je/je/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.je") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.je") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2002-10-31 00:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns4.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.je") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-10-31 00:00:00 UTC")) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns4.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3.google.com") end end diff --git a/spec/whois/parsers/responses/whois.jprs.jp/co.jp/property_state_deleted_spec.rb b/spec/whois/parsers/responses/whois.jprs.jp/co.jp/property_state_deleted_spec.rb index 6910c055..c18f0a96 100644 --- a/spec/whois/parsers/responses/whois.jprs.jp/co.jp/property_state_deleted_spec.rb +++ b/spec/whois/parsers/responses/whois.jprs.jp/co.jp/property_state_deleted_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.jprs.jp.rb' -describe Whois::Parsers::WhoisJprsJp, "property_state_deleted.expected" do +describe "whois.jprs.jp", :aggregate_failures do subject do file = fixture("responses", "whois.jprs.jp/co.jp/property_state_deleted.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.jprs.jp") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:suspended) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_state_deleted.expected" do + expect(subject.status).to eq(:suspended) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.jprs.jp/co.jp/property_state_registered_spec.rb b/spec/whois/parsers/responses/whois.jprs.jp/co.jp/property_state_registered_spec.rb index 29106d64..3cd8b597 100644 --- a/spec/whois/parsers/responses/whois.jprs.jp/co.jp/property_state_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.jprs.jp/co.jp/property_state_registered_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.jprs.jp.rb' -describe Whois::Parsers::WhoisJprsJp, "property_state_registered.expected" do +describe "whois.jprs.jp", :aggregate_failures do subject do file = fixture("responses", "whois.jprs.jp/co.jp/property_state_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.jprs.jp") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_state_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.jprs.jp/jp/property_registrar_spec.rb b/spec/whois/parsers/responses/whois.jprs.jp/jp/property_registrar_spec.rb new file mode 100644 index 00000000..f5ab50d5 --- /dev/null +++ b/spec/whois/parsers/responses/whois.jprs.jp/jp/property_registrar_spec.rb @@ -0,0 +1,24 @@ +# encoding: utf-8 + +require 'spec_helper' +require 'whois/parsers/whois.jprs.jp.rb' + +describe Whois::Parsers::WhoisJprsJp, "property_registrar.expected" do + + subject do + file = fixture("responses", "whois.jprs.jp/jp/property_registrar.txt") + part = Whois::Record::Part.new(body: File.read(file)) + described_class.new(part) + end + + describe "#registrar" do + it do + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("Netowl,Inc.") + expect(subject.registrar.organization).to eq("Netowl, Inc.") + expect(subject.registrar.url).to eq(nil) + end + end + +end \ No newline at end of file diff --git a/spec/whois/parsers/responses/whois.jprs.jp/jp/property_status_suspended_spec.rb b/spec/whois/parsers/responses/whois.jprs.jp/jp/property_status_suspended_spec.rb index 15234daf..06342cc9 100644 --- a/spec/whois/parsers/responses/whois.jprs.jp/jp/property_status_suspended_spec.rb +++ b/spec/whois/parsers/responses/whois.jprs.jp/jp/property_status_suspended_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.jprs.jp.rb' -describe Whois::Parsers::WhoisJprsJp, "property_status_suspended.expected" do +describe "whois.jprs.jp", :aggregate_failures do subject do file = fixture("responses", "whois.jprs.jp/jp/property_status_suspended.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.jprs.jp") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:expired) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_suspended.expected" do + expect(subject.status).to eq(:expired) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.jprs.jp/jp/property_status_to_be_suspended_spec.rb b/spec/whois/parsers/responses/whois.jprs.jp/jp/property_status_to_be_suspended_spec.rb index 257311da..a7dc8cab 100644 --- a/spec/whois/parsers/responses/whois.jprs.jp/jp/property_status_to_be_suspended_spec.rb +++ b/spec/whois/parsers/responses/whois.jprs.jp/jp/property_status_to_be_suspended_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.jprs.jp.rb' -describe Whois::Parsers::WhoisJprsJp, "property_status_to_be_suspended.expected" do +describe "whois.jprs.jp", :aggregate_failures do subject do file = fixture("responses", "whois.jprs.jp/jp/property_status_to_be_suspended.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.jprs.jp") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:redemption) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_to_be_suspended.expected" do + expect(subject.status).to eq(:redemption) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.jprs.jp/jp/property_updates_on_error_out-of-range_spec.rb b/spec/whois/parsers/responses/whois.jprs.jp/jp/property_updates_on_error_out-of-range_spec.rb index d07879a8..c508ef8c 100644 --- a/spec/whois/parsers/responses/whois.jprs.jp/jp/property_updates_on_error_out-of-range_spec.rb +++ b/spec/whois/parsers/responses/whois.jprs.jp/jp/property_updates_on_error_out-of-range_spec.rb @@ -9,20 +9,17 @@ # require 'spec_helper' -require 'whois/parsers/whois.jprs.jp.rb' -describe Whois::Parsers::WhoisJprsJp, "property_updates_on_error_out-of-range.expected" do +describe "whois.jprs.jp", :aggregate_failures do subject do file = fixture("responses", "whois.jprs.jp/jp/property_updates_on_error_out-of-range.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.jprs.jp") + Whois::Parser.parser_for(part) end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2010-10-18 11:30:47 JST")) - end + it "matches property_updates_on_error_out-of-range.expected" do + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2010-10-18 11:30:47 JST")) end end diff --git a/spec/whois/parsers/responses/whois.jprs.jp/jp/status_available_spec.rb b/spec/whois/parsers/responses/whois.jprs.jp/jp/status_available_spec.rb index 6a05d7d2..4a0747e0 100644 --- a/spec/whois/parsers/responses/whois.jprs.jp/jp/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.jprs.jp/jp/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.jprs.jp.rb' -describe Whois::Parsers::WhoisJprsJp, "status_available.expected" do +describe "whois.jprs.jp", :aggregate_failures do subject do file = fixture("responses", "whois.jprs.jp/jp/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.jprs.jp") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.jprs.jp/jp/status_registered_spec.rb b/spec/whois/parsers/responses/whois.jprs.jp/jp/status_registered_spec.rb index b904e6dc..c4879b35 100644 --- a/spec/whois/parsers/responses/whois.jprs.jp/jp/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.jprs.jp/jp/status_registered_spec.rb @@ -9,61 +9,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.jprs.jp.rb' -describe Whois::Parsers::WhoisJprsJp, "status_registered.expected" do +describe "whois.jprs.jp", :aggregate_failures do subject do file = fixture("responses", "whois.jprs.jp/jp/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.jprs.jp") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2005-05-30")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-06-01 01:05:07")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-05-31")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2005-05-30 00:00:00 JST")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-06-01 01:05:09 JST")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-05-31 00:00:00 JST")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.jprs.jp/jp/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.jprs.jp/jp/status_reserved_spec.rb index 66e06874..7c5ce30f 100644 --- a/spec/whois/parsers/responses/whois.jprs.jp/jp/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.jprs.jp/jp/status_reserved_spec.rb @@ -9,51 +9,24 @@ # require 'spec_helper' -require 'whois/parsers/whois.jprs.jp.rb' -describe Whois::Parsers::WhoisJprsJp, "status_reserved.expected" do +describe "whois.jprs.jp", :aggregate_failures do subject do file = fixture("responses", "whois.jprs.jp/jp/status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.jprs.jp") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2001-02-21 00:00:00")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_reserved.expected" do + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2001-02-21 00:00:00 JST")) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/property_created_on_missing_spec.rb b/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/property_created_on_missing_spec.rb index 17b2f91c..d0936bbe 100644 --- a/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/property_created_on_missing_spec.rb +++ b/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/property_created_on_missing_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.jprs.jp.rb' -describe Whois::Parsers::WhoisJprsJp, "property_created_on_missing.expected" do +describe "whois.jprs.jp", :aggregate_failures do subject do file = fixture("responses", "whois.jprs.jp/ne.jp/property_created_on_missing.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.jprs.jp") + Whois::Parser.parser_for(part) end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end + it "matches property_created_on_missing.expected" do + expect(subject.created_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/property_state_reserved_spec.rb b/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/property_state_reserved_spec.rb index d99dd3ed..1df2005d 100644 --- a/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/property_state_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/property_state_reserved_spec.rb @@ -9,34 +9,19 @@ # require 'spec_helper' -require 'whois/parsers/whois.jprs.jp.rb' -describe Whois::Parsers::WhoisJprsJp, "property_state_reserved.expected" do +describe "whois.jprs.jp", :aggregate_failures do subject do file = fixture("responses", "whois.jprs.jp/ne.jp/property_state_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.jprs.jp") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(true) - end + it "matches property_state_reserved.expected" do + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.reserved?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/status_available_spec.rb b/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/status_available_spec.rb index d9604644..03c82943 100644 --- a/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.jprs.jp.rb' -describe Whois::Parsers::WhoisJprsJp, "status_available.expected" do +describe "whois.jprs.jp", :aggregate_failures do subject do file = fixture("responses", "whois.jprs.jp/ne.jp/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.jprs.jp") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/status_registered_spec.rb b/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/status_registered_spec.rb index b4b106a1..fec24ca0 100644 --- a/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/status_registered_spec.rb @@ -9,61 +9,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.jprs.jp.rb' -describe Whois::Parsers::WhoisJprsJp, "status_registered.expected" do +describe "whois.jprs.jp", :aggregate_failures do subject do file = fixture("responses", "whois.jprs.jp/ne.jp/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.jprs.jp") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-09-11")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2009-10-23 19:22:08")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2010-09-30")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-09-11 00:00:00 JST")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2009-10-23 19:22:08 JST")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2010-09-30 00:00:00 JST")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/status_reserved_spec.rb index 63ff4012..a48a25ab 100644 --- a/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.jprs.jp/ne.jp/status_reserved_spec.rb @@ -9,34 +9,19 @@ # require 'spec_helper' -require 'whois/parsers/whois.jprs.jp.rb' -describe Whois::Parsers::WhoisJprsJp, "status_reserved.expected" do +describe "whois.jprs.jp", :aggregate_failures do subject do file = fixture("responses", "whois.jprs.jp/ne.jp/status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.jprs.jp") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(true) - end + it "matches status_reserved.expected" do + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.reserved?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.kenic.or.ke/ke/status_available_spec.rb b/spec/whois/parsers/responses/whois.kenic.or.ke/ke/status_available_spec.rb index 4746f50f..73bdbfc5 100644 --- a/spec/whois/parsers/responses/whois.kenic.or.ke/ke/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.kenic.or.ke/ke/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.kenic.or.ke.rb' -describe Whois::Parsers::WhoisKenicOrKe, "status_available.expected" do +describe "whois.kenic.or.ke", :aggregate_failures do subject do file = fixture("responses", "whois.kenic.or.ke/ke/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.kenic.or.ke") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.kenic.or.ke/ke/status_invalid_spec.rb b/spec/whois/parsers/responses/whois.kenic.or.ke/ke/status_invalid_spec.rb index c99fd5c3..eff8c452 100644 --- a/spec/whois/parsers/responses/whois.kenic.or.ke/ke/status_invalid_spec.rb +++ b/spec/whois/parsers/responses/whois.kenic.or.ke/ke/status_invalid_spec.rb @@ -9,55 +9,24 @@ # require 'spec_helper' -require 'whois/parsers/whois.kenic.or.ke.rb' -describe Whois::Parsers::WhoisKenicOrKe, "status_invalid.expected" do +describe "whois.kenic.or.ke", :aggregate_failures do subject do file = fixture("responses", "whois.kenic.or.ke/ke/status_invalid.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.kenic.or.ke") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:invalid) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#invalid?" do - it do - expect(subject.invalid?).to eq(true) - end + it "matches status_invalid.expected" do + expect(subject.status).to eq(:invalid) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.invalid?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.kenic.or.ke/ke/status_registered_spec.rb b/spec/whois/parsers/responses/whois.kenic.or.ke/ke/status_registered_spec.rb index 5aa2fbc6..b0fd22ad 100644 --- a/spec/whois/parsers/responses/whois.kenic.or.ke/ke/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.kenic.or.ke/ke/status_registered_spec.rb @@ -9,61 +9,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.kenic.or.ke.rb' -describe Whois::Parsers::WhoisKenicOrKe, "status_registered.expected" do +describe "whois.kenic.or.ke", :aggregate_failures do subject do file = fixture("responses", "whois.kenic.or.ke/ke/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.kenic.or.ke") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-04-18 00:00:00 EAT")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-12-16 12:48:00 EAT")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-01-01 00:00:00 EAT")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-04-18 00:00:00 EAT")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-12-16 12:48:00 EAT")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-01-01 00:00:00 EAT")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.kg/kg/status_available_spec.rb b/spec/whois/parsers/responses/whois.kg/kg/status_available_spec.rb index fd4c046e..b6b7ec72 100644 --- a/spec/whois/parsers/responses/whois.kg/kg/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.kg/kg/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.kg.rb' -describe Whois::Parsers::WhoisKg, "status_available.expected" do +describe "whois.kg", :aggregate_failures do subject do file = fixture("responses", "whois.kg/kg/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.kg") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.kg/kg/status_registered_spec.rb b/spec/whois/parsers/responses/whois.kg/kg/status_registered_spec.rb index ca2aef08..428e4848 100644 --- a/spec/whois/parsers/responses/whois.kg/kg/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.kg/kg/status_registered_spec.rb @@ -9,65 +9,38 @@ # require 'spec_helper' -require 'whois/parsers/whois.kg.rb' -describe Whois::Parsers::WhoisKg, "status_registered.expected" do +describe "whois.kg", :aggregate_failures do subject do file = fixture("responses", "whois.kg/kg/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.kg") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2004-02-10 09:42:42")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2010-04-19 21:47:14")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-03-30 23:59:00")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns4.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2004-02-10 09:42:42")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2010-04-19 21:47:14")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-03-30 23:59:00")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns4.google.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.kr/kr/property_nameservers_with_ip_spec.rb b/spec/whois/parsers/responses/whois.kr/kr/property_nameservers_with_ip_spec.rb index 71556b45..f32d8907 100644 --- a/spec/whois/parsers/responses/whois.kr/kr/property_nameservers_with_ip_spec.rb +++ b/spec/whois/parsers/responses/whois.kr/kr/property_nameservers_with_ip_spec.rb @@ -9,26 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.kr.rb' -describe Whois::Parsers::WhoisKr, "property_nameservers_with_ip.expected" do +describe "whois.kr", :aggregate_failures do subject do file = fixture("responses", "whois.kr/kr/property_nameservers_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.kr") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("prmns.lg.co.kr") - expect(subject.nameservers[0].ipv4).to eq("165.243.5.15") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("secns.lg.co.kr") - expect(subject.nameservers[1].ipv4).to eq("203.247.133.133") - end + it "matches property_nameservers_with_ip.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("prmns.lg.co.kr") + expect(subject.nameservers[0].ipv4).to eq("165.243.5.15") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("secns.lg.co.kr") + expect(subject.nameservers[1].ipv4).to eq("203.247.133.133") end end diff --git a/spec/whois/parsers/responses/whois.kr/kr/status_available_spec.rb b/spec/whois/parsers/responses/whois.kr/kr/status_available_spec.rb index 2bfb129a..9793cea2 100644 --- a/spec/whois/parsers/responses/whois.kr/kr/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.kr/kr/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.kr.rb' -describe Whois::Parsers::WhoisKr, "status_available.expected" do +describe "whois.kr", :aggregate_failures do subject do file = fixture("responses", "whois.kr/kr/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.kr") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.kr/kr/status_registered_spec.rb b/spec/whois/parsers/responses/whois.kr/kr/status_registered_spec.rb index 4e91c919..17d9c0bf 100644 --- a/spec/whois/parsers/responses/whois.kr/kr/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.kr/kr/status_registered_spec.rb @@ -9,57 +9,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.kr.rb' -describe Whois::Parsers::WhoisKr, "status_registered.expected" do +describe "whois.kr", :aggregate_failures do subject do file = fixture("responses", "whois.kr/kr/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.kr") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2007-03-02")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2010-10-04")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-03-02")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2007-03-02")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2010-10-04")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-03-02")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.markmonitor.com/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.markmonitor.com/response_throttled_spec.rb index a821628b..63957e22 100644 --- a/spec/whois/parsers/responses/whois.markmonitor.com/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/whois.markmonitor.com/response_throttled_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.markmonitor.com.rb' -describe Whois::Parsers::WhoisMarkmonitorCom, "response_throttled.expected" do +describe "whois.markmonitor.com", :aggregate_failures do subject do file = fixture("responses", "whois.markmonitor.com/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.markmonitor.com") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.markmonitor.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.markmonitor.com/status_available_spec.rb index 8f571f5e..3a22eb9d 100644 --- a/spec/whois/parsers/responses/whois.markmonitor.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.markmonitor.com/status_available_spec.rb @@ -9,83 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.markmonitor.com.rb' -describe Whois::Parsers::WhoisMarkmonitorCom, "status_available.expected" do +describe "whois.markmonitor.com", :aggregate_failures do subject do file = fixture("responses", "whois.markmonitor.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.markmonitor.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.markmonitor.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.markmonitor.com/status_registered_spec.rb index 3e39c49f..a16b3bde 100644 --- a/spec/whois/parsers/responses/whois.markmonitor.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.markmonitor.com/status_registered_spec.rb @@ -9,148 +9,96 @@ # require 'spec_helper' -require 'whois/parsers/whois.markmonitor.com.rb' -describe Whois::Parsers::WhoisMarkmonitorCom, "status_registered.expected" do +describe "whois.markmonitor.com", :aggregate_failures do subject do file = fixture("responses", "whois.markmonitor.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.markmonitor.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2002-10-02 00:00:00 -0700")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-10-29 11:50:06 -0700")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2020-09-13 21:00:00 -0700")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor, Inc.") - expect(subject.registrar.organization).to eq("MarkMonitor, Inc.") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].name).to eq("Dns Admin") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("Please contact contact-admin@google.com, 1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6506188571") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6506234000") - expect(subject.admin_contacts[0].fax).to eq("+1.6506188571") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("2400 E. Bayshore Pkwy") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6503300100") - expect(subject.technical_contacts[0].fax).to eq("+1.6506181499") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.com") + expect(subject.domain_id).to eq("") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-10-02 00:00:00 -0700")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-10-29 11:50:06 -0700")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-09-13 21:00:00 -0700")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor, Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].name).to eq("Dns Admin") + expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq("Please contact contact-admin@google.com, 1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") + expect(subject.registrant_contacts[0].fax).to eq("+1.6506188571") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].name).to eq("DNS Admin") + expect(subject.admin_contacts[0].organization).to eq("Google Inc.") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.6506234000") + expect(subject.admin_contacts[0].fax).to eq("+1.6506188571") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].name).to eq("DNS Admin") + expect(subject.technical_contacts[0].organization).to eq("Google Inc.") + expect(subject.technical_contacts[0].address).to eq("2400 E. Bayshore Pkwy") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.6503300100") + expect(subject.technical_contacts[0].fax).to eq("+1.6506181499") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.monic.mo/mo/status_available_spec.rb b/spec/whois/parsers/responses/whois.monic.mo/mo/status_available_spec.rb index 16c52112..3cd9e7c1 100644 --- a/spec/whois/parsers/responses/whois.monic.mo/mo/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.monic.mo/mo/status_available_spec.rb @@ -9,85 +9,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.monic.mo.rb' -describe Whois::Parsers::WhoisMonicMo, "status_available.expected" do +describe "whois.monic.mo", :aggregate_failures do subject do file = fixture("responses", "whois.monic.mo/mo/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.monic.mo") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to eq(nil) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.monic.mo/mo/status_registered_spec.rb b/spec/whois/parsers/responses/whois.monic.mo/mo/status_registered_spec.rb index b56d5d77..62612094 100644 --- a/spec/whois/parsers/responses/whois.monic.mo/mo/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.monic.mo/mo/status_registered_spec.rb @@ -9,93 +9,37 @@ # require 'spec_helper' -require 'whois/parsers/whois.monic.mo.rb' -describe Whois::Parsers::WhoisMonicMo, "status_registered.expected" do +describe "whois.monic.mo", :aggregate_failures do subject do file = fixture("responses", "whois.monic.mo/mo/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.monic.mo") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("umac.mo") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MONIC") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("umacsn1.umac.mo") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("umacsn2.umac.mo") - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("umac.mo") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MONIC") + expect(subject.registrar.url).to eq(nil) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("umacsn1.umac.mo") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("umacsn2.umac.mo") end end diff --git a/spec/whois/parsers/responses/whois.museum/museum/status_available_spec.rb b/spec/whois/parsers/responses/whois.museum/museum/status_available_spec.rb index bc167bb1..69be87ba 100644 --- a/spec/whois/parsers/responses/whois.museum/museum/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.museum/museum/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.museum.rb' -describe Whois::Parsers::WhoisMuseum, "status_available.expected" do +describe "whois.museum", :aggregate_failures do subject do file = fixture("responses", "whois.museum/museum/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.museum") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.museum/museum/status_registered_spec.rb b/spec/whois/parsers/responses/whois.museum/museum/status_registered_spec.rb index 9a769201..9a55b25d 100644 --- a/spec/whois/parsers/responses/whois.museum/museum/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.museum/museum/status_registered_spec.rb @@ -9,61 +9,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.museum.rb' -describe Whois::Parsers::WhoisMuseum, "status_registered.expected" do +describe "whois.museum", :aggregate_failures do subject do file = fixture("responses", "whois.museum/museum/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.museum") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2001-11-10 15:23:42 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2002-04-04 17:48:43 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2003-07-31 11:00:00 UTC")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("nic.museum") - expect(subject.nameservers[0].ipv4).to eq("130.242.24.5") - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("nic.frd.se") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2001-11-10 15:23:42 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2002-04-04 17:48:43 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2003-07-31 11:00:00 UTC")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("nic.museum") + expect(subject.nameservers[0].ipv4).to eq("130.242.24.5") + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("nic.frd.se") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.mx/mx/property_nameservers_with_ip_spec.rb b/spec/whois/parsers/responses/whois.mx/mx/property_nameservers_with_ip_spec.rb new file mode 100644 index 00000000..f1e04bb2 --- /dev/null +++ b/spec/whois/parsers/responses/whois.mx/mx/property_nameservers_with_ip_spec.rb @@ -0,0 +1,31 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.mx/mx/property_nameservers_with_ip.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.mx", :aggregate_failures do + + subject do + file = fixture("responses", "whois.mx/mx/property_nameservers_with_ip.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.mx") + Whois::Parser.parser_for(part) + end + + it "matches property_nameservers_with_ip.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("dns1.mpsnet.net.mx") + expect(subject.nameservers[0].ipv4).to eq("200.4.48.15") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("dns2.mpsnet.net.mx") + expect(subject.nameservers[1].ipv4).to eq("200.4.48.16") + end +end diff --git a/spec/whois/parsers/responses/whois.mx/mx/status_available_spec.rb b/spec/whois/parsers/responses/whois.mx/mx/status_available_spec.rb new file mode 100644 index 00000000..9b836b08 --- /dev/null +++ b/spec/whois/parsers/responses/whois.mx/mx/status_available_spec.rb @@ -0,0 +1,30 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.mx/mx/status_available.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.mx", :aggregate_failures do + + subject do + file = fixture("responses", "whois.mx/mx/status_available.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.mx") + Whois::Parser.parser_for(part) + end + + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end +end diff --git a/spec/whois/parsers/responses/whois.mx/mx/status_registered_spec.rb b/spec/whois/parsers/responses/whois.mx/mx/status_registered_spec.rb new file mode 100644 index 00000000..3b2117ea --- /dev/null +++ b/spec/whois/parsers/responses/whois.mx/mx/status_registered_spec.rb @@ -0,0 +1,48 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.mx/mx/status_registered.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.mx", :aggregate_failures do + + subject do + file = fixture("responses", "whois.mx/mx/status_registered.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.mx") + Whois::Parser.parser_for(part) + end + + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2009-05-12")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2016-05-11")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns4.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns1.google.com") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) + end +end diff --git a/spec/whois/parsers/responses/whois.mynic.my/my/status_available_spec.rb b/spec/whois/parsers/responses/whois.mynic.my/my/status_available_spec.rb index f449d970..f1210d81 100644 --- a/spec/whois/parsers/responses/whois.mynic.my/my/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.mynic.my/my/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.mynic.my.rb' -describe Whois::Parsers::WhoisMynicMy, "status_available.expected" do +describe "whois.mynic.my", :aggregate_failures do subject do file = fixture("responses", "whois.mynic.my/my/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.mynic.my") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.mynic.my/my/status_registered_spec.rb b/spec/whois/parsers/responses/whois.mynic.my/my/status_registered_spec.rb index 614848da..2b513967 100644 --- a/spec/whois/parsers/responses/whois.mynic.my/my/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.mynic.my/my/status_registered_spec.rb @@ -9,59 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.mynic.my.rb' -describe Whois::Parsers::WhoisMynicMy, "status_registered.expected" do +describe "whois.mynic.my", :aggregate_failures do subject do file = fixture("responses", "whois.mynic.my/my/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.mynic.my") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2009-05-13")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-10-11")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-05-13")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq("216.239.32.10") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq("216.239.34.10") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2009-05-13")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-10-11")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-05-13")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq("216.239.32.10") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq("216.239.34.10") end end diff --git a/spec/whois/parsers/responses/whois.na-nic.com.na/na/status_available_spec.rb b/spec/whois/parsers/responses/whois.na-nic.com.na/na/status_available_spec.rb index 973b0cb5..a9244390 100644 --- a/spec/whois/parsers/responses/whois.na-nic.com.na/na/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.na-nic.com.na/na/status_available_spec.rb @@ -9,65 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.na-nic.com.na.rb' -describe Whois::Parsers::WhoisNaNicComNa, "status_available.expected" do +describe "whois.na-nic.com.na", :aggregate_failures do subject do file = fixture("responses", "whois.na-nic.com.na/na/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.na-nic.com.na") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.na") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.na") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.na-nic.com.na/na/status_registered_spec.rb b/spec/whois/parsers/responses/whois.na-nic.com.na/na/status_registered_spec.rb index 1f432ba9..b358549b 100644 --- a/spec/whois/parsers/responses/whois.na-nic.com.na/na/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.na-nic.com.na/na/status_registered_spec.rb @@ -9,76 +9,36 @@ # require 'spec_helper' -require 'whois/parsers/whois.na-nic.com.na.rb' -describe Whois::Parsers::WhoisNaNicComNa, "status_registered.expected" do +describe "whois.na-nic.com.na", :aggregate_failures do subject do file = fixture("responses", "whois.na-nic.com.na/na/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.na-nic.com.na") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.na") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("4100-CoCCA") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2007-03-27 22:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-07-22 17:07:58 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-08-19 23:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.na") + expect(subject.domain_id).to eq("4100-CoCCA") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2007-03-27 22:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-07-22 17:07:58 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-08-19 23:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nc/nc/property_contact_without_state_and_address_spec.rb b/spec/whois/parsers/responses/whois.nc/nc/property_contact_without_state_and_address_spec.rb index 0882547f..e929871a 100644 --- a/spec/whois/parsers/responses/whois.nc/nc/property_contact_without_state_and_address_spec.rb +++ b/spec/whois/parsers/responses/whois.nc/nc/property_contact_without_state_and_address_spec.rb @@ -9,32 +9,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nc.rb' -describe Whois::Parsers::WhoisNc, "property_contact_without_state_and_address.expected" do +describe "whois.nc", :aggregate_failures do subject do file = fixture("responses", "whois.nc/nc/property_contact_without_state_and_address.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nc") + Whois::Parser.parser_for(part) end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].name).to eq("DTSI") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("BP 15101") - expect(subject.registrant_contacts[0].city).to eq("NOUMEA CEDEX") - expect(subject.registrant_contacts[0].zip).to eq("98804") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end + it "matches property_contact_without_state_and_address.expected" do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].name).to eq("DTSI") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("BP 15101") + expect(subject.registrant_contacts[0].city).to eq("NOUMEA CEDEX") + expect(subject.registrant_contacts[0].zip).to eq("98804") + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nc/nc/property_contact_without_state_spec.rb b/spec/whois/parsers/responses/whois.nc/nc/property_contact_without_state_spec.rb index 470f94ad..7c762a20 100644 --- a/spec/whois/parsers/responses/whois.nc/nc/property_contact_without_state_spec.rb +++ b/spec/whois/parsers/responses/whois.nc/nc/property_contact_without_state_spec.rb @@ -9,32 +9,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nc.rb' -describe Whois::Parsers::WhoisNc, "property_contact_without_state.expected" do +describe "whois.nc", :aggregate_failures do subject do file = fixture("responses", "whois.nc/nc/property_contact_without_state.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nc") + Whois::Parser.parser_for(part) end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].name).to eq("PLAY NEW CALEDONIA") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("12 BOULEVARD VAUBAN\nBP 2839") - expect(subject.registrant_contacts[0].city).to eq("NOUMEA CEDEX") - expect(subject.registrant_contacts[0].zip).to eq("98846") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end + it "matches property_contact_without_state.expected" do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].name).to eq("PLAY NEW CALEDONIA") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("12 BOULEVARD VAUBAN\nBP 2839") + expect(subject.registrant_contacts[0].city).to eq("NOUMEA CEDEX") + expect(subject.registrant_contacts[0].zip).to eq("98846") + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nc/nc/status_available_spec.rb b/spec/whois/parsers/responses/whois.nc/nc/status_available_spec.rb index 63c8add6..6f4e58ee 100644 --- a/spec/whois/parsers/responses/whois.nc/nc/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nc/nc/status_available_spec.rb @@ -9,86 +9,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.nc.rb' -describe Whois::Parsers::WhoisNc, "status_available.expected" do +describe "whois.nc", :aggregate_failures do subject do file = fixture("responses", "whois.nc/nc/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nc") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nc/nc/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nc/nc/status_registered_spec.rb index 1c29f781..3ab02207 100644 --- a/spec/whois/parsers/responses/whois.nc/nc/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nc/nc/status_registered_spec.rb @@ -9,107 +9,52 @@ # require 'spec_helper' -require 'whois/parsers/whois.nc.rb' -describe Whois::Parsers::WhoisNc, "status_registered.expected" do +describe "whois.nc", :aggregate_failures do subject do file = fixture("responses", "whois.nc/nc/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nc") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("domaine.nc") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-05-14")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-04-03")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2016-05-14")) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].name).to eq("CCTLD") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("1 RUE MONCHOVET\n7 EME ETAGE\nLE WARUNA 1") - expect(subject.registrant_contacts[0].city).to eq("NOUMEA CEDEX") - expect(subject.registrant_contacts[0].zip).to eq("98841") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq("NEW CALEDONIA") - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("any-ns1.nc") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.nc") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.nc") - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("domaine.nc") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-05-14")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-04-03")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2016-05-14")) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].name).to eq("CCTLD") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("1 RUE MONCHOVET\n7 EME ETAGE\nLE WARUNA 1") + expect(subject.registrant_contacts[0].city).to eq("NOUMEA CEDEX") + expect(subject.registrant_contacts[0].zip).to eq("98841") + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq("NEW CALEDONIA") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("any-ns1.nc") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.nc") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns2.nc") end end diff --git a/spec/whois/parsers/responses/whois.netcom.cm/cm/status_available_spec.rb b/spec/whois/parsers/responses/whois.netcom.cm/cm/status_available_spec.rb index 5ae7205e..64e905af 100644 --- a/spec/whois/parsers/responses/whois.netcom.cm/cm/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.netcom.cm/cm/status_available_spec.rb @@ -9,65 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.netcom.cm.rb' -describe Whois::Parsers::WhoisNetcomCm, "status_available.expected" do +describe "whois.netcom.cm", :aggregate_failures do subject do file = fixture("responses", "whois.netcom.cm/cm/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.netcom.cm") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.cm") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.cm") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.netcom.cm/cm/status_registered_spec.rb b/spec/whois/parsers/responses/whois.netcom.cm/cm/status_registered_spec.rb index 2e5731b0..9722f8c2 100644 --- a/spec/whois/parsers/responses/whois.netcom.cm/cm/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.netcom.cm/cm/status_registered_spec.rb @@ -9,80 +9,40 @@ # require 'spec_helper' -require 'whois/parsers/whois.netcom.cm.rb' -describe Whois::Parsers::WhoisNetcomCm, "status_registered.expected" do +describe "whois.netcom.cm", :aggregate_failures do subject do file = fixture("responses", "whois.netcom.cm/cm/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.netcom.cm") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.cm") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2009-10-07 10:02 WAT")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-09-20 17:47 WAT")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-10-07 10:02 WAT")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.cm") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2009-10-07 10:02 WAT")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-09-20 17:47 WAT")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-10-07 10:02 WAT")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.netcom.cm/cm/status_suspended_spec.rb b/spec/whois/parsers/responses/whois.netcom.cm/cm/status_suspended_spec.rb index b56d9a9a..139d5089 100644 --- a/spec/whois/parsers/responses/whois.netcom.cm/cm/status_suspended_spec.rb +++ b/spec/whois/parsers/responses/whois.netcom.cm/cm/status_suspended_spec.rb @@ -9,76 +9,36 @@ # require 'spec_helper' -require 'whois/parsers/whois.netcom.cm.rb' -describe Whois::Parsers::WhoisNetcomCm, "status_suspended.expected" do +describe "whois.netcom.cm", :aggregate_failures do subject do file = fixture("responses", "whois.netcom.cm/cm/status_suspended.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.netcom.cm") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("imdb.cm") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2009-08-28 01:00 WAT")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-01-24 09:17 WAT")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2011-08-28 01:00 WAT")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("Registrar ANTIC") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.refinedhosting.net") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.refinedhosting.net") - end + it "matches status_suspended.expected" do + expect(subject.domain).to eq("imdb.cm") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2009-08-28 01:00 WAT")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-01-24 09:17 WAT")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2011-08-28 01:00 WAT")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("Registrar ANTIC") + expect(subject.registrar.url).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.refinedhosting.net") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.refinedhosting.net") end end diff --git a/spec/whois/parsers/responses/whois.networksolutions.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.networksolutions.com/status_available_spec.rb index 9901586e..4d528056 100644 --- a/spec/whois/parsers/responses/whois.networksolutions.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.networksolutions.com/status_available_spec.rb @@ -9,83 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.networksolutions.com.rb' -describe Whois::Parsers::WhoisNetworksolutionsCom, "status_available.expected" do +describe "whois.networksolutions.com", :aggregate_failures do subject do file = fixture("responses", "whois.networksolutions.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.networksolutions.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.networksolutions.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.networksolutions.com/status_registered_spec.rb index 01dad517..b7595e4b 100644 --- a/spec/whois/parsers/responses/whois.networksolutions.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.networksolutions.com/status_registered_spec.rb @@ -9,144 +9,92 @@ # require 'spec_helper' -require 'whois/parsers/whois.networksolutions.com.rb' -describe Whois::Parsers::WhoisNetworksolutionsCom, "status_registered.expected" do +describe "whois.networksolutions.com", :aggregate_failures do subject do file = fixture("responses", "whois.networksolutions.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.networksolutions.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("xif.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1997-06-10")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-02-13")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-06-09")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("2") - expect(subject.registrar.name).to eq("NETWORK SOLUTIONS, LLC.") - expect(subject.registrar.organization).to eq("NETWORK SOLUTIONS, LLC.") - expect(subject.registrar.url).to eq("http//www.networksolutions.com/en_US/") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("XIF Communications") - expect(subject.registrant_contacts[0].organization).to eq("XIF Communications") - expect(subject.registrant_contacts[0].address).to eq("1200 New Hampshire Avenue NW") - expect(subject.registrant_contacts[0].city).to eq("Washington") - expect(subject.registrant_contacts[0].zip).to eq("20036") - expect(subject.registrant_contacts[0].state).to eq("DC") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("202-463-7200") - expect(subject.registrant_contacts[0].fax).to eq("999-999-9999") - expect(subject.registrant_contacts[0].email).to eq("noc@xif.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("Communications, XIF ContactMiddleName") - expect(subject.admin_contacts[0].organization).to eq("XIF Communications") - expect(subject.admin_contacts[0].address).to eq("1200 New Hampshire Avenue NW") - expect(subject.admin_contacts[0].city).to eq("Washington") - expect(subject.admin_contacts[0].zip).to eq("20036") - expect(subject.admin_contacts[0].state).to eq("DC") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("202-463-7200") - expect(subject.admin_contacts[0].fax).to eq("202-318-4003") - expect(subject.admin_contacts[0].email).to eq("noc@xif.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Communications, XIF ContactMiddleName") - expect(subject.technical_contacts[0].organization).to eq("XIF Communications") - expect(subject.technical_contacts[0].address).to eq("1200 New Hampshire Avenue NW") - expect(subject.technical_contacts[0].city).to eq("Washington") - expect(subject.technical_contacts[0].zip).to eq("20036") - expect(subject.technical_contacts[0].state).to eq("DC") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("202-463-7200") - expect(subject.technical_contacts[0].fax).to eq("202-318-4003") - expect(subject.technical_contacts[0].email).to eq("noc@xif.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns01.xif.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns-east.cerf.net") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns-west.cerf.net") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("xif.com") + expect(subject.domain_id).to eq("") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1997-06-10")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-02-13")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-06-09")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("2") + expect(subject.registrar.name).to eq("NETWORK SOLUTIONS, LLC.") + expect(subject.registrar.url).to eq("http//www.networksolutions.com/en_US/") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("XIF Communications") + expect(subject.registrant_contacts[0].organization).to eq("XIF Communications") + expect(subject.registrant_contacts[0].address).to eq("1200 New Hampshire Avenue NW") + expect(subject.registrant_contacts[0].city).to eq("Washington") + expect(subject.registrant_contacts[0].zip).to eq("20036") + expect(subject.registrant_contacts[0].state).to eq("DC") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("202-463-7200") + expect(subject.registrant_contacts[0].fax).to eq("999-999-9999") + expect(subject.registrant_contacts[0].email).to eq("noc@xif.com") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("Communications, XIF ContactMiddleName") + expect(subject.admin_contacts[0].organization).to eq("XIF Communications") + expect(subject.admin_contacts[0].address).to eq("1200 New Hampshire Avenue NW") + expect(subject.admin_contacts[0].city).to eq("Washington") + expect(subject.admin_contacts[0].zip).to eq("20036") + expect(subject.admin_contacts[0].state).to eq("DC") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("202-463-7200") + expect(subject.admin_contacts[0].fax).to eq("202-318-4003") + expect(subject.admin_contacts[0].email).to eq("noc@xif.com") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Communications, XIF ContactMiddleName") + expect(subject.technical_contacts[0].organization).to eq("XIF Communications") + expect(subject.technical_contacts[0].address).to eq("1200 New Hampshire Avenue NW") + expect(subject.technical_contacts[0].city).to eq("Washington") + expect(subject.technical_contacts[0].zip).to eq("20036") + expect(subject.technical_contacts[0].state).to eq("DC") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("202-463-7200") + expect(subject.technical_contacts[0].fax).to eq("202-318-4003") + expect(subject.technical_contacts[0].email).to eq("noc@xif.com") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns01.xif.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns-east.cerf.net") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns-west.cerf.net") end end diff --git a/spec/whois/parsers/responses/whois.nic.ac/ac/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.ac/ac/status_available_spec.rb index 2c6013a4..5e9c777e 100644 --- a/spec/whois/parsers/responses/whois.nic.ac/ac/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ac/ac/status_available_spec.rb @@ -9,86 +9,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ac.rb' -describe Whois::Parsers::WhoisNicAc, "status_available.expected" do +describe "whois.nic.ac", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ac/ac/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ac") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.ac/ac/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ac/ac/status_registered_spec.rb index 8df9bc7c..460e9cb0 100644 --- a/spec/whois/parsers/responses/whois.nic.ac/ac/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ac/ac/status_registered_spec.rb @@ -9,117 +9,61 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ac.rb' -describe Whois::Parsers::WhoisNicAc, "status_registered.expected" do +describe "whois.nic.ac", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ac/ac/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ac") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.ac") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D503300000040385778-LRMS") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-04-03 13:38:02 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2019-03-02T10:33:12 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2020-04-03 13:38:02 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.organization).to eq("MarkMonitor Inc.") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("Google LLC") - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("google.ac") + expect(subject.domain_id).to eq("D503300000040385778-LRMS") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-04-03 13:38:02 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2019-03-02T10:33:12 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-04-03 13:38:02 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.af/af/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.af/af/status_available_spec.rb index 98b56df1..e681ed53 100644 --- a/spec/whois/parsers/responses/whois.nic.af/af/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.af/af/status_available_spec.rb @@ -9,65 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.af.rb' -describe Whois::Parsers::WhoisNicAf, "status_available.expected" do +describe "whois.nic.af", :aggregate_failures do subject do file = fixture("responses", "whois.nic.af/af/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.af") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.af") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.af") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.af/af/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.af/af/status_registered_spec.rb index 1a20610c..f36c63b1 100644 --- a/spec/whois/parsers/responses/whois.nic.af/af/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.af/af/status_registered_spec.rb @@ -9,80 +9,40 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.af.rb' -describe Whois::Parsers::WhoisNicAf, "status_registered.expected" do +describe "whois.nic.af", :aggregate_failures do subject do file = fixture("responses", "whois.nic.af/af/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.af") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.af") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("345679-CoCCA") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2009-10-05 03:51:17 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-01-16 06:50:48 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-05-05 03:51:17 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.af") + expect(subject.domain_id).to eq("345679-CoCCA") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2009-10-05 03:51:17 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-01-16 06:50:48 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-05-05 03:51:17 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.ag/ag/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.ag/ag/status_available_spec.rb index f8846b32..ad44eda1 100644 --- a/spec/whois/parsers/responses/whois.nic.ag/ag/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ag/ag/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ag.rb' -describe Whois::Parsers::WhoisNicAg, "status_available.expected" do +describe "whois.nic.ag", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ag/ag/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ag") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.ag/ag/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ag/ag/status_registered_spec.rb index 128a93e0..2ac64cce 100644 --- a/spec/whois/parsers/responses/whois.nic.ag/ag/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ag/ag/status_registered_spec.rb @@ -9,142 +9,60 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ag.rb' -describe Whois::Parsers::WhoisNicAg, "status_registered.expected" do +describe "whois.nic.ag", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ag/ag/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ag") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to CCTLD WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Afilias registry database. The data in this record is provided by Afilias Limited for informational purposes only, and Afilias does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to: (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Afilias reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.ag") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D48552-LRCC") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-01-05 14:06:59 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-12-04 10:20:49 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-01-05 14:06:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("R22-LRCC") - expect(subject.registrar.name).to eq("MarkMonitor, Inc.") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("AGRS-129819") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6506188571") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("AGRS-129819") - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") - expect(subject.admin_contacts[0].fax).to eq("+1.6506188571") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("AGRS-129819") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") - expect(subject.technical_contacts[0].fax).to eq("+1.6506188571") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq("google.ag") + expect(subject.domain_id).to eq("D105800000000048552-AGRS") + expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-01-05 14:06:59 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2020-12-04 10:29:47 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-01-05 14:06:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(0) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(0) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns4.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.ai/ai/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.ai/ai/status_available_spec.rb index 20d8540e..5b54ae3d 100644 --- a/spec/whois/parsers/responses/whois.nic.ai/ai/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ai/ai/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ai.rb' -describe Whois::Parsers::WhoisNicAi, "status_available.expected" do +describe "whois.nic.ai", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ai/ai/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ai") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.ai/ai/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ai/ai/status_registered_spec.rb index 30d6e082..d8a6fd28 100644 --- a/spec/whois/parsers/responses/whois.nic.ai/ai/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ai/ai/status_registered_spec.rb @@ -9,58 +9,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ai.rb' -describe Whois::Parsers::WhoisNicAi, "status_registered.expected" do +describe "whois.nic.ai", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ai/ai/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ai") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.as/as/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.as/as/status_available_spec.rb index 30b09d3b..dbbc6f05 100644 --- a/spec/whois/parsers/responses/whois.nic.as/as/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.as/as/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.as.rb' -describe Whois::Parsers::WhoisNicAs, "status_available.expected" do +describe "whois.nic.as", :aggregate_failures do subject do file = fixture("responses", "whois.nic.as/as/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.as") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.as/as/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.as/as/status_registered_spec.rb index 2eef8404..2f64a5f1 100644 --- a/spec/whois/parsers/responses/whois.nic.as/as/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.as/as/status_registered_spec.rb @@ -9,62 +9,35 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.as.rb' -describe Whois::Parsers::WhoisNicAs, "status_registered.expected" do +describe "whois.nic.as", :aggregate_failures do subject do file = fixture("responses", "whois.nic.as/as/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.as") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.nameservers[3].ipv4).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.asia/asia/property_status_multiple_spec.rb b/spec/whois/parsers/responses/whois.nic.asia/asia/property_status_multiple_spec.rb index df3191a7..1badfdb7 100644 --- a/spec/whois/parsers/responses/whois.nic.asia/asia/property_status_multiple_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.asia/asia/property_status_multiple_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.asia.rb' -describe Whois::Parsers::WhoisNicAsia, "property_status_multiple.expected" do +describe "whois.nic.asia", :aggregate_failures do subject do file = fixture("responses", "whois.nic.asia/asia/property_status_multiple.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.asia") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_multiple.expected" do + expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.asia/asia/property_status_single_spec.rb b/spec/whois/parsers/responses/whois.nic.asia/asia/property_status_single_spec.rb deleted file mode 100644 index 3ad58bcd..00000000 --- a/spec/whois/parsers/responses/whois.nic.asia/asia/property_status_single_spec.rb +++ /dev/null @@ -1,37 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.nic.asia/asia/property_status_single.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.nic.asia.rb' - -describe Whois::Parsers::WhoisNicAsia, "property_status_single.expected" do - - subject do - file = fixture("responses", "whois.nic.asia/asia/property_status_single.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(["OK"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end -end diff --git a/spec/whois/parsers/responses/whois.nic.asia/asia/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.asia/asia/status_available_spec.rb index deb0fb5b..d2bb754d 100644 --- a/spec/whois/parsers/responses/whois.nic.asia/asia/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.asia/asia/status_available_spec.rb @@ -9,93 +9,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.asia.rb' -describe Whois::Parsers::WhoisNicAsia, "status_available.expected" do +describe "whois.nic.asia", :aggregate_failures do subject do file = fixture("responses", "whois.nic.asia/asia/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.asia") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(false) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.reserved?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.asia/asia/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.asia/asia/status_registered_spec.rb index 326624ff..467fa073 100644 --- a/spec/whois/parsers/responses/whois.nic.asia/asia/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.asia/asia/status_registered_spec.rb @@ -9,151 +9,65 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.asia.rb' -describe Whois::Parsers::WhoisNicAsia, "status_registered.expected" do +describe "whois.nic.asia", :aggregate_failures do subject do file = fixture("responses", "whois.nic.asia/asia/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.asia") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("DotAsia WHOIS LEGAL STATEMENT AND TERMS & CONDITIONS: The WHOIS service offered by DotAsia and the access to the records in the DotAsia WHOIS database are provided for information purposes only. It allows persons to check whether a specific domain name is still available or not and to obtain information related to the registration records of existing domain names. DotAsia cannot, under any circumstances, be held liable in case the stored information would prove to be wrong, incomplete, or not accurate in any sense. By submitting a query you agree not to use the information made available to: allow, enable or otherwise support the transmission of unsolicited, commercial advertising or other solicitations whether via email or otherwise; target advertising in any possible way; or to cause nuisance in any possible way to the registrants by sending (whether by automated, electronic processes capable of enabling high volumes or other possible means) messages to them. Without prejudice to the above, it is explicitly forbidden to extract, copy and/or use or re-utilise in any form and by any means (electronically or not) the whole or a quantitatively or qualitatively substantial part of the contents of the WHOIS database without prior and explicit permission by DotAsia, nor in any attempt hereof, or to apply automated, electronic processes to DotAsia (or its systems). You agree that any reproduction and/or transmission of data for commercial purposes will always be considered as the extraction of a substantial part of the content of the WHOIS database. By submitting the query you agree to abide by this policy and accept that DotAsia can take measures to limit the use of its WHOIS services in order to protect the privacy of its registrants or the integrity of the database.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("cj7.asia") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D93126-ASIA") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["OK"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2008-01-15 11:28:02 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-01-15 22:20:16 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-01-15 11:28:02 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("800046") - expect(subject.registrar.name).to eq("dotASIA R4-ASIA") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("FR-132aa75b4bf65") - expect(subject.registrant_contacts[0].name).to eq("RAXCO ASSETS CORP.") - expect(subject.registrant_contacts[0].organization).to eq("RAXCO ASSETS CORP.") - expect(subject.registrant_contacts[0].address).to eq("RM 1201-1204 12/F\nSEA BIRD HSE\n22-28 WYNDHAM ST CENTRAL HK") - expect(subject.registrant_contacts[0].city).to eq("Hong Kong") - expect(subject.registrant_contacts[0].zip).to eq("") - expect(subject.registrant_contacts[0].state).to eq("") - expect(subject.registrant_contacts[0].country_code).to eq("HK") - expect(subject.registrant_contacts[0].phone).to eq("+852.21190333") - expect(subject.registrant_contacts[0].fax).to eq("+852.23045326") - expect(subject.registrant_contacts[0].email).to eq("eddie.yeung@bingogroup.com.hk") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("FR-132aa7afe0967") - expect(subject.admin_contacts[0].name).to eq("Eddie Yeung") - expect(subject.admin_contacts[0].organization).to eq("RAXCO ASSETS CORP.") - expect(subject.admin_contacts[0].address).to eq("RM 1201-1204 12/F\nSEA BIRD HSE\n22-28 WYNDHAM ST CENTRAL HK") - expect(subject.admin_contacts[0].city).to eq("Hong Kong") - expect(subject.admin_contacts[0].zip).to eq("") - expect(subject.admin_contacts[0].state).to eq("") - expect(subject.admin_contacts[0].country_code).to eq("HK") - expect(subject.admin_contacts[0].phone).to eq("+852.21190333") - expect(subject.admin_contacts[0].fax).to eq("") - expect(subject.admin_contacts[0].email).to eq("eddie.yeung@bingogroup.com.hk") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("FR-132aa7afe0967") - expect(subject.technical_contacts[0].name).to eq("Eddie Yeung") - expect(subject.technical_contacts[0].organization).to eq("RAXCO ASSETS CORP.") - expect(subject.technical_contacts[0].address).to eq("RM 1201-1204 12/F\nSEA BIRD HSE\n22-28 WYNDHAM ST CENTRAL HK") - expect(subject.technical_contacts[0].city).to eq("Hong Kong") - expect(subject.technical_contacts[0].zip).to eq("") - expect(subject.technical_contacts[0].state).to eq("") - expect(subject.technical_contacts[0].country_code).to eq("HK") - expect(subject.technical_contacts[0].phone).to eq("+852.21190333") - expect(subject.technical_contacts[0].fax).to eq("") - expect(subject.technical_contacts[0].email).to eq("eddie.yeung@bingogroup.com.hk") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(6) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.dnspod.net") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.dnspod.net") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.dnspod.net") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.dnspod.net") - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("ns5.dnspod.net") - expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[5].name).to eq("ns6.dnspod.net") - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(false) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq("cj7.asia") + expect(subject.domain_id).to eq("D107700000000093126-AGRS") + expect(subject.status).to eq(["ok https://icann.org/epp#ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2008-01-15 11:28:02 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2020-01-15 22:20:23 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2021-01-15 11:28:02 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("119") + expect(subject.registrar.name).to eq("DotAsia Organisation") + expect(subject.registrar.url).to eq("") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("RAXCO ASSETS CORP.") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("") + expect(subject.registrant_contacts[0].country_code).to eq("HK") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(0) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(0) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(6) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.dnspod.net") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.dnspod.net") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.dnspod.net") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.dnspod.net") + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("ns6.dnspod.net") + expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[5].name).to eq("ns5.dnspod.net") + expect(subject.reserved?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.asia/asia/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.nic.asia/asia/status_reserved_spec.rb index fdb030ca..9803f7f1 100644 --- a/spec/whois/parsers/responses/whois.nic.asia/asia/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.asia/asia/status_reserved_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.asia.rb' -describe Whois::Parsers::WhoisNicAsia, "status_reserved.expected" do +describe "whois.nic.asia", :aggregate_failures do subject do file = fixture("responses", "whois.nic.asia/asia/status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.asia") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(true) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_reserved.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:reserved) + expect(subject.reserved?).to eq(true) + expect(subject.available?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.at/at/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.at/at/status_available_spec.rb index 24440cca..b9c25145 100644 --- a/spec/whois/parsers/responses/whois.nic.at/at/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.at/at/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.at.rb' -describe Whois::Parsers::WhoisNicAt, "status_available.expected" do +describe "whois.nic.at", :aggregate_failures do subject do file = fixture("responses", "whois.nic.at/at/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.at") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.at/at/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.at/at/status_registered_spec.rb index 514e4fee..d0a14c1d 100644 --- a/spec/whois/parsers/responses/whois.nic.at/at/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.at/at/status_registered_spec.rb @@ -9,59 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.at.rb' -describe Whois::Parsers::WhoisNicAt, "status_registered.expected" do +describe "whois.nic.at", :aggregate_failures do subject do file = fixture("responses", "whois.nic.at/at/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.at") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2011-04-26 17:57:27")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2011-04-26 17:57:27")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.bike/bike/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.bike/bike/status_available_spec.rb new file mode 100644 index 00000000..99dd7279 --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.bike/bike/status_available_spec.rb @@ -0,0 +1,40 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.bike/bike/status_available.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.bike", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.bike/bike/status_available.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.bike") + Whois::Parser.parser_for(part) + end + + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end +end diff --git a/spec/whois/parsers/responses/whois.nic.bike/bike/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.bike/bike/status_registered_spec.rb new file mode 100644 index 00000000..354ab5b2 --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.bike/bike/status_registered_spec.rb @@ -0,0 +1,89 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.bike/bike/status_registered.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.bike", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.bike/bike/status_registered.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.bike") + Whois::Parser.parser_for(part) + end + + it "matches status_registered.expected" do + expect(subject.domain).to eq("bike.bike") + expect(subject.domain_id).to eq("a864ce4015614eeda646a4121b91c784-DONUTS") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2015-07-19 17:01:03 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2022-09-02 17:01:11 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2023-07-19 17:01:03 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("1011") + expect(subject.registrar.name).to eq("101domain GRS Limited") + expect(subject.registrar.url).to eq("http://101domain.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].organization).to eq("Digital Privacy Corporation") + expect(subject.registrant_contacts[0].address).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].address).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].address).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.gagarin2501.hospedagemdesites.ws") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.gagarin2501.hospedagemdesites.ws") + end +end diff --git a/spec/whois/parsers/responses/whois.nic.bj/bj/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.bj/bj/status_available_spec.rb index 6c959100..35443b84 100644 --- a/spec/whois/parsers/responses/whois.nic.bj/bj/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.bj/bj/status_available_spec.rb @@ -9,86 +9,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.bj.rb' -describe Whois::Parsers::WhoisNicBj, "status_available.expected" do +describe "whois.nic.bj", :aggregate_failures do subject do file = fixture("responses", "whois.nic.bj/bj/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.bj") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.bj/bj/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.bj/bj/status_registered_spec.rb index 524cd560..d5fd1396 100644 --- a/spec/whois/parsers/responses/whois.nic.bj/bj/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.bj/bj/status_registered_spec.rb @@ -9,107 +9,52 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.bj.rb' -describe Whois::Parsers::WhoisNicBj, "status_registered.expected" do +describe "whois.nic.bj", :aggregate_failures do subject do file = fixture("responses", "whois.nic.bj/bj/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.bj") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.bj") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2009-03-25 01:57:22 PDT")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-08-10 01:57:22 PDT")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("GOOGLE INC (ED0155)") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("google.bj") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2009-03-25 01:57:22 PDT")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-08-10 01:57:22 PDT")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("GOOGLE INC (ED0155)") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.bo/bo/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.bo/bo/status_available_spec.rb index c1ecb314..96da35f9 100644 --- a/spec/whois/parsers/responses/whois.nic.bo/bo/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.bo/bo/status_available_spec.rb @@ -9,59 +9,24 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.bo.rb' -describe Whois::Parsers::WhoisNicBo, "status_available.expected" do +describe "whois.nic.bo", :aggregate_failures do subject do file = fixture("responses", "whois.nic.bo/bo/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.bo") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.nic.bo/bo/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.bo/bo/status_registered_spec.rb index f22cb862..11e1a3bc 100644 --- a/spec/whois/parsers/responses/whois.nic.bo/bo/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.bo/bo/status_registered_spec.rb @@ -9,61 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.bo.rb' -describe Whois::Parsers::WhoisNicBo, "status_registered.expected" do +describe "whois.nic.bo", :aggregate_failures do subject do file = fixture("responses", "whois.nic.bo/bo/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.bo") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.bo") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-08-22")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-08-22")) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.bo") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-08-22")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-08-22")) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.nic.cd/cd/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.cd/cd/status_available_spec.rb index 6784c7a7..dc1f918d 100644 --- a/spec/whois/parsers/responses/whois.nic.cd/cd/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cd/cd/status_available_spec.rb @@ -9,65 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.cd.rb' -describe Whois::Parsers::WhoisNicCd, "status_available.expected" do +describe "whois.nic.cd", :aggregate_failures do subject do file = fixture("responses", "whois.nic.cd/cd/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.cd") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.cd") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.cd") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.cd/cd/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.cd/cd/status_registered_spec.rb index 504ed05f..0409808c 100644 --- a/spec/whois/parsers/responses/whois.nic.cd/cd/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cd/cd/status_registered_spec.rb @@ -9,69 +9,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.cd.rb' -describe Whois::Parsers::WhoisNicCd, "status_registered.expected" do +describe "whois.nic.cd", :aggregate_failures do subject do file = fixture("responses", "whois.nic.cd/cd/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.cd") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.cd") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("5758-CD") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MARKMONITOR") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(0) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.cd") + expect(subject.domain_id).to eq("5758-CD") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MARKMONITOR") + expect(subject.registrar.url).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(0) end end diff --git a/spec/whois/parsers/responses/whois.nic.ch/ch/property_contacts_spec.rb b/spec/whois/parsers/responses/whois.nic.ch/ch/property_contacts_spec.rb index 3003f093..c4dc6dd5 100644 --- a/spec/whois/parsers/responses/whois.nic.ch/ch/property_contacts_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ch/ch/property_contacts_spec.rb @@ -9,37 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ch.rb' -describe Whois::Parsers::WhoisNicCh, "property_contacts.expected" do +describe "whois.nic.ch", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ch/ch/property_contacts.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ch") + Whois::Parser.parser_for(part) end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].name).to eq("EISD John") - expect(subject.registrant_contacts[0].address).to eq("Room 208, Furong Road, Changsha City\nCN-41000 Changsha\nChina") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].name).to eq("xie huijie") - expect(subject.technical_contacts[0].address).to eq("xie huijie\nNo95.Lane768.Ruili Road.Minhang District\nCN-200240 shanghai\nChina") - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end + it "matches property_contacts.expected" do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].name).to eq("EISD John") + expect(subject.registrant_contacts[0].address).to eq("Room 208, Furong Road, Changsha City\nCN-41000 Changsha\nChina") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].name).to eq("xie huijie") + expect(subject.technical_contacts[0].address).to eq("xie huijie\nNo95.Lane768.Ruili Road.Minhang District\nCN-200240 shanghai\nChina") + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.nic.ch/ch/property_nameservers_with_ip_spec.rb b/spec/whois/parsers/responses/whois.nic.ch/ch/property_nameservers_with_ip_spec.rb index f61d3bf0..ee3e6cfb 100644 --- a/spec/whois/parsers/responses/whois.nic.ch/ch/property_nameservers_with_ip_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ch/ch/property_nameservers_with_ip_spec.rb @@ -9,28 +9,25 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ch.rb' -describe Whois::Parsers::WhoisNicCh, "property_nameservers_with_ip.expected" do +describe "whois.nic.ch", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ch/ch/property_nameservers_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ch") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.citrin.ch") - expect(subject.nameservers[0].ipv4).to eq("193.247.72.8") - expect(subject.nameservers[0].ipv6).to eq("2001:8a8:21:5::11") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.citrin.ch") - expect(subject.nameservers[1].ipv4).to eq("62.12.149.3") - expect(subject.nameservers[1].ipv6).to eq("2001:8a8:21:5::12") - end + it "matches property_nameservers_with_ip.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.citrin.ch") + expect(subject.nameservers[0].ipv4).to eq("193.247.72.8") + expect(subject.nameservers[0].ipv6).to eq("2001:8a8:21:5::11") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.citrin.ch") + expect(subject.nameservers[1].ipv4).to eq("62.12.149.3") + expect(subject.nameservers[1].ipv6).to eq("2001:8a8:21:5::12") end end diff --git a/spec/whois/parsers/responses/whois.nic.ch/ch/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.ch/ch/status_available_spec.rb index 9aa792f9..b4c1500d 100644 --- a/spec/whois/parsers/responses/whois.nic.ch/ch/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ch/ch/status_available_spec.rb @@ -9,67 +9,28 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ch.rb' -describe Whois::Parsers::WhoisNicCh, "status_available.expected" do +describe "whois.nic.ch", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ch/ch/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ch") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.ch/ch/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ch/ch/status_registered_spec.rb index 62f1a0c0..73dc202b 100644 --- a/spec/whois/parsers/responses/whois.nic.ch/ch/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ch/ch/status_registered_spec.rb @@ -9,81 +9,42 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ch.rb' -describe Whois::Parsers::WhoisNicCh, "status_registered.expected" do +describe "whois.nic.ch", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ch/ch/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ch") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].name).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("Administrator Domain\nAmphitheatre Parkway 1600\nUS-94043 Mountain View, CA\nUnited States") - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].name).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("DNS Admin\n2400 E. Bayshore Pkwy\nUS-94043 Mountain View\nUnited States") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].name).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq("Administrator Domain\nAmphitheatre Parkway 1600\nUS-94043 Mountain View, CA\nUnited States") + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].name).to eq("Google Inc.") + expect(subject.technical_contacts[0].address).to eq("DNS Admin\n2400 E. Bayshore Pkwy\nUS-94043 Mountain View\nUnited States") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.ci/ci/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.ci/ci/status_available_spec.rb index 68290ca7..013196fe 100644 --- a/spec/whois/parsers/responses/whois.nic.ci/ci/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ci/ci/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ci.rb' -describe Whois::Parsers::WhoisNicCi, "status_available.expected" do +describe "whois.nic.ci", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ci/ci/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ci") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.ci/ci/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ci/ci/status_registered_spec.rb index d67d7901..4832aa0d 100644 --- a/spec/whois/parsers/responses/whois.nic.ci/ci/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ci/ci/status_registered_spec.rb @@ -9,60 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ci.rb' -describe Whois::Parsers::WhoisNicCi, "status_registered.expected" do +describe "whois.nic.ci", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ci/ci/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ci") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-01-27 11:14:47")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-02-14 11:14:47")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-01-27 11:14:47")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-02-14 11:14:47")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.cl/cl/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.cl/cl/status_available_spec.rb index a87a506a..9df5f31b 100644 --- a/spec/whois/parsers/responses/whois.nic.cl/cl/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cl/cl/status_available_spec.rb @@ -9,45 +9,20 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.cl.rb' -describe Whois::Parsers::WhoisNicCl, "status_available.expected" do +describe "whois.nic.cl", :aggregate_failures do subject do file = fixture("responses", "whois.nic.cl/cl/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.cl") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.cl/cl/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.cl/cl/status_registered_spec.rb index e44e7f75..b9ee90b4 100644 --- a/spec/whois/parsers/responses/whois.nic.cl/cl/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cl/cl/status_registered_spec.rb @@ -9,57 +9,42 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.cl.rb' -describe Whois::Parsers::WhoisNicCl, "status_registered.expected" do +describe "whois.nic.cl", :aggregate_failures do subject do file = fixture("responses", "whois.nic.cl/cl/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.cl") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns3.google.com") - expect(subject.nameservers[0].ipv4).to eq("216.239.36.10") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns4.google.com") - expect(subject.nameservers[1].ipv4).to eq("216.239.38.10") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns1.google.com") - expect(subject.nameservers[2].ipv4).to eq("216.239.32.10") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns2.google.com") - expect(subject.nameservers[3].ipv4).to eq("216.239.34.10") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.cl") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("https://markmonitor.com/") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].name).to eq("Google LLC") + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-10-22 20:48:23 GMT")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2023-11-20 17:48:02 GMT")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.cloud/cloud/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.cloud/cloud/status_available_spec.rb new file mode 100644 index 00000000..d5bf5ad6 --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.cloud/cloud/status_available_spec.rb @@ -0,0 +1,40 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.cloud/cloud/status_available.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.cloud", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.cloud/cloud/status_available.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.cloud") + Whois::Parser.parser_for(part) + end + + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end +end diff --git a/spec/whois/parsers/responses/whois.nic.cloud/cloud/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.cloud/cloud/status_registered_spec.rb new file mode 100644 index 00000000..f59d460f --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.cloud/cloud/status_registered_spec.rb @@ -0,0 +1,93 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.cloud/cloud/status_registered.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.cloud", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.cloud/cloud/status_registered.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.cloud") + Whois::Parser.parser_for(part) + end + + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.cloud") + expect(subject.domain_id).to eq("DDDAA72F4F319486082E1B91922F2483D-ARI") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2016-01-27 01:19:35 GMT")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2020-12-31 10:38:20 GMT")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-01-27 01:19:35 GMT")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor, Inc.") + expect(subject.registrar.url).to eq("www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + end +end diff --git a/spec/whois/parsers/responses/whois.nic.co/co/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.co/co/status_available_spec.rb index 75336689..f8bb8ea6 100644 --- a/spec/whois/parsers/responses/whois.nic.co/co/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.co/co/status_available_spec.rb @@ -9,83 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.co.rb' -describe Whois::Parsers::WhoisNicCo, "status_available.expected" do +describe "whois.nic.co", :aggregate_failures do subject do file = fixture("responses", "whois.nic.co/co/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.co") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.co") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(nil) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.co/co/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.co/co/status_registered_spec.rb index bf944a3b..54275e9f 100644 --- a/spec/whois/parsers/responses/whois.nic.co/co/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.co/co/status_registered_spec.rb @@ -9,138 +9,92 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.co.rb' -describe Whois::Parsers::WhoisNicCo, "status_registered.expected" do +describe "whois.nic.co", :aggregate_failures do subject do file = fixture("responses", "whois.nic.co/co/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.co") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("t.co") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D740225-CO") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientTransferProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2010-04-26 07:50:40 GMT")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-10-14 13:03:24 GMT")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2016-04-25 23:59:59 GMT")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("299") - expect(subject.registrar.name).to eq("CSC CORPORATE DOMAINS") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("365684910586C791") - expect(subject.registrant_contacts[0].name).to eq("Twitter, Inc.") - expect(subject.registrant_contacts[0].organization).to eq("Twitter, Inc.") - expect(subject.registrant_contacts[0].address).to eq("1355 Market Street\nSuite 900") - expect(subject.registrant_contacts[0].city).to eq("San Francisco") - expect(subject.registrant_contacts[0].zip).to eq("94103") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country).to eq("United States") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.4152229670") - expect(subject.registrant_contacts[0].fax).to eq("+1.4152220922") - expect(subject.registrant_contacts[0].email).to eq("domains@twitter.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("868543810568A633") - expect(subject.admin_contacts[0].name).to eq("Domain Admin") - expect(subject.admin_contacts[0].organization).to eq("Twitter, Inc.") - expect(subject.admin_contacts[0].address).to eq("1355 Market Street\nSuite 900") - expect(subject.admin_contacts[0].city).to eq("San Francisco") - expect(subject.admin_contacts[0].zip).to eq("94103") - expect(subject.admin_contacts[0].state).to eq("California") - expect(subject.admin_contacts[0].country).to eq("United States") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.4152229670") - expect(subject.admin_contacts[0].fax).to eq("+1.4152220922") - expect(subject.admin_contacts[0].email).to eq("domains@twitter.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("42101611057C7478") - expect(subject.technical_contacts[0].name).to eq("Tech Admin") - expect(subject.technical_contacts[0].organization).to eq("Twitter, Inc.") - expect(subject.technical_contacts[0].address).to eq("1355 Market Street\nSuite 900") - expect(subject.technical_contacts[0].city).to eq("San Francisco") - expect(subject.technical_contacts[0].zip).to eq("94103") - expect(subject.technical_contacts[0].state).to eq("California") - expect(subject.technical_contacts[0].country).to eq("United States") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.4152229670") - expect(subject.technical_contacts[0].fax).to eq("+1.4152220922") - expect(subject.technical_contacts[0].email).to eq("domains-tech@twitter.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.p34.dynect.net") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.p34.dynect.net") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.p34.dynect.net") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.p34.dynect.net") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("t.co") + expect(subject.domain_id).to eq("D740225-CO") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2010-04-26 07:50:40 GMT")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-04-26 05:09:40 GMT")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-04-25 23:59:59 GMT")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("299") + expect(subject.registrar.name).to eq("CSC Corporate Domains, Inc.") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].organization).to eq("Twitter, Inc.") + expect(subject.registrant_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(8) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns3.p34.dynect.net") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns4.p34.dynect.net") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("d01-01.ns.twtrdns.net") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("d01-02.ns.twtrdns.net") + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("a.r06.twtrdns.net") + expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[5].name).to eq("b.r06.twtrdns.net") + expect(subject.nameservers[6]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[6].name).to eq("c.r06.twtrdns.net") + expect(subject.nameservers[7]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[7].name).to eq("d.r06.twtrdns.net") end end diff --git a/spec/whois/parsers/responses/whois.nic.college/college/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.college/college/status_available_spec.rb index 391c8e8a..2830911e 100644 --- a/spec/whois/parsers/responses/whois.nic.college/college/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.college/college/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.college.rb' -describe Whois::Parsers::WhoisNicCollege, "status_available.expected" do +describe "whois.nic.college", :aggregate_failures do subject do file = fixture("responses", "whois.nic.college/college/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.college") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.college/college/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.college/college/status_registered_spec.rb index dd0bdc64..d2ac3c47 100644 --- a/spec/whois/parsers/responses/whois.nic.college/college/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.college/college/status_registered_spec.rb @@ -9,161 +9,67 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.college.rb' -describe Whois::Parsers::WhoisNicCollege, "status_registered.expected" do +describe "whois.nic.college", :aggregate_failures do subject do file = fixture("responses", "whois.nic.college/college/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.college") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to the whois service is rate limited. For more information, please see https://registrar-console.centralnic.com/pub/whois_guidance.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("nic.college") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D1465621-CNIC") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["serverTransferProhibited", "serverUpdateProhibited", "serverDeleteProhibited", "serverRenewProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2013-09-11 00:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-09-12 00:15:47 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-09-11 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("9999") - expect(subject.registrar.name).to eq("CentralNic Ltd") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H5178905") - expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") - expect(subject.registrant_contacts[0].organization).to eq("XYZ.COM LLC") - expect(subject.registrant_contacts[0].address).to eq("2121 E Tropicana Ave Suite #2") - expect(subject.registrant_contacts[0].city).to eq("Las Vegas") - expect(subject.registrant_contacts[0].zip).to eq("89119") - expect(subject.registrant_contacts[0].state).to eq("NV") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.8009998422") - expect(subject.registrant_contacts[0].fax).to eq("+1.7023578299") - expect(subject.registrant_contacts[0].email).to eq("icann@xyz.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H5178905") - expect(subject.admin_contacts[0].name).to eq("Domain Administrator") - expect(subject.admin_contacts[0].organization).to eq("XYZ.COM LLC") - expect(subject.admin_contacts[0].address).to eq("2121 E Tropicana Ave Suite #2") - expect(subject.admin_contacts[0].city).to eq("Las Vegas") - expect(subject.admin_contacts[0].zip).to eq("89119") - expect(subject.admin_contacts[0].state).to eq("NV") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.8009998422") - expect(subject.admin_contacts[0].fax).to eq("+1.7023578299") - expect(subject.admin_contacts[0].email).to eq("icann@xyz.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("H5178905") - expect(subject.technical_contacts[0].name).to eq("Domain Administrator") - expect(subject.technical_contacts[0].organization).to eq("XYZ.COM LLC") - expect(subject.technical_contacts[0].address).to eq("2121 E Tropicana Ave Suite #2") - expect(subject.technical_contacts[0].city).to eq("Las Vegas") - expect(subject.technical_contacts[0].zip).to eq("89119") - expect(subject.technical_contacts[0].state).to eq("NV") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.8009998422") - expect(subject.technical_contacts[0].fax).to eq("+1.7023578299") - expect(subject.technical_contacts[0].email).to eq("icann@xyz.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(6) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns0.centralnic-dns.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.centralnic-dns.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.centralnic-dns.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.centralnic-dns.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("ns4.centralnic-dns.com") - expect(subject.nameservers[4].ipv4).to eq(nil) - expect(subject.nameservers[4].ipv6).to eq(nil) - expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[5].name).to eq("ns5.centralnic-dns.com") - expect(subject.nameservers[5].ipv4).to eq(nil) - expect(subject.nameservers[5].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq("nic.college") + expect(subject.domain_id).to eq("D1465621-CNIC") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2013-09-11 11:58:15 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-09-05 00:10:44 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-09-11 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("9999") + expect(subject.registrar.name).to eq("CentralNic Ltd") + expect(subject.registrar.url).to eq("https://www.centralnic.com/") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("XYZ.COM LLC") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("NV") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("a.nic.college") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("b.nic.college") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("c.nic.college") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("d.nic.college") end end diff --git a/spec/whois/parsers/responses/whois.nic.consulting/consulting/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.consulting/consulting/status_available_spec.rb new file mode 100644 index 00000000..78028263 --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.consulting/consulting/status_available_spec.rb @@ -0,0 +1,31 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.consulting/consulting/status_available.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.consulting", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.consulting/consulting/status_available.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.consulting") + Whois::Parser.parser_for(part) + end + + it "matches status_available.expected" do + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end +end diff --git a/spec/whois/parsers/responses/whois.nic.consulting/consulting/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.consulting/consulting/status_registered_spec.rb new file mode 100644 index 00000000..87913a2b --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.consulting/consulting/status_registered_spec.rb @@ -0,0 +1,38 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.consulting/consulting/status_registered.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.consulting", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.consulting/consulting/status_registered.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.consulting") + Whois::Parser.parser_for(part) + end + + it "matches status_registered.expected" do + expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientRenewProhibited https://icann.org/epp#clientRenewProhibited","clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2023-02-15T01:47:04Z")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2024-07-14T03:59:16Z")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2025-02-15T01:47:04Z")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns25.domaincontrol.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns26.domaincontrol.com") + end +end diff --git a/spec/whois/parsers/responses/whois.nic.coop/coop/property_status_multiple_spec.rb b/spec/whois/parsers/responses/whois.nic.coop/coop/property_status_multiple_spec.rb index 0ec1af51..7e0f5a55 100644 --- a/spec/whois/parsers/responses/whois.nic.coop/coop/property_status_multiple_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.coop/coop/property_status_multiple_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.coop.rb' -describe Whois::Parsers::WhoisNicCoop, "property_status_multiple.expected" do +describe "whois.nic.coop", :aggregate_failures do subject do file = fixture("responses", "whois.nic.coop/coop/property_status_multiple.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.coop") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(["clientDeleteProhibited", "clientTransferProhibited", "clientUpdateProhibited"]) - end + it "matches property_status_multiple.expected" do + expect(subject.status).to eq(["clientDeleteProhibited", "clientTransferProhibited", "clientUpdateProhibited"]) end end diff --git a/spec/whois/parsers/responses/whois.nic.coop/coop/property_status_single_spec.rb b/spec/whois/parsers/responses/whois.nic.coop/coop/property_status_single_spec.rb index f3eb1243..922c7818 100644 --- a/spec/whois/parsers/responses/whois.nic.coop/coop/property_status_single_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.coop/coop/property_status_single_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.coop.rb' -describe Whois::Parsers::WhoisNicCoop, "property_status_single.expected" do +describe "whois.nic.coop", :aggregate_failures do subject do file = fixture("responses", "whois.nic.coop/coop/property_status_single.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.coop") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end + it "matches property_status_single.expected" do + expect(subject.status).to eq(["ok"]) end end diff --git a/spec/whois/parsers/responses/whois.nic.coop/coop/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.coop/coop/status_available_spec.rb index e1a747b6..35efd15e 100644 --- a/spec/whois/parsers/responses/whois.nic.coop/coop/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.coop/coop/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.coop.rb' -describe Whois::Parsers::WhoisNicCoop, "status_available.expected" do +describe "whois.nic.coop", :aggregate_failures do subject do file = fixture("responses", "whois.nic.coop/coop/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.coop") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.coop/coop/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.coop/coop/status_registered_spec.rb index 92d2899c..9cd0ec87 100644 --- a/spec/whois/parsers/responses/whois.nic.coop/coop/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.coop/coop/status_registered_spec.rb @@ -9,57 +9,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.coop.rb' -describe Whois::Parsers::WhoisNicCoop, "status_registered.expected" do +describe "whois.nic.coop", :aggregate_failures do subject do file = fixture("responses", "whois.nic.coop/coop/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.coop") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2002-01-31 22:12:44 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-01-04 18:30:54 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2017-01-31 22:12:44 UTC")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.calgarycoop.net") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.calgarycoop.net") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(["ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-01-31 22:12:44 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-01-04 18:30:54 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2017-01-31 22:12:44 UTC")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.calgarycoop.net") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.calgarycoop.net") end end diff --git a/spec/whois/parsers/responses/whois.nic.cx/cx/property_updated_on_empty_spec.rb b/spec/whois/parsers/responses/whois.nic.cx/cx/property_updated_on_empty_spec.rb index 84546a64..459eaa40 100644 --- a/spec/whois/parsers/responses/whois.nic.cx/cx/property_updated_on_empty_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cx/cx/property_updated_on_empty_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.cx.rb' -describe Whois::Parsers::WhoisNicCx, "property_updated_on_empty.expected" do +describe "whois.nic.cx", :aggregate_failures do subject do file = fixture("responses", "whois.nic.cx/cx/property_updated_on_empty.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.cx") + Whois::Parser.parser_for(part) end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end + it "matches property_updated_on_empty.expected" do + expect(subject.updated_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.cx/cx/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.cx/cx/status_available_spec.rb index a6660a84..1aa31485 100644 --- a/spec/whois/parsers/responses/whois.nic.cx/cx/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cx/cx/status_available_spec.rb @@ -9,65 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.cx.rb' -describe Whois::Parsers::WhoisNicCx, "status_available.expected" do +describe "whois.nic.cx", :aggregate_failures do subject do file = fixture("responses", "whois.nic.cx/cx/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.cx") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.cx") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.cx") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.cx/cx/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.cx/cx/status_registered_spec.rb index f6368445..2eea4584 100644 --- a/spec/whois/parsers/responses/whois.nic.cx/cx/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cx/cx/status_registered_spec.rb @@ -9,80 +9,40 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.cx.rb' -describe Whois::Parsers::WhoisNicCx, "status_registered.expected" do +describe "whois.nic.cx", :aggregate_failures do subject do file = fixture("responses", "whois.nic.cx/cx/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.cx") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.cx") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("447518-CoCCA") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2010-07-29 18:15:42 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-06-28 09:18:02 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-07-29 18:15:42 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns3.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns4.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.cx") + expect(subject.domain_id).to eq("447518-CoCCA") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2010-07-29 18:15:42 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-06-28 09:18:02 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-07-29 18:15:42 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns3.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns4.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.cz/cz/case_nset_contact_same_name_spec.rb b/spec/whois/parsers/responses/whois.nic.cz/cz/case_nset_contact_same_name_spec.rb index 4211bf34..6916c57d 100644 --- a/spec/whois/parsers/responses/whois.nic.cz/cz/case_nset_contact_same_name_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cz/cz/case_nset_contact_same_name_spec.rb @@ -9,34 +9,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.cz.rb' -describe Whois::Parsers::WhoisNicCz, "case_nset_contact_same_name.expected" do +describe "whois.nic.cz", :aggregate_failures do subject do file = fixture("responses", "whois.nic.cz/cz/case_nset_contact_same_name.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.cz") + Whois::Parser.parser_for(part) end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].id).to eq("WEBAREAL-CZ") - expect(subject.technical_contacts[0].name).to eq("Jaroslav Hansal") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq("Rudolfovská tř. 247/85\nČeské Budějovice\n37001\nCZ") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq(nil) - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("info@webareal.cz") - expect(subject.technical_contacts[0].created_on).to eq(Time.parse("2009-04-10 14:48:02")) - end + it "matches case_nset_contact_same_name.expected" do + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].id).to eq("WEBAREAL-CZ") + expect(subject.technical_contacts[0].name).to eq("Jaroslav Hansal") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq("Rudolfovská tř. 247/85\nČeské Budějovice\n37001\nCZ") + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq(nil) + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("info@webareal.cz") + expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2009-04-10 14:48:02")) end end diff --git a/spec/whois/parsers/responses/whois.nic.cz/cz/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.nic.cz/cz/response_throttled_spec.rb index 3c497ae8..6982ce63 100644 --- a/spec/whois/parsers/responses/whois.nic.cz/cz/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cz/cz/response_throttled_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.cz.rb' -describe Whois::Parsers::WhoisNicCz, "response_throttled.expected" do +describe "whois.nic.cz", :aggregate_failures do subject do file = fixture("responses", "whois.nic.cz/cz/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.cz") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.cz/cz/response_with_keyset_spec.rb b/spec/whois/parsers/responses/whois.nic.cz/cz/response_with_keyset_spec.rb index 8b357204..e997a19a 100644 --- a/spec/whois/parsers/responses/whois.nic.cz/cz/response_with_keyset_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cz/cz/response_with_keyset_spec.rb @@ -9,32 +9,21 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.cz.rb' -describe Whois::Parsers::WhoisNicCz, "response_with_keyset.expected" do +describe "whois.nic.cz", :aggregate_failures do subject do file = fixture("responses", "whois.nic.cz/cz/response_with_keyset.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.cz") + Whois::Parser.parser_for(part) end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-01-30 18:55:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2010-03-06 15:53:04")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-01-30")) - end + it "matches response_with_keyset.expected" do + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-01-30 18:55:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2010-03-06 15:53:04")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-01-30")) end end diff --git a/spec/whois/parsers/responses/whois.nic.cz/cz/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.cz/cz/status_available_spec.rb index 20fa912a..bd2f5cbb 100644 --- a/spec/whois/parsers/responses/whois.nic.cz/cz/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cz/cz/status_available_spec.rb @@ -9,83 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.cz.rb' -describe Whois::Parsers::WhoisNicCz, "status_available.expected" do +describe "whois.nic.cz", :aggregate_failures do subject do file = fixture("responses", "whois.nic.cz/cz/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.cz") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.cz/cz/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.cz/cz/status_registered_spec.rb index 1460b301..ade5a6df 100644 --- a/spec/whois/parsers/responses/whois.nic.cz/cz/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.cz/cz/status_registered_spec.rb @@ -9,142 +9,90 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.cz.rb' -describe Whois::Parsers::WhoisNicCz, "status_registered.expected" do +describe "whois.nic.cz", :aggregate_failures do subject do file = fixture("responses", "whois.nic.cz/cz/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.cz") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.cz") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2000-07-21 15:21:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2011-05-18 23:28:45")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-07-22")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("REG-MARKMONITOR") - expect(subject.registrar.name).to eq("REG-MARKMONITOR") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("MM12383") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway\nMountain View\n94043\nCA\nUS") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.registrant_contacts[0].created_on).to eq(Time.parse("2011-05-18 23:28:26")) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("MM12383") - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway\nMountain View\n94043\nCA\nUS") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq(nil) - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.admin_contacts[0].created_on).to eq(Time.parse("2011-05-18 23:28:26")) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].id).to eq("MM193020") - expect(subject.technical_contacts[0].name).to eq("Domain Provisioning") - expect(subject.technical_contacts[0].organization).to eq("MarkMonitor, Inc.") - expect(subject.technical_contacts[0].address).to eq("10400 Overland Road PMB 155\nBoise\n83709-1433\nID\nUS") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq(nil) - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("ccops@markmonitor.com") - expect(subject.technical_contacts[0].created_on).to eq(Time.parse("2011-02-03 18:24:34")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns4.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns1.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.cz") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2000-07-21 15:21:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2011-05-18 23:28:45")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-07-22 00:00:00")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("REG-MARKMONITOR") + expect(subject.registrar.name).to eq("REG-MARKMONITOR") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("MM12383") + expect(subject.registrant_contacts[0].name).to eq("DNS Admin") + expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway\nMountain View\n94043\nCA\nUS") + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2011-05-18 23:28:26")) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("MM12383") + expect(subject.admin_contacts[0].name).to eq("DNS Admin") + expect(subject.admin_contacts[0].organization).to eq("Google Inc.") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway\nMountain View\n94043\nCA\nUS") + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq(nil) + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts[0].created_on).to eq(DateTime.parse("2011-05-18 23:28:26")) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].id).to eq("MM193020") + expect(subject.technical_contacts[0].name).to eq("Domain Provisioning") + expect(subject.technical_contacts[0].organization).to eq("MarkMonitor, Inc.") + expect(subject.technical_contacts[0].address).to eq("10400 Overland Road PMB 155\nBoise\n83709-1433\nID\nUS") + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq(nil) + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("ccops@markmonitor.com") + expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2011-02-03 18:24:34")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns4.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns1.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.design/design/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.design/design/status_available_spec.rb index e28a3d89..f3cd12c7 100644 --- a/spec/whois/parsers/responses/whois.nic.design/design/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.design/design/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.design.rb' -describe Whois::Parsers::WhoisNicDesign, "status_available.expected" do +describe "whois.nic.design", :aggregate_failures do subject do file = fixture("responses", "whois.nic.design/design/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.design") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.design/design/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.design/design/status_registered_spec.rb index 0e9b9c15..7658bac3 100644 --- a/spec/whois/parsers/responses/whois.nic.design/design/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.design/design/status_registered_spec.rb @@ -9,153 +9,67 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.design.rb' -describe Whois::Parsers::WhoisNicDesign, "status_registered.expected" do +describe "whois.nic.design", :aggregate_failures do subject do file = fixture("responses", "whois.nic.design/design/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.design") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to the whois service is rate limited. For more information, please see https://registrar-console.centralnic.com/pub/whois_guidance.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("toplevel.design") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D7069819-CNIC") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2015-02-27 16:08:32 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2015-04-21 17:48:34 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2016-02-27 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("9999") - expect(subject.registrar.name).to eq("Top Level Design, LLC") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H4596017") - expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") - expect(subject.registrant_contacts[0].organization).to eq("Top Level Design, LLC") - expect(subject.registrant_contacts[0].address).to eq("742 Ocean Club Place") - expect(subject.registrant_contacts[0].city).to eq("Fernandina Beach") - expect(subject.registrant_contacts[0].zip).to eq("32034") - expect(subject.registrant_contacts[0].state).to eq("Florida") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.5038888808") - expect(subject.registrant_contacts[0].fax).to eq("+1.6788841468") - expect(subject.registrant_contacts[0].email).to eq("ray@tldesign.co") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H4596017") - expect(subject.admin_contacts[0].name).to eq("Domain Administrator") - expect(subject.admin_contacts[0].organization).to eq("Top Level Design, LLC") - expect(subject.admin_contacts[0].address).to eq("742 Ocean Club Place") - expect(subject.admin_contacts[0].city).to eq("Fernandina Beach") - expect(subject.admin_contacts[0].zip).to eq("32034") - expect(subject.admin_contacts[0].state).to eq("Florida") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.5038888808") - expect(subject.admin_contacts[0].fax).to eq("+1.6788841468") - expect(subject.admin_contacts[0].email).to eq("ray@tldesign.co") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("H4596017") - expect(subject.technical_contacts[0].name).to eq("Domain Administrator") - expect(subject.technical_contacts[0].organization).to eq("Top Level Design, LLC") - expect(subject.technical_contacts[0].address).to eq("742 Ocean Club Place") - expect(subject.technical_contacts[0].city).to eq("Fernandina Beach") - expect(subject.technical_contacts[0].zip).to eq("32034") - expect(subject.technical_contacts[0].state).to eq("Florida") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.5038888808") - expect(subject.technical_contacts[0].fax).to eq("+1.6788841468") - expect(subject.technical_contacts[0].email).to eq("ray@tldesign.co") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns-170.awsdns-21.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns-904.awsdns-49.net") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns-1067.awsdns-05.org") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns-1873.awsdns-42.co.uk") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq("toplevel.design") + expect(subject.domain_id).to eq("D44478444-CNIC") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2017-02-16 20:11:45 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-08-30 22:42:53 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-02-16 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("1861") + expect(subject.registrar.name).to eq("Porkbun, LLC") + expect(subject.registrar.url).to eq("https://porkbun.com/") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Top Level Design LLC") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("Oregon") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns-170.awsdns-21.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns-904.awsdns-49.net") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns-1067.awsdns-05.org") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns-1873.awsdns-42.co.uk") end end diff --git a/spec/whois/parsers/responses/whois.nic.dm/dm/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.dm/dm/status_available_spec.rb index bc631619..56184114 100644 --- a/spec/whois/parsers/responses/whois.nic.dm/dm/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.dm/dm/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.dm.rb' -describe Whois::Parsers::WhoisNicDm, "status_available.expected" do +describe "whois.nic.dm", :aggregate_failures do subject do file = fixture("responses", "whois.nic.dm/dm/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.dm") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.dm/dm/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.dm/dm/status_registered_spec.rb index 4f10dc3a..b564e0d6 100644 --- a/spec/whois/parsers/responses/whois.nic.dm/dm/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.dm/dm/status_registered_spec.rb @@ -9,142 +9,86 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.dm.rb' -describe Whois::Parsers::WhoisNicDm, "status_registered.expected" do +describe "whois.nic.dm", :aggregate_failures do subject do file = fixture("responses", "whois.nic.dm/dm/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.dm") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This data is provided by DM REGISTRY for information purposes only in accordance with the DM REGISTRY TLD Privacy Policy. It is intended to assist persons to obtain information about or related to domain name registration records. DM REGISTRY does not guarantee its accuracy. By submitting this query, you agree to abide as follows:\nYou agree to use this data only for lawful purposes and that under no circumstances will you permit this data to 1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via e-mail, telephone or fax (spam); nor 2) enable high volume, automated, electronic processes to the systems of DM REGISTRY or Registrars, except as reasonably required to register new domain names or modify existing registrations; nor 3) will you generate a database of registered domain names and registrant data.\nThese terms may be changed without prior notice. By submitting this query, you agree to abide by this policy.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.dm") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2004-08-23 23:00:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-07-23 17:50:34")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-08-23 23:00:00")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq("www.markmonitor.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("P-CQG21") - expect(subject.registrant_contacts[0].name).to eq("Company Google Inc.") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("P-DNA22") - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq(nil) - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("P-DXA21") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq(nil) - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("This data is provided by DM REGISTRY for information purposes only in accordance with the DM REGISTRY TLD Privacy Policy. It is intended to assist persons to obtain information about or related to domain name registration records. DM REGISTRY does not guarantee its accuracy. By submitting this query, you agree to abide as follows:\nYou agree to use this data only for lawful purposes and that under no circumstances will you permit this data to 1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via e-mail, telephone or fax (spam); nor 2) enable high volume, automated, electronic processes to the systems of DM REGISTRY or Registrars, except as reasonably required to register new domain names or modify existing registrations; nor 3) will you generate a database of registered domain names and registrant data.\nThese terms may be changed without prior notice. By submitting this query, you agree to abide by this policy.") + expect(subject.domain).to eq("google.dm") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2004-08-23 23:00:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-07-23 17:50:34")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-08-23 23:00:00")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("P-CQG21") + expect(subject.registrant_contacts[0].name).to eq("Company Google Inc.") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("P-DNA22") + expect(subject.admin_contacts[0].name).to eq("DNS Admin") + expect(subject.admin_contacts[0].organization).to eq("Google Inc.") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq(nil) + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("P-DXA21") + expect(subject.technical_contacts[0].name).to eq("DNS Admin") + expect(subject.technical_contacts[0].organization).to eq("Google Inc.") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq(nil) + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.dz/dz/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.dz/dz/status_available_spec.rb index 2539e825..605e334b 100644 --- a/spec/whois/parsers/responses/whois.nic.dz/dz/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.dz/dz/status_available_spec.rb @@ -9,49 +9,22 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.dz.rb' -describe Whois::Parsers::WhoisNicDz, "status_available.expected" do +describe "whois.nic.dz", :aggregate_failures do subject do file = fixture("responses", "whois.nic.dz/dz/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.dz") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.nic.dz/dz/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.dz/dz/status_registered_spec.rb index 3e92b517..8a7bb46f 100644 --- a/spec/whois/parsers/responses/whois.nic.dz/dz/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.dz/dz/status_registered_spec.rb @@ -9,49 +9,22 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.dz.rb' -describe Whois::Parsers::WhoisNicDz, "status_registered.expected" do +describe "whois.nic.dz", :aggregate_failures do subject do file = fixture("responses", "whois.nic.dz/dz/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.dz") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.nic.ec/ex/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.ec/ex/status_available_spec.rb index 6f7b5d84..7b2a6d0d 100644 --- a/spec/whois/parsers/responses/whois.nic.ec/ex/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ec/ex/status_available_spec.rb @@ -9,65 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ec.rb' -describe Whois::Parsers::WhoisNicEc, "status_available.expected" do +describe "whois.nic.ec", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ec/ex/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ec") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.ec") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.ec") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.ec/ex/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ec/ex/status_registered_spec.rb index 2f54a285..e2a2a9c0 100644 --- a/spec/whois/parsers/responses/whois.nic.ec/ex/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ec/ex/status_registered_spec.rb @@ -9,88 +9,48 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ec.rb' -describe Whois::Parsers::WhoisNicEc, "status_registered.expected" do +describe "whois.nic.ec", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ec/ex/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ec") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.ec") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-10-16 00:00:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-09-17 00:00:00")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-10-16 00:00:00")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq("www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.ec") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-10-16 00:00:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-09-17 00:00:00")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-10-16 00:00:00")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.es/es/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.es/es/status_available_spec.rb index d4332c97..1b9aad6d 100644 --- a/spec/whois/parsers/responses/whois.nic.es/es/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.es/es/status_available_spec.rb @@ -9,85 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.es.rb' -describe Whois::Parsers::WhoisNicEs, "status_available.expected" do +describe "whois.nic.es", :aggregate_failures do subject do file = fixture("responses", "whois.nic.es/es/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.es") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("ES-NIC") - expect(subject.registrar.organization).to eq("ES-NIC Delegated Internet Registry for Spain") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("ES-NIC") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.es/es/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.es/es/status_registered_spec.rb index 7097c9ec..100ffa70 100644 --- a/spec/whois/parsers/responses/whois.nic.es/es/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.es/es/status_registered_spec.rb @@ -9,94 +9,42 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.es.rb' -describe Whois::Parsers::WhoisNicEs, "status_registered.expected" do +describe "whois.nic.es", :aggregate_failures do subject do file = fixture("responses", "whois.nic.es/es/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.es") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.es") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("16/09/03")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("16/09/14")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("ES-NIC") - expect(subject.registrar.organization).to eq("ES-NIC Delegated Internet Registry for Spain") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].name).to eq("GOOGLE INC.") - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.es") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-09-16")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-09-16")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("ES-NIC") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].name).to eq("GOOGLE INC.") + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.fm/fm/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.fm/fm/status_available_spec.rb index 225368e5..c4ca557a 100644 --- a/spec/whois/parsers/responses/whois.nic.fm/fm/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fm/fm/status_available_spec.rb @@ -9,83 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fm.rb' -describe Whois::Parsers::WhoisNicFm, "status_available.expected" do +describe "whois.nic.fm", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fm/fm/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fm") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.fm/fm/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.fm/fm/status_registered_spec.rb index 83eac995..eb69e9f5 100644 --- a/spec/whois/parsers/responses/whois.nic.fm/fm/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fm/fm/status_registered_spec.rb @@ -9,133 +9,82 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fm.rb' -describe Whois::Parsers::WhoisNicFm, "status_registered.expected" do +describe "whois.nic.fm", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fm/fm/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fm") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.fm") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D34865469-CNIC") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2000-09-05T23:59:59.0Z")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2017-10-20T17:48:39.0Z")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2018-09-04T23:59:59.0Z")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor, Inc.") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("C78398194-CNIC") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin") - expect(subject.registrant_contacts[0].organization).to eq("Google, Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6503300100") - expect(subject.registrant_contacts[0].fax).to eq("+1.6506181499") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@GOOGLE.COM") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("C78398194-CNIC") - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google, Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6503300100") - expect(subject.admin_contacts[0].fax).to eq("+1.6506181499") - expect(subject.admin_contacts[0].email).to eq("dns-admin@GOOGLE.COM") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("C78398194-CNIC") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google, Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6503300100") - expect(subject.technical_contacts[0].fax).to eq("+1.6506181499") - expect(subject.technical_contacts[0].email).to eq("dns-admin@GOOGLE.COM") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns3.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.fm") + expect(subject.domain_id).to eq("D34865469-CNIC") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2000-09-05T23:59:59.0Z")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2017-10-20T17:48:39.0Z")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2018-09-04T23:59:59.0Z")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor, Inc.") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("C78398194-CNIC") + expect(subject.registrant_contacts[0].name).to eq("DNS Admin") + expect(subject.registrant_contacts[0].organization).to eq("Google, Inc.") + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.6503300100") + expect(subject.registrant_contacts[0].fax).to eq("+1.6506181499") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@GOOGLE.COM") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("C78398194-CNIC") + expect(subject.admin_contacts[0].name).to eq("DNS Admin") + expect(subject.admin_contacts[0].organization).to eq("Google, Inc.") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.6503300100") + expect(subject.admin_contacts[0].fax).to eq("+1.6506181499") + expect(subject.admin_contacts[0].email).to eq("dns-admin@GOOGLE.COM") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("C78398194-CNIC") + expect(subject.technical_contacts[0].name).to eq("DNS Admin") + expect(subject.technical_contacts[0].organization).to eq("Google, Inc.") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.6503300100") + expect(subject.technical_contacts[0].fax).to eq("+1.6506181499") + expect(subject.technical_contacts[0].email).to eq("dns-admin@GOOGLE.COM") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns3.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.fo/fo/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.fo/fo/status_available_spec.rb index 97e32754..ab923435 100644 --- a/spec/whois/parsers/responses/whois.nic.fo/fo/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fo/fo/status_available_spec.rb @@ -9,83 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fo.rb' -describe Whois::Parsers::WhoisNicFo, "status_available.expected" do +describe "whois.nic.fo", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fo/fo/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fo") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.fo/fo/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.fo/fo/status_registered_spec.rb index e7f2a4f7..44d34b2a 100644 --- a/spec/whois/parsers/responses/whois.nic.fo/fo/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fo/fo/status_registered_spec.rb @@ -9,125 +9,74 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fo.rb' -describe Whois::Parsers::WhoisNicFo, "status_registered.expected" do +describe "whois.nic.fo", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fo/fo/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fo") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("nic.fo") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2010-06-03 03:34:05")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2011-07-12 12:52:57")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-01-03")) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("ID005359") - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("FO-umsitingin") - expect(subject.registrant_contacts[0].address).to eq("Hoydalsvegur 19, Postboks 1255") - expect(subject.registrant_contacts[0].city).to eq("Torshavn") - expect(subject.registrant_contacts[0].zip).to eq("110") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("FO") - expect(subject.registrant_contacts[0].phone).to eq("+298.322400") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - expect(subject.registrant_contacts[0].created_on).to eq(Time.parse("2010-07-21 19:11:55")) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].id).to eq("ID005359") - expect(subject.technical_contacts[0].name).to eq(nil) - expect(subject.technical_contacts[0].organization).to eq("FO-umsitingin") - expect(subject.technical_contacts[0].address).to eq("Hoydalsvegur 19, Postboks 1255") - expect(subject.technical_contacts[0].city).to eq("Torshavn") - expect(subject.technical_contacts[0].zip).to eq("110") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("FO") - expect(subject.technical_contacts[0].phone).to eq("+298.322400") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq(nil) - expect(subject.technical_contacts[0].created_on).to eq(Time.parse("2010-07-21 19:11:55")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(5) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.gratisdns.dk") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.gratisdns.dk") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.gratisdns.dk") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.gratisdns.dk") - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("ns5.gratisdns.dk") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("nic.fo") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2010-06-03 03:34:05")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2011-07-12 12:52:57")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-01-03")) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("ID005359") + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("FO-umsitingin") + expect(subject.registrant_contacts[0].address).to eq("Hoydalsvegur 19, Postboks 1255") + expect(subject.registrant_contacts[0].city).to eq("Torshavn") + expect(subject.registrant_contacts[0].zip).to eq("110") + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("FO") + expect(subject.registrant_contacts[0].phone).to eq("+298.322400") + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2010-07-21 19:11:55")) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].id).to eq("ID005359") + expect(subject.technical_contacts[0].name).to eq(nil) + expect(subject.technical_contacts[0].organization).to eq("FO-umsitingin") + expect(subject.technical_contacts[0].address).to eq("Hoydalsvegur 19, Postboks 1255") + expect(subject.technical_contacts[0].city).to eq("Torshavn") + expect(subject.technical_contacts[0].zip).to eq("110") + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("FO") + expect(subject.technical_contacts[0].phone).to eq("+298.322400") + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq(nil) + expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2010-07-21 19:11:55")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(5) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.gratisdns.dk") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.gratisdns.dk") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.gratisdns.dk") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.gratisdns.dk") + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("ns5.gratisdns.dk") end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/fr/property_contact_without_address_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/fr/property_contact_without_address_spec.rb deleted file mode 100644 index b2d71fbd..00000000 --- a/spec/whois/parsers/responses/whois.nic.fr/fr/property_contact_without_address_spec.rb +++ /dev/null @@ -1,42 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.nic.fr/fr/property_contact_without_address.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' - -describe Whois::Parsers::WhoisNicFr, "property_contact_without_address.expected" do - - subject do - file = fixture("responses", "whois.nic.fr/fr/property_contact_without_address.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("ANO00-FRNIC") - expect(subject.registrant_contacts[0].name).to eq("Ano Nymous") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2007-09-03 00:00:00 UTC")) - end - end -end diff --git a/spec/whois/parsers/responses/whois.nic.fr/fr/property_contact_without_changed_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/fr/property_contact_without_changed_spec.rb index 55f4460a..65f71295 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/fr/property_contact_without_changed_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/fr/property_contact_without_changed_spec.rb @@ -9,35 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' -describe Whois::Parsers::WhoisNicFr, "property_contact_without_changed.expected" do +describe "whois.nic.fr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fr/fr/property_contact_without_changed.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fr") + Whois::Parser.parser_for(part) end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("JMR39-FRNIC") - expect(subject.admin_contacts[0].name).to eq("Jean Marc Raimondo") - expect(subject.admin_contacts[0].organization).to eq("1C2") - expect(subject.admin_contacts[0].address).to eq("20-22, rue Louis Armand\n75015 Paris") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("FR") - expect(subject.admin_contacts[0].phone).to eq("+33 1 30 62 40 06") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("jmr@1c2.com") - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end + it "matches property_contact_without_changed.expected" do + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("JMR39-FRNIC") + expect(subject.admin_contacts[0].name).to eq("Jean Marc Raimondo") + expect(subject.admin_contacts[0].organization).to eq("1C2") + expect(subject.admin_contacts[0].address).to eq("20-22, rue Louis Armand\n75015 Paris") + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("FR") + expect(subject.admin_contacts[0].phone).to eq("+33 1 30 62 40 06") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("jmr@1c2.com") + expect(subject.admin_contacts[0].updated_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/fr/property_nameservers_multiple_ipv4_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/fr/property_nameservers_multiple_ipv4_spec.rb index d6a9ff71..d04ccea9 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/fr/property_nameservers_multiple_ipv4_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/fr/property_nameservers_multiple_ipv4_spec.rb @@ -9,28 +9,25 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' -describe Whois::Parsers::WhoisNicFr, "property_nameservers_multiple_ipv4.expected" do +describe "whois.nic.fr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fr/fr/property_nameservers_multiple_ipv4.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fr") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.boursedirect.fr") - expect(subject.nameservers[0].ipv4).to eq("212.157.203.190") - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.boursedirect.fr") - expect(subject.nameservers[1].ipv4).to eq("212.157.203.189") - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches property_nameservers_multiple_ipv4.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.boursedirect.fr") + expect(subject.nameservers[0].ipv4).to eq("212.157.203.190") + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.boursedirect.fr") + expect(subject.nameservers[1].ipv4).to eq("212.157.203.189") + expect(subject.nameservers[1].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/fr/property_nameservers_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/fr/property_nameservers_spec.rb index f9d223eb..b81c0ee1 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/fr/property_nameservers_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/fr/property_nameservers_spec.rb @@ -9,28 +9,25 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' -describe Whois::Parsers::WhoisNicFr, "property_nameservers.expected" do +describe "whois.nic.fr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fr/fr/property_nameservers.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fr") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches property_nameservers.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/fr/property_nameservers_with_ipv4_and_some_ipv6_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/fr/property_nameservers_with_ipv4_and_some_ipv6_spec.rb index 3a294506..77d138c8 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/fr/property_nameservers_with_ipv4_and_some_ipv6_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/fr/property_nameservers_with_ipv4_and_some_ipv6_spec.rb @@ -9,44 +9,41 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' -describe Whois::Parsers::WhoisNicFr, "property_nameservers_with_ipv4_and_some_ipv6.expected" do +describe "whois.nic.fr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fr/fr/property_nameservers_with_ipv4_and_some_ipv6.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fr") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(6) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.nic.fr") - expect(subject.nameservers[0].ipv4).to eq("192.134.4.1") - expect(subject.nameservers[0].ipv6).to eq("2001:660:3003:2::4:1") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.nic.fr") - expect(subject.nameservers[1].ipv4).to eq("192.93.0.4") - expect(subject.nameservers[1].ipv6).to eq("2001:660:3005:1::1:2") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.nic.fr") - expect(subject.nameservers[2].ipv4).to eq("192.134.0.49") - expect(subject.nameservers[2].ipv6).to eq("2001:660:3006:1::1:1") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns1.ext.nic.fr") - expect(subject.nameservers[3].ipv4).to eq("193.51.208.13") - expect(subject.nameservers[3].ipv6).to eq(nil) - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("ns4.ext.nic.fr") - expect(subject.nameservers[4].ipv4).to eq("193.0.9.4") - expect(subject.nameservers[4].ipv6).to eq("2001:67c:e0::4") - expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[5].name).to eq("ns5.ext.nic.fr") - expect(subject.nameservers[5].ipv4).to eq("206.167.244.5") - expect(subject.nameservers[5].ipv6).to eq(nil) - end + it "matches property_nameservers_with_ipv4_and_some_ipv6.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(6) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.nic.fr") + expect(subject.nameservers[0].ipv4).to eq("192.134.4.1") + expect(subject.nameservers[0].ipv6).to eq("2001:660:3003:2::4:1") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.nic.fr") + expect(subject.nameservers[1].ipv4).to eq("192.93.0.4") + expect(subject.nameservers[1].ipv6).to eq("2001:660:3005:1::1:2") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.nic.fr") + expect(subject.nameservers[2].ipv4).to eq("192.134.0.49") + expect(subject.nameservers[2].ipv6).to eq("2001:660:3006:1::1:1") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns1.ext.nic.fr") + expect(subject.nameservers[3].ipv4).to eq("193.51.208.13") + expect(subject.nameservers[3].ipv6).to eq(nil) + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("ns4.ext.nic.fr") + expect(subject.nameservers[4].ipv4).to eq("193.0.9.4") + expect(subject.nameservers[4].ipv6).to eq("2001:67c:e0::4") + expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[5].name).to eq("ns5.ext.nic.fr") + expect(subject.nameservers[5].ipv4).to eq("206.167.244.5") + expect(subject.nameservers[5].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_active_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_active_spec.rb index c0b83cc2..da7cfc23 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_active_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_active_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' -describe Whois::Parsers::WhoisNicFr, "property_status_active.expected" do +describe "whois.nic.fr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fr/fr/property_status_active.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fr") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_active.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_blocked_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_blocked_spec.rb index bf678e41..23d5dc77 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_blocked_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_blocked_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' -describe Whois::Parsers::WhoisNicFr, "property_status_blocked.expected" do +describe "whois.nic.fr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fr/fr/property_status_blocked.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fr") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:inactive) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_blocked.expected" do + expect(subject.status).to eq(:inactive) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_missing_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_missing_spec.rb index 479339d2..2cd724e0 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_missing_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_missing_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' -describe Whois::Parsers::WhoisNicFr, "property_status_missing.expected" do +describe "whois.nic.fr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fr/fr/property_status_missing.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fr") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches property_status_missing.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_not_open_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_not_open_spec.rb index 4a22b735..81da70be 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_not_open_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_not_open_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' -describe Whois::Parsers::WhoisNicFr, "property_status_not_open.expected" do +describe "whois.nic.fr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fr/fr/property_status_not_open.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fr") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_not_open.expected" do + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_redemption_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_redemption_spec.rb index c41e8505..30f7655c 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_redemption_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_redemption_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' -describe Whois::Parsers::WhoisNicFr, "property_status_redemption.expected" do +describe "whois.nic.fr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fr/fr/property_status_redemption.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fr") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:redemption) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_redemption.expected" do + expect(subject.status).to eq(:redemption) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_registered_spec.rb index 0e3b9b88..51f57d46 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/fr/property_status_registered_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' -describe Whois::Parsers::WhoisNicFr, "property_status_registered.expected" do +describe "whois.nic.fr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fr/fr/property_status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fr") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/fr/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/fr/response_throttled_spec.rb index b3894305..4aec6f5e 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/fr/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/fr/response_throttled_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' -describe Whois::Parsers::WhoisNicFr, "response_throttled.expected" do +describe "whois.nic.fr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fr/fr/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fr") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/fr/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/fr/status_available_spec.rb index 703eebde..6c50753b 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/fr/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/fr/status_available_spec.rb @@ -9,68 +9,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' -describe Whois::Parsers::WhoisNicFr, "status_available.expected" do +describe "whois.nic.fr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fr/fr/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fr") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/fr/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/fr/status_registered_spec.rb index 31cc44cd..6ec99a6c 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/fr/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/fr/status_registered_spec.rb @@ -9,124 +9,81 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' -describe Whois::Parsers::WhoisNicFr, "status_registered.expected" do +describe "whois.nic.fr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fr/fr/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fr") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2000-07-27")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2016-12-30")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2017-12-30")) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("GIH6-FRNIC") - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("Google Ireland Holdings") - expect(subject.registrant_contacts[0].address).to eq("70 Sir John Rogersons Quay\n2 Dublin") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("IE") - expect(subject.registrant_contacts[0].phone).to eq("+353 14361000") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2015-03-20 00:00:00 UTC")) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("GIH5-FRNIC") - expect(subject.admin_contacts[0].name).to eq(nil) - expect(subject.admin_contacts[0].organization).to eq("Google Ireland Holdings") - expect(subject.admin_contacts[0].address).to eq("70 Sir John Rogersons Quay\n2 Dublin") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("IE") - expect(subject.admin_contacts[0].phone).to eq("+353 14361000") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2011-12-06 00:00:00 UTC")) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("CP4370-FRNIC") - expect(subject.technical_contacts[0].name).to eq("Ccops Provisioning") - expect(subject.technical_contacts[0].organization).to eq("MarkMonitor") - expect(subject.technical_contacts[0].address).to eq("10400 Overland Rd.\nPMB 155\n83709 Boise") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1 2083895740") - expect(subject.technical_contacts[0].fax).to eq("+1 2083895771") - expect(subject.technical_contacts[0].email).to eq("ccops@markmonitor.com") - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2011-06-14 00:00:00 UTC")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2004-05-20 11:28:40 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2018-04-08 03:52:04 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2019-05-07 07:43:45 UTC")) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("U4339-FRNIC") + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("1C2") + expect(subject.registrant_contacts[0].address).to eq("20-22, rue Louis Armand\n75015 Paris") + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("FR") + expect(subject.registrant_contacts[0].phone).to eq("+33 1 30 62 40 06") + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("jmr@1c2.com") + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2016-09-22 07:52:47 UTC")) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("MO2494-FRNIC") + expect(subject.admin_contacts[0].name).to eq("Magic Online") + expect(subject.admin_contacts[0].organization).to eq("Magic Online") + expect(subject.admin_contacts[0].address).to eq("130, avenue President Wilson\n93100 Montreuil\nParis") + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("FR") + expect(subject.admin_contacts[0].phone).to eq("+33 1 41 58 22 50") + expect(subject.admin_contacts[0].fax).to eq("+33 1 56 72 93 30") + expect(subject.admin_contacts[0].email).to eq("hostmaster@magic.fr") + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2014-03-31 16:13:52 UTC")) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("MO2556-FRNIC") + expect(subject.technical_contacts[0].name).to eq("Magic Online") + expect(subject.technical_contacts[0].organization).to eq("Magic Online") + expect(subject.technical_contacts[0].address).to eq("130-134, avenue du President Wilson\n93100 Montreuil\nFrance") + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("FR") + expect(subject.technical_contacts[0].phone).to eq("+33 1 41 58 22 50") + expect(subject.technical_contacts[0].fax).to eq("+33 1 56 72 93 30") + expect(subject.technical_contacts[0].email).to eq("production@magic.fr") + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2014-05-20 15:07:08 UTC")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns.magic.fr") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.magic.fr") end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/tf/property_status_frozen_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/tf/property_status_frozen_spec.rb index 66dcbfe8..7833c831 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/tf/property_status_frozen_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/tf/property_status_frozen_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' -describe Whois::Parsers::WhoisNicFr, "property_status_frozen.expected" do +describe "whois.nic.fr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fr/tf/property_status_frozen.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fr") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_frozen.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/tf/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/tf/response_throttled_spec.rb index 9db79c34..142baece 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/tf/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/tf/response_throttled_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' -describe Whois::Parsers::WhoisNicFr, "response_throttled.expected" do +describe "whois.nic.fr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fr/tf/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fr") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/tf/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/tf/status_available_spec.rb index 5c217425..f1ba3212 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/tf/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/tf/status_available_spec.rb @@ -9,68 +9,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' -describe Whois::Parsers::WhoisNicFr, "status_available.expected" do +describe "whois.nic.fr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fr/tf/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fr") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/tf/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/tf/status_registered_spec.rb index 2ccda0b6..88d9f70d 100644 --- a/spec/whois/parsers/responses/whois.nic.fr/tf/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.fr/tf/status_registered_spec.rb @@ -9,128 +9,83 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' -describe Whois::Parsers::WhoisNicFr, "status_registered.expected" do +describe "whois.nic.fr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.fr/tf/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.fr") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2004-10-26")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2016-10-25")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2017-10-25")) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("AAEA9-FRNIC") - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("Afnic (Terres Australes et Antarctiques - TOM)") - expect(subject.registrant_contacts[0].address).to eq("immeuble international\n2, rue Stephenson\nMontigny-Le-Bretonneux\n78181 Saint Quentin en Yvelines Cedex") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("FR") - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2008-10-09 00:00:00 UTC")) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("NFC1-FRNIC") - expect(subject.admin_contacts[0].name).to eq("NIC France Contact") - expect(subject.admin_contacts[0].organization).to eq("AFNIC") - expect(subject.admin_contacts[0].address).to eq("immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("FR") - expect(subject.admin_contacts[0].phone).to eq("+33 1 39 30 83 00") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2005-08-23 00:00:00 UTC")) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("NFC1-FRNIC") - expect(subject.technical_contacts[0].name).to eq("NIC France Contact") - expect(subject.technical_contacts[0].organization).to eq("AFNIC") - expect(subject.technical_contacts[0].address).to eq("immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("FR") - expect(subject.technical_contacts[0].phone).to eq("+33 1 39 30 83 00") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2005-08-23 00:00:00 UTC")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.nic.fr") - expect(subject.nameservers[0].ipv4).to eq("192.134.4.1") - expect(subject.nameservers[0].ipv6).to eq("2001:67c:2218:2::4:1") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.nic.fr") - expect(subject.nameservers[1].ipv4).to eq("192.93.0.4") - expect(subject.nameservers[1].ipv6).to eq("2001:660:3005:1::1:2") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.nic.fr") - expect(subject.nameservers[2].ipv4).to eq("192.134.0.49") - expect(subject.nameservers[2].ipv6).to eq("2001:660:3006:1::1:1") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2004-10-25 22:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2018-10-25 22:34:00 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2019-10-25 22:00:00 UTC")) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("AAEA9-FRNIC") + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Afnic (Terres Australes et Antarctiques - TOM)") + expect(subject.registrant_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny le Bretonneux") + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("FR") + expect(subject.registrant_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.registrant_contacts[0].fax).to eq("+33 1 39 30 83 01") + expect(subject.registrant_contacts[0].email).to eq("support@afnic.fr") + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2017-07-17 12:40:50 UTC")) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("NFC1-FRNIC") + expect(subject.admin_contacts[0].name).to eq("NIC France Contact") + expect(subject.admin_contacts[0].organization).to eq("AFNIC") + expect(subject.admin_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("FR") + expect(subject.admin_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("hostmaster@nic.fr") + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("NFC1-FRNIC") + expect(subject.technical_contacts[0].name).to eq("NIC France Contact") + expect(subject.technical_contacts[0].organization).to eq("AFNIC") + expect(subject.technical_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("FR") + expect(subject.technical_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("hostmaster@nic.fr") + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.nic.fr") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.nic.fr") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.nic.fr") end end diff --git a/spec/whois/parsers/responses/whois.nic.fr/yt/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/yt/response_throttled_spec.rb deleted file mode 100644 index 45e344fb..00000000 --- a/spec/whois/parsers/responses/whois.nic.fr/yt/response_throttled_spec.rb +++ /dev/null @@ -1,27 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.nic.fr/yt/response_throttled.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' - -describe Whois::Parsers::WhoisNicFr, "response_throttled.expected" do - - subject do - file = fixture("responses", "whois.nic.fr/yt/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end - end -end diff --git a/spec/whois/parsers/responses/whois.nic.fr/yt/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/yt/status_available_spec.rb deleted file mode 100644 index 06e41f29..00000000 --- a/spec/whois/parsers/responses/whois.nic.fr/yt/status_available_spec.rb +++ /dev/null @@ -1,76 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.nic.fr/yt/status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' - -describe Whois::Parsers::WhoisNicFr, "status_available.expected" do - - subject do - file = fixture("responses", "whois.nic.fr/yt/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end -end diff --git a/spec/whois/parsers/responses/whois.nic.fr/yt/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.fr/yt/status_registered_spec.rb deleted file mode 100644 index a3c807d2..00000000 --- a/spec/whois/parsers/responses/whois.nic.fr/yt/status_registered_spec.rb +++ /dev/null @@ -1,136 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.nic.fr/yt/status_registered.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.nic.fr.rb' - -describe Whois::Parsers::WhoisNicFr, "status_registered.expected" do - - subject do - file = fixture("responses", "whois.nic.fr/yt/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1995-01-01")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2016-12-31")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2017-12-31")) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("AC3598-FRNIC") - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("Afnic (Mayotte - CTOM)") - expect(subject.registrant_contacts[0].address).to eq("immeuble international\n2, rue Stephenson\nMontigny-Le-Bretonneux\n78181 Saint Quentin en Yvelines Cedex") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("FR") - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2008-10-09 00:00:00 UTC")) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("NFC1-FRNIC") - expect(subject.admin_contacts[0].name).to eq("NIC France Contact") - expect(subject.admin_contacts[0].organization).to eq("AFNIC") - expect(subject.admin_contacts[0].address).to eq("immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("FR") - expect(subject.admin_contacts[0].phone).to eq("+33 1 39 30 83 00") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2005-08-23 00:00:00 UTC")) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("NFC1-FRNIC") - expect(subject.technical_contacts[0].name).to eq("NIC France Contact") - expect(subject.technical_contacts[0].organization).to eq("AFNIC") - expect(subject.technical_contacts[0].address).to eq("immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("FR") - expect(subject.technical_contacts[0].phone).to eq("+33 1 39 30 83 00") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2005-08-23 00:00:00 UTC")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.nic.fr") - expect(subject.nameservers[0].ipv4).to eq("192.134.4.1") - expect(subject.nameservers[0].ipv6).to eq("2001:67c:2218:2::4:1") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.nic.fr") - expect(subject.nameservers[1].ipv4).to eq("192.93.0.4") - expect(subject.nameservers[1].ipv6).to eq("2001:660:3005:1::1:2") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.nic.fr") - expect(subject.nameservers[2].ipv4).to eq("192.134.0.49") - expect(subject.nameservers[2].ipv6).to eq("2001:660:3006:1::1:1") - end - end -end diff --git a/spec/whois/parsers/responses/whois.nic.gd/gd/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.gd/gd/status_available_spec.rb index 87983776..a415fe12 100644 --- a/spec/whois/parsers/responses/whois.nic.gd/gd/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.gd/gd/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.gd.rb' -describe Whois::Parsers::WhoisNicGd, "status_available.expected" do +describe "whois.nic.gd", :aggregate_failures do subject do file = fixture("responses", "whois.nic.gd/gd/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.gd") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.gd/gd/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.gd/gd/status_registered_spec.rb index bcf3a4df..d95573f5 100644 --- a/spec/whois/parsers/responses/whois.nic.gd/gd/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.gd/gd/status_registered_spec.rb @@ -9,147 +9,91 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.gd.rb' -describe Whois::Parsers::WhoisNicGd, "status_registered.expected" do +describe "whois.nic.gd", :aggregate_failures do subject do file = fixture("responses", "whois.nic.gd/gd/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.gd") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("The data in the WHOIS database of KSregistry GmbH is provided by KSregistry GmbH for information purposes, and to assist persons in obtaining information about or related to domain name registration records. KSregistry GmbH does not guarantee its accuracy. By submitting a WHOIS query, you agree that you will use this data only for lawful purposes and that, under no circumstances, you will use this data to 1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via E-mail (spam); or 2) enable high volume, automated, electronic processes that apply to KSregistry GmbH or its systems. KSregistry GmbH reserves the right to modify these terms. By submitting this query, you agree to abide by this policy.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.gd") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-12-11 00:00:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-11-12 16:07:05")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-12-11 00:00:00")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq("www.markmonitor.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("P-GXI35") - expect(subject.registrant_contacts[0].name).to eq("Google, Inc.") - expect(subject.registrant_contacts[0].organization).to eq("Google, Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6503300100") - expect(subject.registrant_contacts[0].fax).to eq("+1.6506181499") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("P-GXI35") - expect(subject.admin_contacts[0].name).to eq("Google, Inc.") - expect(subject.admin_contacts[0].organization).to eq("Google, Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6503300100") - expect(subject.admin_contacts[0].fax).to eq("+1.6506181499") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("P-GXI35") - expect(subject.technical_contacts[0].name).to eq("Google, Inc.") - expect(subject.technical_contacts[0].organization).to eq("Google, Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6503300100") - expect(subject.technical_contacts[0].fax).to eq("+1.6506181499") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("The data in the WHOIS database of KSregistry GmbH is provided by KSregistry GmbH for information purposes, and to assist persons in obtaining information about or related to domain name registration records. KSregistry GmbH does not guarantee its accuracy. By submitting a WHOIS query, you agree that you will use this data only for lawful purposes and that, under no circumstances, you will use this data to 1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via E-mail (spam); or 2) enable high volume, automated, electronic processes that apply to KSregistry GmbH or its systems. KSregistry GmbH reserves the right to modify these terms. By submitting this query, you agree to abide by this policy.") + expect(subject.domain).to eq("google.gd") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-12-11 00:00:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-11-12 16:07:05")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-12-11 00:00:00")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("P-GXI35") + expect(subject.registrant_contacts[0].name).to eq("Google, Inc.") + expect(subject.registrant_contacts[0].organization).to eq("Google, Inc.") + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.6503300100") + expect(subject.registrant_contacts[0].fax).to eq("+1.6506181499") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("P-GXI35") + expect(subject.admin_contacts[0].name).to eq("Google, Inc.") + expect(subject.admin_contacts[0].organization).to eq("Google, Inc.") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.6503300100") + expect(subject.admin_contacts[0].fax).to eq("+1.6506181499") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("P-GXI35") + expect(subject.technical_contacts[0].name).to eq("Google, Inc.") + expect(subject.technical_contacts[0].organization).to eq("Google, Inc.") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.6503300100") + expect(subject.technical_contacts[0].fax).to eq("+1.6506181499") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.gd/gd/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.nic.gd/gd/status_reserved_spec.rb index fa6ff74b..aa1871ee 100644 --- a/spec/whois/parsers/responses/whois.nic.gd/gd/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.gd/gd/status_reserved_spec.rb @@ -9,34 +9,19 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.gd.rb' -describe Whois::Parsers::WhoisNicGd, "status_reserved.expected" do +describe "whois.nic.gd", :aggregate_failures do subject do file = fixture("responses", "whois.nic.gd/gd/status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.gd") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(true) - end + it "matches status_reserved.expected" do + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(false) + expect(subject.reserved?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.gl/gl/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.gl/gl/status_available_spec.rb index 96c8e24e..85a37a1a 100644 --- a/spec/whois/parsers/responses/whois.nic.gl/gl/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.gl/gl/status_available_spec.rb @@ -9,65 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.gl.rb' -describe Whois::Parsers::WhoisNicGl, "status_available.expected" do +describe "whois.nic.gl", :aggregate_failures do subject do file = fixture("responses", "whois.nic.gl/gl/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.gl") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.gl") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.gl") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.gl/gl/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.gl/gl/status_registered_spec.rb index 2e8a3384..1d4780da 100644 --- a/spec/whois/parsers/responses/whois.nic.gl/gl/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.gl/gl/status_registered_spec.rb @@ -9,80 +9,40 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.gl.rb' -describe Whois::Parsers::WhoisNicGl, "status_registered.expected" do +describe "whois.nic.gl", :aggregate_failures do subject do file = fixture("responses", "whois.nic.gl/gl/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.gl") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.gl") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("Imp669-GL") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-03-11 03:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-12-02 19:11:52 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-01-01 03:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.gl") + expect(subject.domain_id).to eq("Imp669-GL") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-03-11 03:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-12-02 19:11:52 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-01-01 03:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.google/app/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.google/app/status_available_spec.rb new file mode 100644 index 00000000..011287b4 --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.google/app/status_available_spec.rb @@ -0,0 +1,40 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.google/app/status_available.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.google", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.google/app/status_available.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.google") + Whois::Parser.parser_for(part) + end + + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end +end diff --git a/spec/whois/parsers/responses/whois.nic.google/app/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.google/app/status_registered_spec.rb new file mode 100644 index 00000000..9b622776 --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.google/app/status_registered_spec.rb @@ -0,0 +1,53 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.google/app/status_registered.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.google", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.google/app/status_registered.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.google") + Whois::Parser.parser_for(part) + end + + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.app") + expect(subject.domain_id).to eq("2C5A4BAFF-APP") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2018-03-29T16:02:13Z")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2019-03-03T10:46:31Z")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-03-29T16:02:13Z")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.googledomains.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.googledomains.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.googledomains.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.googledomains.com") + end +end diff --git a/spec/whois/parsers/responses/whois.nic.google/dev/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.google/dev/status_available_spec.rb new file mode 100644 index 00000000..0822d359 --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.google/dev/status_available_spec.rb @@ -0,0 +1,40 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.google/dev/status_available.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.google", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.google/dev/status_available.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.google") + Whois::Parser.parser_for(part) + end + + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end +end diff --git a/spec/whois/parsers/responses/whois.nic.google/dev/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.google/dev/status_registered_spec.rb new file mode 100644 index 00000000..f3706938 --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.google/dev/status_registered_spec.rb @@ -0,0 +1,53 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.google/dev/status_registered.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.google", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.google/dev/status_registered.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.google") + Whois::Parser.parser_for(part) + end + + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.dev") + expect(subject.domain_id).to eq("2CF25B78E-DEV") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2018-06-13T22:30:20Z")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2019-06-13T22:30:20Z")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-06-13T22:30:20Z")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("9998") + expect(subject.registrar.name).to eq("Charleston Road Registry Billable") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].organization).to eq("Charleston Road Registry, Inc.") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.googledomains.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.googledomains.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.googledomains.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.googledomains.com") + end +end diff --git a/spec/whois/parsers/responses/whois.nic.google/how/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.google/how/status_available_spec.rb new file mode 100644 index 00000000..67442500 --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.google/how/status_available_spec.rb @@ -0,0 +1,40 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.google/how/status_available.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.google", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.google/how/status_available.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.google") + Whois::Parser.parser_for(part) + end + + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end +end diff --git a/spec/whois/parsers/responses/whois.nic.google/how/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.google/how/status_registered_spec.rb new file mode 100644 index 00000000..f64ba923 --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.google/how/status_registered_spec.rb @@ -0,0 +1,53 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.google/how/status_registered.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.google", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.google/how/status_registered.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.google") + Whois::Parser.parser_for(part) + end + + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.how") + expect(subject.domain_id).to eq("62CF6AF-HOW") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2015-01-12T16:14:39Z")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2019-02-14T19:53:11Z")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-01-12T16:14:39Z")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.googledomains.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.googledomains.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.googledomains.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.googledomains.com") + end +end diff --git a/spec/whois/parsers/responses/whois.nic.google/page/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.google/page/status_available_spec.rb new file mode 100644 index 00000000..b0d7eb07 --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.google/page/status_available_spec.rb @@ -0,0 +1,40 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.google/page/status_available.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.google", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.google/page/status_available.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.google") + Whois::Parser.parser_for(part) + end + + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end +end diff --git a/spec/whois/parsers/responses/whois.nic.google/page/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.google/page/status_registered_spec.rb new file mode 100644 index 00000000..2a7aa898 --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.google/page/status_registered_spec.rb @@ -0,0 +1,41 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.google/page/status_registered.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.google", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.google/page/status_registered.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.google") + Whois::Parser.parser_for(part) + end + + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.page") + expect(subject.domain_id).to eq("2D55CC686-PAGE") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2018-08-13T21:29:41Z")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2019-08-13T21:29:41Z")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("9998") + expect(subject.registrar.name).to eq("Charleston Road Registry Billable") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].organization).to eq("Charleston Road Registry, Inc.") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + end +end diff --git a/spec/whois/parsers/responses/whois.nic.google/soy/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.google/soy/status_available_spec.rb new file mode 100644 index 00000000..c85a4f21 --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.google/soy/status_available_spec.rb @@ -0,0 +1,40 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.google/soy/status_available.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.google", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.google/soy/status_available.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.google") + Whois::Parser.parser_for(part) + end + + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end +end diff --git a/spec/whois/parsers/responses/whois.nic.google/soy/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.google/soy/status_registered_spec.rb new file mode 100644 index 00000000..9d9f599b --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.google/soy/status_registered_spec.rb @@ -0,0 +1,53 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.google/soy/status_registered.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.google", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.google/soy/status_registered.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.google") + Whois::Parser.parser_for(part) + end + + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.soy") + expect(subject.domain_id).to eq("88628D1-SOY") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2014-12-01T21:58:34Z")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2019-02-14T19:53:13Z")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2019-12-01T21:58:34Z")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.googledomains.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.googledomains.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.googledomains.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.googledomains.com") + end +end diff --git a/spec/whois/parsers/responses/whois.nic.google/xn--q9jyb4c/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.google/xn--q9jyb4c/status_available_spec.rb new file mode 100644 index 00000000..8936f83d --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.google/xn--q9jyb4c/status_available_spec.rb @@ -0,0 +1,40 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.google/xn--q9jyb4c/status_available.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.google", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.google/xn--q9jyb4c/status_available.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.google") + Whois::Parser.parser_for(part) + end + + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end +end diff --git a/spec/whois/parsers/responses/whois.nic.google/xn--q9jyb4c/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.google/xn--q9jyb4c/status_registered_spec.rb new file mode 100644 index 00000000..300cf49c --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.google/xn--q9jyb4c/status_registered_spec.rb @@ -0,0 +1,53 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.google/xn--q9jyb4c/status_registered.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.google", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.google/xn--q9jyb4c/status_registered.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.google") + Whois::Parser.parser_for(part) + end + + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.xn--q9jyb4c") + expect(subject.domain_id).to eq("C176ED-Q9JYB4C") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2014-03-04T19:45:32Z")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2019-02-05T10:39:55Z")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-03-04T19:45:32Z")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.googledomains.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.googledomains.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.googledomains.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.googledomains.com") + end +end diff --git a/spec/whois/parsers/responses/whois.nic.gs/gs/property_status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.gs/gs/property_status_available_spec.rb index b91eefe7..0446bac0 100644 --- a/spec/whois/parsers/responses/whois.nic.gs/gs/property_status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.gs/gs/property_status_available_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.gs.rb' -describe Whois::Parsers::WhoisNicGs, "property_status_available.expected" do +describe "whois.nic.gs", :aggregate_failures do subject do file = fixture("responses", "whois.nic.gs/gs/property_status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.gs") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches property_status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.gs/gs/property_status_ok_spec.rb b/spec/whois/parsers/responses/whois.nic.gs/gs/property_status_ok_spec.rb index 71802580..076e0631 100644 --- a/spec/whois/parsers/responses/whois.nic.gs/gs/property_status_ok_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.gs/gs/property_status_ok_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.gs.rb' -describe Whois::Parsers::WhoisNicGs, "property_status_ok.expected" do +describe "whois.nic.gs", :aggregate_failures do subject do file = fixture("responses", "whois.nic.gs/gs/property_status_ok.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.gs") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_ok.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.gs/gs/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.gs/gs/status_available_spec.rb index 9219c253..33e7bfbb 100644 --- a/spec/whois/parsers/responses/whois.nic.gs/gs/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.gs/gs/status_available_spec.rb @@ -9,65 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.gs.rb' -describe Whois::Parsers::WhoisNicGs, "status_available.expected" do +describe "whois.nic.gs", :aggregate_failures do subject do file = fixture("responses", "whois.nic.gs/gs/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.gs") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.gs") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.gs") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.gs/gs/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.gs/gs/status_registered_spec.rb index 1d0392fc..33437a2a 100644 --- a/spec/whois/parsers/responses/whois.nic.gs/gs/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.gs/gs/status_registered_spec.rb @@ -9,76 +9,36 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.gs.rb' -describe Whois::Parsers::WhoisNicGs, "status_registered.expected" do +describe "whois.nic.gs", :aggregate_failures do subject do file = fixture("responses", "whois.nic.gs/gs/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.gs") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.gs") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("4258-CoCCA.gs") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2004-07-08 12:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-12-06 07:35:24 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-07-08 12:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.gs") + expect(subject.domain_id).to eq("4258-CoCCA.gs") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2004-07-08 12:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-12-06 07:35:24 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-07-08 12:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.hn/hn/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.hn/hn/status_available_spec.rb index a67d33a3..5e60a71b 100644 --- a/spec/whois/parsers/responses/whois.nic.hn/hn/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.hn/hn/status_available_spec.rb @@ -9,65 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.hn.rb' -describe Whois::Parsers::WhoisNicHn, "status_available.expected" do +describe "whois.nic.hn", :aggregate_failures do subject do file = fixture("responses", "whois.nic.hn/hn/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.hn") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.hn") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.hn") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.hn/hn/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.hn/hn/status_registered_spec.rb index 741328f5..41efbf06 100644 --- a/spec/whois/parsers/responses/whois.nic.hn/hn/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.hn/hn/status_registered_spec.rb @@ -9,75 +9,36 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.hn.rb' -describe Whois::Parsers::WhoisNicHn, "status_registered.expected" do +describe "whois.nic.hn", :aggregate_failures do subject do file = fixture("responses", "whois.nic.hn/hn/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.hn") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.hn") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("801220-CoCCA") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-03-07 05:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-02-03 10:22:23 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-03-07 05:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.hn") + expect(subject.domain_id).to eq("801220-CoCCA") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-03-07 05:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-02-03 10:22:23 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-03-07 05:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.ht/ht/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.ht/ht/status_available_spec.rb index 3fc271e1..68e2ea19 100644 --- a/spec/whois/parsers/responses/whois.nic.ht/ht/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ht/ht/status_available_spec.rb @@ -9,65 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ht.rb' -describe Whois::Parsers::WhoisNicHt, "status_available.expected" do +describe "whois.nic.ht", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ht/ht/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ht") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.ht") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.ht") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.ht/ht/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ht/ht/status_registered_spec.rb index 6f5a2f5b..ee4f69ce 100644 --- a/spec/whois/parsers/responses/whois.nic.ht/ht/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ht/ht/status_registered_spec.rb @@ -9,80 +9,40 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ht.rb' -describe Whois::Parsers::WhoisNicHt, "status_registered.expected" do +describe "whois.nic.ht", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ht/ht/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ht") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.ht") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("112029-CoCCA") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2004-06-17 23:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-05-16 09:18:24 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-06-17 23:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.ht") + expect(subject.domain_id).to eq("112029-CoCCA") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2004-06-17 23:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-05-16 09:18:24 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-06-17 23:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.hu/hu/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.hu/hu/status_available_spec.rb index adcdd605..4fa38181 100644 --- a/spec/whois/parsers/responses/whois.nic.hu/hu/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.hu/hu/status_available_spec.rb @@ -9,84 +9,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.hu.rb' -describe Whois::Parsers::WhoisNicHu, "status_available.expected" do +describe "whois.nic.hu", :aggregate_failures do subject do file = fixture("responses", "whois.nic.hu/hu/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.hu") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.nic.hu/hu/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.hu/hu/status_registered_spec.rb index 68529a02..e970ce60 100644 --- a/spec/whois/parsers/responses/whois.nic.hu/hu/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.hu/hu/status_registered_spec.rb @@ -9,85 +9,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.hu.rb' -describe Whois::Parsers::WhoisNicHu, "status_registered.expected" do +describe "whois.nic.hu", :aggregate_failures do subject do file = fixture("responses", "whois.nic.hu/hu/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.hu") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.hu") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2000-03-25 23:20:39")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("google.hu") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2000-03-25 23:20:39")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.nic.im/im/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.im/im/status_available_spec.rb index 1fc6e509..13450ca4 100644 --- a/spec/whois/parsers/responses/whois.nic.im/im/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.im/im/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.im.rb' -describe Whois::Parsers::WhoisNicIm, "status_available.expected" do +describe "whois.nic.im", :aggregate_failures do subject do file = fixture("responses", "whois.nic.im/im/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.im") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.im/im/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.im/im/status_registered_spec.rb index 90d95d38..804a14a2 100644 --- a/spec/whois/parsers/responses/whois.nic.im/im/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.im/im/status_registered_spec.rb @@ -9,59 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.im.rb' -describe Whois::Parsers::WhoisNicIm, "status_registered.expected" do +describe "whois.nic.im", :aggregate_failures do subject do file = fixture("responses", "whois.nic.im/im/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.im") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-08-03 23:59:52")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-08-03 23:59:52")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.io/io/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.io/io/status_available_spec.rb index 7e2c5033..bd60c3e2 100644 --- a/spec/whois/parsers/responses/whois.nic.io/io/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.io/io/status_available_spec.rb @@ -9,91 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.io.rb' -describe Whois::Parsers::WhoisNicIo, "status_available.expected" do +describe "whois.nic.io", :aggregate_failures do subject do file = fixture("responses", "whois.nic.io/io/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.io") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(false) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.reserved?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.io/io/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.io/io/status_registered_spec.rb index 5a5384eb..4cad0ccb 100644 --- a/spec/whois/parsers/responses/whois.nic.io/io/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.io/io/status_registered_spec.rb @@ -9,122 +9,62 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.io.rb' -describe Whois::Parsers::WhoisNicIo, "status_registered.expected" do +describe "whois.nic.io", :aggregate_failures do subject do file = fixture("responses", "whois.nic.io/io/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.io") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("redis.io") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D503300000040423931-LRMS") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2010-05-28 22:09:44 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2019-05-06 17:24:58 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2020-05-28 22:09:44 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("625") - expect(subject.registrar.name).to eq("Name.com LLC") - expect(subject.registrar.organization).to eq("Name.com LLC") - expect(subject.registrar.url).to eq("www.name.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("Domain Protection Services, Inc.") - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq("CO") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2kqz.name.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1djs.name.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns4bht.name.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3ckl.name.com") - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(false) - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("redis.io") + expect(subject.domain_id).to eq("D503300000040423931-LRMS") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2010-05-28 22:09:44 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2019-05-06 17:24:58 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-05-28 22:09:44 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("625") + expect(subject.registrar.name).to eq("Name.com LLC") + expect(subject.registrar.url).to eq("www.name.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Domain Protection Services, Inc.") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("CO") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2kqz.name.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1djs.name.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns4bht.name.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3ckl.name.com") + expect(subject.reserved?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.io/io/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.nic.io/io/status_reserved_spec.rb index 89c7bfa5..23812266 100644 --- a/spec/whois/parsers/responses/whois.nic.io/io/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.io/io/status_reserved_spec.rb @@ -9,91 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.io.rb' -describe Whois::Parsers::WhoisNicIo, "status_reserved.expected" do +describe "whois.nic.io", :aggregate_failures do subject do file = fixture("responses", "whois.nic.io/io/status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.io") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(true) - end + it "matches status_reserved.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.reserved?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.ir/ir/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.ir/ir/status_available_spec.rb index 3ab6ed36..248faa11 100644 --- a/spec/whois/parsers/responses/whois.nic.ir/ir/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ir/ir/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ir.rb' -describe Whois::Parsers::WhoisNicIr, "status_available.expected" do +describe "whois.nic.ir", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ir/ir/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ir") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.ir/ir/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ir/ir/status_registered_spec.rb index 64aed1fb..e0237bad 100644 --- a/spec/whois/parsers/responses/whois.nic.ir/ir/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ir/ir/status_registered_spec.rb @@ -9,59 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ir.rb' -describe Whois::Parsers::WhoisNicIr, "status_registered.expected" do +describe "whois.nic.ir", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ir/ir/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ir") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-02-17")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns3.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns4.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns1.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-02-17")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns3.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns4.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns1.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_contact_province_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_contact_province_spec.rb index 4adbee35..ea80cccf 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_contact_province_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_contact_province_spec.rb @@ -9,32 +9,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_contact_province.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_contact_province.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("HTML1-ITNIC") - expect(subject.registrant_contacts[0].name).to eq("HTML.it srl") - expect(subject.registrant_contacts[0].organization).to eq("HTML.it srl") - expect(subject.registrant_contacts[0].address).to eq("Viale Alessandrino, 595") - expect(subject.registrant_contacts[0].city).to eq("Roma") - expect(subject.registrant_contacts[0].zip).to eq("00172") - expect(subject.registrant_contacts[0].state).to eq("RM") - expect(subject.registrant_contacts[0].country_code).to eq("IT") - expect(subject.registrant_contacts[0].created_on).to eq(Time.parse("2007-03-01 10:28:08")) - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2007-03-01 10:28:08")) - end + it "matches property_contact_province.expected" do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("HTML1-ITNIC") + expect(subject.registrant_contacts[0].name).to eq("HTML.it srl") + expect(subject.registrant_contacts[0].organization).to eq("HTML.it srl") + expect(subject.registrant_contacts[0].address).to eq("Viale Alessandrino, 595") + expect(subject.registrant_contacts[0].city).to eq("Roma") + expect(subject.registrant_contacts[0].zip).to eq("00172") + expect(subject.registrant_contacts[0].state).to eq("RM") + expect(subject.registrant_contacts[0].country_code).to eq("IT") + expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2007-03-01 10:28:08")) + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2007-03-01 10:28:08")) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_contact_with_company_in_address_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_contact_with_company_in_address_spec.rb index af97d280..b3b81d8a 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_contact_with_company_in_address_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_contact_with_company_in_address_spec.rb @@ -9,32 +9,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_contact_with_company_in_address.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_contact_with_company_in_address.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("AARS1-ITNIC") - expect(subject.technical_contacts[0].name).to eq("Andrea Antonio Renato Stratta") - expect(subject.technical_contacts[0].organization).to eq("UCI Italia Srl") - expect(subject.technical_contacts[0].address).to eq("Via E. Fermi, 161") - expect(subject.technical_contacts[0].city).to eq("Roma") - expect(subject.technical_contacts[0].zip).to eq("00146") - expect(subject.technical_contacts[0].state).to eq("RM") - expect(subject.technical_contacts[0].country_code).to eq("IT") - expect(subject.technical_contacts[0].created_on).to eq(Time.parse("2006-08-16 00:00:00")) - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2007-03-01 07:48:42")) - end + it "matches property_contact_with_company_in_address.expected" do + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("AARS1-ITNIC") + expect(subject.technical_contacts[0].name).to eq("Andrea Antonio Renato Stratta") + expect(subject.technical_contacts[0].organization).to eq("UCI Italia Srl") + expect(subject.technical_contacts[0].address).to eq("Via E. Fermi, 161") + expect(subject.technical_contacts[0].city).to eq("Roma") + expect(subject.technical_contacts[0].zip).to eq("00146") + expect(subject.technical_contacts[0].state).to eq("RM") + expect(subject.technical_contacts[0].country_code).to eq("IT") + expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2006-08-16 00:00:00")) + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2007-03-01 07:48:42")) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_contact_with_organization_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_contact_with_organization_spec.rb index bbce3ce5..d68e166f 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_contact_with_organization_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_contact_with_organization_spec.rb @@ -9,32 +9,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_contact_with_organization.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_contact_with_organization.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("TT4277-ITNIC") - expect(subject.admin_contacts[0].name).to eq("Tsao Tu") - expect(subject.admin_contacts[0].organization).to eq("Tu Tsao") - expect(subject.admin_contacts[0].address).to eq("30 Herbert Street") - expect(subject.admin_contacts[0].city).to eq("Dublin") - expect(subject.admin_contacts[0].zip).to eq("2") - expect(subject.admin_contacts[0].state).to eq("IE") - expect(subject.admin_contacts[0].country_code).to eq("IE") - expect(subject.admin_contacts[0].created_on).to eq(Time.parse("2008-11-27 16:47:22")) - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2008-11-27 16:47:22")) - end + it "matches property_contact_with_organization.expected" do + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("TT4277-ITNIC") + expect(subject.admin_contacts[0].name).to eq("Tsao Tu") + expect(subject.admin_contacts[0].organization).to eq("Tu Tsao") + expect(subject.admin_contacts[0].address).to eq("30 Herbert Street") + expect(subject.admin_contacts[0].city).to eq("Dublin") + expect(subject.admin_contacts[0].zip).to eq("2") + expect(subject.admin_contacts[0].state).to eq("IE") + expect(subject.admin_contacts[0].country_code).to eq("IE") + expect(subject.admin_contacts[0].created_on).to eq(DateTime.parse("2008-11-27 16:47:22")) + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2008-11-27 16:47:22")) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_status_available_spec.rb index 874350a7..37686caf 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_status_available_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_status_available.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches property_status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_status_client_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_status_client_spec.rb index 528c114d..64c3f2ba 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_status_client_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_status_client_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_status_client.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_status_client.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_client.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_status_graceperiod_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_status_graceperiod_spec.rb index 83d17531..561ba8b8 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_status_graceperiod_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_status_graceperiod_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_status_graceperiod.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_status_graceperiod.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_graceperiod.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_status_inactive_noregistrar_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_status_inactive_noregistrar_spec.rb index 954e2ccb..80a6ce15 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_status_inactive_noregistrar_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_status_inactive_noregistrar_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_status_inactive_noregistrar.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_status_inactive_noregistrar.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:inactive) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_inactive_noregistrar.expected" do + expect(subject.status).to eq(:inactive) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_status_no_provider_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_status_no_provider_spec.rb index ac4253d1..ca64fc59 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_status_no_provider_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_status_no_provider_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_status_no_provider.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_status_no_provider.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_no_provider.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_status_ok_autorenew_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_status_ok_autorenew_spec.rb index 4d2d165a..8999bbe1 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_status_ok_autorenew_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_status_ok_autorenew_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_status_ok_autorenew.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_status_ok_autorenew.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_ok_autorenew.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_status_ok_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_status_ok_spec.rb index e16a3195..3c19a424 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_status_ok_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_status_ok_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_status_ok.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_status_ok.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_ok.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_status_pending-delete_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_status_pending-delete_spec.rb index f71aaa46..f511d7ac 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_status_pending-delete_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_status_pending-delete_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_status_pending-delete.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_status_pending-delete.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:redemption) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_pending-delete.expected" do + expect(subject.status).to eq(:redemption) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingdelete_pendingdelete_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingdelete_pendingdelete_spec.rb index 79f49a28..22715431 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingdelete_pendingdelete_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingdelete_pendingdelete_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_status_pendingdelete_pendingdelete.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_status_pendingdelete_pendingdelete.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:redemption) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_pendingdelete_pendingdelete.expected" do + expect(subject.status).to eq(:redemption) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingdelete_redemptionperiod_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingdelete_redemptionperiod_spec.rb index db4827d4..8e1d8339 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingdelete_redemptionperiod_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingdelete_redemptionperiod_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_status_pendingdelete_redemptionperiod.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_status_pendingdelete_redemptionperiod.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:redemption) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_pendingdelete_redemptionperiod.expected" do + expect(subject.status).to eq(:redemption) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingtransfer_autorenewperiod_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingtransfer_autorenewperiod_spec.rb index 8dee8843..9380fd5b 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingtransfer_autorenewperiod_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingtransfer_autorenewperiod_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_status_pendingtransfer_autorenewperiod.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_status_pendingtransfer_autorenewperiod.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_pendingtransfer_autorenewperiod.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingtransfer_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingtransfer_spec.rb index d973545b..410cd6e7 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingtransfer_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingtransfer_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_status_pendingtransfer.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_status_pendingtransfer.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_pendingtransfer.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingupdate_autorenewperiod_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingupdate_autorenewperiod_spec.rb index fb88d8e0..01964813 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingupdate_autorenewperiod_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingupdate_autorenewperiod_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_status_pendingupdate_autorenewperiod.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_status_pendingupdate_autorenewperiod.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_pendingupdate_autorenewperiod.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingupdate_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingupdate_spec.rb index 7a44508b..b1891b33 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingupdate_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_status_pendingupdate_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_status_pendingupdate.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_status_pendingupdate.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_pendingupdate.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_status_redemption_no_provider_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_status_redemption_no_provider_spec.rb index 127b29ce..93f66bdf 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_status_redemption_no_provider_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_status_redemption_no_provider_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_status_redemption_no_provider.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_status_redemption_no_provider.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:redemption) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_redemption_no_provider.expected" do + expect(subject.status).to eq(:redemption) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_status_reserved_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_status_reserved_spec.rb index 2e933579..d7a68d38 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_status_reserved_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_status_reserved.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_reserved.expected" do + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_status_unassignable_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_status_unassignable_spec.rb index 68c38054..dbc48fe0 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_status_unassignable_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_status_unassignable_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_status_unassignable.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_status_unassignable.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:unavailable) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches property_status_unassignable.expected" do + expect(subject.status).to eq(:unavailable) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/property_technical_contact_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/property_technical_contact_spec.rb index b2ce8250..17d64470 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/property_technical_contact_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/property_technical_contact_spec.rb @@ -9,24 +9,21 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "property_technical_contact.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/property_technical_contact.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("TS7016-ITNIC") - expect(subject.technical_contacts[0].name).to eq("Technical Services") - end + it "matches property_technical_contact.expected" do + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("TS7016-ITNIC") + expect(subject.technical_contacts[0].name).to eq("Technical Services") end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/response_unavailable_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/response_unavailable_spec.rb index bc7c98df..e4c7efc6 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/response_unavailable_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/response_unavailable_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "response_unavailable.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/response_unavailable.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#response_unavailable?" do - it do - expect(subject.response_unavailable?).to eq(true) - end + it "matches response_unavailable.expected" do + expect(subject.response_unavailable?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/status_available_spec.rb index 77d94fed..ccbe60b4 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/status_available_spec.rb @@ -9,93 +9,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "status_available.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.it") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#response_unavailable?" do - it do - expect(subject.response_unavailable?).to eq(false) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq(nil) + expect(subject.domain).to eq("u34jedzcq.it") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.response_unavailable?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/status_registered_spec.rb index d0d0140e..621e1491 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/status_registered_spec.rb @@ -9,152 +9,93 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "status_registered.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Please note that the following result could be a subgroup of the data contained in the database. Additional information can be visualized at: http://www.nic.it/cgi-bin/Whois/whois.cgi") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.it") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1999-12-10 00:00:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-04-21 01:05:35")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-04-21 00:00:00")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("MARKMONITOR-REG") - expect(subject.registrar.name).to eq("MARKMONITOR-REG") - expect(subject.registrar.organization).to eq("MarkMonitor International Limited") - expect(subject.registrar.url).to eq("https://www.markmonitor.com/") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("DUP430692088") - expect(subject.registrant_contacts[0].name).to eq("Google Ireland Holdings") - expect(subject.registrant_contacts[0].organization).to eq("Google Ireland Holdings") - expect(subject.registrant_contacts[0].address).to eq("70 Sir John Rogersons Quay") - expect(subject.registrant_contacts[0].city).to eq("Dublin") - expect(subject.registrant_contacts[0].zip).to eq("2") - expect(subject.registrant_contacts[0].state).to eq("IE") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("IE") - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - expect(subject.registrant_contacts[0].created_on).to eq(Time.parse("2013-04-21 01:05:35")) - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2013-04-21 01:05:35")) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("DUP142437129") - expect(subject.admin_contacts[0].name).to eq("Tsao Tu") - expect(subject.admin_contacts[0].organization).to eq("Tu Tsao") - expect(subject.admin_contacts[0].address).to eq("70 Sir John Rogersons Quay") - expect(subject.admin_contacts[0].city).to eq("Dublin") - expect(subject.admin_contacts[0].zip).to eq("2") - expect(subject.admin_contacts[0].state).to eq("IE") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("IE") - expect(subject.admin_contacts[0].phone).to eq(nil) - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq(nil) - expect(subject.admin_contacts[0].created_on).to eq(Time.parse("2013-04-21 01:05:35")) - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2013-04-21 01:05:35")) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts[0].id).to eq("DUP430692088") - expect(subject.technical_contacts[0].name).to eq("Google Ireland Holdings") - expect(subject.technical_contacts[0].organization).to eq("Google Ireland Holdings") - expect(subject.technical_contacts[0].address).to eq("70 Sir John Rogersons Quay") - expect(subject.technical_contacts[0].city).to eq("Dublin") - expect(subject.technical_contacts[0].zip).to eq("2") - expect(subject.technical_contacts[0].state).to eq("IE") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("IE") - expect(subject.technical_contacts[0].phone).to eq(nil) - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq(nil) - expect(subject.technical_contacts[0].created_on).to eq(Time.parse("2013-04-21 01:05:35")) - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2013-04-21 01:05:35")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns4.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.google.com") - end - end - describe "#response_unavailable?" do - it do - expect(subject.response_unavailable?).to eq(false) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Please note that the following result could be a subgroup of the data contained in the database. Additional information can be visualized at: http://www.nic.it/cgi-bin/Whois/whois.cgi") + expect(subject.domain).to eq("google.it") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1999-12-10 00:00:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-04-21 01:05:35")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-04-21 00:00:00")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("MARKMONITOR-REG") + expect(subject.registrar.name).to eq("MARKMONITOR-REG") + expect(subject.registrar.organization).to eq("MarkMonitor International Limited") + expect(subject.registrar.url).to eq("https://www.markmonitor.com/") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("DUP430692088") + expect(subject.registrant_contacts[0].name).to eq("Google Ireland Holdings") + expect(subject.registrant_contacts[0].organization).to eq("Google Ireland Holdings") + expect(subject.registrant_contacts[0].address).to eq("70 Sir John Rogersons Quay") + expect(subject.registrant_contacts[0].city).to eq("Dublin") + expect(subject.registrant_contacts[0].zip).to eq("2") + expect(subject.registrant_contacts[0].state).to eq("IE") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("IE") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2013-04-21 01:05:35")) + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2013-04-21 01:05:35")) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("DUP142437129") + expect(subject.admin_contacts[0].name).to eq("Tsao Tu") + expect(subject.admin_contacts[0].organization).to eq("Tu Tsao") + expect(subject.admin_contacts[0].address).to eq("70 Sir John Rogersons Quay") + expect(subject.admin_contacts[0].city).to eq("Dublin") + expect(subject.admin_contacts[0].zip).to eq("2") + expect(subject.admin_contacts[0].state).to eq("IE") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("IE") + expect(subject.admin_contacts[0].phone).to eq(nil) + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq(nil) + expect(subject.admin_contacts[0].created_on).to eq(DateTime.parse("2013-04-21 01:05:35")) + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2013-04-21 01:05:35")) + expect(subject.technical_contacts[0].id).to eq("DUP430692088") + expect(subject.technical_contacts[0].name).to eq("Google Ireland Holdings") + expect(subject.technical_contacts[0].organization).to eq("Google Ireland Holdings") + expect(subject.technical_contacts[0].address).to eq("70 Sir John Rogersons Quay") + expect(subject.technical_contacts[0].city).to eq("Dublin") + expect(subject.technical_contacts[0].zip).to eq("2") + expect(subject.technical_contacts[0].state).to eq("IE") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("IE") + expect(subject.technical_contacts[0].phone).to eq(nil) + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq(nil) + expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2013-04-21 01:05:35")) + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2013-04-21 01:05:35")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns4.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns2.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3.google.com") + expect(subject.response_unavailable?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.it/it/status_unavailable_spec.rb b/spec/whois/parsers/responses/whois.nic.it/it/status_unavailable_spec.rb index 6d9fe16c..19a38a9b 100644 --- a/spec/whois/parsers/responses/whois.nic.it/it/status_unavailable_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.it/it/status_unavailable_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.it.rb' -describe Whois::Parsers::WhoisNicIt, "status_unavailable.expected" do +describe "whois.nic.it", :aggregate_failures do subject do file = fixture("responses", "whois.nic.it/it/status_unavailable.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.it") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:unavailable) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches status_unavailable.expected" do + expect(subject.status).to eq(:unavailable) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.jobs/jobs/property_nameserver_no_nameserver_spec.rb b/spec/whois/parsers/responses/whois.nic.jobs/jobs/property_nameserver_no_nameserver_spec.rb index 1d0e15d8..d70240e1 100644 --- a/spec/whois/parsers/responses/whois.nic.jobs/jobs/property_nameserver_no_nameserver_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.jobs/jobs/property_nameserver_no_nameserver_spec.rb @@ -9,20 +9,17 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.jobs.rb' -describe Whois::Parsers::WhoisNicJobs, "property_nameserver_no_nameserver.expected" do +describe "whois.nic.jobs", :aggregate_failures do subject do file = fixture("responses", "whois.nic.jobs/jobs/property_nameserver_no_nameserver.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.jobs") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches property_nameserver_no_nameserver.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.jobs/jobs/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.jobs/jobs/status_available_spec.rb index 4489e330..e11fc23c 100644 --- a/spec/whois/parsers/responses/whois.nic.jobs/jobs/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.jobs/jobs/status_available_spec.rb @@ -9,80 +9,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.jobs.rb' -describe Whois::Parsers::WhoisNicJobs, "status_available.expected" do +describe "whois.nic.jobs", :aggregate_failures do subject do file = fixture("responses", "whois.nic.jobs/jobs/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.jobs") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("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 except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign's (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign 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 that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.jobs") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#referral_whois" do - it do - expect(subject.referral_whois).to eq(nil) - end - end - describe "#referral_url" do - it do - expect(subject.referral_url).to eq(nil) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("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 except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign's (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign 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 that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") + expect(subject.domain).to eq("u34jedzcq.jobs") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.referral_whois).to eq(nil) + expect(subject.referral_url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.jobs/jobs/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.jobs/jobs/status_registered_spec.rb index cef93b41..625222f1 100644 --- a/spec/whois/parsers/responses/whois.nic.jobs/jobs/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.jobs/jobs/status_registered_spec.rb @@ -9,95 +9,43 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.jobs.rb' -describe Whois::Parsers::WhoisNicJobs, "status_registered.expected" do +describe "whois.nic.jobs", :aggregate_failures do subject do file = fixture("responses", "whois.nic.jobs/jobs/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.jobs") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("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 except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign's (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign 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 that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.jobs") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("86932313_DOMAIN_JOBS-VRSN") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2005-09-15 04:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2017-07-27 20:59:01 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2017-09-15 04:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MARKMONITOR INC.") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end - end - describe "#referral_whois" do - it do - expect(subject.referral_whois).to eq("whois.markmonitor.com") - end - end - describe "#referral_url" do - it do - expect(subject.referral_url).to eq("http://www.markmonitor.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("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 except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign's (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign 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 that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") + expect(subject.domain).to eq("google.jobs") + expect(subject.domain_id).to eq("86932313_DOMAIN_JOBS-VRSN") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2005-09-15 04:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2017-07-27 20:59:01 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2017-09-15 04:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MARKMONITOR INC.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.referral_whois).to eq("whois.markmonitor.com") + expect(subject.referral_url).to eq("http://www.markmonitor.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.ki/ki/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.ki/ki/status_available_spec.rb index 0d0ef026..a9c35dfe 100644 --- a/spec/whois/parsers/responses/whois.nic.ki/ki/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ki/ki/status_available_spec.rb @@ -9,65 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ki.rb' -describe Whois::Parsers::WhoisNicKi, "status_available.expected" do +describe "whois.nic.ki", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ki/ki/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ki") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.ki") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.ki") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.ki/ki/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ki/ki/status_registered_spec.rb index f6160f4b..fc6d8be3 100644 --- a/spec/whois/parsers/responses/whois.nic.ki/ki/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ki/ki/status_registered_spec.rb @@ -9,80 +9,40 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ki.rb' -describe Whois::Parsers::WhoisNicKi, "status_registered.expected" do +describe "whois.nic.ki", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ki/ki/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ki") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.ki") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("18030-CoCCA") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-05-15 12:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-12-06 07:34:23 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-11-27 11:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.ki") + expect(subject.domain_id).to eq("18030-CoCCA") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-05-15 12:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-12-06 07:34:23 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-11-27 11:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.kz/kz/property_status_missing_spec.rb b/spec/whois/parsers/responses/whois.nic.kz/kz/property_status_missing_spec.rb index 6e621729..7684920b 100644 --- a/spec/whois/parsers/responses/whois.nic.kz/kz/property_status_missing_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.kz/kz/property_status_missing_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.kz.rb' -describe Whois::Parsers::WhoisNicKz, "property_status_missing.expected" do +describe "whois.nic.kz", :aggregate_failures do subject do file = fixture("responses", "whois.nic.kz/kz/property_status_missing.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.kz") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(nil) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches property_status_missing.expected" do + expect(subject.status).to eq(nil) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.kz/kz/property_status_multiple_spec.rb b/spec/whois/parsers/responses/whois.nic.kz/kz/property_status_multiple_spec.rb index 78790e28..adda2b6f 100644 --- a/spec/whois/parsers/responses/whois.nic.kz/kz/property_status_multiple_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.kz/kz/property_status_multiple_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.kz.rb' -describe Whois::Parsers::WhoisNicKz, "property_status_multiple.expected" do +describe "whois.nic.kz", :aggregate_failures do subject do file = fixture("responses", "whois.nic.kz/kz/property_status_multiple.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.kz") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(["clientDeleteProhibited", "clientRenewProhibited", "clientTransferProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_multiple.expected" do + expect(subject.status).to eq(["clientDeleteProhibited", "clientRenewProhibited", "clientTransferProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.kz/kz/property_status_ok_spec.rb b/spec/whois/parsers/responses/whois.nic.kz/kz/property_status_ok_spec.rb index 6eae4ef7..dc95c150 100644 --- a/spec/whois/parsers/responses/whois.nic.kz/kz/property_status_ok_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.kz/kz/property_status_ok_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.kz.rb' -describe Whois::Parsers::WhoisNicKz, "property_status_ok.expected" do +describe "whois.nic.kz", :aggregate_failures do subject do file = fixture("responses", "whois.nic.kz/kz/property_status_ok.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.kz") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_ok.expected" do + expect(subject.status).to eq(["ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.kz/kz/property_updated_on_blank_spec.rb b/spec/whois/parsers/responses/whois.nic.kz/kz/property_updated_on_blank_spec.rb index baa86db5..549a45a8 100644 --- a/spec/whois/parsers/responses/whois.nic.kz/kz/property_updated_on_blank_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.kz/kz/property_updated_on_blank_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.kz.rb' -describe Whois::Parsers::WhoisNicKz, "property_updated_on_blank.expected" do +describe "whois.nic.kz", :aggregate_failures do subject do file = fixture("responses", "whois.nic.kz/kz/property_updated_on_blank.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.kz") + Whois::Parser.parser_for(part) end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end + it "matches property_updated_on_blank.expected" do + expect(subject.updated_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.kz/kz/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.kz/kz/status_available_spec.rb index f8cff874..52ddde11 100644 --- a/spec/whois/parsers/responses/whois.nic.kz/kz/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.kz/kz/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.kz.rb' -describe Whois::Parsers::WhoisNicKz, "status_available.expected" do +describe "whois.nic.kz", :aggregate_failures do subject do file = fixture("responses", "whois.nic.kz/kz/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.kz") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(nil) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(nil) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.kz/kz/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.kz/kz/status_registered_spec.rb index 461500e8..04dbf9e8 100644 --- a/spec/whois/parsers/responses/whois.nic.kz/kz/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.kz/kz/status_registered_spec.rb @@ -9,56 +9,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.kz.rb' -describe Whois::Parsers::WhoisNicKz, "status_registered.expected" do +describe "whois.nic.kz", :aggregate_failures do subject do file = fixture("responses", "whois.nic.kz/kz/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.kz") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1999-06-07 13:01:43")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-11-28 03:16:59")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(["ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1999-06-07 13:01:43")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-11-28 03:16:59")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.la/la/property_status_multiple_spec.rb b/spec/whois/parsers/responses/whois.nic.la/la/property_status_multiple_spec.rb deleted file mode 100644 index a352375f..00000000 --- a/spec/whois/parsers/responses/whois.nic.la/la/property_status_multiple_spec.rb +++ /dev/null @@ -1,27 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.nic.la/la/property_status_multiple.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.nic.la.rb' - -describe Whois::Parsers::WhoisNicLa, "property_status_multiple.expected" do - - subject do - file = fixture("responses", "whois.nic.la/la/property_status_multiple.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(["TRANSFER PROHIBITED", "RENEW PERIOD"]) - end - end -end diff --git a/spec/whois/parsers/responses/whois.nic.la/la/property_status_single_spec.rb b/spec/whois/parsers/responses/whois.nic.la/la/property_status_single_spec.rb deleted file mode 100644 index 2ca2edfb..00000000 --- a/spec/whois/parsers/responses/whois.nic.la/la/property_status_single_spec.rb +++ /dev/null @@ -1,27 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.nic.la/la/property_status_single.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.nic.la.rb' - -describe Whois::Parsers::WhoisNicLa, "property_status_single.expected" do - - subject do - file = fixture("responses", "whois.nic.la/la/property_status_single.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(["OK"]) - end - end -end diff --git a/spec/whois/parsers/responses/whois.nic.la/la/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.la/la/status_available_spec.rb index a7929081..ba320edb 100644 --- a/spec/whois/parsers/responses/whois.nic.la/la/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.la/la/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.la.rb' -describe Whois::Parsers::WhoisNicLa, "status_available.expected" do +describe "whois.nic.la", :aggregate_failures do subject do file = fixture("responses", "whois.nic.la/la/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.la") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("This whois service is provided by LANIC and only contains information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) LANIC http://www.lanic.gov.la/ Access to the whois service is rate limited. For more information, please see https://registrar-console.lanic.la/pub/whois_guidance.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.la/la/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.la/la/status_registered_spec.rb index b55baa3d..5502c0c0 100644 --- a/spec/whois/parsers/responses/whois.nic.la/la/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.la/la/status_registered_spec.rb @@ -9,145 +9,56 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.la.rb' -describe Whois::Parsers::WhoisNicLa, "status_registered.expected" do +describe "whois.nic.la", :aggregate_failures do subject do file = fixture("responses", "whois.nic.la/la/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.la") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.la") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO471480") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientTransferProhibited", "serverTransferProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2002-07-18 01:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-08-01 15:09:21 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-07-18 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("H2948863") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("TLD Registrar Solutions Ltd") - expect(subject.registrar.url).to eq("www.tldregistrarsolutions.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("ndn-96955") - expect(subject.registrant_contacts[0].name).to eq("Google Inc") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("Ca") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.65067188571") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("ndn-96955") - expect(subject.admin_contacts[0].name).to eq("Google Inc") - expect(subject.admin_contacts[0].organization).to eq("Google Inc") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("Ca") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") - expect(subject.admin_contacts[0].fax).to eq("+1.65067188571") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("ndn-96955") - expect(subject.technical_contacts[0].name).to eq("Google Inc") - expect(subject.technical_contacts[0].organization).to eq("Google Inc") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("Ca") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") - expect(subject.technical_contacts[0].fax).to eq("+1.65067188571") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("This whois service is provided by LANIC and only contains information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) LANIC http://www.lanic.gov.la/ Access to the whois service is rate limited. For more information, please see https://registrar-console.lanic.la/pub/whois_guidance.") + expect(subject.domain).to eq("google.la") + expect(subject.domain_id).to eq("D471480-LANIC") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-07-18 01:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-07-04 21:39:38 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-07-18 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("") + expect(subject.registrar.name).to eq("TLD Registrar Solutions Ltd") + expect(subject.registrar.url).to eq("") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].email).to eq("https://whois.nic.la/contact/google.la/registrant") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].email).to eq("https://whois.nic.la/contact/google.la/admin") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].email).to eq("https://whois.nic.la/contact/google.la/tech") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.li/li/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.li/li/status_available_spec.rb index 96862da3..4166dbbc 100644 --- a/spec/whois/parsers/responses/whois.nic.li/li/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.li/li/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.li.rb' -describe Whois::Parsers::WhoisNicLi, "status_available.expected" do +describe "whois.nic.li", :aggregate_failures do subject do file = fixture("responses", "whois.nic.li/li/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.li") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.li/li/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.li/li/status_registered_spec.rb index 38fe7a7e..aac80325 100644 --- a/spec/whois/parsers/responses/whois.nic.li/li/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.li/li/status_registered_spec.rb @@ -9,58 +9,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.li.rb' -describe Whois::Parsers::WhoisNicLi, "status_registered.expected" do +describe "whois.nic.li", :aggregate_failures do subject do file = fixture("responses", "whois.nic.li/li/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.li") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.lk/lk/property_created_on_null_spec.rb b/spec/whois/parsers/responses/whois.nic.lk/lk/property_created_on_null_spec.rb index 1315a3d0..2b603bf9 100644 --- a/spec/whois/parsers/responses/whois.nic.lk/lk/property_created_on_null_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.lk/lk/property_created_on_null_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.lk.rb' -describe Whois::Parsers::WhoisNicLk, "property_created_on_null.expected" do +describe "whois.nic.lk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.lk/lk/property_created_on_null.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.lk") + Whois::Parser.parser_for(part) end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end + it "matches property_created_on_null.expected" do + expect(subject.created_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.lk/lk/property_updated_on_null_spec.rb b/spec/whois/parsers/responses/whois.nic.lk/lk/property_updated_on_null_spec.rb index 90ca8d66..b0069f92 100644 --- a/spec/whois/parsers/responses/whois.nic.lk/lk/property_updated_on_null_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.lk/lk/property_updated_on_null_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.lk.rb' -describe Whois::Parsers::WhoisNicLk, "property_updated_on_null.expected" do +describe "whois.nic.lk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.lk/lk/property_updated_on_null.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.lk") + Whois::Parser.parser_for(part) end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end + it "matches property_updated_on_null.expected" do + expect(subject.updated_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.lk/lk/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.lk/lk/status_available_spec.rb index fd6f44dc..3956e2e0 100644 --- a/spec/whois/parsers/responses/whois.nic.lk/lk/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.lk/lk/status_available_spec.rb @@ -9,86 +9,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.lk.rb' -describe Whois::Parsers::WhoisNicLk, "status_available.expected" do +describe "whois.nic.lk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.lk/lk/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.lk") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.lk/lk/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.lk/lk/status_registered_spec.rb index 76f685a0..3b46963f 100644 --- a/spec/whois/parsers/responses/whois.nic.lk/lk/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.lk/lk/status_registered_spec.rb @@ -9,101 +9,46 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.lk.rb' -describe Whois::Parsers::WhoisNicLk, "status_registered.expected" do +describe "whois.nic.lk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.lk/lk/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.lk") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.lk") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-04-01")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-03-09")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-04-01")) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("google.lk") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-04-01")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-03-09")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-04-01")) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.lv/lv/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.lv/lv/status_available_spec.rb index 8c33c224..c0087990 100644 --- a/spec/whois/parsers/responses/whois.nic.lv/lv/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.lv/lv/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.lv.rb' -describe Whois::Parsers::WhoisNicLv, "status_available.expected" do +describe "whois.nic.lv", :aggregate_failures do subject do file = fixture("responses", "whois.nic.lv/lv/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.lv") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.lv/lv/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.lv/lv/status_registered_spec.rb index 587b98de..65a23713 100644 --- a/spec/whois/parsers/responses/whois.nic.lv/lv/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.lv/lv/status_registered_spec.rb @@ -9,59 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.lv.rb' -describe Whois::Parsers::WhoisNicLv, "status_registered.expected" do +describe "whois.nic.lv", :aggregate_failures do subject do file = fixture("responses", "whois.nic.lv/lv/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.lv") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-07-08T19:35:53+03:00")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-07-08T19:35:53+03:00")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.ly/ly/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.ly/ly/status_available_spec.rb index 9fba99b6..8a5e0e83 100644 --- a/spec/whois/parsers/responses/whois.nic.ly/ly/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ly/ly/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ly.rb' -describe Whois::Parsers::WhoisNicLy, "status_available.expected" do +describe "whois.nic.ly", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ly/ly/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ly") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.ly/ly/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ly/ly/status_registered_spec.rb index 87807c2e..e9e4699b 100644 --- a/spec/whois/parsers/responses/whois.nic.ly/ly/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ly/ly/status_registered_spec.rb @@ -9,61 +9,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ly.rb' -describe Whois::Parsers::WhoisNicLy, "status_registered.expected" do +describe "whois.nic.ly", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ly/ly/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ly") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2007-10-03 13:36:48")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2009-08-07 22:52:02")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2010-10-03 13:36:48")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns4.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2007-10-03 13:36:48")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2009-08-07 22:52:02")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2010-10-03 13:36:48")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns4.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.md/md/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.md/md/status_available_spec.rb index f55f72ad..66e83d17 100644 --- a/spec/whois/parsers/responses/whois.nic.md/md/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.md/md/status_available_spec.rb @@ -9,86 +9,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.md.rb' -describe Whois::Parsers::WhoisNicMd, "status_available.expected" do +describe "whois.nic.md", :aggregate_failures do subject do file = fixture("responses", "whois.nic.md/md/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.md") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.md/md/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.md/md/status_registered_spec.rb index 7d19b756..d4179772 100644 --- a/spec/whois/parsers/responses/whois.nic.md/md/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.md/md/status_registered_spec.rb @@ -9,98 +9,43 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.md.rb' -describe Whois::Parsers::WhoisNicMd, "status_registered.expected" do +describe "whois.nic.md", :aggregate_failures do subject do file = fixture("responses", "whois.nic.md/md/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.md") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.md") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-05-02")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-05-02")) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Google Inc.") - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq("216.239.32.10") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq("216.239.34.10") - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("google.md") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-05-02")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-05-02")) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Google Inc.") + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq("216.239.32.10") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq("216.239.34.10") end end diff --git a/spec/whois/parsers/responses/whois.nic.me/me/property_nameservers_is_blank_spec.rb b/spec/whois/parsers/responses/whois.nic.me/me/property_nameservers_is_blank_spec.rb index 5826b0af..340c44af 100644 --- a/spec/whois/parsers/responses/whois.nic.me/me/property_nameservers_is_blank_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.me/me/property_nameservers_is_blank_spec.rb @@ -9,20 +9,17 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.me.rb' -describe Whois::Parsers::WhoisNicMe, "property_nameservers_is_blank.expected" do +describe "whois.nic.me", :aggregate_failures do subject do file = fixture("responses", "whois.nic.me/me/property_nameservers_is_blank.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.me") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches property_nameservers_is_blank.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.me/me/property_updated_on_is_blank_spec.rb b/spec/whois/parsers/responses/whois.nic.me/me/property_updated_on_is_blank_spec.rb index 29659c10..f5b62801 100644 --- a/spec/whois/parsers/responses/whois.nic.me/me/property_updated_on_is_blank_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.me/me/property_updated_on_is_blank_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.me.rb' -describe Whois::Parsers::WhoisNicMe, "property_updated_on_is_blank.expected" do +describe "whois.nic.me", :aggregate_failures do subject do file = fixture("responses", "whois.nic.me/me/property_updated_on_is_blank.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.me") + Whois::Parser.parser_for(part) end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_nil - end + it "matches property_updated_on_is_blank.expected" do + expect(subject.updated_on).to be_nil end end diff --git a/spec/whois/parsers/responses/whois.nic.me/me/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.nic.me/me/response_throttled_spec.rb new file mode 100644 index 00000000..455a8624 --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.me/me/response_throttled_spec.rb @@ -0,0 +1,24 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.me/me/response_throttled.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.me", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.me/me/response_throttled.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.me") + Whois::Parser.parser_for(part) + end + + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) + end +end diff --git a/spec/whois/parsers/responses/whois.nic.me/me/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.me/me/status_available_spec.rb index f6684866..701c572a 100644 --- a/spec/whois/parsers/responses/whois.nic.me/me/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.me/me/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.me.rb' -describe Whois::Parsers::WhoisNicMe, "status_available.expected" do +describe "whois.nic.me", :aggregate_failures do subject do file = fixture("responses", "whois.nic.me/me/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.me") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.me/me/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.me/me/status_registered_spec.rb index e4dcfd1a..e17a5904 100644 --- a/spec/whois/parsers/responses/whois.nic.me/me/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.me/me/status_registered_spec.rb @@ -9,142 +9,60 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.me.rb' -describe Whois::Parsers::WhoisNicMe, "status_registered.expected" do +describe "whois.nic.me", :aggregate_failures do subject do file = fixture("responses", "whois.nic.me/me/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.me") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("WHOIS TERMS & CONDITIONS: Access to .ME WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the .ME registry database. The data in this record is provided by .ME Registry for informational purposes only, and .ME Registry does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to: (a) allow, enable, or otherwise support the transmission by e-mail, telephone, facsimile, or other electronic processes of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. .ME Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.me") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D11599-ME") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["CLIENT DELETE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT UPDATE PROHIBITED", "DELETE PROHIBITED", "TRANSFER PROHIBITED", "UPDATE PROHIBITED"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2008-06-13 17:17:40 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-05-12 09:21:14 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-06-13 17:17:40 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("R45-ME") - expect(subject.registrar.name).to eq("MarkMonitor Inc") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("mmr-32097") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6506234000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6506188571") - expect(subject.registrant_contacts[0].email).to eq("dotme@markmonitor.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("mmr-32097") - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6506234000") - expect(subject.admin_contacts[0].fax).to eq("+1.6506188571") - expect(subject.admin_contacts[0].email).to eq("dotme@markmonitor.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("mmr-32097") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6506234000") - expect(subject.technical_contacts[0].fax).to eq("+1.6506188571") - expect(subject.technical_contacts[0].email).to eq("dotme@markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns4.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the registry database. The data in this record is provided by The Registry Operator for informational purposes only, and accuracy is not guaranteed. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Registry Operator reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq("google.me") + expect(subject.domain_id).to eq("D108500000000011599-AGRS") + expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited", "serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited", "serverTransferProhibited https://icann.org/epp#serverTransferProhibited", "serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2008-06-13 17:17:40 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-05-12 09:39:59 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-06-13 17:17:40 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(0) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(0) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns4.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.mg/mg/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.mg/mg/status_available_spec.rb index 80fab956..d5e234b5 100644 --- a/spec/whois/parsers/responses/whois.nic.mg/mg/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.mg/mg/status_available_spec.rb @@ -9,65 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.mg.rb' -describe Whois::Parsers::WhoisNicMg, "status_available.expected" do +describe "whois.nic.mg", :aggregate_failures do subject do file = fixture("responses", "whois.nic.mg/mg/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.mg") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.mg") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.mg") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.mg/mg/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.mg/mg/status_registered_spec.rb index 08993c1e..acb8fef5 100644 --- a/spec/whois/parsers/responses/whois.nic.mg/mg/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.mg/mg/status_registered_spec.rb @@ -9,80 +9,40 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.mg.rb' -describe Whois::Parsers::WhoisNicMg, "status_registered.expected" do +describe "whois.nic.mg", :aggregate_failures do subject do file = fixture("responses", "whois.nic.mg/mg/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.mg") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.mg") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("1915-nicmg") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2009-06-18 08:38:20 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-10-29 15:13:49 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-11-26 21:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.mg") + expect(subject.domain_id).to eq("1915-nicmg") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2009-06-18 08:38:20 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-10-29 15:13:49 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-11-26 21:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.ms/ms/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.ms/ms/status_available_spec.rb index ddfb4a30..e2b4099d 100644 --- a/spec/whois/parsers/responses/whois.nic.ms/ms/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ms/ms/status_available_spec.rb @@ -9,65 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ms.rb' -describe Whois::Parsers::WhoisNicMs, "status_available.expected" do +describe "whois.nic.ms", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ms/ms/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ms") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.ms") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.ms") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.ms/ms/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ms/ms/status_registered_spec.rb index c484574d..2ce565da 100644 --- a/spec/whois/parsers/responses/whois.nic.ms/ms/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ms/ms/status_registered_spec.rb @@ -9,76 +9,36 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ms.rb' -describe Whois::Parsers::WhoisNicMs, "status_registered.expected" do +describe "whois.nic.ms", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ms/ms/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ms") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.ms") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("23725-CoCCA") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1999-06-04 12:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-12-06 08:14:24 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-06-04 12:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.ms") + expect(subject.domain_id).to eq("23725-CoCCA") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1999-06-04 12:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-12-06 08:14:24 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-06-04 12:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.mu/mu/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.mu/mu/status_available_spec.rb index 7a22aa94..703a05a4 100644 --- a/spec/whois/parsers/responses/whois.nic.mu/mu/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.mu/mu/status_available_spec.rb @@ -9,65 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.mu.rb' -describe Whois::Parsers::WhoisNicMu, "status_available.expected" do +describe "whois.nic.mu", :aggregate_failures do subject do file = fixture("responses", "whois.nic.mu/mu/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.mu") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.mu") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.mu") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.mu/mu/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.mu/mu/status_registered_spec.rb index 280333c5..a5302db4 100644 --- a/spec/whois/parsers/responses/whois.nic.mu/mu/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.mu/mu/status_registered_spec.rb @@ -9,80 +9,40 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.mu.rb' -describe Whois::Parsers::WhoisNicMu, "status_registered.expected" do +describe "whois.nic.mu", :aggregate_failures do subject do file = fixture("responses", "whois.nic.mu/mu/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.mu") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.mu") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("70557-CoCCA") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2000-12-20 13:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-11-17 10:20:08 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-12-19 13:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.mu") + expect(subject.domain_id).to eq("70557-CoCCA") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2000-12-20 13:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-11-17 10:20:08 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-12-19 13:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.mx/mx/property_nameservers_with_ip_spec.rb b/spec/whois/parsers/responses/whois.nic.mx/mx/property_nameservers_with_ip_spec.rb deleted file mode 100644 index e735d018..00000000 --- a/spec/whois/parsers/responses/whois.nic.mx/mx/property_nameservers_with_ip_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.nic.mx/mx/property_nameservers_with_ip.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.nic.mx.rb' - -describe Whois::Parsers::WhoisNicMx, "property_nameservers_with_ip.expected" do - - subject do - file = fixture("responses", "whois.nic.mx/mx/property_nameservers_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("dns1.mpsnet.net.mx") - expect(subject.nameservers[0].ipv4).to eq("200.4.48.15") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("dns2.mpsnet.net.mx") - expect(subject.nameservers[1].ipv4).to eq("200.4.48.16") - end - end -end diff --git a/spec/whois/parsers/responses/whois.nic.mx/mx/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.mx/mx/status_available_spec.rb deleted file mode 100644 index 762dc235..00000000 --- a/spec/whois/parsers/responses/whois.nic.mx/mx/status_available_spec.rb +++ /dev/null @@ -1,53 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.nic.mx/mx/status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.nic.mx.rb' - -describe Whois::Parsers::WhoisNicMx, "status_available.expected" do - - subject do - file = fixture("responses", "whois.nic.mx/mx/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end -end diff --git a/spec/whois/parsers/responses/whois.nic.mx/mx/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.mx/mx/status_registered_spec.rb deleted file mode 100644 index ad620ffe..00000000 --- a/spec/whois/parsers/responses/whois.nic.mx/mx/status_registered_spec.rb +++ /dev/null @@ -1,71 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.nic.mx/mx/status_registered.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.nic.mx.rb' - -describe Whois::Parsers::WhoisNicMx, "status_registered.expected" do - - subject do - file = fixture("responses", "whois.nic.mx/mx/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2009-05-12")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2016-05-11")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns4.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns1.google.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end - end -end diff --git a/spec/whois/parsers/responses/whois.nic.name/name/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.name/name/status_available_spec.rb index 310df0a3..9a7513e8 100644 --- a/spec/whois/parsers/responses/whois.nic.name/name/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.name/name/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.name.rb' -describe Whois::Parsers::WhoisNicName, "status_available.expected" do +describe "whois.nic.name", :aggregate_failures do subject do file = fixture("responses", "whois.nic.name/name/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.name") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.name/name/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.name/name/status_registered_spec.rb index 2ffa5005..3abddab6 100644 --- a/spec/whois/parsers/responses/whois.nic.name/name/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.name/name/status_registered_spec.rb @@ -9,69 +9,42 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.name.rb' -describe Whois::Parsers::WhoisNicName, "status_registered.expected" do +describe "whois.nic.name", :aggregate_failures do subject do file = fixture("responses", "whois.nic.name/name/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.name") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(["clientTransferProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-04-19 12:22:08 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-11-30 18:51:55 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-04-19 12:22:08 UTC")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.dnsimple.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.dnsimple.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.dnsimple.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.dnsimple.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(["clientTransferProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-04-19 12:22:08 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-11-30 18:51:55 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-04-19 12:22:08 UTC")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.dnsimple.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.dnsimple.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.dnsimple.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.dnsimple.com") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.net.ng/ng/property_status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.net.ng/ng/property_status_available_spec.rb index 764c771e..f5c0b00c 100644 --- a/spec/whois/parsers/responses/whois.nic.net.ng/ng/property_status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.net.ng/ng/property_status_available_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.net.ng.rb' -describe Whois::Parsers::WhoisNicNetNg, "property_status_available.expected" do +describe "whois.nic.net.ng", :aggregate_failures do subject do file = fixture("responses", "whois.nic.net.ng/ng/property_status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.net.ng") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches property_status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.net.ng/ng/property_status_ok_spec.rb b/spec/whois/parsers/responses/whois.nic.net.ng/ng/property_status_ok_spec.rb index 1d137656..d36743d4 100644 --- a/spec/whois/parsers/responses/whois.nic.net.ng/ng/property_status_ok_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.net.ng/ng/property_status_ok_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.net.ng.rb' -describe Whois::Parsers::WhoisNicNetNg, "property_status_ok.expected" do +describe "whois.nic.net.ng", :aggregate_failures do subject do file = fixture("responses", "whois.nic.net.ng/ng/property_status_ok.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.net.ng") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_ok.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.net.ng/ng/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.net.ng/ng/status_available_spec.rb index 3be9cb8f..95445195 100644 --- a/spec/whois/parsers/responses/whois.nic.net.ng/ng/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.net.ng/ng/status_available_spec.rb @@ -9,65 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.net.ng.rb' -describe Whois::Parsers::WhoisNicNetNg, "status_available.expected" do +describe "whois.nic.net.ng", :aggregate_failures do subject do file = fixture("responses", "whois.nic.net.ng/ng/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.net.ng") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.ng") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.ng") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.net.ng/ng/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.net.ng/ng/status_registered_spec.rb index 9ef312e7..0416e554 100644 --- a/spec/whois/parsers/responses/whois.nic.net.ng/ng/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.net.ng/ng/status_registered_spec.rb @@ -9,80 +9,40 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.net.ng.rb' -describe Whois::Parsers::WhoisNicNetNg, "status_registered.expected" do +describe "whois.nic.net.ng", :aggregate_failures do subject do file = fixture("responses", "whois.nic.net.ng/ng/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.net.ng") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("nic.net.ng") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("6808-NIRA") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2009-05-13 14:27:27 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-08-24 13:46:14 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2020-07-30 23:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("nira") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("rns1.nic.net.ng") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("rns2.nic.net.ng") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("rns3.nic.net.ng") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("rns4.nic.net.ng") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("nic.net.ng") + expect(subject.domain_id).to eq("6808-NIRA") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2009-05-13 14:27:27 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-08-24 13:46:14 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-07-30 23:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("nira") + expect(subject.registrar.url).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("rns1.nic.net.ng") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("rns2.nic.net.ng") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("rns3.nic.net.ng") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("rns4.nic.net.ng") end end diff --git a/spec/whois/parsers/responses/whois.nic.net.sa/sa/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.net.sa/sa/status_available_spec.rb index fa45d34b..e64782c2 100644 --- a/spec/whois/parsers/responses/whois.nic.net.sa/sa/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.net.sa/sa/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.net.sa.rb' -describe Whois::Parsers::WhoisNicNetSa, "status_available.expected" do +describe "whois.nic.net.sa", :aggregate_failures do subject do file = fixture("responses", "whois.nic.net.sa/sa/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.net.sa") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.net.sa/sa/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.net.sa/sa/status_registered_spec.rb index 975277b1..4e4ab12e 100644 --- a/spec/whois/parsers/responses/whois.nic.net.sa/sa/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.net.sa/sa/status_registered_spec.rb @@ -9,60 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.net.sa.rb' -describe Whois::Parsers::WhoisNicNetSa, "status_registered.expected" do +describe "whois.nic.net.sa", :aggregate_failures do subject do file = fixture("responses", "whois.nic.net.sa/sa/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.net.sa") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2000-09-11")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2000-09-11")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.peer1.net") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.peer1.net") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2000-09-11")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2000-09-11")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.peer1.net") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.peer1.net") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.net.sb/sb/property_status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.net.sb/sb/property_status_available_spec.rb index 8be22dd0..40a14a14 100644 --- a/spec/whois/parsers/responses/whois.nic.net.sb/sb/property_status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.net.sb/sb/property_status_available_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.net.sb.rb' -describe Whois::Parsers::WhoisNicNetSb, "property_status_available.expected" do +describe "whois.nic.net.sb", :aggregate_failures do subject do file = fixture("responses", "whois.nic.net.sb/sb/property_status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.net.sb") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches property_status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.net.sb/sb/property_status_ok_spec.rb b/spec/whois/parsers/responses/whois.nic.net.sb/sb/property_status_ok_spec.rb index 1e5247e9..1cce9a42 100644 --- a/spec/whois/parsers/responses/whois.nic.net.sb/sb/property_status_ok_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.net.sb/sb/property_status_ok_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.net.sb.rb' -describe Whois::Parsers::WhoisNicNetSb, "property_status_ok.expected" do +describe "whois.nic.net.sb", :aggregate_failures do subject do file = fixture("responses", "whois.nic.net.sb/sb/property_status_ok.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.net.sb") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_ok.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.net.sb/sb/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.net.sb/sb/status_available_spec.rb index c01b2870..21ffbf99 100644 --- a/spec/whois/parsers/responses/whois.nic.net.sb/sb/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.net.sb/sb/status_available_spec.rb @@ -9,65 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.net.sb.rb' -describe Whois::Parsers::WhoisNicNetSb, "status_available.expected" do +describe "whois.nic.net.sb", :aggregate_failures do subject do file = fixture("responses", "whois.nic.net.sb/sb/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.net.sb") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.sb") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.sb") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.net.sb/sb/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.net.sb/sb/status_registered_spec.rb index 61e1dde9..15e3c894 100644 --- a/spec/whois/parsers/responses/whois.nic.net.sb/sb/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.net.sb/sb/status_registered_spec.rb @@ -9,76 +9,36 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.net.sb.rb' -describe Whois::Parsers::WhoisNicNetSb, "status_registered.expected" do +describe "whois.nic.net.sb", :aggregate_failures do subject do file = fixture("responses", "whois.nic.net.sb/sb/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.net.sb") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("baidu.com.sb") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("404765-CoCCA") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2010-03-27 04:29:19 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-02-26 05:08:41 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2013-03-27 04:29:19 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("Key-Systems") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq("http://www.key-systems.net") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("f1g1ns1.dnspod.net") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("f1g1ns2.dnspod.net") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("baidu.com.sb") + expect(subject.domain_id).to eq("404765-CoCCA") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2010-03-27 04:29:19 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-02-26 05:08:41 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2013-03-27 04:29:19 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("Key-Systems") + expect(subject.registrar.url).to eq("http://www.key-systems.net") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("f1g1ns1.dnspod.net") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("f1g1ns2.dnspod.net") end end diff --git a/spec/whois/parsers/responses/whois.nic.nf/nf/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.nf/nf/status_available_spec.rb index 59ccbc0d..a97ee2cd 100644 --- a/spec/whois/parsers/responses/whois.nic.nf/nf/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.nf/nf/status_available_spec.rb @@ -9,65 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.nf.rb' -describe Whois::Parsers::WhoisNicNf, "status_available.expected" do +describe "whois.nic.nf", :aggregate_failures do subject do file = fixture("responses", "whois.nic.nf/nf/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.nf") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.nf") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.nf") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.nf/nf/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.nf/nf/status_registered_spec.rb index 6e0954a1..7c14fed7 100644 --- a/spec/whois/parsers/responses/whois.nic.nf/nf/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.nf/nf/status_registered_spec.rb @@ -9,80 +9,40 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.nf.rb' -describe Whois::Parsers::WhoisNicNf, "status_registered.expected" do +describe "whois.nic.nf", :aggregate_failures do subject do file = fixture("responses", "whois.nic.nf/nf/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.nf") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.nf") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("26552-CoCCA") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2005-11-27 11:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-12-06 07:35:49 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-11-27 11:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.nf") + expect(subject.domain_id).to eq("26552-CoCCA") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2005-11-27 11:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-12-06 07:35:49 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-11-27 11:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.online/online/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.online/online/status_available_spec.rb new file mode 100644 index 00000000..6bad803a --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.online/online/status_available_spec.rb @@ -0,0 +1,41 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.online/online/status_available.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.online", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.online/online/status_available.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.online") + Whois::Parser.parser_for(part) + end + + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end +end diff --git a/spec/whois/parsers/responses/whois.nic.online/online/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.online/online/status_registered_spec.rb new file mode 100644 index 00000000..8d5dc995 --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.online/online/status_registered_spec.rb @@ -0,0 +1,97 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.online/online/status_registered.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.online", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.online/online/status_registered.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.online") + Whois::Parser.parser_for(part) + end + + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq("google.online") + expect(subject.domain_id).to eq("D9566483-CNIC") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2015-08-19 11:27:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-08-25 01:16:45 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-08-19 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor, Inc (TLDs)") + expect(subject.registrar.url).to eq("") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq(nil) + expect(subject.admin_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts[0].address).to eq(nil) + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq(nil) + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq(nil) + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq(nil) + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq(nil) + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns3.googledomains.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.googledomains.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns2.googledomains.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.googledomains.com") + end +end diff --git a/spec/whois/parsers/responses/whois.nic.org.uy/uy/property_updated_on_empty_spec.rb b/spec/whois/parsers/responses/whois.nic.org.uy/uy/property_updated_on_empty_spec.rb index 270b556e..71297952 100644 --- a/spec/whois/parsers/responses/whois.nic.org.uy/uy/property_updated_on_empty_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.org.uy/uy/property_updated_on_empty_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.org.uy.rb' -describe Whois::Parsers::WhoisNicOrgUy, "property_updated_on_empty.expected" do +describe "whois.nic.org.uy", :aggregate_failures do subject do file = fixture("responses", "whois.nic.org.uy/uy/property_updated_on_empty.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.org.uy") + Whois::Parser.parser_for(part) end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end + it "matches property_updated_on_empty.expected" do + expect(subject.updated_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.org.uy/uy/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.org.uy/uy/status_available_spec.rb index 49a94d41..703edb0f 100644 --- a/spec/whois/parsers/responses/whois.nic.org.uy/uy/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.org.uy/uy/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.org.uy.rb' -describe Whois::Parsers::WhoisNicOrgUy, "status_available.expected" do +describe "whois.nic.org.uy", :aggregate_failures do subject do file = fixture("responses", "whois.nic.org.uy/uy/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.org.uy") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.org.uy/uy/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.org.uy/uy/status_registered_spec.rb index f84bf4e1..a0d103c2 100644 --- a/spec/whois/parsers/responses/whois.nic.org.uy/uy/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.org.uy/uy/status_registered_spec.rb @@ -9,60 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.org.uy.rb' -describe Whois::Parsers::WhoisNicOrgUy, "status_registered.expected" do +describe "whois.nic.org.uy", :aggregate_failures do subject do file = fixture("responses", "whois.nic.org.uy/uy/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.org.uy") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2012-07-03 20:58:58")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-09-12 02:32:59")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.markmonitor.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns3.markmonitor.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2012-07-03 20:58:58")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-09-12 02:32:59")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.markmonitor.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns3.markmonitor.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.pm/pm/property_nameservers_with_ipv4_and_ipv6_spec.rb b/spec/whois/parsers/responses/whois.nic.pm/pm/property_nameservers_with_ipv4_and_ipv6_spec.rb index c6039463..e1cc5254 100644 --- a/spec/whois/parsers/responses/whois.nic.pm/pm/property_nameservers_with_ipv4_and_ipv6_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.pm/pm/property_nameservers_with_ipv4_and_ipv6_spec.rb @@ -9,32 +9,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.pm.rb' -describe Whois::Parsers::WhoisNicPm, "property_nameservers_with_ipv4_and_ipv6.expected" do +describe "whois.nic.pm", :aggregate_failures do subject do file = fixture("responses", "whois.nic.pm/pm/property_nameservers_with_ipv4_and_ipv6.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.pm") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.nic.fr") - expect(subject.nameservers[0].ipv4).to eq("192.93.0.1") - expect(subject.nameservers[0].ipv6).to eq("2001:660:3005:1::1:1") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.nic.fr") - expect(subject.nameservers[1].ipv4).to eq("192.93.0.4") - expect(subject.nameservers[1].ipv6).to eq("2001:660:3005:1::1:2") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.nic.fr") - expect(subject.nameservers[2].ipv4).to eq("192.134.0.49") - expect(subject.nameservers[2].ipv6).to eq("2001:660:3006:1::1:1") - end + it "matches property_nameservers_with_ipv4_and_ipv6.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.nic.fr") + expect(subject.nameservers[0].ipv4).to eq("192.93.0.1") + expect(subject.nameservers[0].ipv6).to eq("2001:660:3005:1::1:1") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.nic.fr") + expect(subject.nameservers[1].ipv4).to eq("192.93.0.4") + expect(subject.nameservers[1].ipv6).to eq("2001:660:3005:1::1:2") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.nic.fr") + expect(subject.nameservers[2].ipv4).to eq("192.134.0.49") + expect(subject.nameservers[2].ipv6).to eq("2001:660:3006:1::1:1") end end diff --git a/spec/whois/parsers/responses/whois.nic.pm/pm/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.nic.pm/pm/response_throttled_spec.rb index f1cdafff..eafa5e49 100644 --- a/spec/whois/parsers/responses/whois.nic.pm/pm/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.pm/pm/response_throttled_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.pm.rb' -describe Whois::Parsers::WhoisNicPm, "response_throttled.expected" do +describe "whois.nic.pm", :aggregate_failures do subject do file = fixture("responses", "whois.nic.pm/pm/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.pm") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.pm/pm/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.pm/pm/status_available_spec.rb index 95e94427..33ac745c 100644 --- a/spec/whois/parsers/responses/whois.nic.pm/pm/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.pm/pm/status_available_spec.rb @@ -9,68 +9,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.pm.rb' -describe Whois::Parsers::WhoisNicPm, "status_available.expected" do +describe "whois.nic.pm", :aggregate_failures do subject do file = fixture("responses", "whois.nic.pm/pm/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.pm") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.pm/pm/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.pm/pm/status_registered_spec.rb index 39f5fc6d..535b364a 100644 --- a/spec/whois/parsers/responses/whois.nic.pm/pm/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.pm/pm/status_registered_spec.rb @@ -9,116 +9,83 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.pm.rb' -describe Whois::Parsers::WhoisNicPm, "status_registered.expected" do +describe "whois.nic.pm", :aggregate_failures do subject do file = fixture("responses", "whois.nic.pm/pm/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.pm") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1995-01-01")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2016-12-31")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2017-12-31")) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("APEM2-FRNIC") - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("Afnic (Saint-Pierre et Miquelon - CTOM)") - expect(subject.registrant_contacts[0].address).to eq("immeuble international\n2, rue Stephenson\nMontigny-Le-Bretonneux\n78181 Saint Quentin en Yvelines Cedex") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("FR") - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2008-10-09 00:00:00 UTC")) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("NFC1-FRNIC") - expect(subject.admin_contacts[0].name).to eq("NIC France Contact") - expect(subject.admin_contacts[0].organization).to eq("AFNIC") - expect(subject.admin_contacts[0].address).to eq("immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("FR") - expect(subject.admin_contacts[0].phone).to eq("+33 1 39 30 83 00") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2005-08-23 00:00:00 UTC")) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("NFC1-FRNIC") - expect(subject.technical_contacts[0].name).to eq("NIC France Contact") - expect(subject.technical_contacts[0].organization).to eq("AFNIC") - expect(subject.technical_contacts[0].address).to eq("immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("FR") - expect(subject.technical_contacts[0].phone).to eq("+33 1 39 30 83 00") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2005-08-23 00:00:00 UTC")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1994-12-31 23:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2018-12-31 23:33:19 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2019-12-31 23:00:00 UTC")) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("APEM2-FRNIC") + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Afnic (Saint-Pierre et Miquelon - CTOM)") + expect(subject.registrant_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny le Bretonneux") + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("FR") + expect(subject.registrant_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.registrant_contacts[0].fax).to eq("+33 1 39 30 83 01") + expect(subject.registrant_contacts[0].email).to eq("support@afnic.fr") + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2017-07-17 12:39:46 UTC")) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("NFC1-FRNIC") + expect(subject.admin_contacts[0].name).to eq("NIC France Contact") + expect(subject.admin_contacts[0].organization).to eq("AFNIC") + expect(subject.admin_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("FR") + expect(subject.admin_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("hostmaster@nic.fr") + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("NFC1-FRNIC") + expect(subject.technical_contacts[0].name).to eq("NIC France Contact") + expect(subject.technical_contacts[0].organization).to eq("AFNIC") + expect(subject.technical_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("FR") + expect(subject.technical_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("hostmaster@nic.fr") + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.nic.fr") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.nic.fr") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.nic.fr") end end diff --git a/spec/whois/parsers/responses/whois.nic.pr/pr/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.pr/pr/status_available_spec.rb index 60cf6c61..f18ad632 100644 --- a/spec/whois/parsers/responses/whois.nic.pr/pr/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.pr/pr/status_available_spec.rb @@ -9,80 +9,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.pr.rb' -describe Whois::Parsers::WhoisNicPr, "status_available.expected" do +describe "whois.nic.pr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.pr/pr/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.pr") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.pr") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.pr") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.pr/pr/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.pr/pr/status_registered_spec.rb index 200c8aab..25df3cfc 100644 --- a/spec/whois/parsers/responses/whois.nic.pr/pr/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.pr/pr/status_registered_spec.rb @@ -9,90 +9,39 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.pr.rb' -describe Whois::Parsers::WhoisNicPr, "status_registered.expected" do +describe "whois.nic.pr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.pr/pr/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.pr") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.pr") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2005-09-15")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-09-15")) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.pr") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2005-09-15")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-09-15")) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.priv.at/at/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.priv.at/at/status_available_spec.rb index a944eacb..303bbea6 100644 --- a/spec/whois/parsers/responses/whois.nic.priv.at/at/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.priv.at/at/status_available_spec.rb @@ -9,49 +9,22 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.priv.at.rb' -describe Whois::Parsers::WhoisNicPrivAt, "status_available.expected" do +describe "whois.nic.priv.at", :aggregate_failures do subject do file = fixture("responses", "whois.nic.priv.at/at/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.priv.at") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.nic.priv.at/at/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.priv.at/at/status_registered_spec.rb index 51384115..f9423048 100644 --- a/spec/whois/parsers/responses/whois.nic.priv.at/at/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.priv.at/at/status_registered_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.priv.at.rb' -describe Whois::Parsers::WhoisNicPrivAt, "status_registered.expected" do +describe "whois.nic.priv.at", :aggregate_failures do subject do file = fixture("responses", "whois.nic.priv.at/at/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.priv.at") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2002-10-13")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2002-10-13")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.nic.pw/pw/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.pw/pw/status_available_spec.rb index fbb67de8..df5141c8 100644 --- a/spec/whois/parsers/responses/whois.nic.pw/pw/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.pw/pw/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.pw.rb' -describe Whois::Parsers::WhoisNicPw, "status_available.expected" do +describe "whois.nic.pw", :aggregate_failures do subject do file = fixture("responses", "whois.nic.pw/pw/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.pw") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.pw/pw/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.pw/pw/status_registered_spec.rb index bf897d7d..5199c55b 100644 --- a/spec/whois/parsers/responses/whois.nic.pw/pw/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.pw/pw/status_registered_spec.rb @@ -9,165 +9,48 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.pw.rb' -describe Whois::Parsers::WhoisNicPw, "status_registered.expected" do +describe "whois.nic.pw", :aggregate_failures do subject do file = fixture("responses", "whois.nic.pw/pw/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.pw") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("This whois service is provided by CentralNic Ltd and only contains information pertaining to Internet domain names we have registered for our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd https://www.centralnic.com/") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.pw") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("CNIC-DO949924") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientTransferProhibited", "clientUpdateProhibited", "clientDeleteProhibited", "serverTransferProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2012-10-12 10:19:46 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-01-18 00:13:36 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2017-02-10 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("7061-EM") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("MarkMonitor, Inc.") - expect(subject.registrar.url).to eq("http://www.markmonitor.com/") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("H2396041") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin - Google Inc") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6502530001") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("H2396041") - expect(subject.admin_contacts[0].name).to eq("DNS Admin - Google Inc") - expect(subject.admin_contacts[0].organization).to eq("Google Inc") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") - expect(subject.admin_contacts[0].fax).to eq("+1.6502530001") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("H2396041") - expect(subject.technical_contacts[0].name).to eq("DNS Admin - Google Inc") - expect(subject.technical_contacts[0].organization).to eq("Google Inc") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") - expect(subject.technical_contacts[0].fax).to eq("+1.6502530001") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(7) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.markmonitor.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.markmonitor.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.markmonitor.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.markmonitor.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("ns5.markmonitor.com") - expect(subject.nameservers[4].ipv4).to eq(nil) - expect(subject.nameservers[4].ipv6).to eq(nil) - expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[5].name).to eq("ns6.markmonitor.com") - expect(subject.nameservers[5].ipv4).to eq(nil) - expect(subject.nameservers[5].ipv6).to eq(nil) - expect(subject.nameservers[6]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[6].name).to eq("ns7.markmonitor.com") - expect(subject.nameservers[6].ipv4).to eq(nil) - expect(subject.nameservers[6].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq("google.pw") + expect(subject.domain_id).to eq("D949924-CNIC") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2012-10-12 10:19:46 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-02-04 15:18:38 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-02-10 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor, Inc.") + expect(subject.registrar.url).to eq("") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].email).to eq("https://whois.nic.pw/contact/google.pw/registrant") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].email).to eq("https://whois.nic.pw/contact/google.pw/admin") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].email).to eq("https://whois.nic.pw/contact/google.pw/tech") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(0) end end diff --git a/spec/whois/parsers/responses/whois.nic.re/re/property_nameservers_with_ipv4_and_ipv6_spec.rb b/spec/whois/parsers/responses/whois.nic.re/re/property_nameservers_with_ipv4_and_ipv6_spec.rb index 2818c646..d134bebb 100644 --- a/spec/whois/parsers/responses/whois.nic.re/re/property_nameservers_with_ipv4_and_ipv6_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.re/re/property_nameservers_with_ipv4_and_ipv6_spec.rb @@ -9,32 +9,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.re.rb' -describe Whois::Parsers::WhoisNicRe, "property_nameservers_with_ipv4_and_ipv6.expected" do +describe "whois.nic.re", :aggregate_failures do subject do file = fixture("responses", "whois.nic.re/re/property_nameservers_with_ipv4_and_ipv6.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.re") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.nic.fr") - expect(subject.nameservers[0].ipv4).to eq("192.93.0.1") - expect(subject.nameservers[0].ipv6).to eq("2001:660:3005:1::1:1") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.nic.fr") - expect(subject.nameservers[1].ipv4).to eq("192.93.0.4") - expect(subject.nameservers[1].ipv6).to eq("2001:660:3005:1::1:2") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.nic.fr") - expect(subject.nameservers[2].ipv4).to eq("192.134.0.49") - expect(subject.nameservers[2].ipv6).to eq("2001:660:3006:1::1:1") - end + it "matches property_nameservers_with_ipv4_and_ipv6.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.nic.fr") + expect(subject.nameservers[0].ipv4).to eq("192.93.0.1") + expect(subject.nameservers[0].ipv6).to eq("2001:660:3005:1::1:1") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.nic.fr") + expect(subject.nameservers[1].ipv4).to eq("192.93.0.4") + expect(subject.nameservers[1].ipv6).to eq("2001:660:3005:1::1:2") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.nic.fr") + expect(subject.nameservers[2].ipv4).to eq("192.134.0.49") + expect(subject.nameservers[2].ipv6).to eq("2001:660:3006:1::1:1") end end diff --git a/spec/whois/parsers/responses/whois.nic.re/re/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.nic.re/re/response_throttled_spec.rb index 921b4d31..9ee5aeb8 100644 --- a/spec/whois/parsers/responses/whois.nic.re/re/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.re/re/response_throttled_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.re.rb' -describe Whois::Parsers::WhoisNicRe, "response_throttled.expected" do +describe "whois.nic.re", :aggregate_failures do subject do file = fixture("responses", "whois.nic.re/re/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.re") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.re/re/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.re/re/status_available_spec.rb index 7ea29193..58663214 100644 --- a/spec/whois/parsers/responses/whois.nic.re/re/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.re/re/status_available_spec.rb @@ -9,68 +9,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.re.rb' -describe Whois::Parsers::WhoisNicRe, "status_available.expected" do +describe "whois.nic.re", :aggregate_failures do subject do file = fixture("responses", "whois.nic.re/re/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.re") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.re/re/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.re/re/status_registered_spec.rb index 4ef6090d..a7f0e528 100644 --- a/spec/whois/parsers/responses/whois.nic.re/re/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.re/re/status_registered_spec.rb @@ -9,116 +9,83 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.re.rb' -describe Whois::Parsers::WhoisNicRe, "status_registered.expected" do +describe "whois.nic.re", :aggregate_failures do subject do file = fixture("responses", "whois.nic.re/re/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.re") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1995-01-01")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2016-12-31")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2017-12-31")) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("A1967-FRNIC") - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("AFNIC") - expect(subject.registrant_contacts[0].address).to eq("immeuble international\n2, rue Stephenson\nMontigny-Le-Bretonneux\n78181 Saint Quentin en Yvelines") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("FR") - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2009-12-02 00:00:00 UTC")) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("NFC1-FRNIC") - expect(subject.admin_contacts[0].name).to eq("NIC France Contact") - expect(subject.admin_contacts[0].organization).to eq("AFNIC") - expect(subject.admin_contacts[0].address).to eq("immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("FR") - expect(subject.admin_contacts[0].phone).to eq("+33 1 39 30 83 00") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2005-08-23 00:00:00 UTC")) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("NFC1-FRNIC") - expect(subject.technical_contacts[0].name).to eq("NIC France Contact") - expect(subject.technical_contacts[0].organization).to eq("AFNIC") - expect(subject.technical_contacts[0].address).to eq("immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("FR") - expect(subject.technical_contacts[0].phone).to eq("+33 1 39 30 83 00") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2005-08-23 00:00:00 UTC")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1994-12-31 23:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2018-12-31 23:33:19 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2019-12-31 23:00:00 UTC")) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("A1967-FRNIC") + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("AFNIC") + expect(subject.registrant_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny le Bretonneux") + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("FR") + expect(subject.registrant_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.registrant_contacts[0].fax).to eq("+33 1 39 30 83 01") + expect(subject.registrant_contacts[0].email).to eq("support@afnic.fr") + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2017-07-17 12:40:19 UTC")) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("NFC1-FRNIC") + expect(subject.admin_contacts[0].name).to eq("NIC France Contact") + expect(subject.admin_contacts[0].organization).to eq("AFNIC") + expect(subject.admin_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("FR") + expect(subject.admin_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("hostmaster@nic.fr") + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("NFC1-FRNIC") + expect(subject.technical_contacts[0].name).to eq("NIC France Contact") + expect(subject.technical_contacts[0].organization).to eq("AFNIC") + expect(subject.technical_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("FR") + expect(subject.technical_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("hostmaster@nic.fr") + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.nic.fr") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.nic.fr") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.nic.fr") end end diff --git a/spec/whois/parsers/responses/whois.nic.sh/sh/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.sh/sh/status_available_spec.rb index f7b4d6ab..bf1b1cd3 100644 --- a/spec/whois/parsers/responses/whois.nic.sh/sh/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.sh/sh/status_available_spec.rb @@ -9,86 +9,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.sh.rb' -describe Whois::Parsers::WhoisNicSh, "status_available.expected" do +describe "whois.nic.sh", :aggregate_failures do subject do file = fixture("responses", "whois.nic.sh/sh/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.sh") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.sh/sh/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.sh/sh/status_registered_spec.rb index 8db612c7..a190f395 100644 --- a/spec/whois/parsers/responses/whois.nic.sh/sh/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.sh/sh/status_registered_spec.rb @@ -9,113 +9,57 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.sh.rb' -describe Whois::Parsers::WhoisNicSh, "status_registered.expected" do +describe "whois.nic.sh", :aggregate_failures do subject do file = fixture("responses", "whois.nic.sh/sh/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.sh") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.sh") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D503300000040555710-LRMS") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1999-06-07 17:23:46 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2019-05-05 09:40:45 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2020-06-06 17:23:46 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.organization).to eq("MarkMonitor Inc.") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("google.sh") + expect(subject.domain_id).to eq("D503300000040555710-LRMS") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1999-06-07 17:23:46 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2019-05-05 09:40:45 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-06-06 17:23:46 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.sl/sl/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.sl/sl/status_available_spec.rb index ee3f56c6..2cffe5af 100644 --- a/spec/whois/parsers/responses/whois.nic.sl/sl/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.sl/sl/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.sl.rb' -describe Whois::Parsers::WhoisNicSl, "status_available.expected" do +describe "whois.nic.sl", :aggregate_failures do subject do file = fixture("responses", "whois.nic.sl/sl/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.sl") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.sl/sl/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.sl/sl/status_registered_spec.rb index 73ccfbb2..5b6b7305 100644 --- a/spec/whois/parsers/responses/whois.nic.sl/sl/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.sl/sl/status_registered_spec.rb @@ -9,60 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.sl.rb' -describe Whois::Parsers::WhoisNicSl, "status_registered.expected" do +describe "whois.nic.sl", :aggregate_failures do subject do file = fixture("responses", "whois.nic.sl/sl/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.sl") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2008-05-18")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2011-05-18")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2008-05-18")) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2011-05-18")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.sm/sm/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.sm/sm/status_available_spec.rb index b0cc18bb..65544449 100644 --- a/spec/whois/parsers/responses/whois.nic.sm/sm/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.sm/sm/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.sm.rb' -describe Whois::Parsers::WhoisNicSm, "status_available.expected" do +describe "whois.nic.sm", :aggregate_failures do subject do file = fixture("responses", "whois.nic.sm/sm/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.sm") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.sm/sm/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.sm/sm/status_registered_spec.rb index 0047986b..dba373d2 100644 --- a/spec/whois/parsers/responses/whois.nic.sm/sm/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.sm/sm/status_registered_spec.rb @@ -9,60 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.sm.rb' -describe Whois::Parsers::WhoisNicSm, "status_registered.expected" do +describe "whois.nic.sm", :aggregate_failures do subject do file = fixture("responses", "whois.nic.sm/sm/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.sm") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-04-03 00:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2008-08-01 00:00:00 UTC")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-04-03 00:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2008-08-01 00:00:00 UTC")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.sn/sn/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.sn/sn/status_available_spec.rb index d5f83213..eb36e477 100644 --- a/spec/whois/parsers/responses/whois.nic.sn/sn/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.sn/sn/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.sn.rb' -describe Whois::Parsers::WhoisNicSn, "status_available.expected" do +describe "whois.nic.sn", :aggregate_failures do subject do file = fixture("responses", "whois.nic.sn/sn/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.sn") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.sn") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("u34jedzcq.sn") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.sn/sn/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.sn/sn/status_registered_spec.rb index ce62fb76..32ce9166 100644 --- a/spec/whois/parsers/responses/whois.nic.sn/sn/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.sn/sn/status_registered_spec.rb @@ -9,111 +9,56 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.sn.rb' -describe Whois::Parsers::WhoisNicSn, "status_registered.expected" do +describe "whois.nic.sn", :aggregate_failures do subject do file = fixture("responses", "whois.nic.sn/sn/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.sn") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.sn") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2008-05-08 17:59:38")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("registry") - expect(subject.registrar.name).to eq("registry") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("C4-SN") - expect(subject.registrant_contacts[0].name).to eq("C4-SN") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("C5-SN") - expect(subject.admin_contacts[0].name).to eq("C5-SN") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("C6-SN") - expect(subject.technical_contacts[0].name).to eq("C6-SN") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("google.sn") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2008-05-08 17:59:38")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("registry") + expect(subject.registrar.name).to eq("registry") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("C4-SN") + expect(subject.registrant_contacts[0].name).to eq("C4-SN") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("C5-SN") + expect(subject.admin_contacts[0].name).to eq("C5-SN") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("C6-SN") + expect(subject.technical_contacts[0].name).to eq("C6-SN") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.so/so/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.so/so/status_available_spec.rb index c2bc1453..da969214 100644 --- a/spec/whois/parsers/responses/whois.nic.so/so/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.so/so/status_available_spec.rb @@ -9,50 +9,24 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.so.rb' -describe Whois::Parsers::WhoisNicSo, "status_available.expected" do +describe "whois.nic.so", :aggregate_failures do subject do file = fixture("responses", "whois.nic.so/so/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.so") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.so") + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.so/so/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.so/so/status_registered_spec.rb index b524c885..2585c97d 100644 --- a/spec/whois/parsers/responses/whois.nic.so/so/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.so/so/status_registered_spec.rb @@ -9,61 +9,82 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.so.rb' -describe Whois::Parsers::WhoisNicSo, "status_registered.expected" do +describe "whois.nic.so", :aggregate_failures do subject do file = fixture("responses", "whois.nic.so/so/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.so") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(["serverDeleteProhibited", "serverTransferProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2011-01-24 02:22:24 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2011-01-25 04:20:26 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-01-24 02:22:24 UTC")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.so") + expect(subject.domain_id).to eq("34544-sonic") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2011-01-24 00:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2022-12-23 09:26:14 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2024-01-24 00:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.name).to eq("Mark Monitor") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("CAKlg-SfRgX") + expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") + expect(subject.registrant_contacts[0].fax).to eq("+1.6502530001") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("ns66c-kLSXy") + expect(subject.admin_contacts[0].name).to eq("Domain Administrator") + expect(subject.admin_contacts[0].organization).to eq("Google LLC") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") + expect(subject.admin_contacts[0].fax).to eq("+1.6502530001") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts[0].id).to eq("J8ANM-4ZMch") + expect(subject.technical_contacts[0].name).to eq("Domain Administrator") + expect(subject.technical_contacts[0].organization).to eq("Google LLC") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") + expect(subject.technical_contacts[0].fax).to eq("+1.6502530001") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.space/space/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.space/space/status_available_spec.rb index 2bd0a87c..917dc0e7 100644 --- a/spec/whois/parsers/responses/whois.nic.space/space/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.space/space/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.space.rb' -describe Whois::Parsers::WhoisNicSpace, "status_available.expected" do +describe "whois.nic.space", :aggregate_failures do subject do file = fixture("responses", "whois.nic.space/space/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.space") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.space/space/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.space/space/status_registered_spec.rb index 72f72354..3129bc08 100644 --- a/spec/whois/parsers/responses/whois.nic.space/space/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.space/space/status_registered_spec.rb @@ -9,155 +9,86 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.space.rb' -describe Whois::Parsers::WhoisNicSpace, "status_registered.expected" do +describe "whois.nic.space", :aggregate_failures do subject do file = fixture("responses", "whois.nic.space/space/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.space") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to the whois service is rate limited. For more information, please see https://registrar-console.centralnic.com/pub/whois_guidance.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("nic.space") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D2361836-CNIC") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok https://icann.org/epp#ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2014-04-10T09:14:07.0Z")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2015-04-04T00:14:21.0Z")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2016-04-10T23:59:59.0Z")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("9999") - expect(subject.registrar.name).to eq("CentralNic Ltd") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("C11480") - expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") - expect(subject.registrant_contacts[0].organization).to eq("CentralNic Ltd") - expect(subject.registrant_contacts[0].address).to eq("35-39 Moorgate") - expect(subject.registrant_contacts[0].city).to eq("London") - expect(subject.registrant_contacts[0].zip).to eq("EC2R 6AR") - expect(subject.registrant_contacts[0].state).to eq("") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("GB") - expect(subject.registrant_contacts[0].phone).to eq("+44.2033880600") - expect(subject.registrant_contacts[0].fax).to eq("+44.2033880601") - expect(subject.registrant_contacts[0].email).to eq("domains@centralnic.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("C11480") - expect(subject.admin_contacts[0].name).to eq("Domain Administrator") - expect(subject.admin_contacts[0].organization).to eq("CentralNic Ltd") - expect(subject.admin_contacts[0].address).to eq("35-39 Moorgate") - expect(subject.admin_contacts[0].city).to eq("London") - expect(subject.admin_contacts[0].zip).to eq("EC2R 6AR") - expect(subject.admin_contacts[0].state).to eq("") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("GB") - expect(subject.admin_contacts[0].phone).to eq("+44.2033880600") - expect(subject.admin_contacts[0].fax).to eq("+44.2033880601") - expect(subject.admin_contacts[0].email).to eq("domains@centralnic.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("C11480") - expect(subject.technical_contacts[0].name).to eq("Domain Administrator") - expect(subject.technical_contacts[0].organization).to eq("CentralNic Ltd") - expect(subject.technical_contacts[0].address).to eq("35-39 Moorgate") - expect(subject.technical_contacts[0].city).to eq("London") - expect(subject.technical_contacts[0].zip).to eq("EC2R 6AR") - expect(subject.technical_contacts[0].state).to eq("") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("GB") - expect(subject.technical_contacts[0].phone).to eq("+44.2033880600") - expect(subject.technical_contacts[0].fax).to eq("+44.2033880601") - expect(subject.technical_contacts[0].email).to eq("domains@centralnic.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(6) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns0.centralnic-dns.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.centralnic-dns.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.centralnic-dns.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns3.centralnic-dns.com") - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("ns4.centralnic-dns.com") - expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[5].name).to eq("ns5.centralnic-dns.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq("nic.space") + expect(subject.domain_id).to eq("D2361836-CNIC") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2014-04-10 09:14:07 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-06-01 11:38:04 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-04-10 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("9999") + expect(subject.registrar.name).to eq("CentralNic Ltd") + expect(subject.registrar.url).to eq("https://www.centralnic.com/") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") + expect(subject.registrant_contacts[0].organization).to eq("CentralNic Ltd") + expect(subject.registrant_contacts[0].address).to eq("35-39 Moorgate") + expect(subject.registrant_contacts[0].city).to eq("London") + expect(subject.registrant_contacts[0].zip).to eq("EC2R 6AR") + expect(subject.registrant_contacts[0].state).to eq("") + expect(subject.registrant_contacts[0].country_code).to eq("GB") + expect(subject.registrant_contacts[0].phone).to eq("+44.2033880600") + expect(subject.registrant_contacts[0].fax).to eq("+44.2033880601") + expect(subject.registrant_contacts[0].email).to eq("domains@centralnic.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("Domain Administrator") + expect(subject.admin_contacts[0].organization).to eq("CentralNic Ltd") + expect(subject.admin_contacts[0].address).to eq("35-39 Moorgate") + expect(subject.admin_contacts[0].city).to eq("London") + expect(subject.admin_contacts[0].zip).to eq("EC2R 6AR") + expect(subject.admin_contacts[0].state).to eq("") + expect(subject.admin_contacts[0].country_code).to eq("GB") + expect(subject.admin_contacts[0].phone).to eq("+44.2033880600") + expect(subject.admin_contacts[0].fax).to eq("+44.2033880601") + expect(subject.admin_contacts[0].email).to eq("domains@centralnic.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Domain Administrator") + expect(subject.technical_contacts[0].organization).to eq("CentralNic Ltd") + expect(subject.technical_contacts[0].address).to eq("35-39 Moorgate") + expect(subject.technical_contacts[0].city).to eq("London") + expect(subject.technical_contacts[0].zip).to eq("EC2R 6AR") + expect(subject.technical_contacts[0].state).to eq("") + expect(subject.technical_contacts[0].country_code).to eq("GB") + expect(subject.technical_contacts[0].phone).to eq("+44.2033880600") + expect(subject.technical_contacts[0].fax).to eq("+44.2033880601") + expect(subject.technical_contacts[0].email).to eq("domains@centralnic.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("a.nic.space") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("b.nic.space") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("e.nic.space") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("f.nic.space") end end diff --git a/spec/whois/parsers/responses/whois.nic.st/st/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.st/st/status_available_spec.rb index 560053b5..22e2ee98 100644 --- a/spec/whois/parsers/responses/whois.nic.st/st/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.st/st/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.st.rb' -describe Whois::Parsers::WhoisNicSt, "status_available.expected" do +describe "whois.nic.st", :aggregate_failures do subject do file = fixture("responses", "whois.nic.st/st/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.st") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.st/st/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.st/st/status_registered_spec.rb index c7421cdf..729317d0 100644 --- a/spec/whois/parsers/responses/whois.nic.st/st/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.st/st/status_registered_spec.rb @@ -9,61 +9,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.st.rb' -describe Whois::Parsers::WhoisNicSt, "status_registered.expected" do +describe "whois.nic.st", :aggregate_failures do subject do file = fixture("responses", "whois.nic.st/st/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.st") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2004-06-15")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2017-05-14")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2018-06-15")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns3.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns4.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2004-06-15")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2017-05-14")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2018-06-15")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns3.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns4.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.systems/systems/status_available_premium_spec.rb b/spec/whois/parsers/responses/whois.nic.systems/systems/status_available_premium_spec.rb new file mode 100644 index 00000000..a446c370 --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.systems/systems/status_available_premium_spec.rb @@ -0,0 +1,40 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.systems/systems/status_available_premium.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.systems", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.systems/systems/status_available_premium.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.systems") + Whois::Parser.parser_for(part) + end + + it "matches status_available_premium.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end +end diff --git a/spec/whois/parsers/responses/whois.nic.systems/systems/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.systems/systems/status_available_spec.rb new file mode 100644 index 00000000..46a2b3a3 --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.systems/systems/status_available_spec.rb @@ -0,0 +1,40 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.systems/systems/status_available.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.systems", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.systems/systems/status_available.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.systems") + Whois::Parser.parser_for(part) + end + + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end +end diff --git a/spec/whois/parsers/responses/whois.nic.systems/systems/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.systems/systems/status_registered_spec.rb new file mode 100644 index 00000000..31917e50 --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.systems/systems/status_registered_spec.rb @@ -0,0 +1,93 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.systems/systems/status_registered.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.systems", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.systems/systems/status_registered.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.systems") + Whois::Parser.parser_for(part) + end + + it "matches status_registered.expected" do + expect(subject.domain).to eq("donuts.systems") + expect(subject.domain_id).to eq("c73f4743486e4a1d8cb725fe0b0d26d7-DONUTS") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2014-02-28 17:19:53 GMT")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2018-02-07 18:00:53 GMT")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2024-02-28 17:19:53 GMT")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("9998") + expect(subject.registrar.name).to eq("Donuts Internal (9998)") + expect(subject.registrar.url).to eq("https://identity.digital") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].organization).to eq("Donuts Inc.") + expect(subject.registrant_contacts[0].address).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].state).to eq("WA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].address).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].address).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns-1501.awsdns-59.org") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns-380.awsdns-47.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns-811.awsdns-37.net") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns-1597.awsdns-07.co.uk") + end +end diff --git a/spec/whois/parsers/responses/whois.nic.systems/systems/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.nic.systems/systems/status_reserved_spec.rb new file mode 100644 index 00000000..8cc15734 --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.systems/systems/status_reserved_spec.rb @@ -0,0 +1,40 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.systems/systems/status_reserved.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.systems", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.systems/systems/status_reserved.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.systems") + Whois::Parser.parser_for(part) + end + + it "matches status_reserved.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end +end diff --git a/spec/whois/parsers/responses/whois.nic.tc/tc/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.tc/tc/status_available_spec.rb index 1be917ce..43996baf 100644 --- a/spec/whois/parsers/responses/whois.nic.tc/tc/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tc/tc/status_available_spec.rb @@ -9,65 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tc.rb' -describe Whois::Parsers::WhoisNicTc, "status_available.expected" do +describe "whois.nic.tc", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tc/tc/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tc") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.tc") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.tc") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.tc/tc/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.tc/tc/status_registered_spec.rb index f96a4ae4..14d5fe10 100644 --- a/spec/whois/parsers/responses/whois.nic.tc/tc/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tc/tc/status_registered_spec.rb @@ -9,79 +9,39 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tc.rb' -describe Whois::Parsers::WhoisNicTc, "status_registered.expected" do +describe "whois.nic.tc", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tc/tc/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tc") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.tc") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-10-11 21:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-10-12 21:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.tc") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-10-11 21:00:00 UTC")) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-10-12 21:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.tech/tech/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.tech/tech/status_available_spec.rb index 3055dd22..167cef21 100644 --- a/spec/whois/parsers/responses/whois.nic.tech/tech/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tech/tech/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tech.rb' -describe Whois::Parsers::WhoisNicTech, "status_available.expected" do +describe "whois.nic.tech", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tech/tech/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tech") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.tech/tech/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.tech/tech/status_registered_spec.rb index 04916cd6..3bf8ff86 100644 --- a/spec/whois/parsers/responses/whois.nic.tech/tech/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tech/tech/status_registered_spec.rb @@ -9,153 +9,75 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tech.rb' -describe Whois::Parsers::WhoisNicTech, "status_registered.expected" do +describe "whois.nic.tech", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tech/tech/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tech") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to the whois service is rate limited. For more information, please see https://registrar-console.centralnic.com/pub/whois_guidance.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.tech") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D9157622-CNIC") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["serverTransferProhibited https://icann.org/epp#serverTransferProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited", "clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2015-07-29 00:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2015-08-04 09:00:43 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2017-07-29 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor, Inc (TLDs)") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("mmr-87489") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6502530001") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("mmr-87489") - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") - expect(subject.admin_contacts[0].fax).to eq("+1.6502530001") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("mmr-87489") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") - expect(subject.technical_contacts[0].fax).to eq("+1.6502530001") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns4.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns1.google.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq("google.tech") + expect(subject.domain_id).to eq("D9157622-CNIC") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2015-07-29 14:20:05 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-08-25 01:16:43 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-07-29 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor, Inc (TLDs)") + expect(subject.registrar.url).to eq("") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns4.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns1.google.com") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.tel/tel/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.tel/tel/status_available_spec.rb index fa385309..36dd9387 100644 --- a/spec/whois/parsers/responses/whois.nic.tel/tel/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tel/tel/status_available_spec.rb @@ -9,83 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tel.rb' -describe Whois::Parsers::WhoisNicTel, "status_available.expected" do +describe "whois.nic.tel", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tel/tel/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tel") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.tel") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(nil) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.tel") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(nil) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.tel/tel/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.tel/tel/status_registered_spec.rb index 90a83b90..a2518eb0 100644 --- a/spec/whois/parsers/responses/whois.nic.tel/tel/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tel/tel/status_registered_spec.rb @@ -9,140 +9,89 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tel.rb' -describe Whois::Parsers::WhoisNicTel, "status_registered.expected" do +describe "whois.nic.tel", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tel/tel/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tel") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.tel") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D587349-TEL") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientDeleteProhibited", "clientTransferProhibited", "clientUpdateProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2009-03-23 23:59:59 GMT")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-02-19 10:23:33 GMT")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-03-22 23:59:59 GMT")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MARKMONITOR, INC.") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("MMR-2383") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country).to eq("United States") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6506188571") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("MMR-2383") - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country).to eq("United States") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") - expect(subject.admin_contacts[0].fax).to eq("+1.6506188571") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("MMR-2383") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country).to eq("United States") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") - expect(subject.technical_contacts[0].fax).to eq("+1.6506188571") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(5) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("a0.cth.dns.nic.tel") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("d0.cth.dns.nic.tel") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("n0.cth.dns.nic.tel") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("s0.cth.dns.nic.tel") - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("t0.cth.dns.nic.tel") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.tel") + expect(subject.domain_id).to eq("D587349-TEL") + expect(subject.status).to eq(["clientDeleteProhibited", "clientTransferProhibited", "clientUpdateProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2009-03-23 23:59:59 GMT")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-02-19 10:23:33 GMT")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-03-22 23:59:59 GMT")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MARKMONITOR, INC.") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("MMR-2383") + expect(subject.registrant_contacts[0].name).to eq("DNS Admin") + expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country).to eq("United States") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") + expect(subject.registrant_contacts[0].fax).to eq("+1.6506188571") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("MMR-2383") + expect(subject.admin_contacts[0].name).to eq("DNS Admin") + expect(subject.admin_contacts[0].organization).to eq("Google Inc.") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country).to eq("United States") + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") + expect(subject.admin_contacts[0].fax).to eq("+1.6506188571") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("MMR-2383") + expect(subject.technical_contacts[0].name).to eq("DNS Admin") + expect(subject.technical_contacts[0].organization).to eq("Google Inc.") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country).to eq("United States") + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") + expect(subject.technical_contacts[0].fax).to eq("+1.6506188571") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(5) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("a0.cth.dns.nic.tel") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("d0.cth.dns.nic.tel") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("n0.cth.dns.nic.tel") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("s0.cth.dns.nic.tel") + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("t0.cth.dns.nic.tel") end end diff --git a/spec/whois/parsers/responses/whois.nic.tl/tl/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.tl/tl/status_available_spec.rb index 689ce741..d207c3f7 100644 --- a/spec/whois/parsers/responses/whois.nic.tl/tl/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tl/tl/status_available_spec.rb @@ -9,65 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tl.rb' -describe Whois::Parsers::WhoisNicTl, "status_available.expected" do +describe "whois.nic.tl", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tl/tl/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tl") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.tl") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.tl") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.tl/tl/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.tl/tl/status_registered_spec.rb index da594605..255381ca 100644 --- a/spec/whois/parsers/responses/whois.nic.tl/tl/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tl/tl/status_registered_spec.rb @@ -9,76 +9,36 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tl.rb' -describe Whois::Parsers::WhoisNicTl, "status_registered.expected" do +describe "whois.nic.tl", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tl/tl/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tl") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.tl") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("19785-CoCCA") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-05-23 12:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-12-06 07:41:57 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-05-23 12:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.tl") + expect(subject.domain_id).to eq("19785-CoCCA") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-05-23 12:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-12-06 07:41:57 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-05-23 12:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.tm/tm/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.tm/tm/status_available_spec.rb index a4ca436d..75d50b52 100644 --- a/spec/whois/parsers/responses/whois.nic.tm/tm/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tm/tm/status_available_spec.rb @@ -9,86 +9,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tm.rb' -describe Whois::Parsers::WhoisNicTm, "status_available.expected" do +describe "whois.nic.tm", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tm/tm/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tm") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.tm") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("u34jedzcq.tm") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.tm/tm/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.tm/tm/status_registered_spec.rb index 6d69a07c..222ee98b 100644 --- a/spec/whois/parsers/responses/whois.nic.tm/tm/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tm/tm/status_registered_spec.rb @@ -9,95 +9,40 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tm.rb' -describe Whois::Parsers::WhoisNicTm, "status_registered.expected" do +describe "whois.nic.tm", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tm/tm/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tm") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.tm") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2020-01-30")) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("google.tm") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-01-30")) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.tr/tr/property_nameservers_with_ip_spec.rb b/spec/whois/parsers/responses/whois.nic.tr/tr/property_nameservers_with_ip_spec.rb index e5103df4..b187d889 100644 --- a/spec/whois/parsers/responses/whois.nic.tr/tr/property_nameservers_with_ip_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tr/tr/property_nameservers_with_ip_spec.rb @@ -9,29 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tr.rb' -describe Whois::Parsers::WhoisNicTr, "property_nameservers_with_ip.expected" do +describe "whois.nic.tr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tr/tr/property_nameservers_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tr") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("titan.radore.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("janus.radore.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("mimas.rh.com.tr") - expect(subject.nameservers[2].ipv4).to eq("77.75.34.2") - end + it "matches property_nameservers_with_ip.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("titan.radore.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("janus.radore.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("mimas.rh.com.tr") + expect(subject.nameservers[2].ipv4).to eq("77.75.34.2") end end diff --git a/spec/whois/parsers/responses/whois.nic.tr/tr/property_nameservers_with_trailing_space_spec.rb b/spec/whois/parsers/responses/whois.nic.tr/tr/property_nameservers_with_trailing_space_spec.rb index 4bb225f5..e155513e 100644 --- a/spec/whois/parsers/responses/whois.nic.tr/tr/property_nameservers_with_trailing_space_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tr/tr/property_nameservers_with_trailing_space_spec.rb @@ -9,24 +9,21 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tr.rb' -describe Whois::Parsers::WhoisNicTr, "property_nameservers_with_trailing_space.expected" do +describe "whois.nic.tr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tr/tr/property_nameservers_with_trailing_space.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tr") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.phpsunucu.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.phpsunucu.com") - end + it "matches property_nameservers_with_trailing_space.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.phpsunucu.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.phpsunucu.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.tr/tr/property_registrant_contact_outside_cityinoneline_spec.rb b/spec/whois/parsers/responses/whois.nic.tr/tr/property_registrant_contact_outside_cityinoneline_spec.rb index 9a3821c7..1c39ef9c 100644 --- a/spec/whois/parsers/responses/whois.nic.tr/tr/property_registrant_contact_outside_cityinoneline_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tr/tr/property_registrant_contact_outside_cityinoneline_spec.rb @@ -9,34 +9,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tr.rb' -describe Whois::Parsers::WhoisNicTr, "property_registrant_contact_outside_cityinoneline.expected" do +describe "whois.nic.tr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tr/tr/property_registrant_contact_outside_cityinoneline.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tr") + Whois::Parser.parser_for(part) end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Yahoo Ýnc.") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("701 First Avenue Sunnyvale Ca 94089") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq("United States of America") - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq("+ 901-408-3493300-") - expect(subject.registrant_contacts[0].fax).to eq("+ 901-408-3493301") - expect(subject.registrant_contacts[0].email).to eq("domainadmin@yahoo-inc.com") - end + it "matches property_registrant_contact_outside_cityinoneline.expected" do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Yahoo Ýnc.") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("701 First Avenue Sunnyvale Ca 94089") + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq("United States of America") + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq("+ 901-408-3493300-") + expect(subject.registrant_contacts[0].fax).to eq("+ 901-408-3493301") + expect(subject.registrant_contacts[0].email).to eq("domainadmin@yahoo-inc.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.tr/tr/property_registrant_contact_outside_citynextline_spec.rb b/spec/whois/parsers/responses/whois.nic.tr/tr/property_registrant_contact_outside_citynextline_spec.rb index 23735edf..bbe02fc2 100644 --- a/spec/whois/parsers/responses/whois.nic.tr/tr/property_registrant_contact_outside_citynextline_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tr/tr/property_registrant_contact_outside_citynextline_spec.rb @@ -9,34 +9,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tr.rb' -describe Whois::Parsers::WhoisNicTr, "property_registrant_contact_outside_citynextline.expected" do +describe "whois.nic.tr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tr/tr/property_registrant_contact_outside_citynextline.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tr") + Whois::Parser.parser_for(part) end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Google Inc.") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway\nMountain View CA") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq("United States of America") - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq("+ 1-650-2530000-") - expect(subject.registrant_contacts[0].fax).to eq("+ 1-650-2530001-") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - end + it "matches property_registrant_contact_outside_citynextline.expected" do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Google Inc.") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway\nMountain View CA") + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq("United States of America") + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq("+ 1-650-2530000-") + expect(subject.registrant_contacts[0].fax).to eq("+ 1-650-2530001-") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.tr/tr/property_registrant_contact_turkey_spec.rb b/spec/whois/parsers/responses/whois.nic.tr/tr/property_registrant_contact_turkey_spec.rb index d639026a..75d4e959 100644 --- a/spec/whois/parsers/responses/whois.nic.tr/tr/property_registrant_contact_turkey_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tr/tr/property_registrant_contact_turkey_spec.rb @@ -9,34 +9,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tr.rb' -describe Whois::Parsers::WhoisNicTr, "property_registrant_contact_turkey.expected" do +describe "whois.nic.tr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tr/tr/property_registrant_contact_turkey.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tr") + Whois::Parser.parser_for(part) end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Hotel Bilgisayar Hizmetleri San. Tic. Turizm Ltd. Þti.") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("Cumhuriyet Cd. No:61 Bingül Han Asma Kat\nElmadað") - expect(subject.registrant_contacts[0].city).to eq("Ýstanbul") - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq("Türkiye") - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq("+ 90-212-2473997-") - expect(subject.registrant_contacts[0].fax).to eq("+ 90-212-2473995") - expect(subject.registrant_contacts[0].email).to eq("romeo6860@yahoo.com") - end + it "matches property_registrant_contact_turkey.expected" do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Hotel Bilgisayar Hizmetleri San. Tic. Turizm Ltd. Þti.") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("Cumhuriyet Cd. No:61 Bingül Han Asma Kat\nElmadað") + expect(subject.registrant_contacts[0].city).to eq("Ýstanbul") + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq("Türkiye") + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq("+ 90-212-2473997-") + expect(subject.registrant_contacts[0].fax).to eq("+ 90-212-2473995") + expect(subject.registrant_contacts[0].email).to eq("romeo6860@yahoo.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.tr/tr/response_error_invalid_input_spec.rb b/spec/whois/parsers/responses/whois.nic.tr/tr/response_error_invalid_input_spec.rb index 7e79e02f..75f6d817 100644 --- a/spec/whois/parsers/responses/whois.nic.tr/tr/response_error_invalid_input_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tr/tr/response_error_invalid_input_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tr.rb' -describe Whois::Parsers::WhoisNicTr, "response_error_invalid_input.expected" do +describe "whois.nic.tr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tr/tr/response_error_invalid_input.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tr") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:invalid) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches response_error_invalid_input.expected" do + expect(subject.status).to eq(:invalid) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.tr/tr/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.tr/tr/status_available_spec.rb index d8f983e1..bcfa8dc7 100644 --- a/spec/whois/parsers/responses/whois.nic.tr/tr/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tr/tr/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tr.rb' -describe Whois::Parsers::WhoisNicTr, "status_available.expected" do +describe "whois.nic.tr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tr/tr/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tr") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect { subject.domain }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect { subject.domain }.to raise_error(Whois::AttributeNotSupported) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.tr/tr/status_invalid_spec.rb b/spec/whois/parsers/responses/whois.nic.tr/tr/status_invalid_spec.rb index b7fa2ff7..c6d2c3c0 100644 --- a/spec/whois/parsers/responses/whois.nic.tr/tr/status_invalid_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tr/tr/status_invalid_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tr.rb' -describe Whois::Parsers::WhoisNicTr, "status_invalid.expected" do +describe "whois.nic.tr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tr/tr/status_invalid.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tr") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect { subject.domain }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:invalid) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_invalid.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect { subject.domain }.to raise_error(Whois::AttributeNotSupported) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:invalid) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.tr/tr/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.tr/tr/status_registered_spec.rb index 01c0caba..7d0798a5 100644 --- a/spec/whois/parsers/responses/whois.nic.tr/tr/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.tr/tr/status_registered_spec.rb @@ -9,140 +9,85 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.tr.rb' -describe Whois::Parsers::WhoisNicTr, "status_registered.expected" do +describe "whois.nic.tr", :aggregate_failures do subject do file = fixture("responses", "whois.nic.tr/tr/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.tr") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect { subject.domain }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2001-08-23 00:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-08-22 00:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Google Inc.") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway\nMountain View CA") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq("United States of America") - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq("+ 1-650-2530000-") - expect(subject.registrant_contacts[0].fax).to eq("+ 1-650-2530001-") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("mi154-metu") - expect(subject.admin_contacts[0].name).to eq(nil) - expect(subject.admin_contacts[0].organization).to eq("MarkMonitor, Inc") - expect(subject.admin_contacts[0].address).to eq("Hidden upon user request") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq("Hidden upon user request") - expect(subject.admin_contacts[0].fax).to eq("Hidden upon user request") - expect(subject.admin_contacts[0].email).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("btl1-metu") - expect(subject.technical_contacts[0].name).to eq(nil) - expect(subject.technical_contacts[0].organization).to eq("BERÝL TEKNOLOJÝ LTD. ÞTÝ.") - expect(subject.technical_contacts[0].address).to eq("Ceyhun Atuf Kansu Cad. Bayraktar Ýþ Merkezi\nNo:114 G-4 Balgat\nAnkara,06520\nTürkiye") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq("+ 90-312-4733035-") - expect(subject.technical_contacts[0].fax).to eq("+ 90-312-4733039-") - expect(subject.technical_contacts[0].email).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect { subject.domain }.to raise_error(Whois::AttributeNotSupported) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2001-08-23 00:00:00 UTC")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-08-22 00:00:00 UTC")) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Google Inc.") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway\nMountain View CA") + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq("United States of America") + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq("+ 1-650-2530000-") + expect(subject.registrant_contacts[0].fax).to eq("+ 1-650-2530001-") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("mi154-metu") + expect(subject.admin_contacts[0].name).to eq(nil) + expect(subject.admin_contacts[0].organization).to eq("MarkMonitor, Inc") + expect(subject.admin_contacts[0].address).to eq("Hidden upon user request") + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq("Hidden upon user request") + expect(subject.admin_contacts[0].fax).to eq("Hidden upon user request") + expect(subject.admin_contacts[0].email).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("btl1-metu") + expect(subject.technical_contacts[0].name).to eq(nil) + expect(subject.technical_contacts[0].organization).to eq("BERÝL TEKNOLOJÝ LTD. ÞTÝ.") + expect(subject.technical_contacts[0].address).to eq("Ceyhun Atuf Kansu Cad. Bayraktar Ýþ Merkezi\nNo:114 G-4 Balgat\nAnkara,06520\nTürkiye") + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq("+ 90-312-4733035-") + expect(subject.technical_contacts[0].fax).to eq("+ 90-312-4733039-") + expect(subject.technical_contacts[0].email).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.travel/travel/property_status_multiple_spec.rb b/spec/whois/parsers/responses/whois.nic.travel/travel/property_status_multiple_spec.rb deleted file mode 100644 index bff66f3e..00000000 --- a/spec/whois/parsers/responses/whois.nic.travel/travel/property_status_multiple_spec.rb +++ /dev/null @@ -1,27 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.nic.travel/travel/property_status_multiple.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.nic.travel.rb' - -describe Whois::Parsers::WhoisNicTravel, "property_status_multiple.expected" do - - subject do - file = fixture("responses", "whois.nic.travel/travel/property_status_multiple.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(["clientDeleteProhibited", "clientTransferProhibited"]) - end - end -end diff --git a/spec/whois/parsers/responses/whois.nic.travel/travel/property_status_single_spec.rb b/spec/whois/parsers/responses/whois.nic.travel/travel/property_status_single_spec.rb deleted file mode 100644 index 14187fff..00000000 --- a/spec/whois/parsers/responses/whois.nic.travel/travel/property_status_single_spec.rb +++ /dev/null @@ -1,27 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.nic.travel/travel/property_status_single.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.nic.travel.rb' - -describe Whois::Parsers::WhoisNicTravel, "property_status_single.expected" do - - subject do - file = fixture("responses", "whois.nic.travel/travel/property_status_single.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end -end diff --git a/spec/whois/parsers/responses/whois.nic.travel/travel/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.travel/travel/status_available_spec.rb index 466f4779..0ecc5662 100644 --- a/spec/whois/parsers/responses/whois.nic.travel/travel/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.travel/travel/status_available_spec.rb @@ -9,83 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.travel.rb' -describe Whois::Parsers::WhoisNicTravel, "status_available.expected" do +describe "whois.nic.travel", :aggregate_failures do subject do file = fixture("responses", "whois.nic.travel/travel/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.travel") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.travel") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(nil) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.travel/travel/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.travel/travel/status_registered_spec.rb index 2770060f..b3ba26a9 100644 --- a/spec/whois/parsers/responses/whois.nic.travel/travel/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.travel/travel/status_registered_spec.rb @@ -9,134 +9,85 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.travel.rb' -describe Whois::Parsers::WhoisNicTravel, "status_registered.expected" do +describe "whois.nic.travel", :aggregate_failures do subject do file = fixture("responses", "whois.nic.travel/travel/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.travel") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("travel.travel") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D24096-TRAVEL") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2005-10-04 21:44:27 GMT")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-09-18 15:13:32 GMT")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2021-10-03 23:59:59 GMT")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("NEUSTAR GATEWAY") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("TRALLIANCE") - expect(subject.registrant_contacts[0].name).to eq("Tralliance Corporation") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("110 East Broward Blvd, 14th floor") - expect(subject.registrant_contacts[0].city).to eq("Fort Lauderdale") - expect(subject.registrant_contacts[0].zip).to eq("33301") - expect(subject.registrant_contacts[0].state).to eq("FL") - expect(subject.registrant_contacts[0].country).to eq("United States") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.9547695999") - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("info@tralliance.travel") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("TRALLIANCE") - expect(subject.admin_contacts[0].name).to eq("Tralliance Corporation") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq("110 East Broward Blvd, 14th floor") - expect(subject.admin_contacts[0].city).to eq("Fort Lauderdale") - expect(subject.admin_contacts[0].zip).to eq("33301") - expect(subject.admin_contacts[0].state).to eq("FL") - expect(subject.admin_contacts[0].country).to eq("United States") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.9547695999") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("info@tralliance.travel") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("TRALLIANCE") - expect(subject.technical_contacts[0].name).to eq("Tralliance Corporation") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq("110 East Broward Blvd, 14th floor") - expect(subject.technical_contacts[0].city).to eq("Fort Lauderdale") - expect(subject.technical_contacts[0].zip).to eq("33301") - expect(subject.technical_contacts[0].state).to eq("FL") - expect(subject.technical_contacts[0].country).to eq("United States") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.9547695999") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("info@tralliance.travel") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns01-mia.theglobe.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("netsys.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("travel.travel") + expect(subject.domain_id).to eq("ff0390f7114c4ad99ac46ae56c00300f-DONUTS") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2005-10-04 21:44:27 GMT")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2022-11-18 00:00:14 GMT")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2023-10-03 23:59:59 GMT")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("9998") + expect(subject.registrar.name).to eq("Donuts Internal (9998)") + expect(subject.registrar.url).to eq("https://identity.digital") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].organization).to eq("Donuts Inc.") + expect(subject.registrant_contacts[0].address).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].state).to eq("WA") + expect(subject.registrant_contacts[0].country_code).to eq("us") + expect(subject.registrant_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].address).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].address).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns-1812.awsdns-34.co.uk") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns-458.awsdns-57.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns-935.awsdns-52.net") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns-1480.awsdns-57.org") end end diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/property_nameservers_with_ip_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/property_nameservers_with_ip_spec.rb index fe379400..a2a3e062 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/property_nameservers_with_ip_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/property_nameservers_with_ip_spec.rb @@ -9,26 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.uk.rb' -describe Whois::Parsers::WhoisNicUk, "property_nameservers_with_ip.expected" do +describe "whois.nic.uk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.uk/uk/property_nameservers_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.uk") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns0.netbenefit.co.uk") - expect(subject.nameservers[0].ipv4).to eq("212.53.64.30") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.netbenefit.co.uk") - expect(subject.nameservers[1].ipv4).to eq("212.53.77.30") - end + it "matches property_nameservers_with_ip.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns0.netbenefit.co.uk") + expect(subject.nameservers[0].ipv4).to eq("212.53.64.30") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.netbenefit.co.uk") + expect(subject.nameservers[1].ipv4).to eq("212.53.77.30") end end diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/property_registrar_godaddy_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/property_registrar_godaddy_spec.rb index 25e42832..ea6f8207 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/property_registrar_godaddy_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/property_registrar_godaddy_spec.rb @@ -9,23 +9,20 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.uk.rb' -describe Whois::Parsers::WhoisNicUk, "property_registrar_godaddy.expected" do +describe "whois.nic.uk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.uk/uk/property_registrar_godaddy.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.uk") + Whois::Parser.parser_for(part) end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("GODADDY") - expect(subject.registrar.name).to eq("GoDaddy.com, LLP.") - expect(subject.registrar.name).to eq("GoDaddy.com, LLP.") - expect(subject.registrar.url).to eq(nil) - end + it "matches property_registrar_godaddy.expected" do + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("GODADDY") + expect(subject.registrar.name).to eq("GoDaddy.com, LLP.") + expect(subject.registrar.name).to eq("GoDaddy.com, LLP.") + expect(subject.registrar.url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/property_registrar_without_trading_name_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/property_registrar_without_trading_name_spec.rb index 5879c815..454b1dcd 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/property_registrar_without_trading_name_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/property_registrar_without_trading_name_spec.rb @@ -9,23 +9,20 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.uk.rb' -describe Whois::Parsers::WhoisNicUk, "property_registrar_without_trading_name.expected" do +describe "whois.nic.uk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.uk/uk/property_registrar_without_trading_name.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.uk") + Whois::Parser.parser_for(part) end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("NETNAMES") - expect(subject.registrar.name).to eq("NetNames Limited") - expect(subject.registrar.name).to eq("NetNames Limited") - expect(subject.registrar.url).to eq("http://www.netnames.co.uk") - end + it "matches property_registrar_without_trading_name.expected" do + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("NETNAMES") + expect(subject.registrar.name).to eq("NetNames Limited") + expect(subject.registrar.name).to eq("NetNames Limited") + expect(subject.registrar.url).to eq("http://www.netnames.co.uk") end end diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_missing_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_missing_spec.rb index 01bf6743..deeaf8ba 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_missing_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_missing_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.uk.rb' -describe Whois::Parsers::WhoisNicUk, "property_status_missing.expected" do +describe "whois.nic.uk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.uk/uk/property_status_missing.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.uk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches property_status_missing.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_no_longer_required_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_no_longer_required_spec.rb index 5f0dc4d6..622a3d2c 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_no_longer_required_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_no_longer_required_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.uk.rb' -describe Whois::Parsers::WhoisNicUk, "property_status_no_longer_required.expected" do +describe "whois.nic.uk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.uk/uk/property_status_no_longer_required.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.uk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_no_longer_required.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_no_status_listed_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_no_status_listed_spec.rb index b86e8930..bae7325b 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_no_status_listed_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_no_status_listed_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.uk.rb' -describe Whois::Parsers::WhoisNicUk, "property_status_no_status_listed.expected" do +describe "whois.nic.uk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.uk/uk/property_status_no_status_listed.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.uk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_no_status_listed.expected" do + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_processing_registration_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_processing_registration_spec.rb index 26384eb5..ef49e709 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_processing_registration_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_processing_registration_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.uk.rb' -describe Whois::Parsers::WhoisNicUk, "property_status_processing_registration.expected" do +describe "whois.nic.uk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.uk/uk/property_status_processing_registration.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.uk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_processing_registration.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_processing_renewal_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_processing_renewal_spec.rb index 4b0ba680..d5c37e2c 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_processing_renewal_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_processing_renewal_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.uk.rb' -describe Whois::Parsers::WhoisNicUk, "property_status_processing_renewal.expected" do +describe "whois.nic.uk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.uk/uk/property_status_processing_renewal.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.uk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_processing_renewal.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_registered_until_expiry_date_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_registered_until_expiry_date_spec.rb index 5647b4c4..f572ee8c 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_registered_until_expiry_date_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_registered_until_expiry_date_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.uk.rb' -describe Whois::Parsers::WhoisNicUk, "property_status_registered_until_expiry_date.expected" do +describe "whois.nic.uk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.uk/uk/property_status_registered_until_expiry_date.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.uk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_registered_until_expiry_date.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_suspended_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_suspended_spec.rb index 4ab63f0b..854480e0 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_suspended_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/property_status_suspended_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.uk.rb' -describe Whois::Parsers::WhoisNicUk, "property_status_suspended.expected" do +describe "whois.nic.uk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.uk/uk/property_status_suspended.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.uk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_suspended.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/response_throttled_spec.rb index 1f79391a..d428fdda 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/response_throttled_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.uk.rb' -describe Whois::Parsers::WhoisNicUk, "response_throttled.expected" do +describe "whois.nic.uk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.uk/uk/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.uk") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/status_available_spec.rb index b946cac8..4b0f5430 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/status_available_spec.rb @@ -9,70 +9,27 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.uk.rb' -describe Whois::Parsers::WhoisNicUk, "status_available.expected" do +describe "whois.nic.uk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.uk/uk/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.uk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#valid?" do - it do - expect(subject.valid?).to eq(true) - end - end - describe "#invalid?" do - it do - expect(subject.invalid?).to eq(false) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.valid?).to eq(true) + expect(subject.invalid?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/status_invalid_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/status_invalid_spec.rb index d5a0e494..4e89d5dd 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/status_invalid_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/status_invalid_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.uk.rb' -describe Whois::Parsers::WhoisNicUk, "status_invalid.expected" do +describe "whois.nic.uk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.uk/uk/status_invalid.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.uk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:invalid) - end - end - describe "#valid?" do - it do - expect(subject.valid?).to eq(false) - end - end - describe "#invalid?" do - it do - expect(subject.invalid?).to eq(true) - end + it "matches status_invalid.expected" do + expect(subject.status).to eq(:invalid) + expect(subject.valid?).to eq(false) + expect(subject.invalid?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/status_registered_spec.rb index 84a1c47e..bdd68992 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/status_registered_spec.rb @@ -9,101 +9,54 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.uk.rb' -describe Whois::Parsers::WhoisNicUk, "status_registered.expected" do +describe "whois.nic.uk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.uk/uk/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.uk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1999-02-14")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-01-13")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-02-14")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("MARKMONITOR") - expect(subject.registrar.name).to eq("Markmonitor") - expect(subject.registrar.organization).to eq("Markmonitor Inc.") - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Google Inc.") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country).to eq("United States") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end - end - describe "#valid?" do - it do - expect(subject.valid?).to eq(true) - end - end - describe "#invalid?" do - it do - expect(subject.invalid?).to eq(false) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1999-02-14")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-01-13")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-02-14")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("MARKMONITOR") + expect(subject.registrar.name).to eq("Markmonitor") + expect(subject.registrar.organization).to eq("Markmonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Google Inc.") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country).to eq("United States") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.response_throttled?).to eq(false) + expect(subject.valid?).to eq(true) + expect(subject.invalid?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/status_reserved_spec.rb index 02f2cd1c..ea375db3 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/status_reserved_spec.rb @@ -9,104 +9,57 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.uk.rb' -describe Whois::Parsers::WhoisNicUk, "status_reserved.expected" do +describe "whois.nic.uk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.uk/uk/status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.uk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1996-08-01")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-03-23")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("Nominet") - expect(subject.registrar.organization).to eq("Nominet UK") - expect(subject.registrar.url).to eq("http://www.nic.uk/") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Nominet UK") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("Minerva House, Edmund Halley Road\nOxford Science Park") - expect(subject.registrant_contacts[0].city).to eq("Oxford") - expect(subject.registrant_contacts[0].zip).to eq("OX4 4DQ") - expect(subject.registrant_contacts[0].state).to eq("Oxon") - expect(subject.registrant_contacts[0].country).to eq("United Kingdom") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("nom-ns1.nominet.org.uk") - expect(subject.nameservers[0].ipv4).to eq("213.248.199.16") - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("nom-ns2.nominet.org.uk") - expect(subject.nameservers[1].ipv4).to eq("195.66.240.250") - expect(subject.nameservers[1].ipv6).to eq("2a01:40:1001:37::2") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("nom-ns3.nominet.org.uk") - expect(subject.nameservers[2].ipv4).to eq("213.219.13.194") - expect(subject.nameservers[2].ipv6).to eq(nil) - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end - end - describe "#valid?" do - it do - expect(subject.valid?).to eq(true) - end - end - describe "#invalid?" do - it do - expect(subject.invalid?).to eq(false) - end + it "matches status_reserved.expected" do + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1996-08-01")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-03-23")) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("Nominet") + expect(subject.registrar.organization).to eq("Nominet UK") + expect(subject.registrar.url).to eq("http://www.nic.uk/") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Nominet UK") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("Minerva House, Edmund Halley Road\nOxford Science Park") + expect(subject.registrant_contacts[0].city).to eq("Oxford") + expect(subject.registrant_contacts[0].zip).to eq("OX4 4DQ") + expect(subject.registrant_contacts[0].state).to eq("Oxon") + expect(subject.registrant_contacts[0].country).to eq("United Kingdom") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("nom-ns1.nominet.org.uk") + expect(subject.nameservers[0].ipv4).to eq("213.248.199.16") + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("nom-ns2.nominet.org.uk") + expect(subject.nameservers[1].ipv4).to eq("195.66.240.250") + expect(subject.nameservers[1].ipv6).to eq("2a01:40:1001:37::2") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("nom-ns3.nominet.org.uk") + expect(subject.nameservers[2].ipv4).to eq("213.219.13.194") + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.response_throttled?).to eq(false) + expect(subject.valid?).to eq(true) + expect(subject.invalid?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.uk/uk/status_suspended_spec.rb b/spec/whois/parsers/responses/whois.nic.uk/uk/status_suspended_spec.rb index 524ea3fb..4abd6fb5 100644 --- a/spec/whois/parsers/responses/whois.nic.uk/uk/status_suspended_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.uk/uk/status_suspended_spec.rb @@ -9,62 +9,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.uk.rb' -describe Whois::Parsers::WhoisNicUk, "status_suspended.expected" do +describe "whois.nic.uk", :aggregate_failures do subject do file = fixture("responses", "whois.nic.uk/uk/status_suspended.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.uk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2008-08-30")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-02-09")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2010-08-30")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("KEY-SYSTEMS-DE") - expect(subject.registrar.name).to eq("Key-Systems GmbH") - expect(subject.registrar.name).to eq("Key-Systems GmbH") - expect(subject.registrar.url).to eq("http://www.Key-Systems.net") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_suspended.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2008-08-30")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-02-09")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2010-08-30")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("KEY-SYSTEMS-DE") + expect(subject.registrar.name).to eq("Key-Systems GmbH") + expect(subject.registrar.name).to eq("Key-Systems GmbH") + expect(subject.registrar.url).to eq("http://www.Key-Systems.net") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.us/us/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.us/us/status_available_spec.rb index 786f0c6b..b6eec999 100644 --- a/spec/whois/parsers/responses/whois.nic.us/us/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.us/us/status_available_spec.rb @@ -9,83 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.us.rb' -describe Whois::Parsers::WhoisNicUs, "status_available.expected" do +describe "whois.nic.us", :aggregate_failures do subject do file = fixture("responses", "whois.nic.us/us/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.us") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.us") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(nil) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.us") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(nil) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.us/us/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.us/us/status_registered_spec.rb index 2941f751..42ee4afc 100644 --- a/spec/whois/parsers/responses/whois.nic.us/us/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.us/us/status_registered_spec.rb @@ -9,138 +9,87 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.us.rb' -describe Whois::Parsers::WhoisNicUs, "status_registered.expected" do +describe "whois.nic.us", :aggregate_failures do subject do file = fixture("responses", "whois.nic.us/us/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.us") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.us") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D775573-US") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientDeleteProhibited", "clientTransferProhibited", "clientUpdateProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2002-04-19 23:15:57 GMT")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-03-17 09:44:30 GMT")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-04-18 23:59:59 GMT")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MARKMONITOR, INC.") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("MMR-135878") - expect(subject.registrant_contacts[0].name).to eq("Google Inc") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country).to eq("United States") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6502530001") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("MMR-136042") - expect(subject.admin_contacts[0].name).to eq("Christina Chiou") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country).to eq("United States") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") - expect(subject.admin_contacts[0].fax).to eq("+1.6502530001") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("MMR-136042") - expect(subject.technical_contacts[0].name).to eq("Christina Chiou") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country).to eq("United States") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") - expect(subject.technical_contacts[0].fax).to eq("+1.6502530001") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.us") + expect(subject.domain_id).to eq("D775573-US") + expect(subject.status).to eq(["clientDeleteProhibited", "clientTransferProhibited", "clientUpdateProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-04-19 23:15:57 GMT")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-03-17 09:44:30 GMT")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-04-18 23:59:59 GMT")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MARKMONITOR, INC.") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("MMR-135878") + expect(subject.registrant_contacts[0].name).to eq("Google Inc") + expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country).to eq("United States") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") + expect(subject.registrant_contacts[0].fax).to eq("+1.6502530001") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("MMR-136042") + expect(subject.admin_contacts[0].name).to eq("Christina Chiou") + expect(subject.admin_contacts[0].organization).to eq("Google Inc.") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country).to eq("United States") + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") + expect(subject.admin_contacts[0].fax).to eq("+1.6502530001") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("MMR-136042") + expect(subject.technical_contacts[0].name).to eq("Christina Chiou") + expect(subject.technical_contacts[0].organization).to eq("Google Inc.") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country).to eq("United States") + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") + expect(subject.technical_contacts[0].fax).to eq("+1.6502530001") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.ve/ve/property_expires_on_missing_spec.rb b/spec/whois/parsers/responses/whois.nic.ve/ve/property_expires_on_missing_spec.rb index ee3120c6..42c03052 100644 --- a/spec/whois/parsers/responses/whois.nic.ve/ve/property_expires_on_missing_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ve/ve/property_expires_on_missing_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ve.rb' -describe Whois::Parsers::WhoisNicVe, "property_expires_on_missing.expected" do +describe "whois.nic.ve", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ve/ve/property_expires_on_missing.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ve") + Whois::Parser.parser_for(part) end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end + it "matches property_expires_on_missing.expected" do + expect(subject.expires_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.ve/ve/property_nameservers_missing_spec.rb b/spec/whois/parsers/responses/whois.nic.ve/ve/property_nameservers_missing_spec.rb index 2a2096d1..8c436cd5 100644 --- a/spec/whois/parsers/responses/whois.nic.ve/ve/property_nameservers_missing_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ve/ve/property_nameservers_missing_spec.rb @@ -9,20 +9,17 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ve.rb' -describe Whois::Parsers::WhoisNicVe, "property_nameservers_missing.expected" do +describe "whois.nic.ve", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ve/ve/property_nameservers_missing.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ve") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches property_nameservers_missing.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.ve/ve/property_nameservers_spec.rb b/spec/whois/parsers/responses/whois.nic.ve/ve/property_nameservers_spec.rb index 1e3d2597..0e38a136 100644 --- a/spec/whois/parsers/responses/whois.nic.ve/ve/property_nameservers_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ve/ve/property_nameservers_spec.rb @@ -9,24 +9,21 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ve.rb' -describe Whois::Parsers::WhoisNicVe, "property_nameservers.expected" do +describe "whois.nic.ve", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ve/ve/property_nameservers.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ve") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("avalon.ula.ve") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("azmodan.ula.ve") - end + it "matches property_nameservers.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("avalon.ula.ve") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("azmodan.ula.ve") end end diff --git a/spec/whois/parsers/responses/whois.nic.ve/ve/property_status_activo_spec.rb b/spec/whois/parsers/responses/whois.nic.ve/ve/property_status_activo_spec.rb index 1926937c..e328a539 100644 --- a/spec/whois/parsers/responses/whois.nic.ve/ve/property_status_activo_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ve/ve/property_status_activo_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ve.rb' -describe Whois::Parsers::WhoisNicVe, "property_status_activo.expected" do +describe "whois.nic.ve", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ve/ve/property_status_activo.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ve") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_activo.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.ve/ve/property_status_missing_spec.rb b/spec/whois/parsers/responses/whois.nic.ve/ve/property_status_missing_spec.rb index 0cef22b9..40000eaa 100644 --- a/spec/whois/parsers/responses/whois.nic.ve/ve/property_status_missing_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ve/ve/property_status_missing_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ve.rb' -describe Whois::Parsers::WhoisNicVe, "property_status_missing.expected" do +describe "whois.nic.ve", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ve/ve/property_status_missing.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ve") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches property_status_missing.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.ve/ve/property_status_suspendido_spec.rb b/spec/whois/parsers/responses/whois.nic.ve/ve/property_status_suspendido_spec.rb index 77e3b4fc..9ef131b7 100644 --- a/spec/whois/parsers/responses/whois.nic.ve/ve/property_status_suspendido_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ve/ve/property_status_suspendido_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ve.rb' -describe Whois::Parsers::WhoisNicVe, "property_status_suspendido.expected" do +describe "whois.nic.ve", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ve/ve/property_status_suspendido.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ve") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:inactive) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_suspendido.expected" do + expect(subject.status).to eq(:inactive) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.ve/ve/property_updated_on_blank_spec.rb b/spec/whois/parsers/responses/whois.nic.ve/ve/property_updated_on_blank_spec.rb index 1fcc9031..78fa485c 100644 --- a/spec/whois/parsers/responses/whois.nic.ve/ve/property_updated_on_blank_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ve/ve/property_updated_on_blank_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ve.rb' -describe Whois::Parsers::WhoisNicVe, "property_updated_on_blank.expected" do +describe "whois.nic.ve", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ve/ve/property_updated_on_blank.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ve") + Whois::Parser.parser_for(part) end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end + it "matches property_updated_on_blank.expected" do + expect(subject.updated_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.nic.ve/ve/property_updated_on_spec.rb b/spec/whois/parsers/responses/whois.nic.ve/ve/property_updated_on_spec.rb index 38a12516..5b334d44 100644 --- a/spec/whois/parsers/responses/whois.nic.ve/ve/property_updated_on_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ve/ve/property_updated_on_spec.rb @@ -9,20 +9,17 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ve.rb' -describe Whois::Parsers::WhoisNicVe, "property_updated_on.expected" do +describe "whois.nic.ve", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ve/ve/property_updated_on.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ve") + Whois::Parser.parser_for(part) end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2005-11-17 21:16:31")) - end + it "matches property_updated_on.expected" do + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2005-11-17 21:16:31")) end end diff --git a/spec/whois/parsers/responses/whois.nic.ve/ve/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.ve/ve/status_available_spec.rb index 48041039..6add3381 100644 --- a/spec/whois/parsers/responses/whois.nic.ve/ve/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ve/ve/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ve.rb' -describe Whois::Parsers::WhoisNicVe, "status_available.expected" do +describe "whois.nic.ve", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ve/ve/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ve") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.ve/ve/status_inactive_spec.rb b/spec/whois/parsers/responses/whois.nic.ve/ve/status_inactive_spec.rb index a7f32944..2be55f7e 100644 --- a/spec/whois/parsers/responses/whois.nic.ve/ve/status_inactive_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ve/ve/status_inactive_spec.rb @@ -9,57 +9,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ve.rb' -describe Whois::Parsers::WhoisNicVe, "status_inactive.expected" do +describe "whois.nic.ve", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ve/ve/status_inactive.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ve") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:inactive) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2005-11-21 15:21:32")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2006-06-08 21:54:41")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2010-11-21 15:21:32")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns10.tepuyserver.net") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns9.tepuyserver.net") - end + it "matches status_inactive.expected" do + expect(subject.status).to eq(:inactive) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2005-11-21 15:21:32")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2006-06-08 21:54:41")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2010-11-21 15:21:32")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns10.tepuyserver.net") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns9.tepuyserver.net") end end diff --git a/spec/whois/parsers/responses/whois.nic.ve/ve/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.ve/ve/status_registered_spec.rb index dda2b24a..99594cc2 100644 --- a/spec/whois/parsers/responses/whois.nic.ve/ve/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.ve/ve/status_registered_spec.rb @@ -9,52 +9,25 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.ve.rb' -describe Whois::Parsers::WhoisNicVe, "status_registered.expected" do +describe "whois.nic.ve", :aggregate_failures do subject do file = fixture("responses", "whois.nic.ve/ve/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.ve") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2010-10-27 12:23:43")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2011-10-27 12:23:43")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2010-10-27 12:23:43")) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2011-10-27 12:23:43")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.wf/wf/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.nic.wf/wf/response_throttled_spec.rb index 84554c27..2913ba89 100644 --- a/spec/whois/parsers/responses/whois.nic.wf/wf/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.wf/wf/response_throttled_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.wf.rb' -describe Whois::Parsers::WhoisNicWf, "response_throttled.expected" do +describe "whois.nic.wf", :aggregate_failures do subject do file = fixture("responses", "whois.nic.wf/wf/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.wf") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.wf/wf/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.wf/wf/status_available_spec.rb index 3032cb3c..647dbfc7 100644 --- a/spec/whois/parsers/responses/whois.nic.wf/wf/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.wf/wf/status_available_spec.rb @@ -9,68 +9,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.wf.rb' -describe Whois::Parsers::WhoisNicWf, "status_available.expected" do +describe "whois.nic.wf", :aggregate_failures do subject do file = fixture("responses", "whois.nic.wf/wf/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.wf") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.wf/wf/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.wf/wf/status_registered_spec.rb index 41094b33..322f7ae8 100644 --- a/spec/whois/parsers/responses/whois.nic.wf/wf/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.wf/wf/status_registered_spec.rb @@ -9,128 +9,83 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.wf.rb' -describe Whois::Parsers::WhoisNicWf, "status_registered.expected" do +describe "whois.nic.wf", :aggregate_failures do subject do file = fixture("responses", "whois.nic.wf/wf/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.wf") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1995-01-01")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2016-12-31")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2017-12-31")) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("AEFT2-FRNIC") - expect(subject.registrant_contacts[0].name).to eq(nil) - expect(subject.registrant_contacts[0].organization).to eq("Afnic (Wallis et Futuna - TOM)") - expect(subject.registrant_contacts[0].address).to eq("immeuble international\n2, rue Stephenson\nMontigny-Le-Bretonneux\n78181 Saint Quentin en Yvelines Cedex") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("FR") - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2008-10-09 00:00:00 UTC")) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("NFC1-FRNIC") - expect(subject.admin_contacts[0].name).to eq("NIC France Contact") - expect(subject.admin_contacts[0].organization).to eq("AFNIC") - expect(subject.admin_contacts[0].address).to eq("immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("FR") - expect(subject.admin_contacts[0].phone).to eq("+33 1 39 30 83 00") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2005-08-23 00:00:00 UTC")) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("NFC1-FRNIC") - expect(subject.technical_contacts[0].name).to eq("NIC France Contact") - expect(subject.technical_contacts[0].organization).to eq("AFNIC") - expect(subject.technical_contacts[0].address).to eq("immeuble international\n2, rue Stephenson\nMontigny le Bretonneux\n78181 Saint Quentin en Yvelines Cedex") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("FR") - expect(subject.technical_contacts[0].phone).to eq("+33 1 39 30 83 00") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("hostmaster@nic.fr") - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2005-08-23 00:00:00 UTC")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.nic.fr") - expect(subject.nameservers[0].ipv4).to eq("192.134.4.1") - expect(subject.nameservers[0].ipv6).to eq("2001:67c:2218:2::4:1") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.nic.fr") - expect(subject.nameservers[1].ipv4).to eq("192.93.0.4") - expect(subject.nameservers[1].ipv6).to eq("2001:660:3005:1::1:2") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.nic.fr") - expect(subject.nameservers[2].ipv4).to eq("192.134.0.49") - expect(subject.nameservers[2].ipv6).to eq("2001:660:3006:1::1:1") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1994-12-31 23:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2018-12-31 23:33:39 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2019-12-31 23:00:00 UTC")) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("AEFT2-FRNIC") + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Afnic (Wallis et Futuna - TOM)") + expect(subject.registrant_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny le Bretonneux") + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("FR") + expect(subject.registrant_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.registrant_contacts[0].fax).to eq("+33 1 39 30 83 01") + expect(subject.registrant_contacts[0].email).to eq("support@afnic.fr") + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2017-07-17 12:41:18 UTC")) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("NFC1-FRNIC") + expect(subject.admin_contacts[0].name).to eq("NIC France Contact") + expect(subject.admin_contacts[0].organization).to eq("AFNIC") + expect(subject.admin_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("FR") + expect(subject.admin_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("hostmaster@nic.fr") + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("NFC1-FRNIC") + expect(subject.technical_contacts[0].name).to eq("NIC France Contact") + expect(subject.technical_contacts[0].organization).to eq("AFNIC") + expect(subject.technical_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("FR") + expect(subject.technical_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("hostmaster@nic.fr") + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.nic.fr") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.nic.fr") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.nic.fr") end end diff --git a/spec/whois/parsers/responses/whois.nic.world/world/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.world/world/status_available_spec.rb new file mode 100644 index 00000000..16cba0cf --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.world/world/status_available_spec.rb @@ -0,0 +1,40 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.world/world/status_available.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.world", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.world/world/status_available.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.world") + Whois::Parser.parser_for(part) + end + + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end +end diff --git a/spec/whois/parsers/responses/whois.nic.world/world/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.world/world/status_registered_spec.rb new file mode 100644 index 00000000..9c5625e3 --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.world/world/status_registered_spec.rb @@ -0,0 +1,89 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.world/world/status_registered.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.world", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.world/world/status_registered.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.world") + Whois::Parser.parser_for(part) + end + + it "matches status_registered.expected" do + expect(subject.domain).to eq("solex.world") + expect(subject.domain_id).to eq("0bd73f47b47f436cac3ee5b20df18ef5-DONUTS") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2017-10-03 11:12:14 GMT")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2022-10-06 14:00:13 GMT")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2023-10-03 11:12:14 GMT")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("433") + expect(subject.registrar.name).to eq("OVH SAS") + expect(subject.registrar.url).to eq("http://www.ovh.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].organization).to eq("") + expect(subject.registrant_contacts[0].address).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].state).to eq("") + expect(subject.registrant_contacts[0].country_code).to eq("FR") + expect(subject.registrant_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].address).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].address).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("dns104.ovh.net") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns104.ovh.net") + end +end diff --git a/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_available_spec.rb index c0b3d974..a48c7286 100644 --- a/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_available_spec.rb @@ -9,93 +9,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.xxx.rb' -describe Whois::Parsers::WhoisNicXxx, "status_available.expected" do +describe "whois.nic.xxx", :aggregate_failures do subject do file = fixture("responses", "whois.nic.xxx/xxx/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.xxx") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(false) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("The Service is provided so that you may look up certain information in relation to domain names that we store in our database. Use of the Service is subject to our policies, in particular you should familiarise yourself with our Acceptable Use Policy and our Privacy Policy. The information provided by this Service is 'as is' and we make no guarantee of it its accuracy. You agree that by your use of the Service you will not use the information provided by us in a way which is: * inconsistent with any applicable laws, * inconsistent with any policy issued by us, * to generate, distribute, or facilitate unsolicited mass email, promotions, advertisings or other solicitations, or * to enable high volume, automated, electronic processes that apply to the Service. You acknowledge that: * a response from the Service that a domain name is 'available', does not guarantee that is able to be registered, * we may restrict, suspend or terminate your access to the Service at any time, and * the copying, compilation, repackaging, dissemination or other use of the information provided by the Service is not permitted, without our express written consent. This information has been prepared and published in order to represent administrative and technical management of the TLD. We may discontinue or amend any part or the whole of these Terms of Service from time to time at our absolute discretion.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.reserved?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_registered_spec.rb index aafa2605..3dd6d8ab 100644 --- a/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_registered_spec.rb @@ -9,146 +9,90 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.xxx.rb' -describe Whois::Parsers::WhoisNicXxx, "status_registered.expected" do +describe "whois.nic.xxx", :aggregate_failures do subject do file = fixture("responses", "whois.nic.xxx/xxx/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.xxx") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to .XXX ICM REGISTRY WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the ICM registry database. The data in this record is provided by ICM Registry for informational purposes only, and ICM does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to(a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. ICM reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("masala.xxx") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D130773-XXX") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2011-12-01 01:37:55 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-12-02 22:20:04 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-12-01 01:37:55 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("R3228-XXX") - expect(subject.registrar.name).to eq("Mesh Digital Limited") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("MNT5BB23000590") - expect(subject.registrant_contacts[0].name).to eq("Domainmonster.com Privacy Service") - expect(subject.registrant_contacts[0].organization).to eq("Identity Protect Limited") - expect(subject.registrant_contacts[0].address).to eq("PO Box 795") - expect(subject.registrant_contacts[0].city).to eq("Godalming") - expect(subject.registrant_contacts[0].zip).to eq("GU7 9GA") - expect(subject.registrant_contacts[0].state).to eq("Surrey") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("GB") - expect(subject.registrant_contacts[0].phone).to eq("+44.1483307527") - expect(subject.registrant_contacts[0].fax).to eq("+44.1483304031") - expect(subject.registrant_contacts[0].email).to eq("masala.xxx@privatemonster.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("MNT5BB23000590") - expect(subject.admin_contacts[0].name).to eq("Domainmonster.com Privacy Service") - expect(subject.admin_contacts[0].organization).to eq("Identity Protect Limited") - expect(subject.admin_contacts[0].address).to eq("PO Box 795") - expect(subject.admin_contacts[0].city).to eq("Godalming") - expect(subject.admin_contacts[0].zip).to eq("GU7 9GA") - expect(subject.admin_contacts[0].state).to eq("Surrey") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("GB") - expect(subject.admin_contacts[0].phone).to eq("+44.1483307527") - expect(subject.admin_contacts[0].fax).to eq("+44.1483304031") - expect(subject.admin_contacts[0].email).to eq("masala.xxx@privatemonster.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("MNT5BB23000590") - expect(subject.technical_contacts[0].name).to eq("Domainmonster.com Privacy Service") - expect(subject.technical_contacts[0].organization).to eq("Identity Protect Limited") - expect(subject.technical_contacts[0].address).to eq("PO Box 795") - expect(subject.technical_contacts[0].city).to eq("Godalming") - expect(subject.technical_contacts[0].zip).to eq("GU7 9GA") - expect(subject.technical_contacts[0].state).to eq("Surrey") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("GB") - expect(subject.technical_contacts[0].phone).to eq("+44.1483307527") - expect(subject.technical_contacts[0].fax).to eq("+44.1483304031") - expect(subject.technical_contacts[0].email).to eq("masala.xxx@privatemonster.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns39.domaincontrol.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns40.domaincontrol.com") - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(false) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("The Service is provided so that you may look up certain information in relation to domain names that we store in our database. Use of the Service is subject to our policies, in particular you should familiarise yourself with our Acceptable Use Policy and our Privacy Policy. The information provided by this Service is 'as is' and we make no guarantee of it its accuracy. You agree that by your use of the Service you will not use the information provided by us in a way which is: * inconsistent with any applicable laws, * inconsistent with any policy issued by us, * to generate, distribute, or facilitate unsolicited mass email, promotions, advertisings or other solicitations, or * to enable high volume, automated, electronic processes that apply to the Service. You acknowledge that: * a response from the Service that a domain name is 'available', does not guarantee that is able to be registered, * we may restrict, suspend or terminate your access to the Service at any time, and * the copying, compilation, repackaging, dissemination or other use of the information provided by the Service is not permitted, without our express written consent. This information has been prepared and published in order to represent administrative and technical management of the TLD. We may discontinue or amend any part or the whole of these Terms of Service from time to time at our absolute discretion.") + expect(subject.domain).to eq("sex.xxx") + expect(subject.domain_id).to eq("D855895-GDREG") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2012-05-31 14:58:50 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-05-01 08:25:32 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-05-31 14:58:50 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("625") + expect(subject.registrar.name).to eq("Name.com, Inc.") + expect(subject.registrar.url).to eq("www.name.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].organization).to eq("Domain Protection Services, Inc.") + expect(subject.registrant_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].state).to eq("") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].address).to eq("REDACTED FOR PRIVACY, REDACTED FOR PRIVACY, REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].phone).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].fax).to eq("REDACTED FOR PRIVACY ext: REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns4.imlns.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns3.imlns.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns1.imlns.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns.imlns.com") + expect(subject.reserved?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_reserved_spec.rb index e5eebf25..8abccae8 100644 --- a/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.xxx/xxx/status_reserved_spec.rb @@ -9,34 +9,19 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.xxx.rb' -describe Whois::Parsers::WhoisNicXxx, "status_reserved.expected" do +describe "whois.nic.xxx", :aggregate_failures do subject do file = fixture("responses", "whois.nic.xxx/xxx/status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.xxx") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(true) - end + it "matches status_reserved.expected" do + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.reserved?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.nic.xyz/xyz/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.xyz/xyz/status_available_spec.rb index e3953e85..6e6adb9f 100644 --- a/spec/whois/parsers/responses/whois.nic.xyz/xyz/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.xyz/xyz/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.xyz.rb' -describe Whois::Parsers::WhoisNicXyz, "status_available.expected" do +describe "whois.nic.xyz", :aggregate_failures do subject do file = fixture("responses", "whois.nic.xyz/xyz/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.xyz") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.nic.xyz/xyz/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.xyz/xyz/status_registered_spec.rb index 41d9a1fa..7605a4ec 100644 --- a/spec/whois/parsers/responses/whois.nic.xyz/xyz/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.nic.xyz/xyz/status_registered_spec.rb @@ -9,162 +9,67 @@ # require 'spec_helper' -require 'whois/parsers/whois.nic.xyz.rb' -describe Whois::Parsers::WhoisNicXyz, "status_registered.expected" do +describe "whois.nic.xyz", :aggregate_failures do subject do file = fixture("responses", "whois.nic.xyz/xyz/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.xyz") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to the whois service is rate limited. For more information, please see https://registrar-console.centralnic.com/pub/whois_guidance.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("abc.xyz") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D2192285-CNIC") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited", "clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2014-03-20 12:59:17 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2015-08-18 15:09:36 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2025-03-20 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor, Inc (TLDs)") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("mmr-87489") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6502530000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6502530001") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.registrant_contacts[0].url).to eq(nil) - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("mmr-87489") - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6502530000") - expect(subject.admin_contacts[0].fax).to eq("+1.6502530001") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.admin_contacts[0].url).to eq(nil) - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("mmr-87489") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6502530000") - expect(subject.technical_contacts[0].fax).to eq("+1.6502530001") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.technical_contacts[0].url).to eq(nil) - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns4.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns1.google.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("The Whois and RDAP services are provided by CentralNic, and contain information pertaining to Internet domain names registered by our our customers. By using this service you are agreeing (1) not to use any information presented here for any purpose other than determining ownership of domain names, (2) not to store or reproduce this data in any way, (3) not to use any high-volume, automated, electronic processes to obtain data from this service. Abuse of this service is monitored and actions in contravention of these terms will result in being permanently blacklisted. All data is (c) CentralNic Ltd (https://www.centralnic.com) Access to the Whois and RDAP services is rate limited. For more information, visit https://registrar-console.centralnic.com/pub/whois_guidance.") + expect(subject.domain).to eq("abc.xyz") + expect(subject.domain_id).to eq("D2192285-CNIC") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2014-03-20 12:59:17 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2018-04-23 22:02:32 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2025-03-20 23:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor, Inc (TLDs)") + expect(subject.registrar.url).to eq("") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].email).to eq("Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns4.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns1.google.com") end end diff --git a/spec/whois/parsers/responses/whois.nic.yt/yt/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.nic.yt/yt/response_throttled_spec.rb new file mode 100644 index 00000000..9595a9eb --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.yt/yt/response_throttled_spec.rb @@ -0,0 +1,24 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.yt/yt/response_throttled.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.yt", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.yt/yt/response_throttled.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.yt") + Whois::Parser.parser_for(part) + end + + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) + end +end diff --git a/spec/whois/parsers/responses/whois.nic.yt/yt/status_available_spec.rb b/spec/whois/parsers/responses/whois.nic.yt/yt/status_available_spec.rb new file mode 100644 index 00000000..ce108ae2 --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.yt/yt/status_available_spec.rb @@ -0,0 +1,37 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.yt/yt/status_available.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.yt", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.yt/yt/status_available.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.yt") + Whois::Parser.parser_for(part) + end + + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end +end diff --git a/spec/whois/parsers/responses/whois.nic.yt/yt/status_registered_spec.rb b/spec/whois/parsers/responses/whois.nic.yt/yt/status_registered_spec.rb new file mode 100644 index 00000000..de7441e5 --- /dev/null +++ b/spec/whois/parsers/responses/whois.nic.yt/yt/status_registered_spec.rb @@ -0,0 +1,91 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.nic.yt/yt/status_registered.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.nic.yt", :aggregate_failures do + + subject do + file = fixture("responses", "whois.nic.yt/yt/status_registered.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.nic.yt") + Whois::Parser.parser_for(part) + end + + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1994-12-31 23:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2018-12-31 23:33:38 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2019-12-31 23:00:00 UTC")) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("AC3598-FRNIC") + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Afnic (Mayotte - CTOM)") + expect(subject.registrant_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny le Bretonneux") + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("FR") + expect(subject.registrant_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.registrant_contacts[0].fax).to eq("+33 1 39 30 83 01") + expect(subject.registrant_contacts[0].email).to eq("support@afnic.fr") + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2017-07-17 12:41:44 UTC")) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("NFC1-FRNIC") + expect(subject.admin_contacts[0].name).to eq("NIC France Contact") + expect(subject.admin_contacts[0].organization).to eq("AFNIC") + expect(subject.admin_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("FR") + expect(subject.admin_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("hostmaster@nic.fr") + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("NFC1-FRNIC") + expect(subject.technical_contacts[0].name).to eq("NIC France Contact") + expect(subject.technical_contacts[0].organization).to eq("AFNIC") + expect(subject.technical_contacts[0].address).to eq("immeuble le Stephenson\n1, rue Stephenson\nHall A2 - 3eme etage\n78180 Montigny-Le-Bretonneux") + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("FR") + expect(subject.technical_contacts[0].phone).to eq("+33 1 39 30 83 00") + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("hostmaster@nic.fr") + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2005-08-23 16:13:17 UTC")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.nic.fr") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.nic.fr") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.nic.fr") + end +end diff --git a/spec/whois/parsers/responses/whois.norid.no/no/status_available_spec.rb b/spec/whois/parsers/responses/whois.norid.no/no/status_available_spec.rb index 3a5cadda..d435d512 100644 --- a/spec/whois/parsers/responses/whois.norid.no/no/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.norid.no/no/status_available_spec.rb @@ -9,44 +9,21 @@ # require 'spec_helper' -require 'whois/parsers/whois.norid.no.rb' -describe Whois::Parsers::WhoisNoridNo, "status_available.expected" do +describe "whois.norid.no", :aggregate_failures do subject do file = fixture("responses", "whois.norid.no/no/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.norid.no") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.norid.no/no/status_registered_spec.rb b/spec/whois/parsers/responses/whois.norid.no/no/status_registered_spec.rb index 6bd0c0b0..0059782b 100644 --- a/spec/whois/parsers/responses/whois.norid.no/no/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.norid.no/no/status_registered_spec.rb @@ -9,46 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.norid.no.rb' -describe Whois::Parsers::WhoisNoridNo, "status_registered.expected" do +describe "whois.norid.no", :aggregate_failures do subject do file = fixture("responses", "whois.norid.no/no/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.norid.no") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2001-02-26")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2015-01-27")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2001-02-26")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2015-01-27")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.pairnic.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.pairnic.com/status_available_spec.rb index 276321c9..44a2b9fb 100644 --- a/spec/whois/parsers/responses/whois.pairnic.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.pairnic.com/status_available_spec.rb @@ -9,83 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.pairnic.com.rb' -describe Whois::Parsers::WhoisPairnicCom, "status_available.expected" do +describe "whois.pairnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.pairnic.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.pairnic.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.pairnic.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.pairnic.com/status_registered_spec.rb index ce83bb27..37a7689b 100644 --- a/spec/whois/parsers/responses/whois.pairnic.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.pairnic.com/status_registered_spec.rb @@ -9,133 +9,81 @@ # require 'spec_helper' -require 'whois/parsers/whois.pairnic.com.rb' -describe Whois::Parsers::WhoisPairnicCom, "status_registered.expected" do +describe "whois.pairnic.com", :aggregate_failures do subject do file = fixture("responses", "whois.pairnic.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.pairnic.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("pairnic.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("2806983_DOMAIN_COM-VRSN") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1998-12-19T05:00:00.0000Z")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-09-04T13:55:30.0000Z")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2017-12-18T19:00:-0500Z")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("99") - expect(subject.registrar.name).to eq("pairNIC INC") - expect(subject.registrar.organization).to eq("pairNIC INC") - expect(subject.registrar.url).to eq("https://www.pairnic.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("753531") - expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") - expect(subject.registrant_contacts[0].organization).to eq("pair Networks, Inc.") - expect(subject.registrant_contacts[0].address).to eq("2403 Sidney Street Suite 210") - expect(subject.registrant_contacts[0].city).to eq("Pittsburgh") - expect(subject.registrant_contacts[0].zip).to eq("15203") - expect(subject.registrant_contacts[0].state).to eq("PA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("") - expect(subject.registrant_contacts[0].fax).to eq("") - expect(subject.registrant_contacts[0].email).to eq("") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("753250") - expect(subject.admin_contacts[0].name).to eq("Domain Administrator") - expect(subject.admin_contacts[0].organization).to eq("pair Networks, Inc.") - expect(subject.admin_contacts[0].address).to eq("2403 Sidney Street Suite 210") - expect(subject.admin_contacts[0].city).to eq("Pittsburgh") - expect(subject.admin_contacts[0].zip).to eq("15203") - expect(subject.admin_contacts[0].state).to eq("PA") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.4123817247") - expect(subject.admin_contacts[0].fax).to eq("+1.4123819997") - expect(subject.admin_contacts[0].email).to eq("domain@pair.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("753250") - expect(subject.technical_contacts[0].name).to eq("Domain Administrator") - expect(subject.technical_contacts[0].organization).to eq("pair Networks, Inc.") - expect(subject.technical_contacts[0].address).to eq("2403 Sidney Street Suite 210") - expect(subject.technical_contacts[0].city).to eq("Pittsburgh") - expect(subject.technical_contacts[0].zip).to eq("15203") - expect(subject.technical_contacts[0].state).to eq("PA") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.4123817247") - expect(subject.technical_contacts[0].fax).to eq("+1.4123819997") - expect(subject.technical_contacts[0].email).to eq("domain@pair.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns0.ns0.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns00.ns0.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("pairnic.com") + expect(subject.domain_id).to eq("2806983_DOMAIN_COM-VRSN") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1998-12-19T05:00:00.0000Z")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-09-04T13:55:30.0000Z")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2017-12-18T19:00:-0500Z")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("99") + expect(subject.registrar.name).to eq("pairNIC INC") + expect(subject.registrar.url).to eq("https://www.pairnic.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("753531") + expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") + expect(subject.registrant_contacts[0].organization).to eq("pair Networks, Inc.") + expect(subject.registrant_contacts[0].address).to eq("2403 Sidney Street Suite 210") + expect(subject.registrant_contacts[0].city).to eq("Pittsburgh") + expect(subject.registrant_contacts[0].zip).to eq("15203") + expect(subject.registrant_contacts[0].state).to eq("PA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("753250") + expect(subject.admin_contacts[0].name).to eq("Domain Administrator") + expect(subject.admin_contacts[0].organization).to eq("pair Networks, Inc.") + expect(subject.admin_contacts[0].address).to eq("2403 Sidney Street Suite 210") + expect(subject.admin_contacts[0].city).to eq("Pittsburgh") + expect(subject.admin_contacts[0].zip).to eq("15203") + expect(subject.admin_contacts[0].state).to eq("PA") + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.4123817247") + expect(subject.admin_contacts[0].fax).to eq("+1.4123819997") + expect(subject.admin_contacts[0].email).to eq("domain@pair.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("753250") + expect(subject.technical_contacts[0].name).to eq("Domain Administrator") + expect(subject.technical_contacts[0].organization).to eq("pair Networks, Inc.") + expect(subject.technical_contacts[0].address).to eq("2403 Sidney Street Suite 210") + expect(subject.technical_contacts[0].city).to eq("Pittsburgh") + expect(subject.technical_contacts[0].zip).to eq("15203") + expect(subject.technical_contacts[0].state).to eq("PA") + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.4123817247") + expect(subject.technical_contacts[0].fax).to eq("+1.4123819997") + expect(subject.technical_contacts[0].email).to eq("domain@pair.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns0.ns0.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns00.ns0.com") end end diff --git a/spec/whois/parsers/responses/whois.pandi.or.id/id/status_available_spec.rb b/spec/whois/parsers/responses/whois.pandi.or.id/id/status_available_spec.rb deleted file mode 100644 index 64389bcb..00000000 --- a/spec/whois/parsers/responses/whois.pandi.or.id/id/status_available_spec.rb +++ /dev/null @@ -1,96 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.pandi.or.id/id/status_available.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.pandi.or.id.rb' - -describe Whois::Parsers::WhoisPandiOrId, "status_available.expected" do - - subject do - file = fixture("responses", "whois.pandi.or.id/id/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end -end diff --git a/spec/whois/parsers/responses/whois.pandi.or.id/id/status_registered_spec.rb b/spec/whois/parsers/responses/whois.pandi.or.id/id/status_registered_spec.rb deleted file mode 100644 index 30dacbed..00000000 --- a/spec/whois/parsers/responses/whois.pandi.or.id/id/status_registered_spec.rb +++ /dev/null @@ -1,161 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.pandi.or.id/id/status_registered.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.pandi.or.id.rb' - -describe Whois::Parsers::WhoisPandiOrId, "status_registered.expected" do - - subject do - file = fixture("responses", "whois.pandi.or.id/id/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.co.id") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("PANDI-DO246796") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientTransferProhibited", "serverTransferProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2004-12-18 13:33:21 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-09-20 23:24:51 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-09-01 23:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("digitalreg") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq("Digital Registra") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("0123459P2ZC") - expect(subject.registrant_contacts[0].name).to eq("Domain Administrator") - expect(subject.registrant_contacts[0].organization).to eq("PT Google Indonesia") - expect(subject.registrant_contacts[0].address).to eq("Menara BCA Grand Indonesia\nRegus Grand Indonesia") - expect(subject.registrant_contacts[0].city).to eq("Jakarta") - expect(subject.registrant_contacts[0].zip).to eq("10310") - expect(subject.registrant_contacts[0].state).to eq("Jakarta") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("ID") - expect(subject.registrant_contacts[0].phone).to eq("+62.2123584400") - expect(subject.registrant_contacts[0].fax).to eq("+62.2123584400") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("0123459P2ZC") - expect(subject.admin_contacts[0].name).to eq("Domain Administrator") - expect(subject.admin_contacts[0].organization).to eq("PT Google Indonesia") - expect(subject.admin_contacts[0].address).to eq("Menara BCA Grand Indonesia\nRegus Grand Indonesia") - expect(subject.admin_contacts[0].city).to eq("Jakarta") - expect(subject.admin_contacts[0].zip).to eq("10310") - expect(subject.admin_contacts[0].state).to eq("Jakarta") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("ID") - expect(subject.admin_contacts[0].phone).to eq("+62.2123584400") - expect(subject.admin_contacts[0].fax).to eq("+62.2123584400") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("01234616RFG") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.65030000") - expect(subject.technical_contacts[0].fax).to eq("+1.65030001") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end - end -end diff --git a/spec/whois/parsers/responses/whois.pir.org/org/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.pir.org/org/response_throttled_spec.rb index d005acdf..dda93bea 100644 --- a/spec/whois/parsers/responses/whois.pir.org/org/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/whois.pir.org/org/response_throttled_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.pir.org.rb' -describe Whois::Parsers::WhoisPirOrg, "response_throttled.expected" do +describe "whois.pir.org", :aggregate_failures do subject do file = fixture("responses", "whois.pir.org/org/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.pir.org") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.pir.org/org/status_available_spec.rb b/spec/whois/parsers/responses/whois.pir.org/org/status_available_spec.rb index f5518df5..0638638d 100644 --- a/spec/whois/parsers/responses/whois.pir.org/org/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.pir.org/org/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.pir.org.rb' -describe Whois::Parsers::WhoisPirOrg, "status_available.expected" do +describe "whois.pir.org", :aggregate_failures do subject do file = fixture("responses", "whois.pir.org/org/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.pir.org") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq(nil) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Access to Public Interest Registry WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Public Interest Registry registry database. The data in this record is provided by Public Interest Registry for informational purposes only, and Public Interest Registry does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Public Interest Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.pir.org/org/status_registered_spec.rb b/spec/whois/parsers/responses/whois.pir.org/org/status_registered_spec.rb index 4d84c7fb..3815bfbb 100644 --- a/spec/whois/parsers/responses/whois.pir.org/org/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.pir.org/org/status_registered_spec.rb @@ -9,147 +9,61 @@ # require 'spec_helper' -require 'whois/parsers/whois.pir.org.rb' -describe Whois::Parsers::WhoisPirOrg, "status_registered.expected" do +describe "whois.pir.org", :aggregate_failures do subject do file = fixture("responses", "whois.pir.org/org/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.pir.org") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Access to Public Interest Registry WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Public Interest Registry registry database. The data in this record is provided by Public Interest Registry for informational purposes only, and Public Interest Registry does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Public Interest Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. Please query the RDDS service of the Registrar of Record identified in this output for information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.org") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("D2244233-LROR") - end - end - describe "#status" do - it do - expect(subject.status).to eq(["clientDeleteProhibited", "clientTransferProhibited", "clientUpdateProhibited"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1998-10-21 04:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-09-18 09:17:35 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-10-20 04:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor Inc. (R37-LROR)") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("mmr-32097") - expect(subject.registrant_contacts[0].name).to eq("DNS Admin") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.6506234000") - expect(subject.registrant_contacts[0].fax).to eq("+1.6506188571") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("mmr-32097") - expect(subject.admin_contacts[0].name).to eq("DNS Admin") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.6506234000") - expect(subject.admin_contacts[0].fax).to eq("+1.6506188571") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("mmr-32097") - expect(subject.technical_contacts[0].name).to eq("DNS Admin") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.6506234000") - expect(subject.technical_contacts[0].fax).to eq("+1.6506188571") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to Public Interest Registry WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Public Interest Registry registry database. The data in this record is provided by Public Interest Registry for informational purposes only, and Public Interest Registry does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Public Interest Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy. The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.") + expect(subject.domain).to eq("google.org") + expect(subject.domain_id).to eq("D2244233-LROR") + expect(subject.status).to eq(["clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", "clientTransferProhibited https://icann.org/epp#clientTransferProhibited", "clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited", "serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited", "serverTransferProhibited https://icann.org/epp#serverTransferProhibited", "serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1998-10-21 04:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2021-09-18 09:24:00 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-10-20 04:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq(nil) + expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(0) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(0) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.response_throttled?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.pnina.ps/ps/status_available_spec.rb b/spec/whois/parsers/responses/whois.pnina.ps/ps/status_available_spec.rb index 8267d200..360d5c7a 100644 --- a/spec/whois/parsers/responses/whois.pnina.ps/ps/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.pnina.ps/ps/status_available_spec.rb @@ -9,65 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.pnina.ps.rb' -describe Whois::Parsers::WhoisPninaPs, "status_available.expected" do +describe "whois.pnina.ps", :aggregate_failures do subject do file = fixture("responses", "whois.pnina.ps/ps/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.pnina.ps") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.ps") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.ps") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.pnina.ps/ps/status_registered_spec.rb b/spec/whois/parsers/responses/whois.pnina.ps/ps/status_registered_spec.rb index 888b8871..a7da6dbd 100644 --- a/spec/whois/parsers/responses/whois.pnina.ps/ps/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.pnina.ps/ps/status_registered_spec.rb @@ -9,83 +9,43 @@ # require 'spec_helper' -require 'whois/parsers/whois.pnina.ps.rb' -describe Whois::Parsers::WhoisPninaPs, "status_registered.expected" do +describe "whois.pnina.ps", :aggregate_failures do subject do file = fixture("responses", "whois.pnina.ps/ps/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.pnina.ps") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.ps") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("21665-PS") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2004-05-18 22:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-05-18 22:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.ps") + expect(subject.domain_id).to eq("21665-PS") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2004-05-18 22:00:00 UTC")) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-05-18 22:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.register.bg/bg/property_nameservers_with_ip_spec.rb b/spec/whois/parsers/responses/whois.register.bg/bg/property_nameservers_with_ip_spec.rb index 7f9232c9..a92ddf9c 100644 --- a/spec/whois/parsers/responses/whois.register.bg/bg/property_nameservers_with_ip_spec.rb +++ b/spec/whois/parsers/responses/whois.register.bg/bg/property_nameservers_with_ip_spec.rb @@ -9,26 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.register.bg.rb' -describe Whois::Parsers::WhoisRegisterBg, "property_nameservers_with_ip.expected" do +describe "whois.register.bg", :aggregate_failures do subject do file = fixture("responses", "whois.register.bg/bg/property_nameservers_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.register.bg") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("chicken.orbitel.bg") - expect(subject.nameservers[0].ipv4).to eq("195.24.32.5") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns.orbitel.bg") - expect(subject.nameservers[1].ipv4).to eq("195.24.32.2") - end + it "matches property_nameservers_with_ip.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("chicken.orbitel.bg") + expect(subject.nameservers[0].ipv4).to eq("195.24.32.5") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns.orbitel.bg") + expect(subject.nameservers[1].ipv4).to eq("195.24.32.2") end end diff --git a/spec/whois/parsers/responses/whois.register.bg/bg/status_available_spec.rb b/spec/whois/parsers/responses/whois.register.bg/bg/status_available_spec.rb index 7c2a91e8..0e6a1847 100644 --- a/spec/whois/parsers/responses/whois.register.bg/bg/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.register.bg/bg/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.register.bg.rb' -describe Whois::Parsers::WhoisRegisterBg, "status_available.expected" do +describe "whois.register.bg", :aggregate_failures do subject do file = fixture("responses", "whois.register.bg/bg/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.register.bg") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.register.bg/bg/status_registered_spec.rb b/spec/whois/parsers/responses/whois.register.bg/bg/status_registered_spec.rb index 92403ee6..af995ffb 100644 --- a/spec/whois/parsers/responses/whois.register.bg/bg/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.register.bg/bg/status_registered_spec.rb @@ -9,60 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.register.bg.rb' -describe Whois::Parsers::WhoisRegisterBg, "status_registered.expected" do +describe "whois.register.bg", :aggregate_failures do subject do file = fixture("responses", "whois.register.bg/bg/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.register.bg") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-06-30 00:00:00")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-06-30 00:00:00")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns4.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-06-30 00:00:00 EEST")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-06-30 00:00:00 EEST")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns4.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.register.com/registered_without_updated_on_spec.rb b/spec/whois/parsers/responses/whois.register.com/registered_without_updated_on_spec.rb index 3982a4f6..e64c65f8 100644 --- a/spec/whois/parsers/responses/whois.register.com/registered_without_updated_on_spec.rb +++ b/spec/whois/parsers/responses/whois.register.com/registered_without_updated_on_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.register.com.rb' -describe Whois::Parsers::WhoisRegisterCom, "registered_without_updated_on.expected" do +describe "whois.register.com", :aggregate_failures do subject do file = fixture("responses", "whois.register.com/registered_without_updated_on.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.register.com") + Whois::Parser.parser_for(part) end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end + it "matches registered_without_updated_on.expected" do + expect(subject.updated_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.register.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.register.com/status_registered_spec.rb index 46ff2506..e2b9297c 100644 --- a/spec/whois/parsers/responses/whois.register.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.register.com/status_registered_spec.rb @@ -9,137 +9,86 @@ # require 'spec_helper' -require 'whois/parsers/whois.register.com.rb' -describe Whois::Parsers::WhoisRegisterCom, "status_registered.expected" do +describe "whois.register.com", :aggregate_failures do subject do file = fixture("responses", "whois.register.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.register.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("register.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1994-11-01T00:00:00-0500")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2009-08-26T00:00:00-0400")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2019-08-04T00:00:00-0400")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("9") - expect(subject.registrar.name).to eq("Register.com") - expect(subject.registrar.url).to eq("http://www.register.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].name).to eq("Domain Registrar") - expect(subject.registrant_contacts[0].organization).to eq("Register.Com, Inc.") - expect(subject.registrant_contacts[0].address).to eq("575 8th Avenue") - expect(subject.registrant_contacts[0].city).to eq("New York") - expect(subject.registrant_contacts[0].zip).to eq("10018") - expect(subject.registrant_contacts[0].state).to eq("NY") - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.9027492701") - expect(subject.registrant_contacts[0].fax).to eq("") - expect(subject.registrant_contacts[0].email).to eq("domainregistrar@register.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].name).to eq("Domain Registrar") - expect(subject.admin_contacts[0].organization).to eq("Register.Com, Inc.") - expect(subject.admin_contacts[0].address).to eq("575 8th Avenue") - expect(subject.admin_contacts[0].city).to eq("New York") - expect(subject.admin_contacts[0].zip).to eq("10018") - expect(subject.admin_contacts[0].state).to eq("NY") - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.9027492701") - expect(subject.admin_contacts[0].fax).to eq("") - expect(subject.admin_contacts[0].email).to eq("domainregistrar@register.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].name).to eq("Domain Registrar") - expect(subject.technical_contacts[0].organization).to eq("Register.Com, Inc.") - expect(subject.technical_contacts[0].address).to eq("575 8th Avenue") - expect(subject.technical_contacts[0].city).to eq("New York") - expect(subject.technical_contacts[0].zip).to eq("10018") - expect(subject.technical_contacts[0].state).to eq("NY") - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.9027492701") - expect(subject.technical_contacts[0].fax).to eq("") - expect(subject.technical_contacts[0].email).to eq("domainregistrar@register.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(6) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.register.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns3.register.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns4.register.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns5.register.com") - expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[4].name).to eq("ns6.register.com") - expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[5].name).to eq("ns1.register.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("register.com") + expect(subject.domain_id).to eq("") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1994-11-01T00:00:00-0500")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2009-08-26T00:00:00-0400")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2019-08-04T00:00:00-0400")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("9") + expect(subject.registrar.name).to eq("Register.com") + expect(subject.registrar.url).to eq("http://www.register.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].name).to eq("Domain Registrar") + expect(subject.registrant_contacts[0].organization).to eq("Register.Com, Inc.") + expect(subject.registrant_contacts[0].address).to eq("575 8th Avenue") + expect(subject.registrant_contacts[0].city).to eq("New York") + expect(subject.registrant_contacts[0].zip).to eq("10018") + expect(subject.registrant_contacts[0].state).to eq("NY") + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.9027492701") + expect(subject.registrant_contacts[0].fax).to eq("") + expect(subject.registrant_contacts[0].email).to eq("domainregistrar@register.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].name).to eq("Domain Registrar") + expect(subject.admin_contacts[0].organization).to eq("Register.Com, Inc.") + expect(subject.admin_contacts[0].address).to eq("575 8th Avenue") + expect(subject.admin_contacts[0].city).to eq("New York") + expect(subject.admin_contacts[0].zip).to eq("10018") + expect(subject.admin_contacts[0].state).to eq("NY") + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.9027492701") + expect(subject.admin_contacts[0].fax).to eq("") + expect(subject.admin_contacts[0].email).to eq("domainregistrar@register.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].name).to eq("Domain Registrar") + expect(subject.technical_contacts[0].organization).to eq("Register.Com, Inc.") + expect(subject.technical_contacts[0].address).to eq("575 8th Avenue") + expect(subject.technical_contacts[0].city).to eq("New York") + expect(subject.technical_contacts[0].zip).to eq("10018") + expect(subject.technical_contacts[0].state).to eq("NY") + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.9027492701") + expect(subject.technical_contacts[0].fax).to eq("") + expect(subject.technical_contacts[0].email).to eq("domainregistrar@register.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(6) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2.register.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns3.register.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns4.register.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns5.register.com") + expect(subject.nameservers[4]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[4].name).to eq("ns6.register.com") + expect(subject.nameservers[5]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[5].name).to eq("ns1.register.com") end end diff --git a/spec/whois/parsers/responses/whois.register.si/si/status_available_spec.rb b/spec/whois/parsers/responses/whois.register.si/si/status_available_spec.rb index cd335165..e09e892f 100644 --- a/spec/whois/parsers/responses/whois.register.si/si/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.register.si/si/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.register.si.rb' -describe Whois::Parsers::WhoisRegisterSi, "status_available.expected" do +describe "whois.register.si", :aggregate_failures do subject do file = fixture("responses", "whois.register.si/si/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.register.si") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.register.si/si/status_registered_spec.rb b/spec/whois/parsers/responses/whois.register.si/si/status_registered_spec.rb index d29d4395..f9cd3837 100644 --- a/spec/whois/parsers/responses/whois.register.si/si/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.register.si/si/status_registered_spec.rb @@ -9,60 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.register.si.rb' -describe Whois::Parsers::WhoisRegisterSi, "status_registered.expected" do +describe "whois.register.si", :aggregate_failures do subject do file = fixture("responses", "whois.register.si/si/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.register.si") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2005-04-04")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-07-19")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2005-04-04")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-07-19")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.registre.ma/ma/status_available_spec.rb b/spec/whois/parsers/responses/whois.registre.ma/ma/status_available_spec.rb index cef71c8b..c093fa58 100644 --- a/spec/whois/parsers/responses/whois.registre.ma/ma/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.registre.ma/ma/status_available_spec.rb @@ -9,44 +9,21 @@ # require 'spec_helper' -require 'whois/parsers/whois.registre.ma.rb' -describe Whois::Parsers::WhoisRegistreMa, "status_available.expected" do +describe "whois.registre.ma", :aggregate_failures do subject do file = fixture("responses", "whois.registre.ma/ma/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registre.ma") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.registre.ma/ma/status_registered_spec.rb b/spec/whois/parsers/responses/whois.registre.ma/ma/status_registered_spec.rb index b84b339e..315f6ce6 100644 --- a/spec/whois/parsers/responses/whois.registre.ma/ma/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.registre.ma/ma/status_registered_spec.rb @@ -9,46 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.registre.ma.rb' -describe Whois::Parsers::WhoisRegistreMa, "status_registered.expected" do +describe "whois.registre.ma", :aggregate_failures do subject do file = fixture("responses", "whois.registre.ma/ma/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registre.ma") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2009-03-24")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2009-03-24")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2009-03-24")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2009-03-24")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) end end diff --git a/spec/whois/parsers/responses/whois.registro.br/br/property_nameservers_with_ip_spec.rb b/spec/whois/parsers/responses/whois.registro.br/br/property_nameservers_with_ip_spec.rb index d87e54ef..069604fd 100644 --- a/spec/whois/parsers/responses/whois.registro.br/br/property_nameservers_with_ip_spec.rb +++ b/spec/whois/parsers/responses/whois.registro.br/br/property_nameservers_with_ip_spec.rb @@ -9,32 +9,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.registro.br.rb' -describe Whois::Parsers::WhoisRegistroBr, "property_nameservers_with_ip.expected" do +describe "whois.registro.br", :aggregate_failures do subject do file = fixture("responses", "whois.registro.br/br/property_nameservers_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registro.br") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.hostgator.com.br") - expect(subject.nameservers[0].ipv4).to eq("74.53.28.178") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.hostgator.com.br") - expect(subject.nameservers[1].ipv4).to eq("74.53.28.179") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.hostgator.com.br") - expect(subject.nameservers[2].ipv4).to eq("174.133.202.50") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.hostgator.com.br") - expect(subject.nameservers[3].ipv4).to eq("174.133.202.51") - end + it "matches property_nameservers_with_ip.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.hostgator.com.br") + expect(subject.nameservers[0].ipv4).to eq("74.53.28.178") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.hostgator.com.br") + expect(subject.nameservers[1].ipv4).to eq("74.53.28.179") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.hostgator.com.br") + expect(subject.nameservers[2].ipv4).to eq("174.133.202.50") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.hostgator.com.br") + expect(subject.nameservers[3].ipv4).to eq("174.133.202.51") end end diff --git a/spec/whois/parsers/responses/whois.registro.br/br/status_available_limited_spec.rb b/spec/whois/parsers/responses/whois.registro.br/br/status_available_limited_spec.rb index 699ea8c9..7f20c390 100644 --- a/spec/whois/parsers/responses/whois.registro.br/br/status_available_limited_spec.rb +++ b/spec/whois/parsers/responses/whois.registro.br/br/status_available_limited_spec.rb @@ -9,24 +9,17 @@ # require 'spec_helper' -require 'whois/parsers/whois.registro.br.rb' -describe Whois::Parsers::WhoisRegistroBr, "status_available_limited.expected" do +describe "whois.registro.br", :aggregate_failures do subject do file = fixture("responses", "whois.registro.br/br/status_available_limited.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registro.br") + Whois::Parser.parser_for(part) end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches status_available_limited.expected" do + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.registro.br/br/status_available_spec.rb b/spec/whois/parsers/responses/whois.registro.br/br/status_available_spec.rb index d4c3639c..f37a3071 100644 --- a/spec/whois/parsers/responses/whois.registro.br/br/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.registro.br/br/status_available_spec.rb @@ -9,55 +9,24 @@ # require 'spec_helper' -require 'whois/parsers/whois.registro.br.rb' -describe Whois::Parsers::WhoisRegistroBr, "status_available.expected" do +describe "whois.registro.br", :aggregate_failures do subject do file = fixture("responses", "whois.registro.br/br/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registro.br") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.br") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.br") + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.registro.br/br/status_registered_limited_spec.rb b/spec/whois/parsers/responses/whois.registro.br/br/status_registered_limited_spec.rb index b5e6091b..2ca09dcb 100644 --- a/spec/whois/parsers/responses/whois.registro.br/br/status_registered_limited_spec.rb +++ b/spec/whois/parsers/responses/whois.registro.br/br/status_registered_limited_spec.rb @@ -9,24 +9,17 @@ # require 'spec_helper' -require 'whois/parsers/whois.registro.br.rb' -describe Whois::Parsers::WhoisRegistroBr, "status_registered_limited.expected" do +describe "whois.registro.br", :aggregate_failures do subject do file = fixture("responses", "whois.registro.br/br/status_registered_limited.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registro.br") + Whois::Parser.parser_for(part) end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches status_registered_limited.expected" do + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.registro.br/br/status_registered_spec.rb b/spec/whois/parsers/responses/whois.registro.br/br/status_registered_spec.rb index e034c012..e619f4bd 100644 --- a/spec/whois/parsers/responses/whois.registro.br/br/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.registro.br/br/status_registered_spec.rb @@ -9,132 +9,89 @@ # require 'spec_helper' -require 'whois/parsers/whois.registro.br.rb' -describe Whois::Parsers::WhoisRegistroBr, "status_registered.expected" do +describe "whois.registro.br", :aggregate_failures do subject do file = fixture("responses", "whois.registro.br/br/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registro.br") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.com.br") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1999-05-18")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2017-04-27")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2018-05-18")) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("DOADM17") - expect(subject.registrant_contacts[0].name).to eq("Domain Admin") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("ccops@markmonitor.com") - expect(subject.registrant_contacts[0].created_on).to eq(Time.parse("2010-05-20 00:00:00 UTC")) - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2017-01-03 00:00:00 UTC")) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("DOADM17") - expect(subject.admin_contacts[0].name).to eq("Domain Admin") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq(nil) - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq(nil) - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("ccops@markmonitor.com") - expect(subject.admin_contacts[0].created_on).to eq(Time.parse("2010-05-20 00:00:00 UTC")) - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2017-01-03 00:00:00 UTC")) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("DOADM17") - expect(subject.technical_contacts[0].name).to eq("Domain Admin") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq(nil) - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq(nil) - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("ccops@markmonitor.com") - expect(subject.technical_contacts[0].created_on).to eq(Time.parse("2010-05-20 00:00:00 UTC")) - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2017-01-03 00:00:00 UTC")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.com.br") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1999-05-18")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2017-04-27")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2018-05-18")) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("DOADM17") + expect(subject.registrant_contacts[0].name).to eq("Domain Admin") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("ccops@markmonitor.com") + expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2010-05-20 00:00:00 UTC")) + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2017-01-03 00:00:00 UTC")) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("DOADM17") + expect(subject.admin_contacts[0].name).to eq("Domain Admin") + expect(subject.admin_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts[0].address).to eq(nil) + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq(nil) + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("ccops@markmonitor.com") + expect(subject.admin_contacts[0].created_on).to eq(DateTime.parse("2010-05-20 00:00:00 UTC")) + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2017-01-03 00:00:00 UTC")) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("DOADM17") + expect(subject.technical_contacts[0].name).to eq("Domain Admin") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq(nil) + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq(nil) + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("ccops@markmonitor.com") + expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2010-05-20 00:00:00 UTC")) + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2017-01-03 00:00:00 UTC")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.registry.gy/gy/status_available_spec.rb b/spec/whois/parsers/responses/whois.registry.gy/gy/status_available_spec.rb index 12ee346a..7f889c45 100644 --- a/spec/whois/parsers/responses/whois.registry.gy/gy/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.registry.gy/gy/status_available_spec.rb @@ -9,65 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.registry.gy.rb' -describe Whois::Parsers::WhoisRegistryGy, "status_available.expected" do +describe "whois.registry.gy", :aggregate_failures do subject do file = fixture("responses", "whois.registry.gy/gy/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registry.gy") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.gy") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.gy") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.registry.gy/gy/status_registered_spec.rb b/spec/whois/parsers/responses/whois.registry.gy/gy/status_registered_spec.rb index debb4e2c..6467bcee 100644 --- a/spec/whois/parsers/responses/whois.registry.gy/gy/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.registry.gy/gy/status_registered_spec.rb @@ -9,80 +9,40 @@ # require 'spec_helper' -require 'whois/parsers/whois.registry.gy.rb' -describe Whois::Parsers::WhoisRegistryGy, "status_registered.expected" do +describe "whois.registry.gy", :aggregate_failures do subject do file = fixture("responses", "whois.registry.gy/gy/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registry.gy") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.gy") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("573328-CoCCA") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2008-05-12 17:56:23 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-01-16 06:53:13 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-10-04 23:30:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.gy") + expect(subject.domain_id).to eq("573328-CoCCA") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2008-05-12 17:56:23 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-01-16 06:53:13 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-10-04 23:30:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.registry.hm/hm/status_available_spec.rb b/spec/whois/parsers/responses/whois.registry.hm/hm/status_available_spec.rb index 791e288e..b185068a 100644 --- a/spec/whois/parsers/responses/whois.registry.hm/hm/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.registry.hm/hm/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.registry.hm.rb' -describe Whois::Parsers::WhoisRegistryHm, "status_available.expected" do +describe "whois.registry.hm", :aggregate_failures do subject do file = fixture("responses", "whois.registry.hm/hm/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registry.hm") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.registry.hm/hm/status_registered_spec.rb b/spec/whois/parsers/responses/whois.registry.hm/hm/status_registered_spec.rb index 1709ee08..99a6eb53 100644 --- a/spec/whois/parsers/responses/whois.registry.hm/hm/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.registry.hm/hm/status_registered_spec.rb @@ -9,56 +9,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.registry.hm.rb' -describe Whois::Parsers::WhoisRegistryHm, "status_registered.expected" do +describe "whois.registry.hm", :aggregate_failures do subject do file = fixture("responses", "whois.registry.hm/hm/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registry.hm") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-04-28")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2020-04-28")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.everydns.net") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.everydns.net") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-04-28")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-04-28")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.everydns.net") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.everydns.net") end end diff --git a/spec/whois/parsers/responses/whois.registry.in/in/status_available_spec.rb b/spec/whois/parsers/responses/whois.registry.in/in/status_available_spec.rb new file mode 100644 index 00000000..4a499c69 --- /dev/null +++ b/spec/whois/parsers/responses/whois.registry.in/in/status_available_spec.rb @@ -0,0 +1,41 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.registry.in/in/status_available.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.registry.in", :aggregate_failures do + + subject do + file = fixture("responses", "whois.registry.in/in/status_available.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registry.in") + Whois::Parser.parser_for(part) + end + + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Access to .IN WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the .IN registry database. The data in this record is provided by .IN Registry for informational purposes only ,and .IN does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator or a Registrar, or Neustar except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. .IN reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.") + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + end +end diff --git a/spec/whois/parsers/responses/whois.registry.in/in/status_registered_spec.rb b/spec/whois/parsers/responses/whois.registry.in/in/status_registered_spec.rb new file mode 100644 index 00000000..aad276f2 --- /dev/null +++ b/spec/whois/parsers/responses/whois.registry.in/in/status_registered_spec.rb @@ -0,0 +1,95 @@ +# This file is autogenerated. Do not edit it manually. +# If you want change the content of this file, edit +# +# /spec/fixtures/responses/whois.registry.in/in/status_registered.expected +# +# and regenerate the tests with the following rake task +# +# $ rake spec:generate +# + +require 'spec_helper' + +describe "whois.registry.in", :aggregate_failures do + + subject do + file = fixture("responses", "whois.registry.in/in/status_registered.txt") + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registry.in") + Whois::Parser.parser_for(part) + end + + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Access to .IN WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the .IN registry database. The data in this record is provided by .IN Registry for informational purposes only ,and .IN does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator or a Registrar, or Neustar except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. .IN reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.") + expect(subject.domain).to eq("google.in") + expect(subject.domain_id).to eq("D21089-IN") + expect(subject.status).to eq(["clientTransferProhibited http://www.icann.org/epp#clientTransferProhibited", "clientDeleteProhibited http://www.icann.org/epp#clientDeleteProhibited", "clientUpdateProhibited http://www.icann.org/epp#clientUpdateProhibited"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to eq(DateTime.parse("2005-02-14 20:35:14 UTC")) + expect(subject.updated_on).to eq(DateTime.parse("2021-01-18 10:38:43 UTC")) + expect(subject.expires_on).to eq(DateTime.parse("2022-02-14 20:35:14 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].organization).to eq("Google LLC") + expect(subject.registrant_contacts[0].address).to eq("REDACTED FOR PRIVACY\nREDACTED FOR PRIVACY\nREDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].fax).to eq("REDACTED FOR PRIVACY") + expect(subject.registrant_contacts[0].email).to eq("Please contact the Registrar listed above") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].address).to eq("REDACTED FOR PRIVACY\nREDACTED FOR PRIVACY\nREDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].phone).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].fax).to eq("REDACTED FOR PRIVACY") + expect(subject.admin_contacts[0].email).to eq("Please contact the Registrar listed above") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].name).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].organization).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].address).to eq("REDACTED FOR PRIVACY\nREDACTED FOR PRIVACY\nREDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].city).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].zip).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].state).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].phone).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].fax).to eq("REDACTED FOR PRIVACY") + expect(subject.technical_contacts[0].email).to eq("Please contact the Registrar listed above") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns4.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns1.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns3.google.com") + end +end diff --git a/spec/whois/parsers/responses/whois.registry.om/om/status_available_spec.rb b/spec/whois/parsers/responses/whois.registry.om/om/status_available_spec.rb index 0a8d3c32..d9ef5762 100644 --- a/spec/whois/parsers/responses/whois.registry.om/om/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.registry.om/om/status_available_spec.rb @@ -9,87 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.registry.om.rb' -describe Whois::Parsers::WhoisRegistryOm, "status_available.expected" do +describe "whois.registry.om", :aggregate_failures do subject do file = fixture("responses", "whois.registry.om/om/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registry.om") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.registry.om/om/status_registered_spec.rb b/spec/whois/parsers/responses/whois.registry.om/om/status_registered_spec.rb index 0151cf01..3d1141cc 100644 --- a/spec/whois/parsers/responses/whois.registry.om/om/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.registry.om/om/status_registered_spec.rb @@ -9,132 +9,76 @@ # require 'spec_helper' -require 'whois/parsers/whois.registry.om.rb' -describe Whois::Parsers::WhoisRegistryOm, "status_registered.expected" do +describe "whois.registry.om", :aggregate_failures do subject do file = fixture("responses", "whois.registry.om/om/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registry.om") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("rop.gov.om") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-10-06 18:20:12 UTC")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("Oman Telecommunication Company") - expect(subject.registrar.organization).to eq("Oman Telecommunication Company") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("10084244") - expect(subject.registrant_contacts[0].name).to eq("Nasser Said Al Daree") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("Visit portal.registry.om/whois for Web based WhoIs") - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("10084244") - expect(subject.technical_contacts[0].name).to eq("Nasser Said Al Daree") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq(nil) - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq(nil) - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("Visit portal.registry.om/whois for Web based WhoIs") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns3.omantel.net.om") - expect(subject.nameservers[0].ipv4).to eq("62.231.247.70") - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.omantel.net.om") - expect(subject.nameservers[1].ipv4).to eq("82.178.72.21") - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.omantel.net.om") - expect(subject.nameservers[2].ipv4).to eq("212.72.4.147") - expect(subject.nameservers[2].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("rop.gov.om") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(["ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-10-06 18:20:12 UTC")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("Oman Telecommunication Company") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("10084244") + expect(subject.registrant_contacts[0].name).to eq("Nasser Said Al Daree") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("Visit portal.registry.om/whois for Web based WhoIs") + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("10084244") + expect(subject.technical_contacts[0].name).to eq("Nasser Said Al Daree") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq(nil) + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq(nil) + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("Visit portal.registry.om/whois for Web based WhoIs") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns3.omantel.net.om") + expect(subject.nameservers[0].ipv4).to eq("62.231.247.70") + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.omantel.net.om") + expect(subject.nameservers[1].ipv4).to eq("82.178.72.21") + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns2.omantel.net.om") + expect(subject.nameservers[2].ipv4).to eq("212.72.4.147") + expect(subject.nameservers[2].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.registry.om/om/status_reserved_spec.rb b/spec/whois/parsers/responses/whois.registry.om/om/status_reserved_spec.rb index 04265b96..4d71f86a 100644 --- a/spec/whois/parsers/responses/whois.registry.om/om/status_reserved_spec.rb +++ b/spec/whois/parsers/responses/whois.registry.om/om/status_reserved_spec.rb @@ -9,34 +9,19 @@ # require 'spec_helper' -require 'whois/parsers/whois.registry.om.rb' -describe Whois::Parsers::WhoisRegistryOm, "status_reserved.expected" do +describe "whois.registry.om", :aggregate_failures do subject do file = fixture("responses", "whois.registry.om/om/status_reserved.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registry.om") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:reserved) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#reserved?" do - it do - expect(subject.reserved?).to eq(true) - end + it "matches status_reserved.expected" do + expect(subject.status).to eq(:reserved) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(false) + expect(subject.reserved?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.registry.qa/qa/property_nameservers_without_ips_spec.rb b/spec/whois/parsers/responses/whois.registry.qa/qa/property_nameservers_without_ips_spec.rb index 11a79ef3..cf522810 100644 --- a/spec/whois/parsers/responses/whois.registry.qa/qa/property_nameservers_without_ips_spec.rb +++ b/spec/whois/parsers/responses/whois.registry.qa/qa/property_nameservers_without_ips_spec.rb @@ -9,29 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.registry.qa.rb' -describe Whois::Parsers::WhoisRegistryQa, "property_nameservers_without_ips.expected" do +describe "whois.registry.qa", :aggregate_failures do subject do file = fixture("responses", "whois.registry.qa/qa/property_nameservers_without_ips.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registry.qa") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.qatarbank.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.qatarbank.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.qatarbank.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - end + it "matches property_nameservers_without_ips.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.qatarbank.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.qatarbank.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.qatarbank.com") + expect(subject.nameservers[2].ipv4).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.registry.qa/qa/status_available_spec.rb b/spec/whois/parsers/responses/whois.registry.qa/qa/status_available_spec.rb index ff05d9e2..1ff1c301 100644 --- a/spec/whois/parsers/responses/whois.registry.qa/qa/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.registry.qa/qa/status_available_spec.rb @@ -9,87 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.registry.qa.rb' -describe Whois::Parsers::WhoisRegistryQa, "status_available.expected" do +describe "whois.registry.qa", :aggregate_failures do subject do file = fixture("responses", "whois.registry.qa/qa/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registry.qa") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.registry.qa/qa/status_registered_spec.rb b/spec/whois/parsers/responses/whois.registry.qa/qa/status_registered_spec.rb index c3e6ba1b..3c6c7de8 100644 --- a/spec/whois/parsers/responses/whois.registry.qa/qa/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.registry.qa/qa/status_registered_spec.rb @@ -9,122 +9,66 @@ # require 'spec_helper' -require 'whois/parsers/whois.registry.qa.rb' -describe Whois::Parsers::WhoisRegistryQa, "status_registered.expected" do +describe "whois.registry.qa", :aggregate_failures do subject do file = fixture("responses", "whois.registry.qa/qa/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.registry.qa") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("qtel.com.qa") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(["ok"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("QatarTelecom") - expect(subject.registrar.name).to eq("Qatar Telecom (Qtel) Q. S. C") - expect(subject.registrar.organization).to eq("Qatar Telecom (Qtel) Q. S. C") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("QT11734") - expect(subject.registrant_contacts[0].name).to eq("DNS Administrator - Qtel Internet Services") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("Visit www.domains.qa") - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("QT11734") - expect(subject.technical_contacts[0].name).to eq("DNS Administrator - Qtel Internet Services") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq(nil) - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq(nil) - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("Visit www.domains.qa") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.qtel.com.qa") - expect(subject.nameservers[0].ipv4).to eq("212.77.203.185") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.qtel.com.qa") - expect(subject.nameservers[1].ipv4).to eq("213.130.113.101") - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("qtel.com.qa") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(["ok"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("QatarTelecom") + expect(subject.registrar.name).to eq("Qatar Telecom (Qtel) Q. S. C") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("QT11734") + expect(subject.registrant_contacts[0].name).to eq("DNS Administrator - Qtel Internet Services") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("Visit www.domains.qa") + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("QT11734") + expect(subject.technical_contacts[0].name).to eq("DNS Administrator - Qtel Internet Services") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq(nil) + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq(nil) + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("Visit www.domains.qa") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.qtel.com.qa") + expect(subject.nameservers[0].ipv4).to eq("212.77.203.185") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.qtel.com.qa") + expect(subject.nameservers[1].ipv4).to eq("213.130.113.101") end end diff --git a/spec/whois/parsers/responses/whois.rnids.rs/rs/case_token_whois_privacy_spec.rb b/spec/whois/parsers/responses/whois.rnids.rs/rs/case_token_whois_privacy_spec.rb index a3fb33e8..820d49d7 100644 --- a/spec/whois/parsers/responses/whois.rnids.rs/rs/case_token_whois_privacy_spec.rb +++ b/spec/whois/parsers/responses/whois.rnids.rs/rs/case_token_whois_privacy_spec.rb @@ -9,32 +9,21 @@ # require 'spec_helper' -require 'whois/parsers/whois.rnids.rs.rb' -describe Whois::Parsers::WhoisRnidsRs, "case_token_whois_privacy.expected" do +describe "whois.rnids.rs", :aggregate_failures do subject do file = fixture("responses", "whois.rnids.rs/rs/case_token_whois_privacy.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.rnids.rs") + Whois::Parser.parser_for(part) end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end + it "matches case_token_whois_privacy.expected" do + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.rnids.rs/rs/property_nameservers_hyphenated_spec.rb b/spec/whois/parsers/responses/whois.rnids.rs/rs/property_nameservers_hyphenated_spec.rb index eab55dfc..71102df5 100644 --- a/spec/whois/parsers/responses/whois.rnids.rs/rs/property_nameservers_hyphenated_spec.rb +++ b/spec/whois/parsers/responses/whois.rnids.rs/rs/property_nameservers_hyphenated_spec.rb @@ -9,26 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.rnids.rs.rb' -describe Whois::Parsers::WhoisRnidsRs, "property_nameservers_hyphenated.expected" do +describe "whois.rnids.rs", :aggregate_failures do subject do file = fixture("responses", "whois.rnids.rs/rs/property_nameservers_hyphenated.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.rnids.rs") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("bits-hq.bitsyu.net") - expect(subject.nameservers[0].ipv4).to eq("217.24.17.10") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("largo.bitsyu.net") - expect(subject.nameservers[1].ipv4).to eq("217.24.17.80") - end + it "matches property_nameservers_hyphenated.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("bits-hq.bitsyu.net") + expect(subject.nameservers[0].ipv4).to eq("217.24.17.10") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("largo.bitsyu.net") + expect(subject.nameservers[1].ipv4).to eq("217.24.17.80") end end diff --git a/spec/whois/parsers/responses/whois.rnids.rs/rs/property_status_expired_spec.rb b/spec/whois/parsers/responses/whois.rnids.rs/rs/property_status_expired_spec.rb index 05010f34..50d6800e 100644 --- a/spec/whois/parsers/responses/whois.rnids.rs/rs/property_status_expired_spec.rb +++ b/spec/whois/parsers/responses/whois.rnids.rs/rs/property_status_expired_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.rnids.rs.rb' -describe Whois::Parsers::WhoisRnidsRs, "property_status_expired.expected" do +describe "whois.rnids.rs", :aggregate_failures do subject do file = fixture("responses", "whois.rnids.rs/rs/property_status_expired.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.rnids.rs") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:expired) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_expired.expected" do + expect(subject.status).to eq(:expired) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.rnids.rs/rs/property_status_in_transfer_spec.rb b/spec/whois/parsers/responses/whois.rnids.rs/rs/property_status_in_transfer_spec.rb index a38a9df7..3fe5d0e5 100644 --- a/spec/whois/parsers/responses/whois.rnids.rs/rs/property_status_in_transfer_spec.rb +++ b/spec/whois/parsers/responses/whois.rnids.rs/rs/property_status_in_transfer_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.rnids.rs.rb' -describe Whois::Parsers::WhoisRnidsRs, "property_status_in_transfer.expected" do +describe "whois.rnids.rs", :aggregate_failures do subject do file = fixture("responses", "whois.rnids.rs/rs/property_status_in_transfer.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.rnids.rs") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_in_transfer.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.rnids.rs/rs/property_status_locked_spec.rb b/spec/whois/parsers/responses/whois.rnids.rs/rs/property_status_locked_spec.rb index c12e77dd..85ff2c9f 100644 --- a/spec/whois/parsers/responses/whois.rnids.rs/rs/property_status_locked_spec.rb +++ b/spec/whois/parsers/responses/whois.rnids.rs/rs/property_status_locked_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.rnids.rs.rb' -describe Whois::Parsers::WhoisRnidsRs, "property_status_locked.expected" do +describe "whois.rnids.rs", :aggregate_failures do subject do file = fixture("responses", "whois.rnids.rs/rs/property_status_locked.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.rnids.rs") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_locked.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.rnids.rs/rs/status_available_spec.rb b/spec/whois/parsers/responses/whois.rnids.rs/rs/status_available_spec.rb index 1d3ae8ac..3b9d661f 100644 --- a/spec/whois/parsers/responses/whois.rnids.rs/rs/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.rnids.rs/rs/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.rnids.rs.rb' -describe Whois::Parsers::WhoisRnidsRs, "status_available.expected" do +describe "whois.rnids.rs", :aggregate_failures do subject do file = fixture("responses", "whois.rnids.rs/rs/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.rnids.rs") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.rnids.rs/rs/status_registered_spec.rb b/spec/whois/parsers/responses/whois.rnids.rs/rs/status_registered_spec.rb index 2244057b..1a2d5216 100644 --- a/spec/whois/parsers/responses/whois.rnids.rs/rs/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.rnids.rs/rs/status_registered_spec.rb @@ -9,125 +9,69 @@ # require 'spec_helper' -require 'whois/parsers/whois.rnids.rs.rb' -describe Whois::Parsers::WhoisRnidsRs, "status_registered.expected" do +describe "whois.rnids.rs", :aggregate_failures do subject do file = fixture("responses", "whois.rnids.rs/rs/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.rnids.rs") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.rs") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2008-03-10 12:31:19")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-02-11 19:49:38")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-03-10 12:31:19")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("NINET Company d.o.o.") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway, Mountain View, United States of America") - expect(subject.registrant_contacts[0].email).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("Domain Administrator, Drustvo za marketing Google DOO") - expect(subject.admin_contacts[0].address).to eq("Marsala Birjuzova 47/18, Beograd, Serbia") - expect(subject.admin_contacts[0].email).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Domain Administrator, MarkMonitor, Inc.") - expect(subject.technical_contacts[0].address).to eq("391 N Ancestor Place, Boise, ID, United States of America") - expect(subject.technical_contacts[0].email).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq("216.239.36.10") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - expect(subject.nameservers[3].ipv4).to eq("216.239.38.10") - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect(subject.domain).to eq("google.rs") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2008-03-10 12:31:19")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-02-11 19:49:38")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-03-10 12:31:19")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("NINET Company d.o.o.") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway, Mountain View, United States of America") + expect(subject.registrant_contacts[0].email).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("Domain Administrator, Drustvo za marketing Google DOO") + expect(subject.admin_contacts[0].address).to eq("Marsala Birjuzova 47/18, Beograd, Serbia") + expect(subject.admin_contacts[0].email).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Domain Administrator, MarkMonitor, Inc.") + expect(subject.technical_contacts[0].address).to eq("391 N Ancestor Place, Boise, ID, United States of America") + expect(subject.technical_contacts[0].email).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].ipv4).to eq("216.239.36.10") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.nameservers[3].ipv4).to eq("216.239.38.10") end end diff --git a/spec/whois/parsers/responses/whois.rotld.ro/ro/property_status_updateprohibited_spec.rb b/spec/whois/parsers/responses/whois.rotld.ro/ro/property_status_updateprohibited_spec.rb deleted file mode 100644 index 0185d62e..00000000 --- a/spec/whois/parsers/responses/whois.rotld.ro/ro/property_status_updateprohibited_spec.rb +++ /dev/null @@ -1,37 +0,0 @@ -# This file is autogenerated. Do not edit it manually. -# If you want change the content of this file, edit -# -# /spec/fixtures/responses/whois.rotld.ro/ro/property_status_updateprohibited.expected -# -# and regenerate the tests with the following rake task -# -# $ rake spec:generate -# - -require 'spec_helper' -require 'whois/parsers/whois.rotld.ro.rb' - -describe Whois::Parsers::WhoisRotldRo, "property_status_updateprohibited.expected" do - - subject do - file = fixture("responses", "whois.rotld.ro/ro/property_status_updateprohibited.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) - end - - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end -end diff --git a/spec/whois/parsers/responses/whois.rotld.ro/ro/status_available_spec.rb b/spec/whois/parsers/responses/whois.rotld.ro/ro/status_available_spec.rb index b15e0745..723b489e 100644 --- a/spec/whois/parsers/responses/whois.rotld.ro/ro/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.rotld.ro/ro/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.rotld.ro.rb' -describe Whois::Parsers::WhoisRotldRo, "status_available.expected" do +describe "whois.rotld.ro", :aggregate_failures do subject do file = fixture("responses", "whois.rotld.ro/ro/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.rotld.ro") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.rotld.ro/ro/status_registered_spec.rb b/spec/whois/parsers/responses/whois.rotld.ro/ro/status_registered_spec.rb index 81a4e9e7..0d720a7c 100644 --- a/spec/whois/parsers/responses/whois.rotld.ro/ro/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.rotld.ro/ro/status_registered_spec.rb @@ -9,66 +9,37 @@ # require 'spec_helper' -require 'whois/parsers/whois.rotld.ro.rb' -describe Whois::Parsers::WhoisRotldRo, "status_registered.expected" do +describe "whois.rotld.ro", :aggregate_failures do subject do file = fixture("responses", "whois.rotld.ro/ro/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.rotld.ro") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2000-07-17 00:00:00")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2024-09-15 00:00:00")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.rrpproxy.net/status_available_spec.rb b/spec/whois/parsers/responses/whois.rrpproxy.net/status_available_spec.rb index 15c6cdca..6b7cc0ec 100644 --- a/spec/whois/parsers/responses/whois.rrpproxy.net/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.rrpproxy.net/status_available_spec.rb @@ -9,83 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.rrpproxy.net.rb' -describe Whois::Parsers::WhoisRrpproxyNet, "status_available.expected" do +describe "whois.rrpproxy.net", :aggregate_failures do subject do file = fixture("responses", "whois.rrpproxy.net/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.rrpproxy.net") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.rrpproxy.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.rrpproxy.net/status_registered_spec.rb index 4cefa48e..f8696570 100644 --- a/spec/whois/parsers/responses/whois.rrpproxy.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.rrpproxy.net/status_registered_spec.rb @@ -9,145 +9,93 @@ # require 'spec_helper' -require 'whois/parsers/whois.rrpproxy.net.rb' -describe Whois::Parsers::WhoisRrpproxyNet, "status_registered.expected" do +describe "whois.rrpproxy.net", :aggregate_failures do subject do file = fixture("responses", "whois.rrpproxy.net/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.rrpproxy.net") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("multisafepay.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("334322677_DOMAIN_COM-VRSN") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2006-02-03 19:44:56 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-02-04 08:34:14 UTC")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("269") - expect(subject.registrar.name).to eq("Key-Systems GmbH") - expect(subject.registrar.organization).to eq("Key-Systems GmbH") - expect(subject.registrar.url).to eq("http://www.reasonnet.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("P-DQJ547") - expect(subject.registrant_contacts[0].name).to eq("David Jacobs") - expect(subject.registrant_contacts[0].organization).to eq("ReasonNet B.V.") - expect(subject.registrant_contacts[0].address).to eq("Gyroscoopweg 134") - expect(subject.registrant_contacts[0].city).to eq("Amsterdam") - expect(subject.registrant_contacts[0].zip).to eq("1042 AZ") - expect(subject.registrant_contacts[0].state).to eq("NH") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("NL") - expect(subject.registrant_contacts[0].phone).to eq("+31.205060035") - expect(subject.registrant_contacts[0].fax).to eq("+31.205060038") - expect(subject.registrant_contacts[0].email).to eq("domains@reasonnet.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("P-OEG220") - expect(subject.admin_contacts[0].name).to eq("Olaf Geurs") - expect(subject.admin_contacts[0].organization).to eq("ION") - expect(subject.admin_contacts[0].address).to eq("Vlierweg 12") - expect(subject.admin_contacts[0].city).to eq("Amsterdam") - expect(subject.admin_contacts[0].zip).to eq("1032 LG") - expect(subject.admin_contacts[0].state).to eq("NH") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("NL") - expect(subject.admin_contacts[0].phone).to eq("+31.204949100") - expect(subject.admin_contacts[0].fax).to eq("") - expect(subject.admin_contacts[0].email).to eq("domains@reasonnet.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("P-OEG220") - expect(subject.technical_contacts[0].name).to eq("Olaf Geurs") - expect(subject.technical_contacts[0].organization).to eq("ION") - expect(subject.technical_contacts[0].address).to eq("Vlierweg 12") - expect(subject.technical_contacts[0].city).to eq("Amsterdam") - expect(subject.technical_contacts[0].zip).to eq("1032 LG") - expect(subject.technical_contacts[0].state).to eq("NH") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("NL") - expect(subject.technical_contacts[0].phone).to eq("+31.204949100") - expect(subject.technical_contacts[0].fax).to eq("") - expect(subject.technical_contacts[0].email).to eq("domains@reasonnet.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns.teletik.nl") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns3.teletik.nl") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("multisafepay.com") + expect(subject.domain_id).to eq("334322677_DOMAIN_COM-VRSN") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2006-02-03 19:44:56 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-02-04 08:34:14 UTC")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("269") + expect(subject.registrar.name).to eq("Key-Systems GmbH") + expect(subject.registrar.url).to eq("http://www.reasonnet.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("P-DQJ547") + expect(subject.registrant_contacts[0].name).to eq("David Jacobs") + expect(subject.registrant_contacts[0].organization).to eq("ReasonNet B.V.") + expect(subject.registrant_contacts[0].address).to eq("Gyroscoopweg 134") + expect(subject.registrant_contacts[0].city).to eq("Amsterdam") + expect(subject.registrant_contacts[0].zip).to eq("1042 AZ") + expect(subject.registrant_contacts[0].state).to eq("NH") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("NL") + expect(subject.registrant_contacts[0].phone).to eq("+31.205060035") + expect(subject.registrant_contacts[0].fax).to eq("+31.205060038") + expect(subject.registrant_contacts[0].email).to eq("domains@reasonnet.com") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("P-OEG220") + expect(subject.admin_contacts[0].name).to eq("Olaf Geurs") + expect(subject.admin_contacts[0].organization).to eq("ION") + expect(subject.admin_contacts[0].address).to eq("Vlierweg 12") + expect(subject.admin_contacts[0].city).to eq("Amsterdam") + expect(subject.admin_contacts[0].zip).to eq("1032 LG") + expect(subject.admin_contacts[0].state).to eq("NH") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("NL") + expect(subject.admin_contacts[0].phone).to eq("+31.204949100") + expect(subject.admin_contacts[0].fax).to eq("") + expect(subject.admin_contacts[0].email).to eq("domains@reasonnet.com") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("P-OEG220") + expect(subject.technical_contacts[0].name).to eq("Olaf Geurs") + expect(subject.technical_contacts[0].organization).to eq("ION") + expect(subject.technical_contacts[0].address).to eq("Vlierweg 12") + expect(subject.technical_contacts[0].city).to eq("Amsterdam") + expect(subject.technical_contacts[0].zip).to eq("1032 LG") + expect(subject.technical_contacts[0].state).to eq("NH") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("NL") + expect(subject.technical_contacts[0].phone).to eq("+31.204949100") + expect(subject.technical_contacts[0].fax).to eq("") + expect(subject.technical_contacts[0].email).to eq("domains@reasonnet.com") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns.teletik.nl") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns3.teletik.nl") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.safenames.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.safenames.net/status_registered_spec.rb index 6c07e20d..c612ab90 100644 --- a/spec/whois/parsers/responses/whois.safenames.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.safenames.net/status_registered_spec.rb @@ -9,142 +9,90 @@ # require 'spec_helper' -require 'whois/parsers/whois.safenames.net.rb' -describe Whois::Parsers::WhoisSafenamesNet, "status_registered.expected" do +describe "whois.safenames.net", :aggregate_failures do subject do file = fixture("responses", "whois.safenames.net/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.safenames.net") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("stripe.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1995-09-12T04:00:00Z")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-10-02T15:33:46Z")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2024-09-11T04:00:00Z")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("447") - expect(subject.registrar.name).to eq("Safenames Ltd") - expect(subject.registrar.organization).to eq("Safenames Ltd") - expect(subject.registrar.url).to eq("http://www.safenames.net") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Domain Admin") - expect(subject.registrant_contacts[0].organization).to eq("Stripe") - expect(subject.registrant_contacts[0].address).to eq("3180 18th St") - expect(subject.registrant_contacts[0].city).to eq("San Francisco") - expect(subject.registrant_contacts[0].zip).to eq("94110") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("US") - expect(subject.registrant_contacts[0].phone).to eq("+1.8772544179") - expect(subject.registrant_contacts[0].fax).to eq("") - expect(subject.registrant_contacts[0].email).to eq("dns@stripe.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("Domain Admin") - expect(subject.admin_contacts[0].organization).to eq("Stripe") - expect(subject.admin_contacts[0].address).to eq("3180 18th St") - expect(subject.admin_contacts[0].city).to eq("San Francisco") - expect(subject.admin_contacts[0].zip).to eq("94110") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("US") - expect(subject.admin_contacts[0].phone).to eq("+1.8772544179") - expect(subject.admin_contacts[0].fax).to eq("") - expect(subject.admin_contacts[0].email).to eq("dns@stripe.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Domain Admin") - expect(subject.technical_contacts[0].organization).to eq("Stripe") - expect(subject.technical_contacts[0].address).to eq("3180 18th St") - expect(subject.technical_contacts[0].city).to eq("San Francisco") - expect(subject.technical_contacts[0].zip).to eq("94110") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("US") - expect(subject.technical_contacts[0].phone).to eq("+1.8772544179") - expect(subject.technical_contacts[0].fax).to eq("") - expect(subject.technical_contacts[0].email).to eq("dns@stripe.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("dns1.idp365.net") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("dns2.idp365.net") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("stripe.com") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1995-09-12T04:00:00Z")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-10-02T15:33:46Z")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2024-09-11T04:00:00Z")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("447") + expect(subject.registrar.name).to eq("Safenames Ltd") + expect(subject.registrar.url).to eq("http://www.safenames.net") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Domain Admin") + expect(subject.registrant_contacts[0].organization).to eq("Stripe") + expect(subject.registrant_contacts[0].address).to eq("3180 18th St") + expect(subject.registrant_contacts[0].city).to eq("San Francisco") + expect(subject.registrant_contacts[0].zip).to eq("94110") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("US") + expect(subject.registrant_contacts[0].phone).to eq("+1.8772544179") + expect(subject.registrant_contacts[0].fax).to eq("") + expect(subject.registrant_contacts[0].email).to eq("dns@stripe.com") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("Domain Admin") + expect(subject.admin_contacts[0].organization).to eq("Stripe") + expect(subject.admin_contacts[0].address).to eq("3180 18th St") + expect(subject.admin_contacts[0].city).to eq("San Francisco") + expect(subject.admin_contacts[0].zip).to eq("94110") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("US") + expect(subject.admin_contacts[0].phone).to eq("+1.8772544179") + expect(subject.admin_contacts[0].fax).to eq("") + expect(subject.admin_contacts[0].email).to eq("dns@stripe.com") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Domain Admin") + expect(subject.technical_contacts[0].organization).to eq("Stripe") + expect(subject.technical_contacts[0].address).to eq("3180 18th St") + expect(subject.technical_contacts[0].city).to eq("San Francisco") + expect(subject.technical_contacts[0].zip).to eq("94110") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("US") + expect(subject.technical_contacts[0].phone).to eq("+1.8772544179") + expect(subject.technical_contacts[0].fax).to eq("") + expect(subject.technical_contacts[0].email).to eq("dns@stripe.com") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("dns1.idp365.net") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("dns2.idp365.net") end end diff --git a/spec/whois/parsers/responses/whois.schlund.info/registered_without_update_on_spec.rb b/spec/whois/parsers/responses/whois.schlund.info/registered_without_update_on_spec.rb index 0c08d893..9001aacc 100644 --- a/spec/whois/parsers/responses/whois.schlund.info/registered_without_update_on_spec.rb +++ b/spec/whois/parsers/responses/whois.schlund.info/registered_without_update_on_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.schlund.info.rb' -describe Whois::Parsers::WhoisSchlundInfo, "registered_without_update_on.expected" do +describe "whois.schlund.info", :aggregate_failures do subject do file = fixture("responses", "whois.schlund.info/registered_without_update_on.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.schlund.info") + Whois::Parser.parser_for(part) end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end + it "matches registered_without_update_on.expected" do + expect(subject.updated_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.schlund.info/status_available_spec.rb b/spec/whois/parsers/responses/whois.schlund.info/status_available_spec.rb index 10cf3dd1..ef23cab9 100644 --- a/spec/whois/parsers/responses/whois.schlund.info/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.schlund.info/status_available_spec.rb @@ -9,83 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.schlund.info.rb' -describe Whois::Parsers::WhoisSchlundInfo, "status_available.expected" do +describe "whois.schlund.info", :aggregate_failures do subject do file = fixture("responses", "whois.schlund.info/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.schlund.info") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.schlund.info/status_registered_spec.rb b/spec/whois/parsers/responses/whois.schlund.info/status_registered_spec.rb index 7b94074d..ba6d9854 100644 --- a/spec/whois/parsers/responses/whois.schlund.info/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.schlund.info/status_registered_spec.rb @@ -9,137 +9,85 @@ # require 'spec_helper' -require 'whois/parsers/whois.schlund.info.rb' -describe Whois::Parsers::WhoisSchlundInfo, "status_registered.expected" do +describe "whois.schlund.info", :aggregate_failures do subject do file = fixture("responses", "whois.schlund.info/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.schlund.info") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("schlund.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1996-10-10 00:00:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-10-09 00:00:00")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-10-09 00:00:00")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("83") - expect(subject.registrar.name).to eq("1&1 Internet AG") - expect(subject.registrar.organization).to eq("1&1 Internet AG") - expect(subject.registrar.url).to eq("http://1and1.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Markus Huhn") - expect(subject.registrant_contacts[0].organization).to eq("1&1 Internet AG") - expect(subject.registrant_contacts[0].address).to eq("Elgendorfer Str. 57") - expect(subject.registrant_contacts[0].city).to eq("Montabaur") - expect(subject.registrant_contacts[0].zip).to eq("56410") - expect(subject.registrant_contacts[0].state).to eq("") - expect(subject.registrant_contacts[0].country_code).to eq("DE") - expect(subject.registrant_contacts[0].phone).to eq("+49.2602960") - expect(subject.registrant_contacts[0].fax).to eq("+49.72191374215") - expect(subject.registrant_contacts[0].email).to eq("hostmaster@1und1.de") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("Markus Huhn") - expect(subject.admin_contacts[0].organization).to eq("1&1 Internet AG") - expect(subject.admin_contacts[0].address).to eq("Elgendorfer Str. 57") - expect(subject.admin_contacts[0].city).to eq("Montabaur") - expect(subject.admin_contacts[0].zip).to eq("56410") - expect(subject.admin_contacts[0].state).to eq("") - expect(subject.admin_contacts[0].country_code).to eq("DE") - expect(subject.admin_contacts[0].phone).to eq("+49.2602960") - expect(subject.admin_contacts[0].fax).to eq("+49.72191374215") - expect(subject.admin_contacts[0].email).to eq("hostmaster@1und1.de") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Hostmaster EINSUNDEINS") - expect(subject.technical_contacts[0].organization).to eq("1&1 Internet AG") - expect(subject.technical_contacts[0].address).to eq("Brauerstr. 48") - expect(subject.technical_contacts[0].city).to eq("Karlsruhe") - expect(subject.technical_contacts[0].zip).to eq("76135") - expect(subject.technical_contacts[0].state).to eq("") - expect(subject.technical_contacts[0].country_code).to eq("DE") - expect(subject.technical_contacts[0].phone).to eq("+49.7219600") - expect(subject.technical_contacts[0].fax).to eq("+49.72191374248") - expect(subject.technical_contacts[0].email).to eq("hostmaster@1und1.de") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns-1and1.ui-dns.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns-1and1.ui-dns.org") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns-1and1.ui-dns.de") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns-1and1.ui-dns.biz") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("schlund.com") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1996-10-10 00:00:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-10-09 00:00:00")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-10-09 00:00:00")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("83") + expect(subject.registrar.name).to eq("1&1 Internet AG") + expect(subject.registrar.url).to eq("http://1and1.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Markus Huhn") + expect(subject.registrant_contacts[0].organization).to eq("1&1 Internet AG") + expect(subject.registrant_contacts[0].address).to eq("Elgendorfer Str. 57") + expect(subject.registrant_contacts[0].city).to eq("Montabaur") + expect(subject.registrant_contacts[0].zip).to eq("56410") + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("DE") + expect(subject.registrant_contacts[0].phone).to eq("+49.2602960") + expect(subject.registrant_contacts[0].fax).to eq("+49.72191374215") + expect(subject.registrant_contacts[0].email).to eq("hostmaster@1und1.de") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("Markus Huhn") + expect(subject.admin_contacts[0].organization).to eq("1&1 Internet AG") + expect(subject.admin_contacts[0].address).to eq("Elgendorfer Str. 57") + expect(subject.admin_contacts[0].city).to eq("Montabaur") + expect(subject.admin_contacts[0].zip).to eq("56410") + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("DE") + expect(subject.admin_contacts[0].phone).to eq("+49.2602960") + expect(subject.admin_contacts[0].fax).to eq("+49.72191374215") + expect(subject.admin_contacts[0].email).to eq("hostmaster@1und1.de") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Hostmaster EINSUNDEINS") + expect(subject.technical_contacts[0].organization).to eq("1&1 Internet AG") + expect(subject.technical_contacts[0].address).to eq("Brauerstr. 48") + expect(subject.technical_contacts[0].city).to eq("Karlsruhe") + expect(subject.technical_contacts[0].zip).to eq("76135") + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("DE") + expect(subject.technical_contacts[0].phone).to eq("+49.7219600") + expect(subject.technical_contacts[0].fax).to eq("+49.72191374248") + expect(subject.technical_contacts[0].email).to eq("hostmaster@1und1.de") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns-1and1.ui-dns.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns-1and1.ui-dns.org") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns-1and1.ui-dns.de") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns-1and1.ui-dns.biz") end end diff --git a/spec/whois/parsers/responses/whois.sgnic.sg/sg/property_nameservers_schema_1_spec.rb b/spec/whois/parsers/responses/whois.sgnic.sg/sg/property_nameservers_schema_1_spec.rb index 24aed13e..87e206f6 100644 --- a/spec/whois/parsers/responses/whois.sgnic.sg/sg/property_nameservers_schema_1_spec.rb +++ b/spec/whois/parsers/responses/whois.sgnic.sg/sg/property_nameservers_schema_1_spec.rb @@ -9,28 +9,25 @@ # require 'spec_helper' -require 'whois/parsers/whois.sgnic.sg.rb' -describe Whois::Parsers::WhoisSgnicSg, "property_nameservers_schema_1.expected" do +describe "whois.sgnic.sg", :aggregate_failures do subject do file = fixture("responses", "whois.sgnic.sg/sg/property_nameservers_schema_1.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sgnic.sg") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches property_nameservers_schema_1.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.sgnic.sg/sg/property_nameservers_schema_1_with_ip_spec.rb b/spec/whois/parsers/responses/whois.sgnic.sg/sg/property_nameservers_schema_1_with_ip_spec.rb index ed0cc710..a8227839 100644 --- a/spec/whois/parsers/responses/whois.sgnic.sg/sg/property_nameservers_schema_1_with_ip_spec.rb +++ b/spec/whois/parsers/responses/whois.sgnic.sg/sg/property_nameservers_schema_1_with_ip_spec.rb @@ -9,29 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.sgnic.sg.rb' -describe Whois::Parsers::WhoisSgnicSg, "property_nameservers_schema_1_with_ip.expected" do +describe "whois.sgnic.sg", :aggregate_failures do subject do file = fixture("responses", "whois.sgnic.sg/sg/property_nameservers_schema_1_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sgnic.sg") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("dnssec1.singnet.com.sg") - expect(subject.nameservers[0].ipv4).to eq("165.21.83.11") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("dnssec2.singnet.com.sg") - expect(subject.nameservers[1].ipv4).to eq("195.13.10.226") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("dnssec3.singnet.com.sg") - expect(subject.nameservers[2].ipv4).to eq("165.21.100.11") - end + it "matches property_nameservers_schema_1_with_ip.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("dnssec1.singnet.com.sg") + expect(subject.nameservers[0].ipv4).to eq("165.21.83.11") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("dnssec2.singnet.com.sg") + expect(subject.nameservers[1].ipv4).to eq("195.13.10.226") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("dnssec3.singnet.com.sg") + expect(subject.nameservers[2].ipv4).to eq("165.21.100.11") end end diff --git a/spec/whois/parsers/responses/whois.sgnic.sg/sg/property_nameservers_schema_2_spec.rb b/spec/whois/parsers/responses/whois.sgnic.sg/sg/property_nameservers_schema_2_spec.rb index 0fc08311..821023b3 100644 --- a/spec/whois/parsers/responses/whois.sgnic.sg/sg/property_nameservers_schema_2_spec.rb +++ b/spec/whois/parsers/responses/whois.sgnic.sg/sg/property_nameservers_schema_2_spec.rb @@ -9,28 +9,25 @@ # require 'spec_helper' -require 'whois/parsers/whois.sgnic.sg.rb' -describe Whois::Parsers::WhoisSgnicSg, "property_nameservers_schema_2.expected" do +describe "whois.sgnic.sg", :aggregate_failures do subject do file = fixture("responses", "whois.sgnic.sg/sg/property_nameservers_schema_2.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sgnic.sg") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches property_nameservers_schema_2.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.sgnic.sg/sg/status_available_spec.rb b/spec/whois/parsers/responses/whois.sgnic.sg/sg/status_available_spec.rb index 12fd4f6f..26a2da98 100644 --- a/spec/whois/parsers/responses/whois.sgnic.sg/sg/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.sgnic.sg/sg/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.sgnic.sg.rb' -describe Whois::Parsers::WhoisSgnicSg, "status_available.expected" do +describe "whois.sgnic.sg", :aggregate_failures do subject do file = fixture("responses", "whois.sgnic.sg/sg/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sgnic.sg") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.sgnic.sg/sg/status_registered_spec.rb b/spec/whois/parsers/responses/whois.sgnic.sg/sg/status_registered_spec.rb index 6308e170..fd646984 100644 --- a/spec/whois/parsers/responses/whois.sgnic.sg/sg/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.sgnic.sg/sg/status_registered_spec.rb @@ -9,60 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.sgnic.sg.rb' -describe Whois::Parsers::WhoisSgnicSg, "status_registered.expected" do +describe "whois.sgnic.sg", :aggregate_failures do subject do file = fixture("responses", "whois.sgnic.sg/sg/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sgnic.sg") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(["OK", "CLIENT UPDATE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT DELETE PROHIBITED", "VerifiedID@SG-Not Required"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2005-01-03 12:00:00")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-01-03 00:00:00")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(["OK", "CLIENT UPDATE PROHIBITED", "CLIENT TRANSFER PROHIBITED", "CLIENT DELETE PROHIBITED", "VerifiedID@SG-Not Required"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2005-01-03 12:00:00")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-01-03 00:00:00")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_dakt_spec.rb b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_dakt_spec.rb index 9303a377..1f65886d 100644 --- a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_dakt_spec.rb +++ b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_dakt_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.sk-nic.sk.rb' -describe Whois::Parsers::WhoisSkNicSk, "property_status_dom_dakt.expected" do +describe "whois.sk-nic.sk", :aggregate_failures do subject do file = fixture("responses", "whois.sk-nic.sk/sk/property_status_dom_dakt.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sk-nic.sk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_dom_dakt.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_exp_spec.rb b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_exp_spec.rb index efe09844..33ec1781 100644 --- a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_exp_spec.rb +++ b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_exp_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.sk-nic.sk.rb' -describe Whois::Parsers::WhoisSkNicSk, "property_status_dom_exp.expected" do +describe "whois.sk-nic.sk", :aggregate_failures do subject do file = fixture("responses", "whois.sk-nic.sk/sk/property_status_dom_exp.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sk-nic.sk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_dom_exp.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_held_spec.rb b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_held_spec.rb index afc652af..d5a11d55 100644 --- a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_held_spec.rb +++ b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_held_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.sk-nic.sk.rb' -describe Whois::Parsers::WhoisSkNicSk, "property_status_dom_held.expected" do +describe "whois.sk-nic.sk", :aggregate_failures do subject do file = fixture("responses", "whois.sk-nic.sk/sk/property_status_dom_held.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sk-nic.sk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:redemption) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_dom_held.expected" do + expect(subject.status).to eq(:redemption) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_lnot_spec.rb b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_lnot_spec.rb index 2920dc12..de9eaa51 100644 --- a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_lnot_spec.rb +++ b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_lnot_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.sk-nic.sk.rb' -describe Whois::Parsers::WhoisSkNicSk, "property_status_dom_lnot.expected" do +describe "whois.sk-nic.sk", :aggregate_failures do subject do file = fixture("responses", "whois.sk-nic.sk/sk/property_status_dom_lnot.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sk-nic.sk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_dom_lnot.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_ok_spec.rb b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_ok_spec.rb index a332fa5a..5913c8bf 100644 --- a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_ok_spec.rb +++ b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_ok_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.sk-nic.sk.rb' -describe Whois::Parsers::WhoisSkNicSk, "property_status_dom_ok.expected" do +describe "whois.sk-nic.sk", :aggregate_failures do subject do file = fixture("responses", "whois.sk-nic.sk/sk/property_status_dom_ok.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sk-nic.sk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_dom_ok.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_ta_spec.rb b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_ta_spec.rb index b5f86a39..1e9b82d6 100644 --- a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_ta_spec.rb +++ b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_ta_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.sk-nic.sk.rb' -describe Whois::Parsers::WhoisSkNicSk, "property_status_dom_ta.expected" do +describe "whois.sk-nic.sk", :aggregate_failures do subject do file = fixture("responses", "whois.sk-nic.sk/sk/property_status_dom_ta.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sk-nic.sk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_dom_ta.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_warn_spec.rb b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_warn_spec.rb index d0fb1639..58c83740 100644 --- a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_warn_spec.rb +++ b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/property_status_dom_warn_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.sk-nic.sk.rb' -describe Whois::Parsers::WhoisSkNicSk, "property_status_dom_warn.expected" do +describe "whois.sk-nic.sk", :aggregate_failures do subject do file = fixture("responses", "whois.sk-nic.sk/sk/property_status_dom_warn.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sk-nic.sk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_dom_warn.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/status_available_spec.rb b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/status_available_spec.rb index 8504e7aa..0e9b9d02 100644 --- a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.sk-nic.sk.rb' -describe Whois::Parsers::WhoisSkNicSk, "status_available.expected" do +describe "whois.sk-nic.sk", :aggregate_failures do subject do file = fixture("responses", "whois.sk-nic.sk/sk/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sk-nic.sk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/status_registered_spec.rb b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/status_registered_spec.rb index c53cae04..2dbe8fb7 100644 --- a/spec/whois/parsers/responses/whois.sk-nic.sk/sk/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.sk-nic.sk/sk/status_registered_spec.rb @@ -9,60 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.sk-nic.sk.rb' -describe Whois::Parsers::WhoisSkNicSk, "status_registered.expected" do +describe "whois.sk-nic.sk", :aggregate_failures do subject do file = fixture("responses", "whois.sk-nic.sk/sk/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sk-nic.sk") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2010-06-28")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2011-07-23")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2010-06-28")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2011-07-23")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.smallregistry.net/status_available_spec.rb b/spec/whois/parsers/responses/whois.smallregistry.net/status_available_spec.rb index 287b4377..35841bc2 100644 --- a/spec/whois/parsers/responses/whois.smallregistry.net/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.smallregistry.net/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.smallregistry.net.rb' -describe Whois::Parsers::WhoisSmallregistryNet, "status_available.expected" do +describe "whois.smallregistry.net", :aggregate_failures do subject do file = fixture("responses", "whois.smallregistry.net/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.smallregistry.net") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Welcome to the SMALLREGISTRY WHOIS Server. Datas are available in order to supply you with information purpose only, PROMOPIXEL is not responsible for its accuracy. Copy of whole or part of the data without permission from PROMOPIXEL is strictly forbidden. The sole owner of a domain is the entity described in the relevant \"registrant:\" record. Domain or subdomain ownership disputes should be settled by contacting SMALLREGISTRY registry: https://www.smallregistry.net, or PROMOPIXEL: http://www.promopixel.com\nBienvenue sur le serveur WHOIS de SMALLREGISTRY. Les données fournies sont disponibles à titre informatif uniquement, PROMOPIXEL ne garantit pas leurs exactitudes. La copie de tout ou partie de la base de données est interdite sans l'autorisation expresse de PROMOPIXEL. Le seul propriétaire d'un domaine ou d'un sous-domaine est l'entité décrite dans l’enregistrement \"registrant:\" correspondant. Un différent sur la propriété d'un nom de domaine ou de sous-domaine peut être réglé en contactant le registre SMALLREGISTRY: https://www.smallregistry.net, ou PROMOPIXEL: http://www.promopixel.com") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Welcome to the SMALLREGISTRY WHOIS Server. Datas are available in order to supply you with information purpose only, PROMOPIXEL is not responsible for its accuracy. Copy of whole or part of the data without permission from PROMOPIXEL is strictly forbidden. The sole owner of a domain is the entity described in the relevant \"registrant:\" record. Domain or subdomain ownership disputes should be settled by contacting SMALLREGISTRY registry: https://www.smallregistry.net, or PROMOPIXEL: http://www.promopixel.com\nBienvenue sur le serveur WHOIS de SMALLREGISTRY. Les données fournies sont disponibles à titre informatif uniquement, PROMOPIXEL ne garantit pas leurs exactitudes. La copie de tout ou partie de la base de données est interdite sans l'autorisation expresse de PROMOPIXEL. Le seul propriétaire d'un domaine ou d'un sous-domaine est l'entité décrite dans l’enregistrement \"registrant:\" correspondant. Un différent sur la propriété d'un nom de domaine ou de sous-domaine peut être réglé en contactant le registre SMALLREGISTRY: https://www.smallregistry.net, ou PROMOPIXEL: http://www.promopixel.com") + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.smallregistry.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.smallregistry.net/status_registered_spec.rb index 37c9a5af..5b06d9a7 100644 --- a/spec/whois/parsers/responses/whois.smallregistry.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.smallregistry.net/status_registered_spec.rb @@ -9,129 +9,73 @@ # require 'spec_helper' -require 'whois/parsers/whois.smallregistry.net.rb' -describe Whois::Parsers::WhoisSmallregistryNet, "status_registered.expected" do +describe "whois.smallregistry.net", :aggregate_failures do subject do file = fixture("responses", "whois.smallregistry.net/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.smallregistry.net") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Welcome to the SMALLREGISTRY WHOIS Server. Datas are available in order to supply you with information purpose only, PROMOPIXEL is not responsible for its accuracy. Copy of whole or part of the data without permission from PROMOPIXEL is strictly forbidden. The sole owner of a domain is the entity described in the relevant \"registrant:\" record. Domain or subdomain ownership disputes should be settled by contacting SMALLREGISTRY registry: https://www.smallregistry.net, or PROMOPIXEL: http://www.promopixel.com\nBienvenue sur le serveur WHOIS de SMALLREGISTRY. Les données fournies sont disponibles à titre informatif uniquement, PROMOPIXEL ne garantit pas leurs exactitudes. La copie de tout ou partie de la base de données est interdite sans l'autorisation expresse de PROMOPIXEL. Le seul propriétaire d'un domaine ou d'un sous-domaine est l'entité décrite dans l’enregistrement \"registrant:\" correspondant. Un différent sur la propriété d'un nom de domaine ou de sous-domaine peut être réglé en contactant le registre SMALLREGISTRY: https://www.smallregistry.net, ou PROMOPIXEL: http://www.promopixel.com") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("dr-foo-bar-baz.chirurgiens-dentistes.fr") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2011-01-13 15:45:18 +01:00")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2013-01-13 15:45:18 +01:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-01-13 16:00:09 +01:00")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("GOOGLE") - expect(subject.registrar.organization).to eq("GOOGLE") - expect(subject.registrar.url).to eq("http://www.google.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("FBB1-SMALL") - expect(subject.registrant_contacts[0].name).to eq("FOO BAR BAZ") - expect(subject.registrant_contacts[0].organization).to eq("FOO BAR BAZ INC") - expect(subject.registrant_contacts[0].address).to eq("116 RUE DE LA PAIX\n75001 PARIS\nFRANCE") - expect(subject.registrant_contacts[0].phone).to eq("+33.123456651") - expect(subject.registrant_contacts[0].fax).to eq("+33.123456660") - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2011-01-13 15:45:18 +01:00")) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("QR1-SMALL") - expect(subject.admin_contacts[0].name).to eq(nil) - expect(subject.admin_contacts[0].organization).to eq("QWE RTY") - expect(subject.admin_contacts[0].address).to eq("13 RUE DE LA PAIX\n75003 PARIS\nFRANCE") - expect(subject.admin_contacts[0].phone).to eq("+33.144887967") - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2010-08-02 14:48:21 +02:00")) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("GOOG-SMALL") - expect(subject.technical_contacts[0].name).to eq(nil) - expect(subject.technical_contacts[0].organization).to eq("GOOGLE DNS MASTER") - expect(subject.technical_contacts[0].address).to eq("GOOGLE\n22, RUE DE LA PAIX\n75008 PARIS\nFRANCE") - expect(subject.technical_contacts[0].phone).to eq("+33.821845353") - expect(subject.technical_contacts[0].fax).to eq("+33.821845354") - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2011-05-18 09:35:37 +02:00")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Welcome to the SMALLREGISTRY WHOIS Server. Datas are available in order to supply you with information purpose only, PROMOPIXEL is not responsible for its accuracy. Copy of whole or part of the data without permission from PROMOPIXEL is strictly forbidden. The sole owner of a domain is the entity described in the relevant \"registrant:\" record. Domain or subdomain ownership disputes should be settled by contacting SMALLREGISTRY registry: https://www.smallregistry.net, or PROMOPIXEL: http://www.promopixel.com\nBienvenue sur le serveur WHOIS de SMALLREGISTRY. Les données fournies sont disponibles à titre informatif uniquement, PROMOPIXEL ne garantit pas leurs exactitudes. La copie de tout ou partie de la base de données est interdite sans l'autorisation expresse de PROMOPIXEL. Le seul propriétaire d'un domaine ou d'un sous-domaine est l'entité décrite dans l’enregistrement \"registrant:\" correspondant. Un différent sur la propriété d'un nom de domaine ou de sous-domaine peut être réglé en contactant le registre SMALLREGISTRY: https://www.smallregistry.net, ou PROMOPIXEL: http://www.promopixel.com") + expect(subject.domain).to eq("dr-foo-bar-baz.chirurgiens-dentistes.fr") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2011-01-13 15:45:18 +01:00")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2013-01-13 15:45:18 +01:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-01-13 16:00:09 +01:00")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("GOOGLE") + expect(subject.registrar.url).to eq("http://www.google.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("FBB1-SMALL") + expect(subject.registrant_contacts[0].name).to eq("FOO BAR BAZ") + expect(subject.registrant_contacts[0].organization).to eq("FOO BAR BAZ INC") + expect(subject.registrant_contacts[0].address).to eq("116 RUE DE LA PAIX\n75001 PARIS\nFRANCE") + expect(subject.registrant_contacts[0].phone).to eq("+33.123456651") + expect(subject.registrant_contacts[0].fax).to eq("+33.123456660") + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2011-01-13 15:45:18 +01:00")) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("QR1-SMALL") + expect(subject.admin_contacts[0].name).to eq(nil) + expect(subject.admin_contacts[0].organization).to eq("QWE RTY") + expect(subject.admin_contacts[0].address).to eq("13 RUE DE LA PAIX\n75003 PARIS\nFRANCE") + expect(subject.admin_contacts[0].phone).to eq("+33.144887967") + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2010-08-02 14:48:21 +02:00")) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("GOOG-SMALL") + expect(subject.technical_contacts[0].name).to eq(nil) + expect(subject.technical_contacts[0].organization).to eq("GOOGLE DNS MASTER") + expect(subject.technical_contacts[0].address).to eq("GOOGLE\n22, RUE DE LA PAIX\n75008 PARIS\nFRANCE") + expect(subject.technical_contacts[0].phone).to eq("+33.821845353") + expect(subject.technical_contacts[0].fax).to eq("+33.821845354") + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2011-05-18 09:35:37 +02:00")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.srs.net.nz/nz/property_status_pendingrelease_spec.rb b/spec/whois/parsers/responses/whois.srs.net.nz/nz/property_status_pendingrelease_spec.rb index f4845b68..1cae1835 100644 --- a/spec/whois/parsers/responses/whois.srs.net.nz/nz/property_status_pendingrelease_spec.rb +++ b/spec/whois/parsers/responses/whois.srs.net.nz/nz/property_status_pendingrelease_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.srs.net.nz.rb' -describe Whois::Parsers::WhoisSrsNetNz, "property_status_pendingrelease.expected" do +describe "whois.srs.net.nz", :aggregate_failures do subject do file = fixture("responses", "whois.srs.net.nz/nz/property_status_pendingrelease.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.srs.net.nz") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:redemption) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_pendingrelease.expected" do + expect(subject.status).to eq(:redemption) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.srs.net.nz/nz/response_throttled_spec.rb b/spec/whois/parsers/responses/whois.srs.net.nz/nz/response_throttled_spec.rb index 53068d51..36d8a226 100644 --- a/spec/whois/parsers/responses/whois.srs.net.nz/nz/response_throttled_spec.rb +++ b/spec/whois/parsers/responses/whois.srs.net.nz/nz/response_throttled_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.srs.net.nz.rb' -describe Whois::Parsers::WhoisSrsNetNz, "response_throttled.expected" do +describe "whois.srs.net.nz", :aggregate_failures do subject do file = fixture("responses", "whois.srs.net.nz/nz/response_throttled.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.srs.net.nz") + Whois::Parser.parser_for(part) end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(true) - end + it "matches response_throttled.expected" do + expect(subject.response_throttled?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.srs.net.nz/nz/status_available_spec.rb b/spec/whois/parsers/responses/whois.srs.net.nz/nz/status_available_spec.rb index 1c121995..26f5f08b 100644 --- a/spec/whois/parsers/responses/whois.srs.net.nz/nz/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.srs.net.nz/nz/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.srs.net.nz.rb' -describe Whois::Parsers::WhoisSrsNetNz, "status_available.expected" do +describe "whois.srs.net.nz", :aggregate_failures do subject do file = fixture("responses", "whois.srs.net.nz/nz/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.srs.net.nz") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.co.nz") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.co.nz") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.response_throttled?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.srs.net.nz/nz/status_invalid_spec.rb b/spec/whois/parsers/responses/whois.srs.net.nz/nz/status_invalid_spec.rb index c0b73a82..516b5b91 100644 --- a/spec/whois/parsers/responses/whois.srs.net.nz/nz/status_invalid_spec.rb +++ b/spec/whois/parsers/responses/whois.srs.net.nz/nz/status_invalid_spec.rb @@ -9,65 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.srs.net.nz.rb' -describe Whois::Parsers::WhoisSrsNetNz, "status_invalid.expected" do +describe "whois.srs.net.nz", :aggregate_failures do subject do file = fixture("responses", "whois.srs.net.nz/nz/status_invalid.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.srs.net.nz") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:invalid) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#valid?" do - it do - expect(subject.valid?).to eq(false) - end - end - describe "#invalid?" do - it do - expect(subject.invalid?).to eq(true) - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end + it "matches status_invalid.expected" do + expect(subject.status).to eq(:invalid) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.valid?).to eq(false) + expect(subject.invalid?).to eq(true) + expect(subject.response_throttled?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.srs.net.nz/nz/status_registered_spec.rb b/spec/whois/parsers/responses/whois.srs.net.nz/nz/status_registered_spec.rb index f7b8bf86..9185ad46 100644 --- a/spec/whois/parsers/responses/whois.srs.net.nz/nz/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.srs.net.nz/nz/status_registered_spec.rb @@ -9,151 +9,95 @@ # require 'spec_helper' -require 'whois/parsers/whois.srs.net.nz.rb' -describe Whois::Parsers::WhoisSrsNetNz, "status_registered.expected" do +describe "whois.srs.net.nz", :aggregate_failures do subject do file = fixture("responses", "whois.srs.net.nz/nz/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.srs.net.nz") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.co.nz") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1999-02-17 00:00:00 +13:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-01-16 23:20:24 +13:00")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-02-17 00:00:00 +13:00")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonitor") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Google Inc") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.registrant_contacts[0].city).to eq("Mountain View") - expect(subject.registrant_contacts[0].zip).to eq("94043") - expect(subject.registrant_contacts[0].state).to eq("CA") - expect(subject.registrant_contacts[0].country).to eq("US (UNITED STATES)") - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq("+1 650 +1 650 3300100") - expect(subject.registrant_contacts[0].fax).to eq("+1 650 +1 650 6181434") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("Google Inc") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.admin_contacts[0].city).to eq("Mountain View") - expect(subject.admin_contacts[0].zip).to eq("94043") - expect(subject.admin_contacts[0].state).to eq("CA") - expect(subject.admin_contacts[0].country).to eq("US (UNITED STATES)") - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq("+1 650 +1 650 3300100") - expect(subject.admin_contacts[0].fax).to eq("+1 650 +1 650 6181434") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Google Inc") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") - expect(subject.technical_contacts[0].city).to eq("Mountain View") - expect(subject.technical_contacts[0].zip).to eq("94043") - expect(subject.technical_contacts[0].state).to eq("CA") - expect(subject.technical_contacts[0].country).to eq("US (UNITED STATES)") - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq("+1 650 +1 650 3300100") - expect(subject.technical_contacts[0].fax).to eq("+ +1 650 6181434") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end - end - describe "#response_throttled?" do - it do - expect(subject.response_throttled?).to eq(false) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.co.nz") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1999-02-17 00:00:00 +13:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-01-16 23:20:24 +13:00")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-02-17 00:00:00 +13:00")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonitor") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Google Inc") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.registrant_contacts[0].city).to eq("Mountain View") + expect(subject.registrant_contacts[0].zip).to eq("94043") + expect(subject.registrant_contacts[0].state).to eq("CA") + expect(subject.registrant_contacts[0].country).to eq("US (UNITED STATES)") + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq("+1 650 +1 650 3300100") + expect(subject.registrant_contacts[0].fax).to eq("+1 650 +1 650 6181434") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("Google Inc") + expect(subject.admin_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.admin_contacts[0].city).to eq("Mountain View") + expect(subject.admin_contacts[0].zip).to eq("94043") + expect(subject.admin_contacts[0].state).to eq("CA") + expect(subject.admin_contacts[0].country).to eq("US (UNITED STATES)") + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq("+1 650 +1 650 3300100") + expect(subject.admin_contacts[0].fax).to eq("+1 650 +1 650 6181434") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Google Inc") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway") + expect(subject.technical_contacts[0].city).to eq("Mountain View") + expect(subject.technical_contacts[0].zip).to eq("94043") + expect(subject.technical_contacts[0].state).to eq("CA") + expect(subject.technical_contacts[0].country).to eq("US (UNITED STATES)") + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq("+1 650 +1 650 3300100") + expect(subject.technical_contacts[0].fax).to eq("+ +1 650 6181434") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.response_throttled?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.sx/sx/property_status_premium_name_spec.rb b/spec/whois/parsers/responses/whois.sx/sx/property_status_premium_name_spec.rb index dfcfaf17..77ae2db4 100644 --- a/spec/whois/parsers/responses/whois.sx/sx/property_status_premium_name_spec.rb +++ b/spec/whois/parsers/responses/whois.sx/sx/property_status_premium_name_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.sx.rb' -describe Whois::Parsers::WhoisSx, "property_status_premium_name.expected" do +describe "whois.sx", :aggregate_failures do subject do file = fixture("responses", "whois.sx/sx/property_status_premium_name.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sx") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:unavailable) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches property_status_premium_name.expected" do + expect(subject.status).to eq(:unavailable) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.sx/sx/status_available_spec.rb b/spec/whois/parsers/responses/whois.sx/sx/status_available_spec.rb index 92f6915f..455aac6f 100644 --- a/spec/whois/parsers/responses/whois.sx/sx/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.sx/sx/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.sx.rb' -describe Whois::Parsers::WhoisSx, "status_available.expected" do +describe "whois.sx", :aggregate_failures do subject do file = fixture("responses", "whois.sx/sx/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sx") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("WHOIS LEGAL STATEMENT AND TERMS & CONDITIONS\nThe WHOIS service offered by OpenRegistry and the access to the\nrecords in the OpenRegistry WHOIS database are provided for information\npurposes only. It allows persons to check whether a specific domain name\nis still available or not and to obtain information related to the\nregistration records of existing domain names. You are not authorized to\naccess or query our WHOIS database through the use of electronic\nprocesses that are high-volume and automated except as reasonably\nnecessary to register domain names or modify existing registrations.\n\nOpenRegistry cannot, under any circumstances, be held liable should the\nstored information prove to be wrong, incomplete or inaccurate in any sense.\n\nBy submitting a WHOIS query you agree not to use the information made\navailable to:\n- Allow, enable or otherwise support the transmission of unsolicited,\ncommercial advertising or other solicitations whether via email, telephone\nor otherwise;\n- Target advertising in any possible way;\n- Cause nuisance in any possible way to the registrants by sending (whether\nby automated, electronic processes capable of enabling high volumes or\nother possible means) messages to them.\n\nWithout prejudice to the above, it is explicitly forbidden to extract, copy\nand/or use or re-utilise in any form and by any means (electronically or\nnot) the whole or a quantitatively or qualitatively substantial part of the\ncontents of the WHOIS database without prior and explicit permission by\nOpenRegistry, nor in any attempt hereof, to apply automated, electronic\nprocesses to OpenRegistry (or its systems).\n\nBy submitting the query you agree that any reproduction and/or transmission\nof data for commercial purposes will always be considered as the extraction\nof a substantial part of the content of the WHOIS database. You also agree\nto abide by this policy and accept that OpenRegistry can take measures to\nlimit the use of its WHOIS services in order to protect the privacy of its\nregistrants and/or the integrity of the database. OpenRegistry reserves the\nright to restrict your access to the WHOIS database in its sole discretion\nto ensure operational stability. OpenRegistry may restrict or terminate your\naccess to the WHOIS database for failure to abide by these terms of use.\n\nOpenRegistry reserves the right to modify these terms at any time.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.sx") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("WHOIS LEGAL STATEMENT AND TERMS & CONDITIONS\nThe WHOIS service offered by OpenRegistry and the access to the\nrecords in the OpenRegistry WHOIS database are provided for information\npurposes only. It allows persons to check whether a specific domain name\nis still available or not and to obtain information related to the\nregistration records of existing domain names. You are not authorized to\naccess or query our WHOIS database through the use of electronic\nprocesses that are high-volume and automated except as reasonably\nnecessary to register domain names or modify existing registrations.\n\nOpenRegistry cannot, under any circumstances, be held liable should the\nstored information prove to be wrong, incomplete or inaccurate in any sense.\n\nBy submitting a WHOIS query you agree not to use the information made\navailable to:\n- Allow, enable or otherwise support the transmission of unsolicited,\ncommercial advertising or other solicitations whether via email, telephone\nor otherwise;\n- Target advertising in any possible way;\n- Cause nuisance in any possible way to the registrants by sending (whether\nby automated, electronic processes capable of enabling high volumes or\nother possible means) messages to them.\n\nWithout prejudice to the above, it is explicitly forbidden to extract, copy\nand/or use or re-utilise in any form and by any means (electronically or\nnot) the whole or a quantitatively or qualitatively substantial part of the\ncontents of the WHOIS database without prior and explicit permission by\nOpenRegistry, nor in any attempt hereof, to apply automated, electronic\nprocesses to OpenRegistry (or its systems).\n\nBy submitting the query you agree that any reproduction and/or transmission\nof data for commercial purposes will always be considered as the extraction\nof a substantial part of the content of the WHOIS database. You also agree\nto abide by this policy and accept that OpenRegistry can take measures to\nlimit the use of its WHOIS services in order to protect the privacy of its\nregistrants and/or the integrity of the database. OpenRegistry reserves the\nright to restrict your access to the WHOIS database in its sole discretion\nto ensure operational stability. OpenRegistry may restrict or terminate your\naccess to the WHOIS database for failure to abide by these terms of use.\n\nOpenRegistry reserves the right to modify these terms at any time.") + expect(subject.domain).to eq("u34jedzcq.sx") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.sx/sx/status_registered_spec.rb b/spec/whois/parsers/responses/whois.sx/sx/status_registered_spec.rb index d44d7d33..dbe93c08 100644 --- a/spec/whois/parsers/responses/whois.sx/sx/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.sx/sx/status_registered_spec.rb @@ -9,149 +9,93 @@ # require 'spec_helper' -require 'whois/parsers/whois.sx.rb' -describe Whois::Parsers::WhoisSx, "status_registered.expected" do +describe "whois.sx", :aggregate_failures do subject do file = fixture("responses", "whois.sx/sx/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sx") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("WHOIS LEGAL STATEMENT AND TERMS & CONDITIONS\nThe WHOIS service offered by OpenRegistry and the access to the\nrecords in the OpenRegistry WHOIS database are provided for information\npurposes only. It allows persons to check whether a specific domain name\nis still available or not and to obtain information related to the\nregistration records of existing domain names. You are not authorized to\naccess or query our WHOIS database through the use of electronic\nprocesses that are high-volume and automated except as reasonably\nnecessary to register domain names or modify existing registrations.\n\nOpenRegistry cannot, under any circumstances, be held liable should the\nstored information prove to be wrong, incomplete or inaccurate in any sense.\n\nBy submitting a WHOIS query you agree not to use the information made\navailable to:\n- Allow, enable or otherwise support the transmission of unsolicited,\ncommercial advertising or other solicitations whether via email, telephone\nor otherwise;\n- Target advertising in any possible way;\n- Cause nuisance in any possible way to the registrants by sending (whether\nby automated, electronic processes capable of enabling high volumes or\nother possible means) messages to them.\n\nWithout prejudice to the above, it is explicitly forbidden to extract, copy\nand/or use or re-utilise in any form and by any means (electronically or\nnot) the whole or a quantitatively or qualitatively substantial part of the\ncontents of the WHOIS database without prior and explicit permission by\nOpenRegistry, nor in any attempt hereof, to apply automated, electronic\nprocesses to OpenRegistry (or its systems).\n\nBy submitting the query you agree that any reproduction and/or transmission\nof data for commercial purposes will always be considered as the extraction\nof a substantial part of the content of the WHOIS database. You also agree\nto abide by this policy and accept that OpenRegistry can take measures to\nlimit the use of its WHOIS services in order to protect the privacy of its\nregistrants and/or the integrity of the database. OpenRegistry reserves the\nright to restrict your access to the WHOIS database in its sole discretion\nto ensure operational stability. OpenRegistry may restrict or terminate your\naccess to the WHOIS database for failure to abide by these terms of use.\n\nOpenRegistry reserves the right to modify these terms at any time.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("whois.sx") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("d5-sx") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2011-12-09 14:07:22 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-02-25 16:50:39 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2022-12-09 14:07:22 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("SX Registry O") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("C65") - expect(subject.registrant_contacts[0].name).to eq("SX Registry SA administrator") - expect(subject.registrant_contacts[0].organization).to eq("SX Registry SA") - expect(subject.registrant_contacts[0].address).to eq("2, rue Léon Laval") - expect(subject.registrant_contacts[0].city).to eq("Leudelange") - expect(subject.registrant_contacts[0].zip).to eq("L3372") - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq("LUXEMBOURG") - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("registry@registry.sx") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("C65") - expect(subject.admin_contacts[0].name).to eq("SX Registry SA administrator") - expect(subject.admin_contacts[0].organization).to eq("SX Registry SA") - expect(subject.admin_contacts[0].address).to eq("2, rue Léon Laval") - expect(subject.admin_contacts[0].city).to eq("Leudelange") - expect(subject.admin_contacts[0].zip).to eq("L3372") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq("LUXEMBOURG") - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq(nil) - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("registry@registry.sx") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("C65") - expect(subject.technical_contacts[0].name).to eq("SX Registry SA administrator") - expect(subject.technical_contacts[0].organization).to eq("SX Registry SA") - expect(subject.technical_contacts[0].address).to eq("2, rue Léon Laval") - expect(subject.technical_contacts[0].city).to eq("Leudelange") - expect(subject.technical_contacts[0].zip).to eq("L3372") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq("LUXEMBOURG") - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq(nil) - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("registry@registry.sx") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("a.ns.sx") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("b.ns.sx") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("c.ns.sx") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("WHOIS LEGAL STATEMENT AND TERMS & CONDITIONS\nThe WHOIS service offered by OpenRegistry and the access to the\nrecords in the OpenRegistry WHOIS database are provided for information\npurposes only. It allows persons to check whether a specific domain name\nis still available or not and to obtain information related to the\nregistration records of existing domain names. You are not authorized to\naccess or query our WHOIS database through the use of electronic\nprocesses that are high-volume and automated except as reasonably\nnecessary to register domain names or modify existing registrations.\n\nOpenRegistry cannot, under any circumstances, be held liable should the\nstored information prove to be wrong, incomplete or inaccurate in any sense.\n\nBy submitting a WHOIS query you agree not to use the information made\navailable to:\n- Allow, enable or otherwise support the transmission of unsolicited,\ncommercial advertising or other solicitations whether via email, telephone\nor otherwise;\n- Target advertising in any possible way;\n- Cause nuisance in any possible way to the registrants by sending (whether\nby automated, electronic processes capable of enabling high volumes or\nother possible means) messages to them.\n\nWithout prejudice to the above, it is explicitly forbidden to extract, copy\nand/or use or re-utilise in any form and by any means (electronically or\nnot) the whole or a quantitatively or qualitatively substantial part of the\ncontents of the WHOIS database without prior and explicit permission by\nOpenRegistry, nor in any attempt hereof, to apply automated, electronic\nprocesses to OpenRegistry (or its systems).\n\nBy submitting the query you agree that any reproduction and/or transmission\nof data for commercial purposes will always be considered as the extraction\nof a substantial part of the content of the WHOIS database. You also agree\nto abide by this policy and accept that OpenRegistry can take measures to\nlimit the use of its WHOIS services in order to protect the privacy of its\nregistrants and/or the integrity of the database. OpenRegistry reserves the\nright to restrict your access to the WHOIS database in its sole discretion\nto ensure operational stability. OpenRegistry may restrict or terminate your\naccess to the WHOIS database for failure to abide by these terms of use.\n\nOpenRegistry reserves the right to modify these terms at any time.") + expect(subject.domain).to eq("whois.sx") + expect(subject.domain_id).to eq("d5-sx") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2011-12-09 14:07:22 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-02-25 16:50:39 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2022-12-09 14:07:22 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("SX Registry O") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("C65") + expect(subject.registrant_contacts[0].name).to eq("SX Registry SA administrator") + expect(subject.registrant_contacts[0].organization).to eq("SX Registry SA") + expect(subject.registrant_contacts[0].address).to eq("2, rue Léon Laval") + expect(subject.registrant_contacts[0].city).to eq("Leudelange") + expect(subject.registrant_contacts[0].zip).to eq("L3372") + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq("LUXEMBOURG") + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("registry@registry.sx") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("C65") + expect(subject.admin_contacts[0].name).to eq("SX Registry SA administrator") + expect(subject.admin_contacts[0].organization).to eq("SX Registry SA") + expect(subject.admin_contacts[0].address).to eq("2, rue Léon Laval") + expect(subject.admin_contacts[0].city).to eq("Leudelange") + expect(subject.admin_contacts[0].zip).to eq("L3372") + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq("LUXEMBOURG") + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq(nil) + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("registry@registry.sx") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("C65") + expect(subject.technical_contacts[0].name).to eq("SX Registry SA administrator") + expect(subject.technical_contacts[0].organization).to eq("SX Registry SA") + expect(subject.technical_contacts[0].address).to eq("2, rue Léon Laval") + expect(subject.technical_contacts[0].city).to eq("Leudelange") + expect(subject.technical_contacts[0].zip).to eq("L3372") + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq("LUXEMBOURG") + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq(nil) + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("registry@registry.sx") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("a.ns.sx") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("b.ns.sx") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("c.ns.sx") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.sx/sx/status_unavailable_spec.rb b/spec/whois/parsers/responses/whois.sx/sx/status_unavailable_spec.rb index a79a0fa3..1c60779e 100644 --- a/spec/whois/parsers/responses/whois.sx/sx/status_unavailable_spec.rb +++ b/spec/whois/parsers/responses/whois.sx/sx/status_unavailable_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.sx.rb' -describe Whois::Parsers::WhoisSx, "status_unavailable.expected" do +describe "whois.sx", :aggregate_failures do subject do file = fixture("responses", "whois.sx/sx/status_unavailable.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.sx") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:unavailable) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end + it "matches status_unavailable.expected" do + expect(subject.status).to eq(:unavailable) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.tcinet.ru/ru/property_nameservers_with_ip_spec.rb b/spec/whois/parsers/responses/whois.tcinet.ru/ru/property_nameservers_with_ip_spec.rb index 788562d2..e159b65d 100644 --- a/spec/whois/parsers/responses/whois.tcinet.ru/ru/property_nameservers_with_ip_spec.rb +++ b/spec/whois/parsers/responses/whois.tcinet.ru/ru/property_nameservers_with_ip_spec.rb @@ -9,29 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.tcinet.ru.rb' -describe Whois::Parsers::WhoisTcinetRu, "property_nameservers_with_ip.expected" do +describe "whois.tcinet.ru", :aggregate_failures do subject do file = fixture("responses", "whois.tcinet.ru/ru/property_nameservers_with_ip.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tcinet.ru") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns.masterhost.ru") - expect(subject.nameservers[0].ipv4).to eq("217.16.20.30") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.masterhost.ru") - expect(subject.nameservers[1].ipv4).to eq("217.16.16.30") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.masterhost.ru") - expect(subject.nameservers[2].ipv4).to eq("217.16.22.30") - end + it "matches property_nameservers_with_ip.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns.masterhost.ru") + expect(subject.nameservers[0].ipv4).to eq("217.16.20.30") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.masterhost.ru") + expect(subject.nameservers[1].ipv4).to eq("217.16.16.30") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns2.masterhost.ru") + expect(subject.nameservers[2].ipv4).to eq("217.16.22.30") end end diff --git a/spec/whois/parsers/responses/whois.tcinet.ru/ru/status_available_spec.rb b/spec/whois/parsers/responses/whois.tcinet.ru/ru/status_available_spec.rb index afd1df40..8e2c9511 100644 --- a/spec/whois/parsers/responses/whois.tcinet.ru/ru/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.tcinet.ru/ru/status_available_spec.rb @@ -9,81 +9,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.tcinet.ru.rb' -describe Whois::Parsers::WhoisTcinetRu, "status_available.expected" do +describe "whois.tcinet.ru", :aggregate_failures do subject do file = fixture("responses", "whois.tcinet.ru/ru/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tcinet.ru") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.tcinet.ru/ru/status_registered_spec.rb b/spec/whois/parsers/responses/whois.tcinet.ru/ru/status_registered_spec.rb index 85782eda..49547360 100644 --- a/spec/whois/parsers/responses/whois.tcinet.ru/ru/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.tcinet.ru/ru/status_registered_spec.rb @@ -9,97 +9,45 @@ # require 'spec_helper' -require 'whois/parsers/whois.tcinet.ru.rb' -describe Whois::Parsers::WhoisTcinetRu, "status_registered.expected" do +describe "whois.tcinet.ru", :aggregate_failures do subject do file = fixture("responses", "whois.tcinet.ru/ru/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tcinet.ru") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.ru") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(["REGISTERED", "DELEGATED", "VERIFIED"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2004-03-04")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-03-05")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("RU-CENTER-REG-RIPN") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].url).to eq("https://www.nic.ru/whois") - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.ru") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(["REGISTERED", "DELEGATED", "VERIFIED"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2004-03-04")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-03-05")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("RU-CENTER-REG-RIPN") + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].organization).to eq("Google Inc.") + expect(subject.admin_contacts[0].url).to eq("https://www.nic.ru/whois") + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.tcinet.ru/su/status_available_spec.rb b/spec/whois/parsers/responses/whois.tcinet.ru/su/status_available_spec.rb index b10c3c59..c1e388b5 100644 --- a/spec/whois/parsers/responses/whois.tcinet.ru/su/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.tcinet.ru/su/status_available_spec.rb @@ -9,81 +9,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.tcinet.ru.rb' -describe Whois::Parsers::WhoisTcinetRu, "status_available.expected" do +describe "whois.tcinet.ru", :aggregate_failures do subject do file = fixture("responses", "whois.tcinet.ru/su/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tcinet.ru") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.tcinet.ru/su/status_registered_spec.rb b/spec/whois/parsers/responses/whois.tcinet.ru/su/status_registered_spec.rb index aedd65d9..21963cac 100644 --- a/spec/whois/parsers/responses/whois.tcinet.ru/su/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.tcinet.ru/su/status_registered_spec.rb @@ -9,97 +9,45 @@ # require 'spec_helper' -require 'whois/parsers/whois.tcinet.ru.rb' -describe Whois::Parsers::WhoisTcinetRu, "status_registered.expected" do +describe "whois.tcinet.ru", :aggregate_failures do subject do file = fixture("responses", "whois.tcinet.ru/su/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tcinet.ru") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.su") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(["REGISTERED", "DELEGATED", "UNVERIFIED"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2005-10-16")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2010-10-16")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("RUCENTER-REG-FID") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("Private Person") - expect(subject.admin_contacts[0].phone).to eq("+7 495 9681807") - expect(subject.admin_contacts[0].fax).to eq("+7 495 9681807") - expect(subject.admin_contacts[0].email).to eq("cis@cis.su") - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1073.hostgator.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1074.hostgator.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.su") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(["REGISTERED", "DELEGATED", "UNVERIFIED"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2005-10-16")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2010-10-16")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("RUCENTER-REG-FID") + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("Private Person") + expect(subject.admin_contacts[0].phone).to eq("+7 495 9681807") + expect(subject.admin_contacts[0].fax).to eq("+7 495 9681807") + expect(subject.admin_contacts[0].email).to eq("cis@cis.su") + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1073.hostgator.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1074.hostgator.com") end end diff --git a/spec/whois/parsers/responses/whois.tcinet.ru/xn--p1ai/status_available_spec.rb b/spec/whois/parsers/responses/whois.tcinet.ru/xn--p1ai/status_available_spec.rb index 1c6a3b99..de131618 100644 --- a/spec/whois/parsers/responses/whois.tcinet.ru/xn--p1ai/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.tcinet.ru/xn--p1ai/status_available_spec.rb @@ -9,81 +9,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.tcinet.ru.rb' -describe Whois::Parsers::WhoisTcinetRu, "status_available.expected" do +describe "whois.tcinet.ru", :aggregate_failures do subject do file = fixture("responses", "whois.tcinet.ru/xn--p1ai/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tcinet.ru") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.tcinet.ru/xn--p1ai/status_registered_spec.rb b/spec/whois/parsers/responses/whois.tcinet.ru/xn--p1ai/status_registered_spec.rb index 95d04a1f..3309b8ad 100644 --- a/spec/whois/parsers/responses/whois.tcinet.ru/xn--p1ai/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.tcinet.ru/xn--p1ai/status_registered_spec.rb @@ -9,100 +9,48 @@ # require 'spec_helper' -require 'whois/parsers/whois.tcinet.ru.rb' -describe Whois::Parsers::WhoisTcinetRu, "status_registered.expected" do +describe "whois.tcinet.ru", :aggregate_failures do subject do file = fixture("responses", "whois.tcinet.ru/xn--p1ai/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tcinet.ru") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("xn----8sbc3ahklcs4adf.xn--p1ai") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(["REGISTERED", "DELEGATED", "VERIFIED"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2010-11-12")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2011-11-12")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("R01-REG-RF") - expect(subject.registrar.name).to eq(nil) - expect(subject.registrar.organization).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("R01 Personal Data Operator protected") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq("+7 800 3020800") - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("liderkubani@gmail.com") - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.redsoft.ru") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.redsoft.ru") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.r01.ru") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("xn----8sbc3ahklcs4adf.xn--p1ai") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(["REGISTERED", "DELEGATED", "VERIFIED"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2010-11-12")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2011-11-12")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("R01-REG-RF") + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("R01 Personal Data Operator protected") + expect(subject.admin_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq("+7 800 3020800") + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("liderkubani@gmail.com") + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.redsoft.ru") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.redsoft.ru") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns2.r01.ru") end end diff --git a/spec/whois/parsers/responses/whois.thnic.co.th/th/status_available_spec.rb b/spec/whois/parsers/responses/whois.thnic.co.th/th/status_available_spec.rb index ac751feb..c4a3c8ef 100644 --- a/spec/whois/parsers/responses/whois.thnic.co.th/th/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.thnic.co.th/th/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.thnic.co.th.rb' -describe Whois::Parsers::WhoisThnicCoTh, "status_available.expected" do +describe "whois.thnic.co.th", :aggregate_failures do subject do file = fixture("responses", "whois.thnic.co.th/th/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.thnic.co.th") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.thnic.co.th/th/status_registered_spec.rb b/spec/whois/parsers/responses/whois.thnic.co.th/th/status_registered_spec.rb index f8553b1b..1e27ea72 100644 --- a/spec/whois/parsers/responses/whois.thnic.co.th/th/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.thnic.co.th/th/status_registered_spec.rb @@ -9,61 +9,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.thnic.co.th.rb' -describe Whois::Parsers::WhoisThnicCoTh, "status_registered.expected" do +describe "whois.thnic.co.th", :aggregate_failures do subject do file = fixture("responses", "whois.thnic.co.th/th/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.thnic.co.th") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2004-10-08")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-09-07")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2013-10-07")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2004-10-08")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-09-07")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2013-10-07")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.tld.ee/ee/property_status_serverhold_spec.rb b/spec/whois/parsers/responses/whois.tld.ee/ee/property_status_serverhold_spec.rb index d573d9bd..f6920842 100644 --- a/spec/whois/parsers/responses/whois.tld.ee/ee/property_status_serverhold_spec.rb +++ b/spec/whois/parsers/responses/whois.tld.ee/ee/property_status_serverhold_spec.rb @@ -9,166 +9,110 @@ # require 'spec_helper' -require 'whois/parsers/whois.tld.ee.rb' -describe Whois::Parsers::WhoisTldEe, "property_status_serverhold.expected" do +describe "whois.tld.ee", :aggregate_failures do subject do file = fixture("responses", "whois.tld.ee/ee/property_status_serverhold.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tld.ee") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Estonia .ee Top Level Domain WHOIS server\nMore information at http://internet.ee") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("samanacrafts.ee") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:expired) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2014-11-01 20:38:55 +02:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-11-01 20:38:55 +02:00")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-11-01")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.name).to eq("Edicy OÜ") - expect(subject.registrar.organization).to eq("Edicy OÜ") - expect(subject.registrar.url).to eq("http://www.edicy.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Anastassia Hisamova") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2014-11-01 20:38:55 +02:00")) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(2) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("Anastassia Hisamova") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq(nil) - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq(nil) - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2014-11-01 20:38:55 +02:00")) - expect(subject.admin_contacts[1]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[1].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[1].id).to eq(nil) - expect(subject.admin_contacts[1].name).to eq("Anastassia Hisamova") - expect(subject.admin_contacts[1].organization).to eq(nil) - expect(subject.admin_contacts[1].address).to eq(nil) - expect(subject.admin_contacts[1].city).to eq(nil) - expect(subject.admin_contacts[1].zip).to eq(nil) - expect(subject.admin_contacts[1].state).to eq(nil) - expect(subject.admin_contacts[1].country).to eq(nil) - expect(subject.admin_contacts[1].country_code).to eq(nil) - expect(subject.admin_contacts[1].phone).to eq(nil) - expect(subject.admin_contacts[1].fax).to eq(nil) - expect(subject.admin_contacts[1].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") - expect(subject.admin_contacts[1].created_on).to eq(nil) - expect(subject.admin_contacts[1].updated_on).to eq(Time.parse("2014-11-01 20:38:55 +02:00")) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Priit Haamer") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq(nil) - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq(nil) - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2010-12-09 16:08:33 +02:00")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns4.edicy.net") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns3.edicy.net") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches property_status_serverhold.expected" do + expect(subject.disclaimer).to eq("Estonia .ee Top Level Domain WHOIS server\nMore information at http://internet.ee") + expect(subject.domain).to eq("samanacrafts.ee") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:expired) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2014-11-01 20:38:55 +02:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-11-01 20:38:55 +02:00")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-11-01")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.name).to eq("Edicy OÜ") + expect(subject.registrar.url).to eq("http://www.edicy.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Anastassia Hisamova") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2014-11-01 20:38:55 +02:00")) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(2) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("Anastassia Hisamova") + expect(subject.admin_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts[0].address).to eq(nil) + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq(nil) + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2014-11-01 20:38:55 +02:00")) + expect(subject.admin_contacts[1]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[1].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[1].id).to eq(nil) + expect(subject.admin_contacts[1].name).to eq("Anastassia Hisamova") + expect(subject.admin_contacts[1].organization).to eq(nil) + expect(subject.admin_contacts[1].address).to eq(nil) + expect(subject.admin_contacts[1].city).to eq(nil) + expect(subject.admin_contacts[1].zip).to eq(nil) + expect(subject.admin_contacts[1].state).to eq(nil) + expect(subject.admin_contacts[1].country).to eq(nil) + expect(subject.admin_contacts[1].country_code).to eq(nil) + expect(subject.admin_contacts[1].phone).to eq(nil) + expect(subject.admin_contacts[1].fax).to eq(nil) + expect(subject.admin_contacts[1].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") + expect(subject.admin_contacts[1].created_on).to eq(nil) + expect(subject.admin_contacts[1].updated_on).to eq(DateTime.parse("2014-11-01 20:38:55 +02:00")) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Priit Haamer") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq(nil) + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq(nil) + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2010-12-09 16:08:33 +02:00")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns4.edicy.net") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns3.edicy.net") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.tld.ee/ee/status_available_spec.rb b/spec/whois/parsers/responses/whois.tld.ee/ee/status_available_spec.rb index afb0b208..0c5a6217 100644 --- a/spec/whois/parsers/responses/whois.tld.ee/ee/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.tld.ee/ee/status_available_spec.rb @@ -9,88 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.tld.ee.rb' -describe Whois::Parsers::WhoisTldEe, "status_available.expected" do +describe "whois.tld.ee", :aggregate_failures do subject do file = fixture("responses", "whois.tld.ee/ee/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tld.ee") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Estonia .ee Top Level Domain WHOIS server\nMore information at http://internet.ee") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("Estonia .ee Top Level Domain WHOIS server\nMore information at http://internet.ee") + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.tld.ee/ee/status_expired_spec.rb b/spec/whois/parsers/responses/whois.tld.ee/ee/status_expired_spec.rb index 7da4d729..841c4c6c 100644 --- a/spec/whois/parsers/responses/whois.tld.ee/ee/status_expired_spec.rb +++ b/spec/whois/parsers/responses/whois.tld.ee/ee/status_expired_spec.rb @@ -9,149 +9,97 @@ # require 'spec_helper' -require 'whois/parsers/whois.tld.ee.rb' -describe Whois::Parsers::WhoisTldEe, "status_expired.expected" do +describe "whois.tld.ee", :aggregate_failures do subject do file = fixture("responses", "whois.tld.ee/ee/status_expired.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tld.ee") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Estonia .ee Top Level Domain WHOIS server\nMore information at http://internet.ee") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("eestiinternet.ee") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:expired) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2010-07-04 07:52:56 +03:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2010-11-29 13:32:16 +02:00")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2015-11-29")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.name).to eq("Elisa Eesti AS") - expect(subject.registrar.organization).to eq("Elisa Eesti AS") - expect(subject.registrar.url).to eq("http://www.elisa.ee") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Eesti Interneti Sihtasutus") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2010-11-29 13:32:16 +02:00")) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("Jaana Järve") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq(nil) - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq(nil) - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2015-10-30 08:31:21 +02:00")) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Jaana Järve") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq(nil) - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq(nil) - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2015-10-30 08:31:21 +02:00")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("c.tld.ee") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("d.tld.ee") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("b.tld.ee") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - end + it "matches status_expired.expected" do + expect(subject.disclaimer).to eq("Estonia .ee Top Level Domain WHOIS server\nMore information at http://internet.ee") + expect(subject.domain).to eq("eestiinternet.ee") + expect(subject.status).to eq(:expired) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2010-07-04 07:52:56 +03:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2010-11-29 13:32:16 +02:00")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2015-11-29")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.name).to eq("Elisa Eesti AS") + expect(subject.registrar.url).to eq("http://www.elisa.ee") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Eesti Interneti Sihtasutus") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2010-11-29 13:32:16 +02:00")) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("Jaana Järve") + expect(subject.admin_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts[0].address).to eq(nil) + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq(nil) + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2015-10-30 08:31:21 +02:00")) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Jaana Järve") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq(nil) + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq(nil) + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2015-10-30 08:31:21 +02:00")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("c.tld.ee") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("d.tld.ee") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("b.tld.ee") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.tld.ee/ee/status_registered_spec.rb b/spec/whois/parsers/responses/whois.tld.ee/ee/status_registered_spec.rb index cb6f7c03..b48eccc9 100644 --- a/spec/whois/parsers/responses/whois.tld.ee/ee/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.tld.ee/ee/status_registered_spec.rb @@ -9,158 +9,102 @@ # require 'spec_helper' -require 'whois/parsers/whois.tld.ee.rb' -describe Whois::Parsers::WhoisTldEe, "status_registered.expected" do +describe "whois.tld.ee", :aggregate_failures do subject do file = fixture("responses", "whois.tld.ee/ee/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tld.ee") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("Estonia .ee Top Level Domain WHOIS server\nMore information at http://internet.ee") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("internet.ee") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2010-08-10 16:43:38 +03:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2010-11-29 13:32:16 +02:00")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2017-02-04")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.name).to eq("Elisa Eesti AS") - expect(subject.registrar.organization).to eq("Elisa Eesti AS") - expect(subject.registrar.url).to eq("http://www.elisa.ee") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Eesti Interneti Sihtasutus") - expect(subject.registrant_contacts[0].organization).to eq(nil) - expect(subject.registrant_contacts[0].address).to eq(nil) - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(Time.parse("2010-11-29 13:32:16 +02:00")) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("Jaana Järve") - expect(subject.admin_contacts[0].organization).to eq(nil) - expect(subject.admin_contacts[0].address).to eq(nil) - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq(nil) - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2015-10-30 08:31:21 +02:00")) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Jaana Järve") - expect(subject.technical_contacts[0].organization).to eq(nil) - expect(subject.technical_contacts[0].address).to eq(nil) - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq(nil) - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2015-10-30 08:31:21 +02:00")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("c.tld.ee") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("d.tld.ee") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("b.tld.ee") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("e.tld.ee") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("Estonia .ee Top Level Domain WHOIS server\nMore information at http://internet.ee") + expect(subject.domain).to eq("internet.ee") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2010-08-10 16:43:38 +03:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2010-11-29 13:32:16 +02:00")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2017-02-04")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.name).to eq("Elisa Eesti AS") + expect(subject.registrar.url).to eq("http://www.elisa.ee") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Eesti Interneti Sihtasutus") + expect(subject.registrant_contacts[0].organization).to eq(nil) + expect(subject.registrant_contacts[0].address).to eq(nil) + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(DateTime.parse("2010-11-29 13:32:16 +02:00")) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("Jaana Järve") + expect(subject.admin_contacts[0].organization).to eq(nil) + expect(subject.admin_contacts[0].address).to eq(nil) + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq(nil) + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2015-10-30 08:31:21 +02:00")) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Jaana Järve") + expect(subject.technical_contacts[0].organization).to eq(nil) + expect(subject.technical_contacts[0].address).to eq(nil) + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq(nil) + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("Not Disclosed - Visit www.internet.ee for webbased WHOIS") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2015-10-30 08:31:21 +02:00")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("c.tld.ee") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("d.tld.ee") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("b.tld.ee") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("e.tld.ee") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.tld.sy/sy/status_available_spec.rb b/spec/whois/parsers/responses/whois.tld.sy/sy/status_available_spec.rb index 4155313f..3ff0d831 100644 --- a/spec/whois/parsers/responses/whois.tld.sy/sy/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.tld.sy/sy/status_available_spec.rb @@ -9,65 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois.tld.sy.rb' -describe Whois::Parsers::WhoisTldSy, "status_available.expected" do +describe "whois.tld.sy", :aggregate_failures do subject do file = fixture("responses", "whois.tld.sy/sy/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tld.sy") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.sy") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.sy") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.tld.sy/sy/status_registered_spec.rb b/spec/whois/parsers/responses/whois.tld.sy/sy/status_registered_spec.rb index 6fade923..815b2741 100644 --- a/spec/whois/parsers/responses/whois.tld.sy/sy/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.tld.sy/sy/status_registered_spec.rb @@ -9,75 +9,35 @@ # require 'spec_helper' -require 'whois/parsers/whois.tld.sy.rb' -describe Whois::Parsers::WhoisTldSy, "status_registered.expected" do +describe "whois.tld.sy", :aggregate_failures do subject do file = fixture("responses", "whois.tld.sy/sy/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tld.sy") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("tld.sy") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("7-sy") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2010-12-02 16:01:27 UTC")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2017-12-01 22:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("nans") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns4.tld.sy") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns3.tld.sy") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("tld.sy") + expect(subject.domain_id).to eq("7-sy") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2010-12-02 16:01:27 UTC")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2017-12-01 22:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("nans") + expect(subject.registrar.url).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns4.tld.sy") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns3.tld.sy") end end diff --git a/spec/whois/parsers/responses/whois.tonic.to/to/response_incomplete_spec.rb b/spec/whois/parsers/responses/whois.tonic.to/to/response_incomplete_spec.rb index 796d7f06..553e1875 100644 --- a/spec/whois/parsers/responses/whois.tonic.to/to/response_incomplete_spec.rb +++ b/spec/whois/parsers/responses/whois.tonic.to/to/response_incomplete_spec.rb @@ -9,24 +9,17 @@ # require 'spec_helper' -require 'whois/parsers/whois.tonic.to.rb' -describe Whois::Parsers::WhoisTonicTo, "response_incomplete.expected" do +describe "whois.tonic.to", :aggregate_failures do subject do file = fixture("responses", "whois.tonic.to/to/response_incomplete.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tonic.to") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:incomplete) - end - end - describe "#response_incomplete?" do - it do - expect(subject.response_incomplete?).to eq(true) - end + it "matches response_incomplete.expected" do + expect(subject.status).to eq(:incomplete) + expect(subject.response_incomplete?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.tonic.to/to/status_available_spec.rb b/spec/whois/parsers/responses/whois.tonic.to/to/status_available_spec.rb index 74ccb36e..d8eb2474 100644 --- a/spec/whois/parsers/responses/whois.tonic.to/to/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.tonic.to/to/status_available_spec.rb @@ -9,89 +9,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.tonic.to.rb' -describe Whois::Parsers::WhoisTonicTo, "status_available.expected" do +describe "whois.tonic.to", :aggregate_failures do subject do file = fixture("responses", "whois.tonic.to/to/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tonic.to") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect { subject.domain }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#response_incomplete?" do - it do - expect(subject.response_incomplete?).to eq(false) - end + it "matches status_available.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect { subject.domain }.to raise_error(Whois::AttributeNotSupported) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) + expect(subject.response_incomplete?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.tonic.to/to/status_registered_spec.rb b/spec/whois/parsers/responses/whois.tonic.to/to/status_registered_spec.rb index 197f2c5b..9166588f 100644 --- a/spec/whois/parsers/responses/whois.tonic.to/to/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.tonic.to/to/status_registered_spec.rb @@ -9,89 +9,30 @@ # require 'spec_helper' -require 'whois/parsers/whois.tonic.to.rb' -describe Whois::Parsers::WhoisTonicTo, "status_registered.expected" do +describe "whois.tonic.to", :aggregate_failures do subject do file = fixture("responses", "whois.tonic.to/to/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tonic.to") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain" do - it do - expect { subject.domain }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#admin_contacts" do - it do - expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#technical_contacts" do - it do - expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#response_incomplete?" do - it do - expect(subject.response_incomplete?).to eq(false) - end + it "matches status_registered.expected" do + expect { subject.disclaimer }.to raise_error(Whois::AttributeNotSupported) + expect { subject.domain }.to raise_error(Whois::AttributeNotSupported) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect { subject.registrant_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) + expect { subject.nameservers }.to raise_error(Whois::AttributeNotSupported) + expect(subject.response_incomplete?).to eq(false) end end diff --git a/spec/whois/parsers/responses/whois.tucows.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.tucows.com/status_available_spec.rb index 47509d92..e607f1c1 100644 --- a/spec/whois/parsers/responses/whois.tucows.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.tucows.com/status_available_spec.rb @@ -9,83 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.tucows.com.rb' -describe Whois::Parsers::WhoisTucowsCom, "status_available.expected" do +describe "whois.tucows.com", :aggregate_failures do subject do file = fixture("responses", "whois.tucows.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tucows.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.tucows.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.tucows.com/status_registered_spec.rb index 333f8d74..0f4f7a0a 100644 --- a/spec/whois/parsers/responses/whois.tucows.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.tucows.com/status_registered_spec.rb @@ -9,135 +9,83 @@ # require 'spec_helper' -require 'whois/parsers/whois.tucows.com.rb' -describe Whois::Parsers::WhoisTucowsCom, "status_registered.expected" do +describe "whois.tucows.com", :aggregate_failures do subject do file = fixture("responses", "whois.tucows.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tucows.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("tucows.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1995-09-07 04:00:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-08-07 23:52:35")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-09-06 04:00:00")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("69") - expect(subject.registrar.name).to eq("TUCOWS, INC.") - expect(subject.registrar.organization).to eq("TUCOWS, INC.") - expect(subject.registrar.url).to eq("http://tucowsdomains.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].name).to eq("DNS Administrator") - expect(subject.registrant_contacts[0].organization).to eq("Tucows.com Co") - expect(subject.registrant_contacts[0].address).to eq("96 Mowat Avenue") - expect(subject.registrant_contacts[0].city).to eq("Toronto") - expect(subject.registrant_contacts[0].zip).to eq("M6K3M1") - expect(subject.registrant_contacts[0].state).to eq("Ontario") - expect(subject.registrant_contacts[0].country_code).to eq("CA") - expect(subject.registrant_contacts[0].phone).to eq("+1.4165350123 ext: 0000") - expect(subject.registrant_contacts[0].fax).to eq("") - expect(subject.registrant_contacts[0].email).to eq("dnsadmin@tucows.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].name).to eq("DNS Administrator") - expect(subject.admin_contacts[0].organization).to eq("Tucows ( Delaware ) Inc.") - expect(subject.admin_contacts[0].address).to eq("96 Mowat Avenue") - expect(subject.admin_contacts[0].city).to eq("Toronto") - expect(subject.admin_contacts[0].zip).to eq("M6K3M1") - expect(subject.admin_contacts[0].state).to eq("Ontario") - expect(subject.admin_contacts[0].country_code).to eq("CA") - expect(subject.admin_contacts[0].phone).to eq("+1.4165350123 ext: 0000") - expect(subject.admin_contacts[0].fax).to eq("") - expect(subject.admin_contacts[0].email).to eq("dnsadmin@tucows.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].name).to eq("DNS Administrator") - expect(subject.technical_contacts[0].organization).to eq("Tucows ( Delaware ) Inc.") - expect(subject.technical_contacts[0].address).to eq("96 Mowat Avenue") - expect(subject.technical_contacts[0].city).to eq("Toronto") - expect(subject.technical_contacts[0].zip).to eq("M6K3M1") - expect(subject.technical_contacts[0].state).to eq("Ontario") - expect(subject.technical_contacts[0].country_code).to eq("CA") - expect(subject.technical_contacts[0].phone).to eq("+1.4165350123 ext: 0000") - expect(subject.technical_contacts[0].fax).to eq("") - expect(subject.technical_contacts[0].email).to eq("dnsadmin@tucows.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns3.tucows.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.tucows.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.tucows.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("tucows.com") + expect(subject.domain_id).to eq("") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1995-09-07 04:00:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-08-07 23:52:35")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-09-06 04:00:00")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("69") + expect(subject.registrar.name).to eq("TUCOWS, INC.") + expect(subject.registrar.url).to eq("http://tucowsdomains.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].name).to eq("DNS Administrator") + expect(subject.registrant_contacts[0].organization).to eq("Tucows.com Co") + expect(subject.registrant_contacts[0].address).to eq("96 Mowat Avenue") + expect(subject.registrant_contacts[0].city).to eq("Toronto") + expect(subject.registrant_contacts[0].zip).to eq("M6K3M1") + expect(subject.registrant_contacts[0].state).to eq("Ontario") + expect(subject.registrant_contacts[0].country_code).to eq("CA") + expect(subject.registrant_contacts[0].phone).to eq("+1.4165350123 ext: 0000") + expect(subject.registrant_contacts[0].fax).to eq("") + expect(subject.registrant_contacts[0].email).to eq("dnsadmin@tucows.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].name).to eq("DNS Administrator") + expect(subject.admin_contacts[0].organization).to eq("Tucows ( Delaware ) Inc.") + expect(subject.admin_contacts[0].address).to eq("96 Mowat Avenue") + expect(subject.admin_contacts[0].city).to eq("Toronto") + expect(subject.admin_contacts[0].zip).to eq("M6K3M1") + expect(subject.admin_contacts[0].state).to eq("Ontario") + expect(subject.admin_contacts[0].country_code).to eq("CA") + expect(subject.admin_contacts[0].phone).to eq("+1.4165350123 ext: 0000") + expect(subject.admin_contacts[0].fax).to eq("") + expect(subject.admin_contacts[0].email).to eq("dnsadmin@tucows.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].name).to eq("DNS Administrator") + expect(subject.technical_contacts[0].organization).to eq("Tucows ( Delaware ) Inc.") + expect(subject.technical_contacts[0].address).to eq("96 Mowat Avenue") + expect(subject.technical_contacts[0].city).to eq("Toronto") + expect(subject.technical_contacts[0].zip).to eq("M6K3M1") + expect(subject.technical_contacts[0].state).to eq("Ontario") + expect(subject.technical_contacts[0].country_code).to eq("CA") + expect(subject.technical_contacts[0].phone).to eq("+1.4165350123 ext: 0000") + expect(subject.technical_contacts[0].fax).to eq("") + expect(subject.technical_contacts[0].email).to eq("dnsadmin@tucows.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns3.tucows.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.tucows.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns2.tucows.com") + expect(subject.nameservers[2].ipv4).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.twnic.net.tw/tw/status_available_spec.rb b/spec/whois/parsers/responses/whois.twnic.net.tw/tw/status_available_spec.rb index 244925ad..6481495a 100644 --- a/spec/whois/parsers/responses/whois.twnic.net.tw/tw/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.twnic.net.tw/tw/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.twnic.net.tw.rb' -describe Whois::Parsers::WhoisTwnicNetTw, "status_available.expected" do +describe "whois.twnic.net.tw", :aggregate_failures do subject do file = fixture("responses", "whois.twnic.net.tw/tw/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.twnic.net.tw") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.twnic.net.tw/tw/status_registered_spec.rb b/spec/whois/parsers/responses/whois.twnic.net.tw/tw/status_registered_spec.rb index d7883a25..d57f2f57 100644 --- a/spec/whois/parsers/responses/whois.twnic.net.tw/tw/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.twnic.net.tw/tw/status_registered_spec.rb @@ -9,60 +9,33 @@ # require 'spec_helper' -require 'whois/parsers/whois.twnic.net.tw.rb' -describe Whois::Parsers::WhoisTwnicNetTw, "status_registered.expected" do +describe "whois.twnic.net.tw", :aggregate_failures do subject do file = fixture("responses", "whois.twnic.net.tw/tw/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.twnic.net.tw") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2000-08-29")) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2011-11-09")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2000-08-29")) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2011-11-09")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.tznic.or.tz/tz/property_status_expired_spec.rb b/spec/whois/parsers/responses/whois.tznic.or.tz/tz/property_status_expired_spec.rb index 4f09c9af..595aa76c 100644 --- a/spec/whois/parsers/responses/whois.tznic.or.tz/tz/property_status_expired_spec.rb +++ b/spec/whois/parsers/responses/whois.tznic.or.tz/tz/property_status_expired_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.tznic.or.tz.rb' -describe Whois::Parsers::WhoisTznicOrTz, "property_status_expired.expected" do +describe "whois.tznic.or.tz", :aggregate_failures do subject do file = fixture("responses", "whois.tznic.or.tz/tz/property_status_expired.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tznic.or.tz") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:expired) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_expired.expected" do + expect(subject.status).to eq(:expired) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.tznic.or.tz/tz/status_available_spec.rb b/spec/whois/parsers/responses/whois.tznic.or.tz/tz/status_available_spec.rb index 1e66dfcb..6409e70d 100644 --- a/spec/whois/parsers/responses/whois.tznic.or.tz/tz/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.tznic.or.tz/tz/status_available_spec.rb @@ -9,83 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.tznic.or.tz.rb' -describe Whois::Parsers::WhoisTznicOrTz, "status_available.expected" do +describe "whois.tznic.or.tz", :aggregate_failures do subject do file = fixture("responses", "whois.tznic.or.tz/tz/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tznic.or.tz") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.tznic.or.tz/tz/status_registered_spec.rb b/spec/whois/parsers/responses/whois.tznic.or.tz/tz/status_registered_spec.rb index 30682aaf..02c9b9d2 100644 --- a/spec/whois/parsers/responses/whois.tznic.or.tz/tz/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.tznic.or.tz/tz/status_registered_spec.rb @@ -9,139 +9,87 @@ # require 'spec_helper' -require 'whois/parsers/whois.tznic.or.tz.rb' -describe Whois::Parsers::WhoisTznicOrTz, "status_registered.expected" do +describe "whois.tznic.or.tz", :aggregate_failures do subject do file = fixture("responses", "whois.tznic.or.tz/tz/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.tznic.or.tz") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("dailynews.co.tz") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2009-07-27 11:01:10")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2010-08-30 15:47:56")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2012-07-27")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("REG-TZNIC") - expect(subject.registrar.name).to eq("REG-TZNIC") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("CM7-TZNIC") - expect(subject.registrant_contacts[0].name).to eq("Collins Mtita") - expect(subject.registrant_contacts[0].organization).to eq("TSN") - expect(subject.registrant_contacts[0].address).to eq("Dar_es_salaam\nDar_es_salaam\nP.O.BOX 9033\nTZ") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq(nil) - expect(subject.registrant_contacts[0].fax).to eq(nil) - expect(subject.registrant_contacts[0].email).to eq("mcollins@dailynews.co.tz") - expect(subject.registrant_contacts[0].created_on).to eq(Time.parse("2010-08-30 15:46:35")) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("CM7-TZNIC") - expect(subject.admin_contacts[0].name).to eq("Collins Mtita") - expect(subject.admin_contacts[0].organization).to eq("TSN") - expect(subject.admin_contacts[0].address).to eq("Dar_es_salaam\nDar_es_salaam\nP.O.BOX 9033\nTZ") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq(nil) - expect(subject.admin_contacts[0].fax).to eq(nil) - expect(subject.admin_contacts[0].email).to eq("mcollins@dailynews.co.tz") - expect(subject.admin_contacts[0].created_on).to eq(Time.parse("2010-08-30 15:46:35")) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("JN1-TZNIC") - expect(subject.technical_contacts[0].name).to eq("Jacob Noel") - expect(subject.technical_contacts[0].organization).to eq("Twiga Hosting") - expect(subject.technical_contacts[0].address).to eq("Dar es Salaam\nDar es Salaam\nP.O.Box\nTZ") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq("+255.755763951") - expect(subject.technical_contacts[0].fax).to eq(nil) - expect(subject.technical_contacts[0].email).to eq("jacobn@twigaonline.com") - expect(subject.technical_contacts[0].created_on).to eq(Time.parse("2009-08-24 06:21:51")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.twigaservers.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.twigaservers.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("dailynews.co.tz") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2009-07-27 11:01:10")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2010-08-30 15:47:56")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2012-07-27")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("REG-TZNIC") + expect(subject.registrar.name).to eq("REG-TZNIC") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("CM7-TZNIC") + expect(subject.registrant_contacts[0].name).to eq("Collins Mtita") + expect(subject.registrant_contacts[0].organization).to eq("TSN") + expect(subject.registrant_contacts[0].address).to eq("Dar_es_salaam\nDar_es_salaam\nP.O.BOX 9033\nTZ") + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq(nil) + expect(subject.registrant_contacts[0].fax).to eq(nil) + expect(subject.registrant_contacts[0].email).to eq("mcollins@dailynews.co.tz") + expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2010-08-30 15:46:35")) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("CM7-TZNIC") + expect(subject.admin_contacts[0].name).to eq("Collins Mtita") + expect(subject.admin_contacts[0].organization).to eq("TSN") + expect(subject.admin_contacts[0].address).to eq("Dar_es_salaam\nDar_es_salaam\nP.O.BOX 9033\nTZ") + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq(nil) + expect(subject.admin_contacts[0].fax).to eq(nil) + expect(subject.admin_contacts[0].email).to eq("mcollins@dailynews.co.tz") + expect(subject.admin_contacts[0].created_on).to eq(DateTime.parse("2010-08-30 15:46:35")) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("JN1-TZNIC") + expect(subject.technical_contacts[0].name).to eq("Jacob Noel") + expect(subject.technical_contacts[0].organization).to eq("Twiga Hosting") + expect(subject.technical_contacts[0].address).to eq("Dar es Salaam\nDar es Salaam\nP.O.Box\nTZ") + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq("+255.755763951") + expect(subject.technical_contacts[0].fax).to eq(nil) + expect(subject.technical_contacts[0].email).to eq("jacobn@twigaonline.com") + expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2009-08-24 06:21:51")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.twigaservers.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.twigaservers.com") end end diff --git a/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_clienthold_spec.rb b/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_clienthold_spec.rb index 881f3a2e..28688036 100644 --- a/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_clienthold_spec.rb +++ b/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_clienthold_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.ua.rb' -describe Whois::Parsers::WhoisUa, "property_status_clienthold.expected" do +describe "whois.ua", :aggregate_failures do subject do file = fixture("responses", "whois.ua/ua/uaepp/property_status_clienthold.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ua") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_clienthold.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_clienttransferprohibited_spec.rb b/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_clienttransferprohibited_spec.rb index c6cd1385..4b9c36e2 100644 --- a/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_clienttransferprohibited_spec.rb +++ b/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_clienttransferprohibited_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.ua.rb' -describe Whois::Parsers::WhoisUa, "property_status_clienttransferprohibited.expected" do +describe "whois.ua", :aggregate_failures do subject do file = fixture("responses", "whois.ua/ua/uaepp/property_status_clienttransferprohibited.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ua") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_clienttransferprohibited.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_graceperiod_spec.rb b/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_graceperiod_spec.rb index a345d1a7..a3c1923f 100644 --- a/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_graceperiod_spec.rb +++ b/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_graceperiod_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.ua.rb' -describe Whois::Parsers::WhoisUa, "property_status_graceperiod.expected" do +describe "whois.ua", :aggregate_failures do subject do file = fixture("responses", "whois.ua/ua/uaepp/property_status_graceperiod.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ua") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_graceperiod.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_ok_spec.rb b/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_ok_spec.rb index 195c584e..59dcfc41 100644 --- a/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_ok_spec.rb +++ b/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_ok_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.ua.rb' -describe Whois::Parsers::WhoisUa, "property_status_ok.expected" do +describe "whois.ua", :aggregate_failures do subject do file = fixture("responses", "whois.ua/ua/uaepp/property_status_ok.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ua") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_ok.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_pendingdelete_spec.rb b/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_pendingdelete_spec.rb index fd0b8285..eb35b344 100644 --- a/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_pendingdelete_spec.rb +++ b/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_pendingdelete_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.ua.rb' -describe Whois::Parsers::WhoisUa, "property_status_pendingdelete.expected" do +describe "whois.ua", :aggregate_failures do subject do file = fixture("responses", "whois.ua/ua/uaepp/property_status_pendingdelete.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ua") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:redemption) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_pendingdelete.expected" do + expect(subject.status).to eq(:redemption) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_redemptionperiod_spec.rb b/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_redemptionperiod_spec.rb index 8f6f0224..483d470b 100644 --- a/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_redemptionperiod_spec.rb +++ b/spec/whois/parsers/responses/whois.ua/ua/uaepp/property_status_redemptionperiod_spec.rb @@ -9,29 +9,18 @@ # require 'spec_helper' -require 'whois/parsers/whois.ua.rb' -describe Whois::Parsers::WhoisUa, "property_status_redemptionperiod.expected" do +describe "whois.ua", :aggregate_failures do subject do file = fixture("responses", "whois.ua/ua/uaepp/property_status_redemptionperiod.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ua") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:redemption) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end + it "matches property_status_redemptionperiod.expected" do + expect(subject.status).to eq(:redemption) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.ua/ua/uaepp/status_available_spec.rb b/spec/whois/parsers/responses/whois.ua/ua/uaepp/status_available_spec.rb index 67545e6d..7220c45f 100644 --- a/spec/whois/parsers/responses/whois.ua/ua/uaepp/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.ua/ua/uaepp/status_available_spec.rb @@ -9,83 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.ua.rb' -describe Whois::Parsers::WhoisUa, "status_available.expected" do +describe "whois.ua", :aggregate_failures do subject do file = fixture("responses", "whois.ua/ua/uaepp/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ua") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.ua/ua/uaepp/status_registered_spec.rb b/spec/whois/parsers/responses/whois.ua/ua/uaepp/status_registered_spec.rb index 38ec89b5..5ca44d99 100644 --- a/spec/whois/parsers/responses/whois.ua/ua/uaepp/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.ua/ua/uaepp/status_registered_spec.rb @@ -9,142 +9,91 @@ # require 'spec_helper' -require 'whois/parsers/whois.ua.rb' -describe Whois::Parsers::WhoisUa, "status_registered.expected" do +describe "whois.ua", :aggregate_failures do subject do file = fixture("responses", "whois.ua/ua/uaepp/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ua") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.com.ua") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2002-12-04 00:00:00 +02:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-04-15 20:00:10 +03:00")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2013-12-04 00:00:00 +02:00")) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.registrant_contacts[0].id).to eq("com-gi8-1") - expect(subject.registrant_contacts[0].name).to eq("Google Inc.") - expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") - expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway Mountain View CA 94043 US") - expect(subject.registrant_contacts[0].city).to eq(nil) - expect(subject.registrant_contacts[0].zip).to eq(nil) - expect(subject.registrant_contacts[0].state).to eq(nil) - expect(subject.registrant_contacts[0].country).to eq("UA") - expect(subject.registrant_contacts[0].country_code).to eq(nil) - expect(subject.registrant_contacts[0].phone).to eq("+16503300100") - expect(subject.registrant_contacts[0].fax).to eq("+16506188571") - expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.registrant_contacts[0].created_on).to eq(Time.parse("2013-03-31 19:13:45 +03:00")) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("com-gi8-1") - expect(subject.admin_contacts[0].name).to eq("Google Inc.") - expect(subject.admin_contacts[0].organization).to eq("Google Inc.") - expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway Mountain View CA 94043 US") - expect(subject.admin_contacts[0].city).to eq(nil) - expect(subject.admin_contacts[0].zip).to eq(nil) - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq("UA") - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq("+16503300100") - expect(subject.admin_contacts[0].fax).to eq("+16506188571") - expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.admin_contacts[0].created_on).to eq(Time.parse("2013-03-31 19:13:45 +03:00")) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("com-gi8-1") - expect(subject.technical_contacts[0].name).to eq("Google Inc.") - expect(subject.technical_contacts[0].organization).to eq("Google Inc.") - expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway Mountain View CA 94043 US") - expect(subject.technical_contacts[0].city).to eq(nil) - expect(subject.technical_contacts[0].zip).to eq(nil) - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq("UA") - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq("+16503300100") - expect(subject.technical_contacts[0].fax).to eq("+16506188571") - expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") - expect(subject.technical_contacts[0].created_on).to eq(Time.parse("2013-03-31 19:13:45 +03:00")) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns3.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns1.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns4.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns2.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.com.ua") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-12-04 00:00:00 +02:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-04-15 20:00:10 +03:00")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2013-12-04 00:00:00 +02:00")) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.registrant_contacts[0].id).to eq("com-gi8-1") + expect(subject.registrant_contacts[0].name).to eq("Google Inc.") + expect(subject.registrant_contacts[0].organization).to eq("Google Inc.") + expect(subject.registrant_contacts[0].address).to eq("1600 Amphitheatre Parkway Mountain View CA 94043 US") + expect(subject.registrant_contacts[0].city).to eq(nil) + expect(subject.registrant_contacts[0].zip).to eq(nil) + expect(subject.registrant_contacts[0].state).to eq(nil) + expect(subject.registrant_contacts[0].country).to eq("UA") + expect(subject.registrant_contacts[0].country_code).to eq(nil) + expect(subject.registrant_contacts[0].phone).to eq("+16503300100") + expect(subject.registrant_contacts[0].fax).to eq("+16506188571") + expect(subject.registrant_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.registrant_contacts[0].created_on).to eq(DateTime.parse("2013-03-31 19:13:45 +03:00")) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("com-gi8-1") + expect(subject.admin_contacts[0].name).to eq("Google Inc.") + expect(subject.admin_contacts[0].organization).to eq("Google Inc.") + expect(subject.admin_contacts[0].address).to eq("1600 Amphitheatre Parkway Mountain View CA 94043 US") + expect(subject.admin_contacts[0].city).to eq(nil) + expect(subject.admin_contacts[0].zip).to eq(nil) + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq("UA") + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq("+16503300100") + expect(subject.admin_contacts[0].fax).to eq("+16506188571") + expect(subject.admin_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.admin_contacts[0].created_on).to eq(DateTime.parse("2013-03-31 19:13:45 +03:00")) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("com-gi8-1") + expect(subject.technical_contacts[0].name).to eq("Google Inc.") + expect(subject.technical_contacts[0].organization).to eq("Google Inc.") + expect(subject.technical_contacts[0].address).to eq("1600 Amphitheatre Parkway Mountain View CA 94043 US") + expect(subject.technical_contacts[0].city).to eq(nil) + expect(subject.technical_contacts[0].zip).to eq(nil) + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq("UA") + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq("+16503300100") + expect(subject.technical_contacts[0].fax).to eq("+16506188571") + expect(subject.technical_contacts[0].email).to eq("dns-admin@google.com") + expect(subject.technical_contacts[0].created_on).to eq(DateTime.parse("2013-03-31 19:13:45 +03:00")) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns3.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns1.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns4.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns2.google.com") end end diff --git a/spec/whois/parsers/responses/whois.ua/ua/uanic/property_contacts_multiple_spec.rb b/spec/whois/parsers/responses/whois.ua/ua/uanic/property_contacts_multiple_spec.rb index d4a541ef..0d0af401 100644 --- a/spec/whois/parsers/responses/whois.ua/ua/uanic/property_contacts_multiple_spec.rb +++ b/spec/whois/parsers/responses/whois.ua/ua/uanic/property_contacts_multiple_spec.rb @@ -9,52 +9,49 @@ # require 'spec_helper' -require 'whois/parsers/whois.ua.rb' -describe Whois::Parsers::WhoisUa, "property_contacts_multiple.expected" do +describe "whois.ua", :aggregate_failures do subject do file = fixture("responses", "whois.ua/ua/uanic/property_contacts_multiple.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ua") + Whois::Parser.parser_for(part) end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(2) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("KG780-UANIC") - expect(subject.technical_contacts[0].name).to eq(nil) - expect(subject.technical_contacts[0].organization).to eq("Kyivstar GSM") - expect(subject.technical_contacts[0].address).to eq("Chervonozoryanyi Av., 51") - expect(subject.technical_contacts[0].city).to eq("KYIV") - expect(subject.technical_contacts[0].zip).to eq("03110") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq("UA") - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq("+380 (67) 2372213") - expect(subject.technical_contacts[0].fax).to eq("+380 (44) 2473954") - expect(subject.technical_contacts[0].email).to eq("dnsmaster@kyivstar.net") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2008-09-02 12:52:47")) - expect(subject.technical_contacts[1]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[1].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[1].id).to eq("EIC-UANIC") - expect(subject.technical_contacts[1].name).to eq(nil) - expect(subject.technical_contacts[1].organization).to eq("\"ElVisti Information Center\", LLC\nООО \"Информационный центр \"Электронные вести\"\nТОВ \"ІЦ ЕЛВІСТІ\"") - expect(subject.technical_contacts[1].address).to eq("а/с, 151") - expect(subject.technical_contacts[1].city).to eq("КИЇВ") - expect(subject.technical_contacts[1].zip).to eq("03037") - expect(subject.technical_contacts[1].state).to eq(nil) - expect(subject.technical_contacts[1].country).to eq("UA") - expect(subject.technical_contacts[1].country_code).to eq(nil) - expect(subject.technical_contacts[1].phone).to eq("+38044 239-90-91") - expect(subject.technical_contacts[1].fax).to eq(nil) - expect(subject.technical_contacts[1].email).to eq("hostmaster@visti.net") - expect(subject.technical_contacts[1].created_on).to eq(nil) - expect(subject.technical_contacts[1].updated_on).to eq(Time.parse("2011-12-15 11:33:14")) - end + it "matches property_contacts_multiple.expected" do + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(2) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("KG780-UANIC") + expect(subject.technical_contacts[0].name).to eq(nil) + expect(subject.technical_contacts[0].organization).to eq("Kyivstar GSM") + expect(subject.technical_contacts[0].address).to eq("Chervonozoryanyi Av., 51") + expect(subject.technical_contacts[0].city).to eq("KYIV") + expect(subject.technical_contacts[0].zip).to eq("03110") + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq("UA") + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq("+380 (67) 2372213") + expect(subject.technical_contacts[0].fax).to eq("+380 (44) 2473954") + expect(subject.technical_contacts[0].email).to eq("dnsmaster@kyivstar.net") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2008-09-02 12:52:47")) + expect(subject.technical_contacts[1]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[1].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[1].id).to eq("EIC-UANIC") + expect(subject.technical_contacts[1].name).to eq(nil) + expect(subject.technical_contacts[1].organization).to eq("\"ElVisti Information Center\", LLC\nООО \"Информационный центр \"Электронные вести\"\nТОВ \"ІЦ ЕЛВІСТІ\"") + expect(subject.technical_contacts[1].address).to eq("а/с, 151") + expect(subject.technical_contacts[1].city).to eq("КИЇВ") + expect(subject.technical_contacts[1].zip).to eq("03037") + expect(subject.technical_contacts[1].state).to eq(nil) + expect(subject.technical_contacts[1].country).to eq("UA") + expect(subject.technical_contacts[1].country_code).to eq(nil) + expect(subject.technical_contacts[1].phone).to eq("+38044 239-90-91") + expect(subject.technical_contacts[1].fax).to eq(nil) + expect(subject.technical_contacts[1].email).to eq("hostmaster@visti.net") + expect(subject.technical_contacts[1].created_on).to eq(nil) + expect(subject.technical_contacts[1].updated_on).to eq(DateTime.parse("2011-12-15 11:33:14")) end end diff --git a/spec/whois/parsers/responses/whois.ua/ua/uanic/status_registered_spec.rb b/spec/whois/parsers/responses/whois.ua/ua/uanic/status_registered_spec.rb index 4b0b7852..6b25bc4d 100644 --- a/spec/whois/parsers/responses/whois.ua/ua/uanic/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.ua/ua/uanic/status_registered_spec.rb @@ -9,122 +9,71 @@ # require 'spec_helper' -require 'whois/parsers/whois.ua.rb' -describe Whois::Parsers::WhoisUa, "status_registered.expected" do +describe "whois.ua", :aggregate_failures do subject do file = fixture("responses", "whois.ua/ua/uanic/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.ua") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("kyivstar.ua") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2002-09-03 00:00:00")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2012-07-30 16:42:30")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-09-03 12:18:52")) - end - end - describe "#registrar" do - it do - expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(0) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("KG780-UANIC") - expect(subject.admin_contacts[0].name).to eq(nil) - expect(subject.admin_contacts[0].organization).to eq("Kyivstar GSM") - expect(subject.admin_contacts[0].address).to eq("Chervonozoryanyi Av., 51") - expect(subject.admin_contacts[0].city).to eq("KYIV") - expect(subject.admin_contacts[0].zip).to eq("03110") - expect(subject.admin_contacts[0].state).to eq(nil) - expect(subject.admin_contacts[0].country).to eq("UA") - expect(subject.admin_contacts[0].country_code).to eq(nil) - expect(subject.admin_contacts[0].phone).to eq("+380 (67) 2372213") - expect(subject.admin_contacts[0].fax).to eq("+380 (44) 2473954") - expect(subject.admin_contacts[0].email).to eq("dnsmaster@kyivstar.net") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(Time.parse("2008-09-02 12:52:47")) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(2) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("KG780-UANIC") - expect(subject.technical_contacts[0].name).to eq(nil) - expect(subject.technical_contacts[0].organization).to eq("Kyivstar GSM") - expect(subject.technical_contacts[0].address).to eq("Chervonozoryanyi Av., 51") - expect(subject.technical_contacts[0].city).to eq("KYIV") - expect(subject.technical_contacts[0].zip).to eq("03110") - expect(subject.technical_contacts[0].state).to eq(nil) - expect(subject.technical_contacts[0].country).to eq("UA") - expect(subject.technical_contacts[0].country_code).to eq(nil) - expect(subject.technical_contacts[0].phone).to eq("+380 (67) 2372213") - expect(subject.technical_contacts[0].fax).to eq("+380 (44) 2473954") - expect(subject.technical_contacts[0].email).to eq("dnsmaster@kyivstar.net") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(Time.parse("2008-09-02 12:52:47")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns2.elvisti.kiev.ua") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns.kyivstar.net") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("kyivstar.ua") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-09-03 00:00:00")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2012-07-30 16:42:30")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-09-03 12:18:52")) + expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(0) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("KG780-UANIC") + expect(subject.admin_contacts[0].name).to eq(nil) + expect(subject.admin_contacts[0].organization).to eq("Kyivstar GSM") + expect(subject.admin_contacts[0].address).to eq("Chervonozoryanyi Av., 51") + expect(subject.admin_contacts[0].city).to eq("KYIV") + expect(subject.admin_contacts[0].zip).to eq("03110") + expect(subject.admin_contacts[0].state).to eq(nil) + expect(subject.admin_contacts[0].country).to eq("UA") + expect(subject.admin_contacts[0].country_code).to eq(nil) + expect(subject.admin_contacts[0].phone).to eq("+380 (67) 2372213") + expect(subject.admin_contacts[0].fax).to eq("+380 (44) 2473954") + expect(subject.admin_contacts[0].email).to eq("dnsmaster@kyivstar.net") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(DateTime.parse("2008-09-02 12:52:47")) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(2) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("KG780-UANIC") + expect(subject.technical_contacts[0].name).to eq(nil) + expect(subject.technical_contacts[0].organization).to eq("Kyivstar GSM") + expect(subject.technical_contacts[0].address).to eq("Chervonozoryanyi Av., 51") + expect(subject.technical_contacts[0].city).to eq("KYIV") + expect(subject.technical_contacts[0].zip).to eq("03110") + expect(subject.technical_contacts[0].state).to eq(nil) + expect(subject.technical_contacts[0].country).to eq("UA") + expect(subject.technical_contacts[0].country_code).to eq(nil) + expect(subject.technical_contacts[0].phone).to eq("+380 (67) 2372213") + expect(subject.technical_contacts[0].fax).to eq("+380 (44) 2473954") + expect(subject.technical_contacts[0].email).to eq("dnsmaster@kyivstar.net") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(DateTime.parse("2008-09-02 12:52:47")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns2.elvisti.kiev.ua") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns.kyivstar.net") end end diff --git a/spec/whois/parsers/responses/whois.udag.net/status_available_spec.rb b/spec/whois/parsers/responses/whois.udag.net/status_available_spec.rb index ae9bd341..a3db127b 100644 --- a/spec/whois/parsers/responses/whois.udag.net/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.udag.net/status_available_spec.rb @@ -9,83 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.udag.net.rb' -describe Whois::Parsers::WhoisUdagNet, "status_available.expected" do +describe "whois.udag.net", :aggregate_failures do subject do file = fixture("responses", "whois.udag.net/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.udag.net") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.com") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.udag.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.udag.net/status_registered_spec.rb index 8ec6fe04..b62edcd8 100644 --- a/spec/whois/parsers/responses/whois.udag.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.udag.net/status_registered_spec.rb @@ -9,144 +9,92 @@ # require 'spec_helper' -require 'whois/parsers/whois.udag.net.rb' -describe Whois::Parsers::WhoisUdagNet, "status_registered.expected" do +describe "whois.udag.net", :aggregate_failures do subject do file = fixture("responses", "whois.udag.net/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.udag.net") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("udag.net") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("59973274_DOMAIN_NET-VRSN") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2001-02-11T20:15:57Z")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-02-12T08:40:19Z")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-02-11T20:15:57Z")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("1408") - expect(subject.registrar.name).to eq("united domains AG") - expect(subject.registrar.organization).to eq("united domains AG") - expect(subject.registrar.url).to eq("http://www.united-domains.de/") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Host Master") - expect(subject.registrant_contacts[0].organization).to eq("united-domains AG") - expect(subject.registrant_contacts[0].address).to eq("Gautinger Str. 10") - expect(subject.registrant_contacts[0].city).to eq("Starnberg") - expect(subject.registrant_contacts[0].zip).to eq("82319") - expect(subject.registrant_contacts[0].state).to eq("Bayern") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("DE") - expect(subject.registrant_contacts[0].phone).to eq("+49.8151368670") - expect(subject.registrant_contacts[0].fax).to eq("+49.81513686777") - expect(subject.registrant_contacts[0].email).to eq("hostmaster@united-domains.de") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("Hostmaster Hostmaster") - expect(subject.admin_contacts[0].organization).to eq("united-domains AG") - expect(subject.admin_contacts[0].address).to eq("Gautinger Strasse 10") - expect(subject.admin_contacts[0].city).to eq("Starnberg") - expect(subject.admin_contacts[0].zip).to eq("82319") - expect(subject.admin_contacts[0].state).to eq("DE") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("DE") - expect(subject.admin_contacts[0].phone).to eq("+49.8151368670") - expect(subject.admin_contacts[0].fax).to eq("+49.81513686777") - expect(subject.admin_contacts[0].email).to eq("hostmaster@united-domains.de") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Host Master") - expect(subject.technical_contacts[0].organization).to eq("united-domains AG") - expect(subject.technical_contacts[0].address).to eq("Gautinger Str. 10") - expect(subject.technical_contacts[0].city).to eq("Starnberg") - expect(subject.technical_contacts[0].zip).to eq("82319") - expect(subject.technical_contacts[0].state).to eq("Bayern") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("DE") - expect(subject.technical_contacts[0].phone).to eq("+49.8151368670") - expect(subject.technical_contacts[0].fax).to eq("+49.81513686777") - expect(subject.technical_contacts[0].email).to eq("hostmaster@united-domains.de") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.udagdns.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.udagdns.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.udagdns.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("udag.net") + expect(subject.domain_id).to eq("59973274_DOMAIN_NET-VRSN") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2001-02-11T20:15:57Z")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-02-12T08:40:19Z")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-02-11T20:15:57Z")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("1408") + expect(subject.registrar.name).to eq("united domains AG") + expect(subject.registrar.url).to eq("http://www.united-domains.de/") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Host Master") + expect(subject.registrant_contacts[0].organization).to eq("united-domains AG") + expect(subject.registrant_contacts[0].address).to eq("Gautinger Str. 10") + expect(subject.registrant_contacts[0].city).to eq("Starnberg") + expect(subject.registrant_contacts[0].zip).to eq("82319") + expect(subject.registrant_contacts[0].state).to eq("Bayern") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("DE") + expect(subject.registrant_contacts[0].phone).to eq("+49.8151368670") + expect(subject.registrant_contacts[0].fax).to eq("+49.81513686777") + expect(subject.registrant_contacts[0].email).to eq("hostmaster@united-domains.de") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("Hostmaster Hostmaster") + expect(subject.admin_contacts[0].organization).to eq("united-domains AG") + expect(subject.admin_contacts[0].address).to eq("Gautinger Strasse 10") + expect(subject.admin_contacts[0].city).to eq("Starnberg") + expect(subject.admin_contacts[0].zip).to eq("82319") + expect(subject.admin_contacts[0].state).to eq("DE") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("DE") + expect(subject.admin_contacts[0].phone).to eq("+49.8151368670") + expect(subject.admin_contacts[0].fax).to eq("+49.81513686777") + expect(subject.admin_contacts[0].email).to eq("hostmaster@united-domains.de") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Host Master") + expect(subject.technical_contacts[0].organization).to eq("united-domains AG") + expect(subject.technical_contacts[0].address).to eq("Gautinger Str. 10") + expect(subject.technical_contacts[0].city).to eq("Starnberg") + expect(subject.technical_contacts[0].zip).to eq("82319") + expect(subject.technical_contacts[0].state).to eq("Bayern") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("DE") + expect(subject.technical_contacts[0].phone).to eq("+49.8151368670") + expect(subject.technical_contacts[0].fax).to eq("+49.81513686777") + expect(subject.technical_contacts[0].email).to eq("hostmaster@united-domains.de") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.udagdns.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.udagdns.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.udagdns.com") end end diff --git a/spec/whois/parsers/responses/whois.uniregistry.net/tattoo/status_available_spec.rb b/spec/whois/parsers/responses/whois.uniregistry.net/tattoo/status_available_spec.rb index 06a34078..779a6f3a 100644 --- a/spec/whois/parsers/responses/whois.uniregistry.net/tattoo/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.uniregistry.net/tattoo/status_available_spec.rb @@ -9,83 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.uniregistry.net.rb' -describe Whois::Parsers::WhoisUniregistryNet, "status_available.expected" do +describe "whois.uniregistry.net", :aggregate_failures do subject do file = fixture("responses", "whois.uniregistry.net/tattoo/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.uniregistry.net") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.uniregistry.net/tattoo/status_registered_spec.rb b/spec/whois/parsers/responses/whois.uniregistry.net/tattoo/status_registered_spec.rb index 3647a13e..153d28ec 100644 --- a/spec/whois/parsers/responses/whois.uniregistry.net/tattoo/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.uniregistry.net/tattoo/status_registered_spec.rb @@ -9,154 +9,102 @@ # require 'spec_helper' -require 'whois/parsers/whois.uniregistry.net.rb' -describe Whois::Parsers::WhoisUniregistryNet, "status_registered.expected" do +describe "whois.uniregistry.net", :aggregate_failures do subject do file = fixture("responses", "whois.uniregistry.net/tattoo/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.uniregistry.net") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("nic.tattoo") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("DO_4810ec9890fdf872f2e23b58df485dc4-ISC") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2013-09-16 14:21:26 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-11-09 02:51:24 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2023-09-16 14:21:26 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("9999") - expect(subject.registrar.name).to eq("Uniregistry, Corp.") - expect(subject.registrar.organization).to eq("Uniregistry, Corp.") - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("uniregistry") - expect(subject.registrant_contacts[0].name).to eq("Uniregistry Registry Internal Resources") - expect(subject.registrant_contacts[0].organization).to eq("Uniregistry, Corp") - expect(subject.registrant_contacts[0].address).to eq("PO Box 1361") - expect(subject.registrant_contacts[0].city).to eq("Grand Cayman") - expect(subject.registrant_contacts[0].zip).to eq("KY1-1108") - expect(subject.registrant_contacts[0].state).to eq("George Town") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("KY") - expect(subject.registrant_contacts[0].phone).to eq("+1.3457496263") - expect(subject.registrant_contacts[0].fax).to eq("+1.3457496263") - expect(subject.registrant_contacts[0].email).to eq("info+whois@uniregistry.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("tattoo-admin") - expect(subject.admin_contacts[0].name).to eq("Uniregistry admin contact") - expect(subject.admin_contacts[0].organization).to eq("Uniregistry, Corp") - expect(subject.admin_contacts[0].address).to eq("PO Box 1361") - expect(subject.admin_contacts[0].city).to eq("Grand Cayman") - expect(subject.admin_contacts[0].zip).to eq("KY1-1108") - expect(subject.admin_contacts[0].state).to eq("George Town") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("KY") - expect(subject.admin_contacts[0].phone).to eq("+1.3457496263") - expect(subject.admin_contacts[0].fax).to eq("+1.3457496263") - expect(subject.admin_contacts[0].email).to eq("admin@nic.tattoo") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("tattoo-tech") - expect(subject.technical_contacts[0].name).to eq("Uniregistry tech contact") - expect(subject.technical_contacts[0].organization).to eq("Uniregistry, Corp") - expect(subject.technical_contacts[0].address).to eq("PO Box 1361") - expect(subject.technical_contacts[0].city).to eq("Grand Cayman") - expect(subject.technical_contacts[0].zip).to eq("KY1-1108") - expect(subject.technical_contacts[0].state).to eq("George Town") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("KY") - expect(subject.technical_contacts[0].phone).to eq("+1.3457496263") - expect(subject.technical_contacts[0].fax).to eq("+1.3457496263") - expect(subject.technical_contacts[0].email).to eq("tech@nic.tattoo") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("a.ns.uniregistry.net") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("tld.isc-sns.info") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("tld.isc-sns.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("tld.isc-sns.net") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("nic.tattoo") + expect(subject.domain_id).to eq("DO_4810ec9890fdf872f2e23b58df485dc4-ISC") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2013-09-16 14:21:26 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-11-09 02:51:24 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2023-09-16 14:21:26 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("9999") + expect(subject.registrar.name).to eq("Uniregistry, Corp.") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("uniregistry") + expect(subject.registrant_contacts[0].name).to eq("Uniregistry Registry Internal Resources") + expect(subject.registrant_contacts[0].organization).to eq("Uniregistry, Corp") + expect(subject.registrant_contacts[0].address).to eq("PO Box 1361") + expect(subject.registrant_contacts[0].city).to eq("Grand Cayman") + expect(subject.registrant_contacts[0].zip).to eq("KY1-1108") + expect(subject.registrant_contacts[0].state).to eq("George Town") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("KY") + expect(subject.registrant_contacts[0].phone).to eq("+1.3457496263") + expect(subject.registrant_contacts[0].fax).to eq("+1.3457496263") + expect(subject.registrant_contacts[0].email).to eq("info+whois@uniregistry.com") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("tattoo-admin") + expect(subject.admin_contacts[0].name).to eq("Uniregistry admin contact") + expect(subject.admin_contacts[0].organization).to eq("Uniregistry, Corp") + expect(subject.admin_contacts[0].address).to eq("PO Box 1361") + expect(subject.admin_contacts[0].city).to eq("Grand Cayman") + expect(subject.admin_contacts[0].zip).to eq("KY1-1108") + expect(subject.admin_contacts[0].state).to eq("George Town") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("KY") + expect(subject.admin_contacts[0].phone).to eq("+1.3457496263") + expect(subject.admin_contacts[0].fax).to eq("+1.3457496263") + expect(subject.admin_contacts[0].email).to eq("admin@nic.tattoo") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("tattoo-tech") + expect(subject.technical_contacts[0].name).to eq("Uniregistry tech contact") + expect(subject.technical_contacts[0].organization).to eq("Uniregistry, Corp") + expect(subject.technical_contacts[0].address).to eq("PO Box 1361") + expect(subject.technical_contacts[0].city).to eq("Grand Cayman") + expect(subject.technical_contacts[0].zip).to eq("KY1-1108") + expect(subject.technical_contacts[0].state).to eq("George Town") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("KY") + expect(subject.technical_contacts[0].phone).to eq("+1.3457496263") + expect(subject.technical_contacts[0].fax).to eq("+1.3457496263") + expect(subject.technical_contacts[0].email).to eq("tech@nic.tattoo") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("a.ns.uniregistry.net") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("tld.isc-sns.info") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("tld.isc-sns.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("tld.isc-sns.net") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.usp.ac.fj/fj/status_available_spec.rb b/spec/whois/parsers/responses/whois.usp.ac.fj/fj/status_available_spec.rb index 564cf089..9babc889 100644 --- a/spec/whois/parsers/responses/whois.usp.ac.fj/fj/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.usp.ac.fj/fj/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.usp.ac.fj.rb' -describe Whois::Parsers::WhoisUspAcFj, "status_available.expected" do +describe "whois.usp.ac.fj", :aggregate_failures do subject do file = fixture("responses", "whois.usp.ac.fj/fj/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.usp.ac.fj") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.usp.ac.fj/fj/status_registered_spec.rb b/spec/whois/parsers/responses/whois.usp.ac.fj/fj/status_registered_spec.rb index d763f7e6..29cdd772 100644 --- a/spec/whois/parsers/responses/whois.usp.ac.fj/fj/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.usp.ac.fj/fj/status_registered_spec.rb @@ -9,59 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.usp.ac.fj.rb' -describe Whois::Parsers::WhoisUspAcFj, "status_registered.expected" do +describe "whois.usp.ac.fj", :aggregate_failures do subject do file = fixture("responses", "whois.usp.ac.fj/fj/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.usp.ac.fj") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#updated_on" do - it do - expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-04-28")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq("216.239.32.10") - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq("216.239.34.10") - expect(subject.nameservers[1].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect { subject.created_on }.to raise_error(Whois::AttributeNotSupported) + expect { subject.updated_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-04-28")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq("216.239.32.10") + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq("216.239.34.10") + expect(subject.nameservers[1].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.verisign-grs.com/com/property_nameserver_no_nameserver_spec.rb b/spec/whois/parsers/responses/whois.verisign-grs.com/com/property_nameserver_no_nameserver_spec.rb index d3f736ef..fb580dcf 100644 --- a/spec/whois/parsers/responses/whois.verisign-grs.com/com/property_nameserver_no_nameserver_spec.rb +++ b/spec/whois/parsers/responses/whois.verisign-grs.com/com/property_nameserver_no_nameserver_spec.rb @@ -9,20 +9,17 @@ # require 'spec_helper' -require 'whois/parsers/whois.verisign-grs.com.rb' -describe Whois::Parsers::WhoisVerisignGrsCom, "property_nameserver_no_nameserver.expected" do +describe "whois.verisign-grs.com", :aggregate_failures do subject do file = fixture("responses", "whois.verisign-grs.com/com/property_nameserver_no_nameserver.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.verisign-grs.com") + Whois::Parser.parser_for(part) end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches property_nameserver_no_nameserver.expected" do + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.verisign-grs.com/com/status_available_spec.rb b/spec/whois/parsers/responses/whois.verisign-grs.com/com/status_available_spec.rb index 8794022f..9ff88fab 100644 --- a/spec/whois/parsers/responses/whois.verisign-grs.com/com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.verisign-grs.com/com/status_available_spec.rb @@ -9,80 +9,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.verisign-grs.com.rb' -describe Whois::Parsers::WhoisVerisignGrsCom, "status_available.expected" do +describe "whois.verisign-grs.com", :aggregate_failures do subject do file = fixture("responses", "whois.verisign-grs.com/com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.verisign-grs.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("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 except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign Global Registry Services' (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign 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 that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#referral_whois" do - it do - expect(subject.referral_whois).to eq(nil) - end - end - describe "#referral_url" do - it do - expect(subject.referral_url).to eq(nil) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("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 except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign Global Registry Services' (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign 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 that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") + expect(subject.domain).to eq("u34jedzcq.com") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.referral_whois).to eq(nil) + expect(subject.referral_url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.verisign-grs.com/com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.verisign-grs.com/com/status_registered_spec.rb index ddafd6aa..fb6b2582 100644 --- a/spec/whois/parsers/responses/whois.verisign-grs.com/com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.verisign-grs.com/com/status_registered_spec.rb @@ -9,103 +9,51 @@ # require 'spec_helper' -require 'whois/parsers/whois.verisign-grs.com.rb' -describe Whois::Parsers::WhoisVerisignGrsCom, "status_registered.expected" do +describe "whois.verisign-grs.com", :aggregate_failures do subject do file = fixture("responses", "whois.verisign-grs.com/com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.verisign-grs.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("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 except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign Global Registry Services' (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign 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 that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("2138514_DOMAIN_COM-VRSN") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1997-09-15 04:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2011-07-20 16:55:31 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2020-09-14 04:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end - end - describe "#referral_whois" do - it do - expect(subject.referral_whois).to eq("whois.markmonitor.com") - end - end - describe "#referral_url" do - it do - expect(subject.referral_url).to eq("http://www.markmonitor.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("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 except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign Global Registry Services' (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign 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 that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") + expect(subject.domain).to eq("google.com") + expect(subject.domain_id).to eq("2138514_DOMAIN_COM-VRSN") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1997-09-15 04:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2011-07-20 16:55:31 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2020-09-14 04:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) + expect(subject.referral_whois).to eq("whois.markmonitor.com") + expect(subject.referral_url).to eq("http://www.markmonitor.com") end end diff --git a/spec/whois/parsers/responses/whois.verisign-grs.com/net/status_available_spec.rb b/spec/whois/parsers/responses/whois.verisign-grs.com/net/status_available_spec.rb index 1276b6dd..739b94a9 100644 --- a/spec/whois/parsers/responses/whois.verisign-grs.com/net/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.verisign-grs.com/net/status_available_spec.rb @@ -9,80 +9,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.verisign-grs.com.rb' -describe Whois::Parsers::WhoisVerisignGrsCom, "status_available.expected" do +describe "whois.verisign-grs.com", :aggregate_failures do subject do file = fixture("responses", "whois.verisign-grs.com/net/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.verisign-grs.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("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 except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign Global Registry Services' (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign 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 that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.net") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end - end - describe "#referral_whois" do - it do - expect(subject.referral_whois).to eq(nil) - end - end - describe "#referral_url" do - it do - expect(subject.referral_url).to eq(nil) - end + it "matches status_available.expected" do + expect(subject.disclaimer).to eq("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 except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign Global Registry Services' (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign 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 that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") + expect(subject.domain).to eq("u34jedzcq.net") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) + expect(subject.referral_whois).to eq(nil) + expect(subject.referral_url).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.verisign-grs.com/net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.verisign-grs.com/net/status_registered_spec.rb index 93a04b2e..423f1155 100644 --- a/spec/whois/parsers/responses/whois.verisign-grs.com/net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.verisign-grs.com/net/status_registered_spec.rb @@ -9,103 +9,51 @@ # require 'spec_helper' -require 'whois/parsers/whois.verisign-grs.com.rb' -describe Whois::Parsers::WhoisVerisignGrsCom, "status_registered.expected" do +describe "whois.verisign-grs.com", :aggregate_failures do subject do file = fixture("responses", "whois.verisign-grs.com/net/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.verisign-grs.com") + Whois::Parser.parser_for(part) end - describe "#disclaimer" do - it do - expect(subject.disclaimer).to eq("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 except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign Global Registry Services' (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign 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 that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") - end - end - describe "#domain" do - it do - expect(subject.domain).to eq("google.net") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("4802712_DOMAIN_NET-VRSN") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("1999-03-15 05:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2017-02-11 10:56:37 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2018-03-15 04:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("292") - expect(subject.registrar.name).to eq("MarkMonitor Inc.") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq("http://www.markmonitor.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - expect(subject.nameservers[3].ipv4).to eq(nil) - expect(subject.nameservers[3].ipv6).to eq(nil) - end - end - describe "#referral_whois" do - it do - expect(subject.referral_whois).to eq("whois.markmonitor.com") - end - end - describe "#referral_url" do - it do - expect(subject.referral_url).to eq("http://www.markmonitor.com") - end + it "matches status_registered.expected" do + expect(subject.disclaimer).to eq("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 except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign Global Registry Services' (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign 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 that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time.") + expect(subject.domain).to eq("google.net") + expect(subject.domain_id).to eq("4802712_DOMAIN_NET-VRSN") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("1999-03-15 05:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2017-02-11 10:56:37 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2018-03-15 04:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("292") + expect(subject.registrar.name).to eq("MarkMonitor Inc.") + expect(subject.registrar.url).to eq("http://www.markmonitor.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") + expect(subject.nameservers[3].ipv4).to eq(nil) + expect(subject.nameservers[3].ipv6).to eq(nil) + expect(subject.referral_whois).to eq("whois.markmonitor.com") + expect(subject.referral_url).to eq("http://www.markmonitor.com") end end diff --git a/spec/whois/parsers/responses/whois.verisign-grs.com/response_unavailable_spec.rb b/spec/whois/parsers/responses/whois.verisign-grs.com/response_unavailable_spec.rb index f955ff09..5cf9c41b 100644 --- a/spec/whois/parsers/responses/whois.verisign-grs.com/response_unavailable_spec.rb +++ b/spec/whois/parsers/responses/whois.verisign-grs.com/response_unavailable_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.verisign-grs.com.rb' -describe Whois::Parsers::WhoisVerisignGrsCom, "response_unavailable.expected" do +describe "whois.verisign-grs.com", :aggregate_failures do subject do file = fixture("responses", "whois.verisign-grs.com/response_unavailable.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.verisign-grs.com") + Whois::Parser.parser_for(part) end - describe "#response_unavailable?" do - it do - expect(subject.response_unavailable?).to eq(true) - end + it "matches response_unavailable.expected" do + expect(subject.response_unavailable?).to eq(true) end end diff --git a/spec/whois/parsers/responses/whois.website.ws/ws/status_available_spec.rb b/spec/whois/parsers/responses/whois.website.ws/ws/status_available_spec.rb index 8ca5b60a..38f1922c 100644 --- a/spec/whois/parsers/responses/whois.website.ws/ws/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.website.ws/ws/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.website.ws.rb' -describe Whois::Parsers::WhoisWebsiteWs, "status_available.expected" do +describe "whois.website.ws", :aggregate_failures do subject do file = fixture("responses", "whois.website.ws/ws/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.website.ws") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.website.ws/ws/status_registered_spec.rb b/spec/whois/parsers/responses/whois.website.ws/ws/status_registered_spec.rb index 512f2d8d..31fbd221 100644 --- a/spec/whois/parsers/responses/whois.website.ws/ws/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.website.ws/ws/status_registered_spec.rb @@ -9,61 +9,34 @@ # require 'spec_helper' -require 'whois/parsers/whois.website.ws.rb' -describe Whois::Parsers::WhoisWebsiteWs, "status_registered.expected" do +describe "whois.website.ws", :aggregate_failures do subject do file = fixture("responses", "whois.website.ws/ws/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.website.ws") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2002-03-03")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2008-12-08")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2010-03-03")) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-03-03")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2008-12-08")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2010-03-03")) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/spec/whois/parsers/responses/whois.wildwestdomains.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.wildwestdomains.com/status_available_spec.rb index 005b279e..44c85db0 100644 --- a/spec/whois/parsers/responses/whois.wildwestdomains.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.wildwestdomains.com/status_available_spec.rb @@ -9,83 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.wildwestdomains.com.rb' -describe Whois::Parsers::WhoisWildwestdomainsCom, "status_available.expected" do +describe "whois.wildwestdomains.com", :aggregate_failures do subject do file = fixture("responses", "whois.wildwestdomains.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.wildwestdomains.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("sadasdsa.com") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.wildwestdomains.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.wildwestdomains.com/status_registered_spec.rb index 3b09ec1c..b4904775 100644 --- a/spec/whois/parsers/responses/whois.wildwestdomains.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.wildwestdomains.com/status_registered_spec.rb @@ -9,150 +9,98 @@ # require 'spec_helper' -require 'whois/parsers/whois.wildwestdomains.com.rb' -describe Whois::Parsers::WhoisWildwestdomainsCom, "status_registered.expected" do +describe "whois.wildwestdomains.com", :aggregate_failures do subject do file = fixture("responses", "whois.wildwestdomains.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.wildwestdomains.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("wildwestdomains.com") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("33386184_DOMAIN_COM-VRSN") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2000-08-22 23:29:11 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2011-11-01 21:31:47 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2021-11-01 11:59:59 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq("440") - expect(subject.registrar.name).to eq("Wild West Domains, LLC") - expect(subject.registrar.organization).to eq("Wild West Domains, LLC") - expect(subject.registrar.url).to eq("http://www.wildwestdomains.com") - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq(nil) - expect(subject.registrant_contacts[0].name).to eq("Registration Private") - expect(subject.registrant_contacts[0].organization).to eq("Domains By Proxy, LLC") - expect(subject.registrant_contacts[0].address).to eq("DomainsByProxy.com, 14747 N Northsight Blvd Suite 111, PMB 309") - expect(subject.registrant_contacts[0].city).to eq("Scottsdale") - expect(subject.registrant_contacts[0].zip).to eq("85260") - expect(subject.registrant_contacts[0].state).to eq("Arizona") - expect(subject.registrant_contacts[0].country).to eq(nil) - expect(subject.registrant_contacts[0].country_code).to eq("United States") - expect(subject.registrant_contacts[0].phone).to eq("+1.4806242599") - expect(subject.registrant_contacts[0].fax).to eq("+1.4806242598") - expect(subject.registrant_contacts[0].email).to eq("WILDWESTDOMAINS.COM@domainsbyproxy.com") - expect(subject.registrant_contacts[0].created_on).to eq(nil) - expect(subject.registrant_contacts[0].updated_on).to eq(nil) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq(nil) - expect(subject.admin_contacts[0].name).to eq("Registration Private") - expect(subject.admin_contacts[0].organization).to eq("Domains By Proxy, LLC") - expect(subject.admin_contacts[0].address).to eq("DomainsByProxy.com, 14747 N Northsight Blvd Suite 111, PMB 309") - expect(subject.admin_contacts[0].city).to eq("Scottsdale") - expect(subject.admin_contacts[0].zip).to eq("85260") - expect(subject.admin_contacts[0].state).to eq("Arizona") - expect(subject.admin_contacts[0].country).to eq(nil) - expect(subject.admin_contacts[0].country_code).to eq("United States") - expect(subject.admin_contacts[0].phone).to eq("+1.4806242599") - expect(subject.admin_contacts[0].fax).to eq("+1.4806242598") - expect(subject.admin_contacts[0].email).to eq("WILDWESTDOMAINS.COM@domainsbyproxy.com") - expect(subject.admin_contacts[0].created_on).to eq(nil) - expect(subject.admin_contacts[0].updated_on).to eq(nil) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq(nil) - expect(subject.technical_contacts[0].name).to eq("Registration Private") - expect(subject.technical_contacts[0].organization).to eq("Domains By Proxy, LLC") - expect(subject.technical_contacts[0].address).to eq("DomainsByProxy.com, 14747 N Northsight Blvd Suite 111, PMB 309") - expect(subject.technical_contacts[0].city).to eq("Scottsdale") - expect(subject.technical_contacts[0].zip).to eq("85260") - expect(subject.technical_contacts[0].state).to eq("Arizona") - expect(subject.technical_contacts[0].country).to eq(nil) - expect(subject.technical_contacts[0].country_code).to eq("United States") - expect(subject.technical_contacts[0].phone).to eq("+1.4806242599") - expect(subject.technical_contacts[0].fax).to eq("+1.4806242598") - expect(subject.technical_contacts[0].email).to eq("WILDWESTDOMAINS.COM@domainsbyproxy.com") - expect(subject.technical_contacts[0].created_on).to eq(nil) - expect(subject.technical_contacts[0].updated_on).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("cns1.secureserver.net") - expect(subject.nameservers[0].ipv4).to eq(nil) - expect(subject.nameservers[0].ipv6).to eq(nil) - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("cns2.secureserver.net") - expect(subject.nameservers[1].ipv4).to eq(nil) - expect(subject.nameservers[1].ipv6).to eq(nil) - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("cns3.secureserver.net") - expect(subject.nameservers[2].ipv4).to eq(nil) - expect(subject.nameservers[2].ipv6).to eq(nil) - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("wildwestdomains.com") + expect(subject.domain_id).to eq("33386184_DOMAIN_COM-VRSN") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2000-08-22 23:29:11 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2011-11-01 21:31:47 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2021-11-01 11:59:59 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq("440") + expect(subject.registrar.name).to eq("Wild West Domains, LLC") + expect(subject.registrar.url).to eq("http://www.wildwestdomains.com") + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq(nil) + expect(subject.registrant_contacts[0].name).to eq("Registration Private") + expect(subject.registrant_contacts[0].organization).to eq("Domains By Proxy, LLC") + expect(subject.registrant_contacts[0].address).to eq("DomainsByProxy.com, 14747 N Northsight Blvd Suite 111, PMB 309") + expect(subject.registrant_contacts[0].city).to eq("Scottsdale") + expect(subject.registrant_contacts[0].zip).to eq("85260") + expect(subject.registrant_contacts[0].state).to eq("Arizona") + expect(subject.registrant_contacts[0].country).to eq(nil) + expect(subject.registrant_contacts[0].country_code).to eq("United States") + expect(subject.registrant_contacts[0].phone).to eq("+1.4806242599") + expect(subject.registrant_contacts[0].fax).to eq("+1.4806242598") + expect(subject.registrant_contacts[0].email).to eq("WILDWESTDOMAINS.COM@domainsbyproxy.com") + expect(subject.registrant_contacts[0].created_on).to eq(nil) + expect(subject.registrant_contacts[0].updated_on).to eq(nil) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq(nil) + expect(subject.admin_contacts[0].name).to eq("Registration Private") + expect(subject.admin_contacts[0].organization).to eq("Domains By Proxy, LLC") + expect(subject.admin_contacts[0].address).to eq("DomainsByProxy.com, 14747 N Northsight Blvd Suite 111, PMB 309") + expect(subject.admin_contacts[0].city).to eq("Scottsdale") + expect(subject.admin_contacts[0].zip).to eq("85260") + expect(subject.admin_contacts[0].state).to eq("Arizona") + expect(subject.admin_contacts[0].country).to eq(nil) + expect(subject.admin_contacts[0].country_code).to eq("United States") + expect(subject.admin_contacts[0].phone).to eq("+1.4806242599") + expect(subject.admin_contacts[0].fax).to eq("+1.4806242598") + expect(subject.admin_contacts[0].email).to eq("WILDWESTDOMAINS.COM@domainsbyproxy.com") + expect(subject.admin_contacts[0].created_on).to eq(nil) + expect(subject.admin_contacts[0].updated_on).to eq(nil) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq(nil) + expect(subject.technical_contacts[0].name).to eq("Registration Private") + expect(subject.technical_contacts[0].organization).to eq("Domains By Proxy, LLC") + expect(subject.technical_contacts[0].address).to eq("DomainsByProxy.com, 14747 N Northsight Blvd Suite 111, PMB 309") + expect(subject.technical_contacts[0].city).to eq("Scottsdale") + expect(subject.technical_contacts[0].zip).to eq("85260") + expect(subject.technical_contacts[0].state).to eq("Arizona") + expect(subject.technical_contacts[0].country).to eq(nil) + expect(subject.technical_contacts[0].country_code).to eq("United States") + expect(subject.technical_contacts[0].phone).to eq("+1.4806242599") + expect(subject.technical_contacts[0].fax).to eq("+1.4806242598") + expect(subject.technical_contacts[0].email).to eq("WILDWESTDOMAINS.COM@domainsbyproxy.com") + expect(subject.technical_contacts[0].created_on).to eq(nil) + expect(subject.technical_contacts[0].updated_on).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("cns1.secureserver.net") + expect(subject.nameservers[0].ipv4).to eq(nil) + expect(subject.nameservers[0].ipv6).to eq(nil) + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("cns2.secureserver.net") + expect(subject.nameservers[1].ipv4).to eq(nil) + expect(subject.nameservers[1].ipv6).to eq(nil) + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("cns3.secureserver.net") + expect(subject.nameservers[2].ipv4).to eq(nil) + expect(subject.nameservers[2].ipv6).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.yoursrs.com/status_available_spec.rb b/spec/whois/parsers/responses/whois.yoursrs.com/status_available_spec.rb index 55000e33..ab0ab552 100644 --- a/spec/whois/parsers/responses/whois.yoursrs.com/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.yoursrs.com/status_available_spec.rb @@ -9,83 +9,32 @@ # require 'spec_helper' -require 'whois/parsers/whois.yoursrs.com.rb' -describe Whois::Parsers::WhoisYoursrsCom, "status_available.expected" do +describe "whois.yoursrs.com", :aggregate_failures do subject do file = fixture("responses", "whois.yoursrs.com/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.yoursrs.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq(nil) - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq([]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts).to eq([]) - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts).to eq([]) - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts).to eq([]) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq(nil) + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq([]) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts).to eq([]) + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts).to eq([]) + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts).to eq([]) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.yoursrs.com/status_registered_spec.rb b/spec/whois/parsers/responses/whois.yoursrs.com/status_registered_spec.rb index 66c3e511..5d19eb71 100644 --- a/spec/whois/parsers/responses/whois.yoursrs.com/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.yoursrs.com/status_registered_spec.rb @@ -9,133 +9,81 @@ # require 'spec_helper' -require 'whois/parsers/whois.yoursrs.com.rb' -describe Whois::Parsers::WhoisYoursrsCom, "status_registered.expected" do +describe "whois.yoursrs.com", :aggregate_failures do subject do file = fixture("responses", "whois.yoursrs.com/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.yoursrs.com") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("yoursrs.com") - end - end - describe "#domain_id" do - it do - expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#status" do - it do - expect(subject.status).to eq(["OK"]) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2003-11-24 09:40:55")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2014-01-22 14:04:50")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-11-24 09:40:55")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("REALTIME REGISTER B.V.") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#registrant_contacts" do - it do - expect(subject.registrant_contacts).to be_a(Array) - expect(subject.registrant_contacts.size).to eq(1) - expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) - expect(subject.registrant_contacts[0].id).to eq("realtimeregister") - expect(subject.registrant_contacts[0].name).to eq("Valentijn Borstlap") - expect(subject.registrant_contacts[0].organization).to eq("Realtime Register B.V.") - expect(subject.registrant_contacts[0].address).to eq("Ceintuurbaan 32a") - expect(subject.registrant_contacts[0].city).to eq("Zwolle") - expect(subject.registrant_contacts[0].zip).to eq("8024AA") - expect(subject.registrant_contacts[0].state).to eq("Overijssel") - expect(subject.registrant_contacts[0].country_code).to eq("NL") - expect(subject.registrant_contacts[0].phone).to eq("+31.384530752") - expect(subject.registrant_contacts[0].fax).to eq("+31.384540122") - expect(subject.registrant_contacts[0].email).to eq("support@realtimeregister.com") - end - end - describe "#admin_contacts" do - it do - expect(subject.admin_contacts).to be_a(Array) - expect(subject.admin_contacts.size).to eq(1) - expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) - expect(subject.admin_contacts[0].id).to eq("realtimeregister") - expect(subject.admin_contacts[0].name).to eq("Valentijn Borstlap") - expect(subject.admin_contacts[0].organization).to eq("Realtime Register B.V.") - expect(subject.admin_contacts[0].address).to eq("Ceintuurbaan 32a") - expect(subject.admin_contacts[0].city).to eq("Zwolle") - expect(subject.admin_contacts[0].zip).to eq("8024AA") - expect(subject.admin_contacts[0].state).to eq("Overijssel") - expect(subject.admin_contacts[0].country_code).to eq("NL") - expect(subject.admin_contacts[0].phone).to eq("+31.384530752") - expect(subject.admin_contacts[0].fax).to eq("+31.384540122") - expect(subject.admin_contacts[0].email).to eq("support@realtimeregister.com") - end - end - describe "#technical_contacts" do - it do - expect(subject.technical_contacts).to be_a(Array) - expect(subject.technical_contacts.size).to eq(1) - expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) - expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) - expect(subject.technical_contacts[0].id).to eq("realtimeregister") - expect(subject.technical_contacts[0].name).to eq("Valentijn Borstlap") - expect(subject.technical_contacts[0].organization).to eq("Realtime Register B.V.") - expect(subject.technical_contacts[0].address).to eq("Ceintuurbaan 32a") - expect(subject.technical_contacts[0].city).to eq("Zwolle") - expect(subject.technical_contacts[0].zip).to eq("8024AA") - expect(subject.technical_contacts[0].state).to eq("Overijssel") - expect(subject.technical_contacts[0].country_code).to eq("NL") - expect(subject.technical_contacts[0].phone).to eq("+31.384530752") - expect(subject.technical_contacts[0].fax).to eq("+31.384540122") - expect(subject.technical_contacts[0].email).to eq("support@realtimeregister.com") - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.yoursrs.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.yoursrs.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("yoursrs.com") + expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) + expect(subject.status).to eq(["OK"]) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2003-11-24 09:40:55")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2014-01-22 14:04:50")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-11-24 09:40:55")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("REALTIME REGISTER B.V.") + expect(subject.registrar.url).to eq(nil) + expect(subject.registrant_contacts).to be_a(Array) + expect(subject.registrant_contacts.size).to eq(1) + expect(subject.registrant_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.registrant_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_REGISTRANT) + expect(subject.registrant_contacts[0].id).to eq("realtimeregister") + expect(subject.registrant_contacts[0].name).to eq("Valentijn Borstlap") + expect(subject.registrant_contacts[0].organization).to eq("Realtime Register B.V.") + expect(subject.registrant_contacts[0].address).to eq("Ceintuurbaan 32a") + expect(subject.registrant_contacts[0].city).to eq("Zwolle") + expect(subject.registrant_contacts[0].zip).to eq("8024AA") + expect(subject.registrant_contacts[0].state).to eq("Overijssel") + expect(subject.registrant_contacts[0].country_code).to eq("NL") + expect(subject.registrant_contacts[0].phone).to eq("+31.384530752") + expect(subject.registrant_contacts[0].fax).to eq("+31.384540122") + expect(subject.registrant_contacts[0].email).to eq("support@realtimeregister.com") + expect(subject.admin_contacts).to be_a(Array) + expect(subject.admin_contacts.size).to eq(1) + expect(subject.admin_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.admin_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_ADMINISTRATIVE) + expect(subject.admin_contacts[0].id).to eq("realtimeregister") + expect(subject.admin_contacts[0].name).to eq("Valentijn Borstlap") + expect(subject.admin_contacts[0].organization).to eq("Realtime Register B.V.") + expect(subject.admin_contacts[0].address).to eq("Ceintuurbaan 32a") + expect(subject.admin_contacts[0].city).to eq("Zwolle") + expect(subject.admin_contacts[0].zip).to eq("8024AA") + expect(subject.admin_contacts[0].state).to eq("Overijssel") + expect(subject.admin_contacts[0].country_code).to eq("NL") + expect(subject.admin_contacts[0].phone).to eq("+31.384530752") + expect(subject.admin_contacts[0].fax).to eq("+31.384540122") + expect(subject.admin_contacts[0].email).to eq("support@realtimeregister.com") + expect(subject.technical_contacts).to be_a(Array) + expect(subject.technical_contacts.size).to eq(1) + expect(subject.technical_contacts[0]).to be_a(Whois::Parser::Contact) + expect(subject.technical_contacts[0].type).to eq(Whois::Parser::Contact::TYPE_TECHNICAL) + expect(subject.technical_contacts[0].id).to eq("realtimeregister") + expect(subject.technical_contacts[0].name).to eq("Valentijn Borstlap") + expect(subject.technical_contacts[0].organization).to eq("Realtime Register B.V.") + expect(subject.technical_contacts[0].address).to eq("Ceintuurbaan 32a") + expect(subject.technical_contacts[0].city).to eq("Zwolle") + expect(subject.technical_contacts[0].zip).to eq("8024AA") + expect(subject.technical_contacts[0].state).to eq("Overijssel") + expect(subject.technical_contacts[0].country_code).to eq("NL") + expect(subject.technical_contacts[0].phone).to eq("+31.384530752") + expect(subject.technical_contacts[0].fax).to eq("+31.384540122") + expect(subject.technical_contacts[0].email).to eq("support@realtimeregister.com") + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.yoursrs.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.yoursrs.com") end end diff --git a/spec/whois/parsers/responses/whois.yoursrs.com/status_registered_with_no_last_updated_spec.rb b/spec/whois/parsers/responses/whois.yoursrs.com/status_registered_with_no_last_updated_spec.rb index ef64c2af..c824a91d 100644 --- a/spec/whois/parsers/responses/whois.yoursrs.com/status_registered_with_no_last_updated_spec.rb +++ b/spec/whois/parsers/responses/whois.yoursrs.com/status_registered_with_no_last_updated_spec.rb @@ -9,19 +9,16 @@ # require 'spec_helper' -require 'whois/parsers/whois.yoursrs.com.rb' -describe Whois::Parsers::WhoisYoursrsCom, "status_registered_with_no_last_updated.expected" do +describe "whois.yoursrs.com", :aggregate_failures do subject do file = fixture("responses", "whois.yoursrs.com/status_registered_with_no_last_updated.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.yoursrs.com") + Whois::Parser.parser_for(part) end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end + it "matches status_registered_with_no_last_updated.expected" do + expect(subject.updated_on).to eq(nil) end end diff --git a/spec/whois/parsers/responses/whois.za.net/za.net/status_available_spec.rb b/spec/whois/parsers/responses/whois.za.net/za.net/status_available_spec.rb index a475a901..75a29865 100644 --- a/spec/whois/parsers/responses/whois.za.net/za.net/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.za.net/za.net/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.za.net.rb' -describe Whois::Parsers::WhoisZaNet, "status_available.expected" do +describe "whois.za.net", :aggregate_failures do subject do file = fixture("responses", "whois.za.net/za.net/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.za.net") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.za.net/za.net/status_registered_spec.rb b/spec/whois/parsers/responses/whois.za.net/za.net/status_registered_spec.rb index a09278b2..c8626a54 100644 --- a/spec/whois/parsers/responses/whois.za.net/za.net/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.za.net/za.net/status_registered_spec.rb @@ -9,56 +9,29 @@ # require 'spec_helper' -require 'whois/parsers/whois.za.net.rb' -describe Whois::Parsers::WhoisZaNet, "status_registered.expected" do +describe "whois.za.net", :aggregate_failures do subject do file = fixture("responses", "whois.za.net/za.net/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.za.net") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2002-03-29 22:03:53 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2002-03-29 22:03:53 UTC")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(2) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns3.zoneedit.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns5.zoneedit.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-03-29 22:03:53 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2002-03-29 22:03:53 UTC")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(2) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns3.zoneedit.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns5.zoneedit.com") end end diff --git a/spec/whois/parsers/responses/whois.za.org/za.org/status_available_spec.rb b/spec/whois/parsers/responses/whois.za.org/za.org/status_available_spec.rb index 5198656e..834800ed 100644 --- a/spec/whois/parsers/responses/whois.za.org/za.org/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois.za.org/za.org/status_available_spec.rb @@ -9,50 +9,23 @@ # require 'spec_helper' -require 'whois/parsers/whois.za.org.rb' -describe Whois::Parsers::WhoisZaOrg, "status_available.expected" do +describe "whois.za.org", :aggregate_failures do subject do file = fixture("responses", "whois.za.org/za.org/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.za.org") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois.za.org/za.org/status_registered_spec.rb b/spec/whois/parsers/responses/whois.za.org/za.org/status_registered_spec.rb index 12f60553..93cb31cb 100644 --- a/spec/whois/parsers/responses/whois.za.org/za.org/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois.za.org/za.org/status_registered_spec.rb @@ -9,58 +9,31 @@ # require 'spec_helper' -require 'whois/parsers/whois.za.org.rb' -describe Whois::Parsers::WhoisZaOrg, "status_registered.expected" do +describe "whois.za.org", :aggregate_failures do subject do file = fixture("responses", "whois.za.org/za.org/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois.za.org") + Whois::Parser.parser_for(part) end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2000-11-05 14:03:48 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2005-08-15 12:15:10")) - end - end - describe "#expires_on" do - it do - expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(3) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("blade.wcic.co.za") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("sabertooth.wcic.co.za") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns2.iafrica.com") - end + it "matches status_registered.expected" do + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2000-11-05 14:03:48 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2005-08-15 12:15:10 BST")) + expect { subject.expires_on }.to raise_error(Whois::AttributeNotSupported) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(3) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("blade.wcic.co.za") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("sabertooth.wcic.co.za") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns2.iafrica.com") end end diff --git a/spec/whois/parsers/responses/whois1.nic.bi/bi/status_available_spec.rb b/spec/whois/parsers/responses/whois1.nic.bi/bi/status_available_spec.rb index fdb90e68..94744b6c 100644 --- a/spec/whois/parsers/responses/whois1.nic.bi/bi/status_available_spec.rb +++ b/spec/whois/parsers/responses/whois1.nic.bi/bi/status_available_spec.rb @@ -9,65 +9,26 @@ # require 'spec_helper' -require 'whois/parsers/whois1.nic.bi.rb' -describe Whois::Parsers::Whois1NicBi, "status_available.expected" do +describe "whois1.nic.bi", :aggregate_failures do subject do file = fixture("responses", "whois1.nic.bi/bi/status_available.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois1.nic.bi") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("u34jedzcq.bi") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq(nil) - end - end - describe "#status" do - it do - expect(subject.status).to eq(:available) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(true) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(false) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to eq(nil) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to eq(nil) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to eq(nil) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers).to eq([]) - end + it "matches status_available.expected" do + expect(subject.domain).to eq("u34jedzcq.bi") + expect(subject.domain_id).to eq(nil) + expect(subject.status).to eq(:available) + expect(subject.available?).to eq(true) + expect(subject.registered?).to eq(false) + expect(subject.created_on).to eq(nil) + expect(subject.updated_on).to eq(nil) + expect(subject.expires_on).to eq(nil) + expect(subject.registrar).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers).to eq([]) end end diff --git a/spec/whois/parsers/responses/whois1.nic.bi/bi/status_registered_spec.rb b/spec/whois/parsers/responses/whois1.nic.bi/bi/status_registered_spec.rb index eed02fc5..2a3c7d7f 100644 --- a/spec/whois/parsers/responses/whois1.nic.bi/bi/status_registered_spec.rb +++ b/spec/whois/parsers/responses/whois1.nic.bi/bi/status_registered_spec.rb @@ -9,80 +9,40 @@ # require 'spec_helper' -require 'whois/parsers/whois1.nic.bi.rb' -describe Whois::Parsers::Whois1NicBi, "status_registered.expected" do +describe "whois1.nic.bi", :aggregate_failures do subject do file = fixture("responses", "whois1.nic.bi/bi/status_registered.txt") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "whois1.nic.bi") + Whois::Parser.parser_for(part) end - describe "#domain" do - it do - expect(subject.domain).to eq("google.bi") - end - end - describe "#domain_id" do - it do - expect(subject.domain_id).to eq("2633NIC-BI") - end - end - describe "#status" do - it do - expect(subject.status).to eq(:registered) - end - end - describe "#available?" do - it do - expect(subject.available?).to eq(false) - end - end - describe "#registered?" do - it do - expect(subject.registered?).to eq(true) - end - end - describe "#created_on" do - it do - expect(subject.created_on).to be_a(Time) - expect(subject.created_on).to eq(Time.parse("2002-09-29 22:00:00 UTC")) - end - end - describe "#updated_on" do - it do - expect(subject.updated_on).to be_a(Time) - expect(subject.updated_on).to eq(Time.parse("2013-12-05 07:16:04 UTC")) - end - end - describe "#expires_on" do - it do - expect(subject.expires_on).to be_a(Time) - expect(subject.expires_on).to eq(Time.parse("2014-09-29 22:00:00 UTC")) - end - end - describe "#registrar" do - it do - expect(subject.registrar).to be_a(Whois::Parser::Registrar) - expect(subject.registrar.id).to eq(nil) - expect(subject.registrar.name).to eq("MarkMonito") - expect(subject.registrar.organization).to eq(nil) - expect(subject.registrar.url).to eq(nil) - end - end - describe "#nameservers" do - it do - expect(subject.nameservers).to be_a(Array) - expect(subject.nameservers.size).to eq(4) - expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[0].name).to eq("ns1.google.com") - expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[1].name).to eq("ns2.google.com") - expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[2].name).to eq("ns3.google.com") - expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) - expect(subject.nameservers[3].name).to eq("ns4.google.com") - end + it "matches status_registered.expected" do + expect(subject.domain).to eq("google.bi") + expect(subject.domain_id).to eq("2633NIC-BI") + expect(subject.status).to eq(:registered) + expect(subject.available?).to eq(false) + expect(subject.registered?).to eq(true) + expect(subject.created_on).to be_a(Time) + expect(subject.created_on).to eq(DateTime.parse("2002-09-29 22:00:00 UTC")) + expect(subject.updated_on).to be_a(Time) + expect(subject.updated_on).to eq(DateTime.parse("2013-12-05 07:16:04 UTC")) + expect(subject.expires_on).to be_a(Time) + expect(subject.expires_on).to eq(DateTime.parse("2014-09-29 22:00:00 UTC")) + expect(subject.registrar).to be_a(Whois::Parser::Registrar) + expect(subject.registrar.id).to eq(nil) + expect(subject.registrar.name).to eq("MarkMonito") + expect(subject.registrar.url).to eq(nil) + expect(subject.nameservers).to be_a(Array) + expect(subject.nameservers.size).to eq(4) + expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[0].name).to eq("ns1.google.com") + expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[1].name).to eq("ns2.google.com") + expect(subject.nameservers[2]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[2].name).to eq("ns3.google.com") + expect(subject.nameservers[3]).to be_a(Whois::Parser::Nameserver) + expect(subject.nameservers[3].name).to eq("ns4.google.com") end end diff --git a/tasks/spec.rake b/tasks/spec.rake index 601fd7f4..d641c8b1 100644 --- a/tasks/spec.rake +++ b/tasks/spec.rake @@ -23,38 +23,31 @@ namespace :spec do # require 'spec_helper' -require 'whois/parsers/%{khost}.rb' -describe %{described_class}, "%{descr}" do +describe "%{khost}", :aggregate_failures do subject do file = fixture("responses", "%{fixture}") - part = Whois::Record::Part.new(body: File.read(file)) - described_class.new(part) + part = Whois::Record::Part.new(body: File.read(file), host: "%{khost}") + Whois::Parser.parser_for(part) end -%{contexts} -end - RUBY - - TPL_CONTEXT = <<-RUBY.chomp! - describe "#%{descr}" do - it do -%{examples} - end + it "matches %{descr}" do +%{matches} end +end RUBY TPL_MATCH = <<-RUBY.chomp! - expect(subject.%{attribute}).to %{match} + expect(subject.%{attribute}).to %{match} RUBY TPL_MATCH_SIZE = <<-RUBY.chomp! - expect(subject.%{attribute}.size).to eq(%{size}) + expect(subject.%{attribute}.size).to eq(%{size}) RUBY TPL_MATCH_RAISE = <<-RUBY.chomp! - expect { subject.%{attribute} }.to %{match} + expect { subject.%{attribute} }.to %{match} RUBY def relativize(path) @@ -71,7 +64,6 @@ end parts = (source_path.split("/") - SOURCE_PARTS) khost = parts.first kfile = parts.last - described_class = Whois::Parser.parser_klass(khost) target_path = File.join(TARGET_DIR, *parts).gsub(".expected", "_spec.rb") @@ -109,8 +101,8 @@ end # Generate the RSpec content and # write one file for every test. - contexts = tests.map do |attr, specs| - matches = specs.map do |method, condition| + matches = tests.flat_map do |attr, specs| + specs.map do |method, condition| attribute = method % attr case condition when /raise_error/ @@ -120,12 +112,17 @@ end else format(TPL_MATCH, attribute: attribute, match: condition) end - end.join("\n") - format(TPL_CONTEXT, descr: attr, examples: matches) + end end.join("\n") describe = <<-RUBY -#{format(TPL_DESCRIBE, :described_class => described_class, :khost => khost, :descr => kfile, :sfile => relativize(source_path), :fixture => parts.join('/').gsub('.expected', '.txt'), :contexts => contexts)} +#{TPL_DESCRIBE % { + :khost => khost, + :descr => kfile, + :sfile => relativize(source_path), + :fixture => parts.join("/").gsub(".expected", ".txt"), + :matches => matches +}} RUBY print "Generating #{relativize(target_path)}... " @@ -147,9 +144,11 @@ end when c =~ /^%CLASS\{(.+)\}$/ c = "be_a(#{_build_condition_typeof(Regexp.last_match(1))})" - # %s %TIME{...} -> %s Time.parse(...) + # DateTime is better than Time here because it doesn't take local timezone into account (UTC by default) + # and also parses timezones better (e.g. CET, JST, BST, etc..) at the end of the string + # %s %TIME{...} -> %s DateTime.parse(...) when c =~ /^%TIME\{(.+)\}$/ - c = "eq(Time.parse(\"#{Regexp.last_match(1)}\"))" + c = "eq(DateTime.parse(\"#{Regexp.last_match(1)}\"))" # %s %ERROR{...} -> %s raise_error(...) when c =~ /^%ERROR\{(.+)\}$/ diff --git a/utils/mkwhois.rb b/utils/mkwhois.rb index 7ef228ef..2c09fb91 100755 --- a/utils/mkwhois.rb +++ b/utils/mkwhois.rb @@ -1,4 +1,4 @@ -#!/usr/bin/env ruby -w +#!/usr/bin/env ruby # Usage: # diff --git a/whois-parser.gemspec b/whois-parser.gemspec index ce5914a8..e9fafa66 100644 --- a/whois-parser.gemspec +++ b/whois-parser.gemspec @@ -21,8 +21,9 @@ Gem::Specification.new do |s| s.add_dependency "whois", ">= 4.1.0" s.add_dependency "activesupport", ">= 4" + s.add_dependency "ostruct" s.add_development_dependency "rake" s.add_development_dependency "rspec" s.add_development_dependency "yard" -end \ No newline at end of file +end