whois-parser 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +14 -8
- data/CONTRIBUTING.md +21 -7
- data/LICENSE.txt +1 -1
- data/README.md +1 -1
- data/lib/whois-parser.rb +1 -1
- data/lib/whois/parser.rb +16 -1
- data/lib/whois/parser/version.rb +1 -1
- data/lib/whois/parsers/base.rb +1 -1
- data/lib/whois/parsers/base_afilias.rb +2 -2
- data/lib/whois/parsers/base_afilias2.rb +1 -1
- data/lib/whois/parsers/base_cocca.rb +4 -4
- data/lib/whois/parsers/base_cocca2.rb +2 -2
- data/lib/whois/parsers/base_icann_compliant.rb +1 -1
- data/lib/whois/parsers/base_icb.rb +1 -1
- data/lib/whois/parsers/base_iisse.rb +1 -1
- data/lib/whois/parsers/base_nic_fr.rb +3 -3
- data/lib/whois/parsers/base_shared1.rb +1 -1
- data/lib/whois/parsers/base_shared2.rb +1 -1
- data/lib/whois/parsers/base_shared3.rb +1 -1
- data/lib/whois/parsers/base_verisign.rb +1 -1
- data/lib/whois/parsers/base_whoisd.rb +2 -2
- data/lib/whois/parsers/blank.rb +1 -1
- data/lib/whois/parsers/capetown-whois.registry.net.za.rb +1 -1
- data/lib/whois/parsers/ccwhois.ksregistry.net.rb +1 -1
- data/lib/whois/parsers/ccwhois.verisign-grs.com.rb +1 -1
- data/lib/whois/parsers/coza-whois.registry.net.za.rb +25 -0
- data/lib/whois/parsers/durban-whois.registry.net.za.rb +1 -1
- data/lib/whois/parsers/example.rb +1 -1
- data/lib/whois/parsers/joburg-whois.registry.net.za.rb +1 -1
- data/lib/whois/parsers/kero.yachay.pe.rb +3 -3
- data/lib/whois/parsers/org-whois.registry.net.za.rb +1 -1
- data/lib/whois/parsers/tvwhois.verisign-grs.com.rb +1 -1
- data/lib/whois/parsers/whois.1und1.info.rb +1 -1
- data/lib/whois/parsers/whois.35.com.rb +1 -1
- data/lib/whois/parsers/whois.aeda.net.ae.rb +2 -2
- data/lib/whois/parsers/whois.aero.rb +1 -1
- data/lib/whois/parsers/whois.afilias-grs.info.rb +1 -1
- data/lib/whois/parsers/whois.afilias.net.rb +1 -1
- data/lib/whois/parsers/whois.amnic.net.rb +2 -2
- data/lib/whois/parsers/whois.ascio.com.rb +1 -1
- data/lib/whois/parsers/whois.ati.tn.rb +1 -1
- data/lib/whois/parsers/whois.audns.net.au.rb +1 -1
- data/lib/whois/parsers/whois.ax.rb +1 -1
- data/lib/whois/parsers/whois.biz.rb +12 -3
- data/lib/whois/parsers/whois.bnnic.bn.rb +1 -1
- data/lib/whois/parsers/whois.cat.rb +1 -1
- data/lib/whois/parsers/whois.cctld.by.rb +1 -1
- data/lib/whois/parsers/whois.cctld.uz.rb +2 -2
- data/lib/whois/parsers/whois.cdmon.com.rb +1 -1
- data/lib/whois/parsers/whois.centralnic.com.rb +1 -1
- data/lib/whois/parsers/whois.cira.ca.rb +4 -4
- data/lib/whois/parsers/whois.cmc.iq.rb +1 -1
- data/lib/whois/parsers/whois.cnnic.cn.rb +1 -1
- data/lib/whois/parsers/whois.co.ca.rb +1 -1
- data/lib/whois/parsers/whois.co.pl.rb +1 -1
- data/lib/whois/parsers/whois.co.ug.rb +2 -2
- data/lib/whois/parsers/whois.comlaude.com.rb +1 -1
- data/lib/whois/parsers/whois.corporatedomains.com.rb +1 -1
- data/lib/whois/parsers/whois.denic.de.rb +2 -2
- data/lib/whois/parsers/whois.dk-hostmaster.dk.rb +2 -2
- data/lib/whois/parsers/whois.dns.be.rb +3 -3
- data/lib/whois/parsers/whois.dns.hr.rb +1 -1
- data/lib/whois/parsers/whois.dns.lu.rb +2 -2
- data/lib/whois/parsers/whois.dns.pl.rb +1 -1
- data/lib/whois/parsers/whois.dns.pt.rb +2 -2
- data/lib/whois/parsers/whois.domain-registry.nl.rb +2 -2
- data/lib/whois/parsers/whois.domain.kg.rb +1 -1
- data/lib/whois/parsers/whois.domainregistry.ie.rb +2 -2
- data/lib/whois/parsers/whois.domreg.lt.rb +1 -1
- data/lib/whois/parsers/whois.donuts.co.rb +1 -1
- data/lib/whois/parsers/whois.dot.cf.rb +1 -1
- data/lib/whois/parsers/whois.dot.tk.rb +1 -1
- data/lib/whois/parsers/whois.dotgov.gov.rb +2 -2
- data/lib/whois/parsers/whois.dotmobiregistry.net.rb +1 -1
- data/lib/whois/parsers/whois.dotpostregistry.net.rb +1 -1
- data/lib/whois/parsers/whois.dreamhost.com.rb +1 -1
- data/lib/whois/parsers/whois.educause.edu.rb +2 -2
- data/lib/whois/parsers/whois.eenet.ee.rb +1 -1
- data/lib/whois/parsers/whois.enom.com.rb +1 -1
- data/lib/whois/parsers/whois.eu.org.rb +1 -1
- data/lib/whois/parsers/whois.eu.rb +2 -2
- data/lib/whois/parsers/whois.fi.rb +2 -2
- data/lib/whois/parsers/whois.gandi.net.rb +1 -1
- data/lib/whois/parsers/whois.gg.rb +1 -1
- data/lib/whois/parsers/whois.godaddy.com.rb +1 -1
- data/lib/whois/parsers/whois.gov.za.rb +1 -1
- data/lib/whois/parsers/whois.hkirc.hk.rb +1 -1
- data/lib/whois/parsers/whois.iana.org.rb +1 -1
- data/lib/whois/parsers/whois.iis.nu.rb +1 -1
- data/lib/whois/parsers/whois.iis.se.rb +1 -1
- data/lib/whois/parsers/whois.in.ua.rb +2 -2
- data/lib/whois/parsers/whois.inregistry.net.rb +1 -1
- data/lib/whois/parsers/whois.isnic.is.rb +1 -1
- data/lib/whois/parsers/whois.isoc.org.il.rb +2 -2
- data/lib/whois/parsers/whois.ja.net.rb +1 -1
- data/lib/whois/parsers/whois.je.rb +1 -1
- data/lib/whois/parsers/whois.jprs.jp.rb +3 -3
- data/lib/whois/parsers/whois.kenic.or.ke.rb +3 -3
- data/lib/whois/parsers/whois.kr.rb +1 -1
- data/lib/whois/parsers/whois.markmonitor.com.rb +1 -1
- data/lib/whois/parsers/whois.monic.mo.rb +1 -1
- data/lib/whois/parsers/whois.museum.rb +1 -1
- data/lib/whois/parsers/whois.mynic.my.rb +1 -1
- data/lib/whois/parsers/whois.na-nic.com.na.rb +1 -1
- data/lib/whois/parsers/whois.nc.rb +1 -1
- data/lib/whois/parsers/whois.netcom.cm.rb +1 -1
- data/lib/whois/parsers/whois.networksolutions.com.rb +1 -1
- data/lib/whois/parsers/whois.nic.ac.rb +1 -1
- data/lib/whois/parsers/whois.nic.af.rb +1 -1
- data/lib/whois/parsers/whois.nic.ag.rb +1 -1
- data/lib/whois/parsers/{whois.ai.rb → whois.nic.ai.rb} +3 -3
- data/lib/whois/parsers/whois.nic.as.rb +1 -1
- data/lib/whois/parsers/whois.nic.asia.rb +1 -1
- data/lib/whois/parsers/whois.nic.at.rb +1 -1
- data/lib/whois/parsers/whois.nic.bj.rb +1 -1
- data/lib/whois/parsers/whois.nic.bo.rb +1 -1
- data/lib/whois/parsers/whois.nic.cd.rb +1 -1
- data/lib/whois/parsers/whois.nic.ch.rb +1 -1
- data/lib/whois/parsers/whois.nic.ci.rb +1 -1
- data/lib/whois/parsers/whois.nic.cl.rb +1 -1
- data/lib/whois/parsers/whois.nic.co.rb +1 -1
- data/lib/whois/parsers/whois.nic.college.rb +1 -1
- data/lib/whois/parsers/whois.nic.coop.rb +1 -1
- data/lib/whois/parsers/whois.nic.cx.rb +1 -1
- data/lib/whois/parsers/whois.nic.cz.rb +1 -1
- data/lib/whois/parsers/whois.nic.design.rb +1 -1
- data/lib/whois/parsers/whois.nic.dm.rb +1 -1
- data/lib/whois/parsers/whois.nic.dz.rb +1 -1
- data/lib/whois/parsers/whois.nic.ec.rb +2 -2
- data/lib/whois/parsers/whois.nic.es.rb +1 -1
- data/lib/whois/parsers/whois.nic.fm.rb +18 -0
- data/lib/whois/parsers/whois.nic.fo.rb +1 -1
- data/lib/whois/parsers/whois.nic.fr.rb +1 -1
- data/lib/whois/parsers/whois.nic.gd.rb +1 -1
- data/lib/whois/parsers/whois.nic.gl.rb +1 -1
- data/lib/whois/parsers/whois.nic.gs.rb +1 -1
- data/lib/whois/parsers/whois.nic.hn.rb +1 -1
- data/lib/whois/parsers/whois.nic.ht.rb +1 -1
- data/lib/whois/parsers/whois.nic.hu.rb +1 -1
- data/lib/whois/parsers/whois.nic.im.rb +1 -1
- data/lib/whois/parsers/whois.nic.io.rb +1 -1
- data/lib/whois/parsers/whois.nic.ir.rb +1 -1
- data/lib/whois/parsers/whois.nic.it.rb +2 -2
- data/lib/whois/parsers/whois.nic.jobs.rb +1 -1
- data/lib/whois/parsers/whois.nic.ki.rb +1 -1
- data/lib/whois/parsers/whois.nic.kz.rb +1 -1
- data/lib/whois/parsers/whois.nic.la.rb +1 -1
- data/lib/whois/parsers/whois.nic.li.rb +1 -1
- data/lib/whois/parsers/whois.nic.lk.rb +1 -1
- data/lib/whois/parsers/whois.nic.lv.rb +1 -1
- data/lib/whois/parsers/whois.nic.ly.rb +1 -1
- data/lib/whois/parsers/whois.nic.md.rb +1 -1
- data/lib/whois/parsers/whois.nic.me.rb +1 -1
- data/lib/whois/parsers/whois.nic.mg.rb +1 -1
- data/lib/whois/parsers/whois.nic.ms.rb +1 -1
- data/lib/whois/parsers/whois.nic.mu.rb +1 -1
- data/lib/whois/parsers/whois.nic.mx.rb +1 -1
- data/lib/whois/parsers/whois.nic.name.rb +1 -1
- data/lib/whois/parsers/whois.nic.net.ng.rb +1 -1
- data/lib/whois/parsers/whois.nic.net.sa.rb +1 -1
- data/lib/whois/parsers/whois.nic.net.sb.rb +1 -1
- data/lib/whois/parsers/whois.nic.nf.rb +1 -1
- data/lib/whois/parsers/whois.nic.org.uy.rb +2 -2
- data/lib/whois/parsers/whois.nic.pm.rb +1 -1
- data/lib/whois/parsers/whois.nic.pr.rb +1 -1
- data/lib/whois/parsers/whois.nic.priv.at.rb +1 -1
- data/lib/whois/parsers/whois.nic.pw.rb +1 -1
- data/lib/whois/parsers/whois.nic.re.rb +1 -1
- data/lib/whois/parsers/whois.nic.sh.rb +1 -1
- data/lib/whois/parsers/whois.nic.sl.rb +1 -1
- data/lib/whois/parsers/whois.nic.sm.rb +2 -2
- data/lib/whois/parsers/whois.nic.sn.rb +1 -1
- data/lib/whois/parsers/whois.nic.so.rb +1 -1
- data/lib/whois/parsers/whois.nic.space.rb +1 -1
- data/lib/whois/parsers/whois.nic.st.rb +10 -10
- data/lib/whois/parsers/whois.nic.tc.rb +1 -1
- data/lib/whois/parsers/whois.nic.tech.rb +1 -1
- data/lib/whois/parsers/whois.nic.tel.rb +1 -1
- data/lib/whois/parsers/whois.nic.tl.rb +1 -1
- data/lib/whois/parsers/whois.nic.tm.rb +1 -1
- data/lib/whois/parsers/whois.nic.tr.rb +1 -1
- data/lib/whois/parsers/whois.nic.travel.rb +1 -1
- data/lib/whois/parsers/whois.nic.uk.rb +2 -2
- data/lib/whois/parsers/whois.nic.us.rb +1 -1
- data/lib/whois/parsers/whois.nic.ve.rb +2 -2
- data/lib/whois/parsers/whois.nic.wf.rb +1 -1
- data/lib/whois/parsers/whois.nic.xxx.rb +1 -1
- data/lib/whois/parsers/whois.nic.xyz.rb +1 -1
- data/lib/whois/parsers/whois.norid.no.rb +1 -1
- data/lib/whois/parsers/whois.pairnic.com.rb +1 -1
- data/lib/whois/parsers/whois.pandi.or.id.rb +1 -1
- data/lib/whois/parsers/whois.pir.org.rb +1 -1
- data/lib/whois/parsers/whois.pnina.ps.rb +1 -1
- data/lib/whois/parsers/whois.register.bg.rb +2 -2
- data/lib/whois/parsers/whois.register.com.rb +1 -1
- data/lib/whois/parsers/whois.register.si.rb +2 -2
- data/lib/whois/parsers/whois.registre.ma.rb +7 -9
- data/lib/whois/parsers/whois.registro.br.rb +53 -9
- data/lib/whois/parsers/whois.registry.gy.rb +1 -1
- data/lib/whois/parsers/whois.registry.hm.rb +1 -1
- data/lib/whois/parsers/whois.registry.om.rb +1 -1
- data/lib/whois/parsers/whois.registry.qa.rb +1 -1
- data/lib/whois/parsers/whois.ripe.net.rb +1 -1
- data/lib/whois/parsers/whois.rnids.rs.rb +2 -2
- data/lib/whois/parsers/whois.rotld.ro.rb +2 -2
- data/lib/whois/parsers/whois.rrpproxy.net.rb +1 -1
- data/lib/whois/parsers/whois.safenames.net.rb +1 -1
- data/lib/whois/parsers/whois.schlund.info.rb +1 -1
- data/lib/whois/parsers/whois.sgnic.sg.rb +2 -2
- data/lib/whois/parsers/whois.sk-nic.sk.rb +2 -2
- data/lib/whois/parsers/whois.smallregistry.net.rb +2 -2
- data/lib/whois/parsers/whois.srs.net.nz.rb +3 -3
- data/lib/whois/parsers/whois.sx.rb +2 -2
- data/lib/whois/parsers/whois.tcinet.ru.rb +1 -1
- data/lib/whois/parsers/whois.thnic.co.th.rb +2 -2
- data/lib/whois/parsers/whois.tld.ee.rb +1 -1
- data/lib/whois/parsers/whois.tld.sy.rb +1 -1
- data/lib/whois/parsers/whois.tonic.to.rb +1 -1
- data/lib/whois/parsers/whois.tucows.com.rb +1 -1
- data/lib/whois/parsers/whois.twnic.net.tw.rb +1 -1
- data/lib/whois/parsers/whois.tznic.or.tz.rb +1 -1
- data/lib/whois/parsers/whois.ua.rb +3 -3
- data/lib/whois/parsers/whois.udag.net.rb +1 -1
- data/lib/whois/parsers/whois.uniregistry.net.rb +1 -1
- data/lib/whois/parsers/whois.usp.ac.fj.rb +2 -2
- data/lib/whois/parsers/whois.verisign-grs.com.rb +1 -1
- data/lib/whois/parsers/whois.website.ws.rb +1 -1
- data/lib/whois/parsers/whois.wildwestdomains.com.rb +1 -1
- data/lib/whois/parsers/whois.yoursrs.com.rb +1 -1
- data/lib/whois/parsers/whois.za.net.rb +1 -1
- data/lib/whois/parsers/whois.za.org.rb +1 -1
- data/lib/whois/parsers/whois1.nic.bi.rb +1 -1
- data/lib/whois/parsers/za_central_registry.rb +12 -1
- data/lib/whois/scanners/whois.cira.ca.rb +1 -1
- data/whois-parser.gemspec +3 -3
- metadata +10 -10
- data/lib/whois/parsers/whois.registry.net.za.rb +0 -139
- data/lib/whois/scanners/whois.registry.net.za.rb +0 -92
@@ -1,139 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# Ruby Whois
|
3
|
-
#
|
4
|
-
# An intelligent pure Ruby WHOIS client and parser.
|
5
|
-
#
|
6
|
-
# Copyright (c) 2009-2015 Simone Carletti <weppos@weppos.net>
|
7
|
-
#++
|
8
|
-
|
9
|
-
|
10
|
-
require_relative 'base'
|
11
|
-
require 'whois/scanners/whois.registry.net.za'
|
12
|
-
|
13
|
-
|
14
|
-
module Whois
|
15
|
-
class Parsers
|
16
|
-
|
17
|
-
# Parser for the whois.registry.za.net server.
|
18
|
-
#
|
19
|
-
# @note This parser is just a stub and provides only a few basic methods
|
20
|
-
# to check for domain availability and get domain status.
|
21
|
-
# Please consider to contribute implementing missing methods.
|
22
|
-
#
|
23
|
-
# @see Whois::Parsers::Example
|
24
|
-
# The Example parser for the list of all available methods.
|
25
|
-
#
|
26
|
-
class WhoisRegistryNetZa < Base
|
27
|
-
include Scanners::Scannable
|
28
|
-
|
29
|
-
self.scanner = Scanners::WhoisRegistryNetZa
|
30
|
-
|
31
|
-
|
32
|
-
property_supported :disclaimer do
|
33
|
-
node("node:disclaimer")
|
34
|
-
end
|
35
|
-
|
36
|
-
|
37
|
-
property_supported :domain do
|
38
|
-
node("node:domain")
|
39
|
-
end
|
40
|
-
|
41
|
-
property_not_supported :domain_id
|
42
|
-
|
43
|
-
|
44
|
-
property_supported :status do
|
45
|
-
# node("node:status")
|
46
|
-
if registered?
|
47
|
-
:registered
|
48
|
-
else
|
49
|
-
:available
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
property_supported :available? do
|
54
|
-
node("status:available") ? true : false
|
55
|
-
end
|
56
|
-
|
57
|
-
property_supported :registered? do
|
58
|
-
!available?
|
59
|
-
end
|
60
|
-
|
61
|
-
|
62
|
-
property_supported :created_on do
|
63
|
-
node("node:dates") do |array|
|
64
|
-
array[0] =~ /Registration Date:\s*(\d{4}-\d{2}-\d{2})/
|
65
|
-
parse_time($1)
|
66
|
-
end
|
67
|
-
end
|
68
|
-
|
69
|
-
property_not_supported :updated_on
|
70
|
-
|
71
|
-
property_supported :expires_on do
|
72
|
-
node("node:dates") do |array|
|
73
|
-
array[1] =~ /Renewal Date:\s*(\d{4}-\d{2}-\d{2})/
|
74
|
-
parse_time($1)
|
75
|
-
end
|
76
|
-
end
|
77
|
-
|
78
|
-
|
79
|
-
property_supported :registrar do
|
80
|
-
node("node:registrar") do |text|
|
81
|
-
value = text.lines.first
|
82
|
-
Parser::Registrar.new(name: value.strip)
|
83
|
-
end
|
84
|
-
end
|
85
|
-
|
86
|
-
|
87
|
-
property_supported :registrant_contacts do
|
88
|
-
node("node:registrant_details") do |node|
|
89
|
-
build_contact(node)
|
90
|
-
end
|
91
|
-
end
|
92
|
-
|
93
|
-
property_not_supported :admin_contacts
|
94
|
-
|
95
|
-
property_not_supported :technical_contacts
|
96
|
-
|
97
|
-
|
98
|
-
property_supported :nameservers do
|
99
|
-
node("node:nameservers") do |array|
|
100
|
-
Array.wrap(array).map do |nameserver|
|
101
|
-
Parser::Nameserver.new(:name => nameserver)
|
102
|
-
end
|
103
|
-
end
|
104
|
-
end
|
105
|
-
|
106
|
-
|
107
|
-
# Checks whether the response has been throttled.
|
108
|
-
#
|
109
|
-
# @return [Boolean]
|
110
|
-
#
|
111
|
-
# @example
|
112
|
-
# -1: Please go away for 90 Seconds
|
113
|
-
#
|
114
|
-
def response_throttled?
|
115
|
-
!!(content_for_scanner =~ /Please go away for \d+ Seconds/)
|
116
|
-
end
|
117
|
-
|
118
|
-
private
|
119
|
-
|
120
|
-
def build_contact(node)
|
121
|
-
lines = node.dup
|
122
|
-
|
123
|
-
fax, phone, email = 3.times.map { lines.pop.split(":", 2).last.strip.presence }
|
124
|
-
name = lines.delete_if(&:blank?).join("\n")
|
125
|
-
|
126
|
-
Parser::Contact.new(
|
127
|
-
type: Parser::Contact::TYPE_REGISTRANT,
|
128
|
-
name: name,
|
129
|
-
address: Array.wrap(node("node:registrant_address")).join("\n"),
|
130
|
-
phone: phone,
|
131
|
-
fax: fax,
|
132
|
-
email: email
|
133
|
-
)
|
134
|
-
end
|
135
|
-
|
136
|
-
end
|
137
|
-
|
138
|
-
end
|
139
|
-
end
|
@@ -1,92 +0,0 @@
|
|
1
|
-
require_relative 'base'
|
2
|
-
|
3
|
-
module Whois
|
4
|
-
module Scanners
|
5
|
-
|
6
|
-
class WhoisRegistryNetZa < Base
|
7
|
-
self.tokenizers += [
|
8
|
-
:scan_availability,
|
9
|
-
:scan_domain,
|
10
|
-
:scan_registrant_details,
|
11
|
-
:scan_registrant_address,
|
12
|
-
:scan_registrar_details,
|
13
|
-
:scan_dates,
|
14
|
-
:scan_status,
|
15
|
-
:scan_pending_timer_events,
|
16
|
-
:scan_nameservers,
|
17
|
-
:scan_disclaimer
|
18
|
-
]
|
19
|
-
|
20
|
-
tokenizer :scan_availability do
|
21
|
-
if @input.scan_until(/^Available\n$/m)
|
22
|
-
@ast["status:available"] = true
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
tokenizer :scan_domain do
|
27
|
-
if find_heading("Domain Name")
|
28
|
-
@ast["node:domain"] = content_in_category
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
tokenizer :scan_registrant_details do
|
33
|
-
if find_heading("Registrant")
|
34
|
-
@ast["node:registrant_details"] = content_in_category
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
tokenizer :scan_registrant_address do
|
39
|
-
if find_heading("Registrant's Address")
|
40
|
-
@ast["node:registrant_address"] = content_in_category
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
tokenizer :scan_registrar_details do
|
45
|
-
if find_heading("Registrar")
|
46
|
-
@ast["node:registrar"] = content_in_category
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
tokenizer :scan_dates do
|
51
|
-
if find_heading("Relevant Dates")
|
52
|
-
@ast["node:dates"] = content_in_category
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
tokenizer :scan_status do
|
57
|
-
if find_heading("Domain Status")
|
58
|
-
@ast["node:status"] = content_in_category
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
|
-
tokenizer :scan_pending_timer_events do
|
63
|
-
if find_heading("Pending Timer Events")
|
64
|
-
@ast["node:pending_timer_events"] = content_in_category
|
65
|
-
end
|
66
|
-
end
|
67
|
-
|
68
|
-
tokenizer :scan_nameservers do
|
69
|
-
if find_heading("Name Servers")
|
70
|
-
@ast["node:nameservers"] = content_in_category
|
71
|
-
end
|
72
|
-
end
|
73
|
-
|
74
|
-
tokenizer :scan_disclaimer do
|
75
|
-
@input.skip_until(/\n--\n/m)
|
76
|
-
@ast["node:disclaimer"] = @input.scan_until(/.*$/m)
|
77
|
-
end
|
78
|
-
|
79
|
-
private
|
80
|
-
|
81
|
-
def content_in_category
|
82
|
-
lines = _scan_lines_to_array(/ (.*)\n/)
|
83
|
-
lines.size == 1 ? lines.first : lines
|
84
|
-
end
|
85
|
-
|
86
|
-
def find_heading(heading_name)
|
87
|
-
@input.skip_until(/ #{heading_name}:\n/)
|
88
|
-
end
|
89
|
-
end
|
90
|
-
|
91
|
-
end
|
92
|
-
end
|