nicinfo 1.4.1 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/nicinfo/config.rb +2 -2
- data/lib/nicinfo/constants.rb +1 -1
- data/lib/nicinfo/demo/domain-dnr.json +2 -2
- data/lib/nicinfo/demo/entities.json +4 -4
- data/lib/nicinfo/demo/entity-dnr.json +2 -2
- data/lib/nicinfo/demo/entity-rir.json +2 -2
- data/lib/nicinfo/demo/error-code.json +3 -3
- data/lib/nicinfo/demo/nameservers.json +4 -4
- data/lib/nicinfo/demo/ns.json +2 -2
- data/lib/nicinfo/entity.rb +79 -77
- metadata +5 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7ecaa53b9df142ebd216e7dc88de56ab2f811c4339e9f075c4088f26d5cecd83
|
4
|
+
data.tar.gz: af818b3b4a62989a1a4b4f8379601ca184461ad6483361070ac22a021ad83b18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 035ad570ca83474c8a2256ca0107507322aacdd7987cdde9c63332158e2cb59f1c2e100d30e384648b711a2e73e77a3d3a36a1e6e65789de74a4154557e23610
|
7
|
+
data.tar.gz: 3d10ed8e6f05f03b7d6b2124e831e30e7684a7b505791265db4170ad117f574e4a53977aa8e0ed1abd97fef7f33cdee8f819ac620eaba06e1d4e3adb6a908047
|
data/lib/nicinfo/config.rb
CHANGED
@@ -315,9 +315,9 @@ cache:
|
|
315
315
|
bootstrap:
|
316
316
|
|
317
317
|
# The base or bootstrap URL. Specifying this will bypass all built-in bootstrapping.
|
318
|
-
#base_url: https://rdap.arin.net/bootstrap
|
318
|
+
#base_url: https://rdap-bootstrap.arin.net/bootstrap
|
319
319
|
|
320
|
-
help_root_url: https://rdap.arin.net/bootstrap
|
320
|
+
help_root_url: https://rdap-bootstrap.arin.net/bootstrap
|
321
321
|
|
322
322
|
entity_root_url: https://rdap.arin.net/registry
|
323
323
|
|
data/lib/nicinfo/constants.rb
CHANGED
@@ -506,9 +506,9 @@
|
|
506
506
|
],
|
507
507
|
"links":[
|
508
508
|
{
|
509
|
-
"value":"https://rdap.arin.net/bootstrap/domain/xn--fo-5ja.example",
|
509
|
+
"value":"https://rdap-bootstrap.arin.net/bootstrap/domain/xn--fo-5ja.example",
|
510
510
|
"rel":"self",
|
511
|
-
"href":"https://rdap.arin.net/bootstrap/domain/xn--fo-5ja.example"
|
511
|
+
"href":"https://rdap-bootstrap.arin.net/bootstrap/domain/xn--fo-5ja.example"
|
512
512
|
}
|
513
513
|
],
|
514
514
|
"port43":"whois.example.net",
|
@@ -147,9 +147,9 @@
|
|
147
147
|
],
|
148
148
|
"links": [
|
149
149
|
{
|
150
|
-
"value": "https://rdap.arin.net/bootstrap/entity/entity-dnr",
|
150
|
+
"value": "https://rdap-bootstrap.arin.net/bootstrap/entity/entity-dnr",
|
151
151
|
"rel": "self",
|
152
|
-
"href": "https://rdap.arin.net/bootstrap/entity/entity-dnr"
|
152
|
+
"href": "https://rdap-bootstrap.arin.net/bootstrap/entity/entity-dnr"
|
153
153
|
}
|
154
154
|
],
|
155
155
|
"port43": "whois.example.net",
|
@@ -286,9 +286,9 @@
|
|
286
286
|
],
|
287
287
|
"links": [
|
288
288
|
{
|
289
|
-
"value": "https://rdap.arin.net/bootstrap/entity/foo1",
|
289
|
+
"value": "https://rdap-bootstrap.arin.net/bootstrap/entity/foo1",
|
290
290
|
"rel": "self",
|
291
|
-
"href": "https://rdap.arin.net/bootstrap/entity/foo1"
|
291
|
+
"href": "https://rdap-bootstrap.arin.net/bootstrap/entity/foo1"
|
292
292
|
}
|
293
293
|
],
|
294
294
|
"events": [
|
@@ -123,9 +123,9 @@
|
|
123
123
|
],
|
124
124
|
"links":[
|
125
125
|
{
|
126
|
-
"value":"https://rdap.arin.net/bootstrap/entity/entity-dnr",
|
126
|
+
"value":"https://rdap-bootstrap.arin.net/bootstrap/entity/entity-dnr",
|
127
127
|
"rel":"self",
|
128
|
-
"href":"https://rdap.arin.net/bootstrap/entity/entity-dnr"
|
128
|
+
"href":"https://rdap-bootstrap.arin.net/bootstrap/entity/entity-dnr"
|
129
129
|
}
|
130
130
|
],
|
131
131
|
"port43":"whois.example.net",
|
@@ -132,9 +132,9 @@
|
|
132
132
|
],
|
133
133
|
"links":[
|
134
134
|
{
|
135
|
-
"value":"https://rdap.arin.net/bootstrap/entity/foo1",
|
135
|
+
"value":"https://rdap-bootstrap.arin.net/bootstrap/entity/foo1",
|
136
136
|
"rel":"self",
|
137
|
-
"href":"https://rdap.arin.net/bootstrap/entity/foo1"
|
137
|
+
"href":"https://rdap-bootstrap.arin.net/bootstrap/entity/foo1"
|
138
138
|
}
|
139
139
|
],
|
140
140
|
"events":[
|
@@ -14,7 +14,7 @@
|
|
14
14
|
],
|
15
15
|
"links":[
|
16
16
|
{
|
17
|
-
"value":"https://rdap.arin.net/bootstrap/entity/restricted",
|
17
|
+
"value":"https://rdap-bootstrap.arin.net/bootstrap/entity/restricted",
|
18
18
|
"rel":"terms-of-service",
|
19
19
|
"type":"text/html",
|
20
20
|
"href":"http://www.example.com/tos.html"
|
@@ -28,7 +28,7 @@
|
|
28
28
|
],
|
29
29
|
"links":[
|
30
30
|
{
|
31
|
-
"value":"https://rdap.arin.net/bootstrap/entity/restricted",
|
31
|
+
"value":"https://rdap-bootstrap.arin.net/bootstrap/entity/restricted",
|
32
32
|
"rel":"copyright",
|
33
33
|
"type":"text/html",
|
34
34
|
"href":"http://www.example.com/copyright.html"
|
@@ -43,7 +43,7 @@
|
|
43
43
|
],
|
44
44
|
"links":[
|
45
45
|
{
|
46
|
-
"value":"https://rdap.arin.net/bootstrap/entity/restricted",
|
46
|
+
"value":"https://rdap-bootstrap.arin.net/bootstrap/entity/restricted",
|
47
47
|
"rel":"about",
|
48
48
|
"type":"text/html",
|
49
49
|
"href":"https://lists.arin.net/mailman/listinfo/arin-tech-discuss"
|
@@ -45,9 +45,9 @@
|
|
45
45
|
],
|
46
46
|
"links":[
|
47
47
|
{
|
48
|
-
"value":"https://rdap.arin.net/bootstrap/nameserver/ns1.xn--fo-5ja.example",
|
48
|
+
"value":"https://rdap-bootstrap.arin.net/bootstrap/nameserver/ns1.xn--fo-5ja.example",
|
49
49
|
"rel":"self",
|
50
|
-
"href":"https://rdap.arin.net/bootstrap/nameserver/ns1.xn--fo-5ja.example"
|
50
|
+
"href":"https://rdap-bootstrap.arin.net/bootstrap/nameserver/ns1.xn--fo-5ja.example"
|
51
51
|
}
|
52
52
|
],
|
53
53
|
"port43":"whois.example.net",
|
@@ -248,9 +248,9 @@
|
|
248
248
|
],
|
249
249
|
"links":[
|
250
250
|
{
|
251
|
-
"value":"https://rdap.arin.net/bootstrap/nameserver/ns1.xn--fo-5ja.example",
|
251
|
+
"value":"https://rdap-bootstrap.arin.net/bootstrap/nameserver/ns1.xn--fo-5ja.example",
|
252
252
|
"rel":"self",
|
253
|
-
"href":"https://rdap.arin.net/bootstrap/nameserver/ns1.xn--fo-5ja.example"
|
253
|
+
"href":"https://rdap-bootstrap.arin.net/bootstrap/nameserver/ns1.xn--fo-5ja.example"
|
254
254
|
}
|
255
255
|
],
|
256
256
|
"port43":"whois.example.net",
|
data/lib/nicinfo/demo/ns.json
CHANGED
@@ -43,9 +43,9 @@
|
|
43
43
|
],
|
44
44
|
"links":[
|
45
45
|
{
|
46
|
-
"value":"https://rdap.arin.net/bootstrap/nameserver/ns1.xn--fo-5ja.example",
|
46
|
+
"value":"https://rdap-bootstrap.arin.net/bootstrap/nameserver/ns1.xn--fo-5ja.example",
|
47
47
|
"rel":"self",
|
48
|
-
"href":"https://rdap.arin.net/bootstrap/nameserver/ns1.xn--fo-5ja.example"
|
48
|
+
"href":"https://rdap-bootstrap.arin.net/bootstrap/nameserver/ns1.xn--fo-5ja.example"
|
49
49
|
}
|
50
50
|
],
|
51
51
|
"port43":"whois.example.net",
|
data/lib/nicinfo/entity.rb
CHANGED
@@ -131,96 +131,98 @@ module NicInfo
|
|
131
131
|
def process entity
|
132
132
|
if ( vcard = get_vcard( entity ) ) != nil
|
133
133
|
vcardElements = vcard[ 1 ]
|
134
|
-
if vcardElements.size == 0
|
134
|
+
if vcardElements.nil? || vcardElements.size == 0
|
135
135
|
@config.conf_msgs << "jCard (vCard) is empty."
|
136
136
|
elsif vcardElements[ 0 ][ 0 ] != "version"
|
137
137
|
@config.conf_msgs << "jCard (vCard) does not have required version first element."
|
138
138
|
end
|
139
|
-
vcardElements.
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
if element[ 0 ] == "n"
|
144
|
-
name = ""
|
145
|
-
if element[ 3 ][ -1 ].instance_of? Array
|
146
|
-
name << element[ 3 ][ -1 ].join( ' ' )
|
139
|
+
if !vcardElements.nil?
|
140
|
+
vcardElements.each do |element|
|
141
|
+
if element[ 0 ] == "fn"
|
142
|
+
@fns << element[ 3 ]
|
147
143
|
end
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
144
|
+
if element[ 0 ] == "n"
|
145
|
+
name = ""
|
146
|
+
if element[ 3 ][ -1 ].instance_of? Array
|
147
|
+
name << element[ 3 ][ -1 ].join( ' ' )
|
148
|
+
end
|
149
|
+
name << ' ' if name[-1] != ' '
|
150
|
+
name << element[ 3 ][ 1 ]
|
151
|
+
if element[ 3 ][ 2 ] && !element[ 3 ][ 2 ].empty?
|
152
|
+
name << " " << element[ 3 ][ 2 ]
|
153
|
+
end
|
154
|
+
if element[ 3 ][ 3 ] && !element[ 3 ][ 3 ].empty?
|
155
|
+
name << " " << element[ 3 ][ 3 ]
|
156
|
+
end
|
157
|
+
name << " " << element[ 3 ][ 0 ]
|
158
|
+
if element[ 3 ][ -2 ].instance_of? Array
|
159
|
+
name << " " << element[ 3 ][ -2 ].join( ' ' )
|
160
|
+
end
|
161
|
+
@names << name.strip
|
152
162
|
end
|
153
|
-
if element[
|
154
|
-
|
163
|
+
if element[ 0 ] == "tel"
|
164
|
+
tel = Tel.new
|
165
|
+
if (type = element[ 1 ][ "type" ]) != nil
|
166
|
+
tel.type << type if type.instance_of? String
|
167
|
+
tel.type = type if type.instance_of? Array
|
168
|
+
end
|
169
|
+
if (str = element[ 3 ] ).start_with?( "tel:" )
|
170
|
+
tel.number=str[ /^tel\:([^;]*)/,1 ]
|
171
|
+
tel.ext=str[ /[^;]*ext=(.*)/,1 ]
|
172
|
+
else
|
173
|
+
tel.number=str
|
174
|
+
end
|
175
|
+
@phones << tel
|
155
176
|
end
|
156
|
-
|
157
|
-
|
158
|
-
|
177
|
+
if element[ 0 ] == "email"
|
178
|
+
email = Email.new
|
179
|
+
if (type = element[ 1 ][ "type" ]) != nil
|
180
|
+
email.type << type if type.instance_of? String
|
181
|
+
email.type = type if type.instance_of? Array
|
182
|
+
end
|
183
|
+
email.addr=element[ 3 ]
|
184
|
+
@emails << email
|
159
185
|
end
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
186
|
+
if element[ 0 ] == "adr"
|
187
|
+
adr = Adr.new
|
188
|
+
if (type = element[ 1 ][ "type" ]) != nil
|
189
|
+
adr.type << type if type.instance_of? String
|
190
|
+
adr.type = type if type.instance_of? Array
|
191
|
+
end
|
192
|
+
if (label = element[ 1 ][ "label" ]) != nil
|
193
|
+
adr.label = label.split( "\n" )
|
194
|
+
else
|
195
|
+
adr.pobox=element[ 3 ][ 0 ]
|
196
|
+
adr.extended=element[ 3 ][ 1 ]
|
197
|
+
adr.street=element[ 3 ][ 2 ]
|
198
|
+
adr.locality=element[ 3 ][ 3 ]
|
199
|
+
adr.region=element[ 3 ][ 4 ]
|
200
|
+
adr.postal=element[ 3 ][ 5 ]
|
201
|
+
adr.country=element[ 3 ][ 6 ]
|
202
|
+
adr.structured=true
|
203
|
+
end
|
204
|
+
@adrs << adr
|
167
205
|
end
|
168
|
-
if
|
169
|
-
|
170
|
-
tel.ext=str[ /[^;]*ext=(.*)/,1 ]
|
171
|
-
else
|
172
|
-
tel.number=str
|
206
|
+
if element[ 0 ] == "kind"
|
207
|
+
@kind = element[ 3 ]
|
173
208
|
end
|
174
|
-
|
175
|
-
|
176
|
-
if element[ 0 ] == "email"
|
177
|
-
email = Email.new
|
178
|
-
if (type = element[ 1 ][ "type" ]) != nil
|
179
|
-
email.type << type if type.instance_of? String
|
180
|
-
email.type = type if type.instance_of? Array
|
181
|
-
end
|
182
|
-
email.addr=element[ 3 ]
|
183
|
-
@emails << email
|
184
|
-
end
|
185
|
-
if element[ 0 ] == "adr"
|
186
|
-
adr = Adr.new
|
187
|
-
if (type = element[ 1 ][ "type" ]) != nil
|
188
|
-
adr.type << type if type.instance_of? String
|
189
|
-
adr.type = type if type.instance_of? Array
|
209
|
+
if element[ 0 ] == "title"
|
210
|
+
@titles << element[ 3 ]
|
190
211
|
end
|
191
|
-
if
|
192
|
-
|
193
|
-
else
|
194
|
-
adr.pobox=element[ 3 ][ 0 ]
|
195
|
-
adr.extended=element[ 3 ][ 1 ]
|
196
|
-
adr.street=element[ 3 ][ 2 ]
|
197
|
-
adr.locality=element[ 3 ][ 3 ]
|
198
|
-
adr.region=element[ 3 ][ 4 ]
|
199
|
-
adr.postal=element[ 3 ][ 5 ]
|
200
|
-
adr.country=element[ 3 ][ 6 ]
|
201
|
-
adr.structured=true
|
212
|
+
if element[ 0 ] == "role"
|
213
|
+
@roles << element[ 3 ]
|
202
214
|
end
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
end
|
214
|
-
if element[ 0 ] == "org"
|
215
|
-
org = Org.new
|
216
|
-
if (type = element[ 1 ][ "type" ]) != nil
|
217
|
-
org.type << type if type.instance_of? String
|
218
|
-
org.type = type if type.instance_of? Array
|
215
|
+
if element[ 0 ] == "org"
|
216
|
+
org = Org.new
|
217
|
+
if (type = element[ 1 ][ "type" ]) != nil
|
218
|
+
org.type << type if type.instance_of? String
|
219
|
+
org.type = type if type.instance_of? Array
|
220
|
+
end
|
221
|
+
names = element[ 3 ]
|
222
|
+
org.names << names if names.instance_of? String
|
223
|
+
org.names = org.names + names if names.instance_of? Array
|
224
|
+
@orgs << org
|
219
225
|
end
|
220
|
-
names = element[ 3 ]
|
221
|
-
org.names << names if names.instance_of? String
|
222
|
-
org.names = org.names + names if names.instance_of? Array
|
223
|
-
@orgs << org
|
224
226
|
end
|
225
227
|
end
|
226
228
|
if @fns.empty?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nicinfo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Newton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: netaddr
|
@@ -16,20 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
20
|
-
- - ">="
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 1.5.1
|
19
|
+
version: 2.0.4
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
24
|
- - "~>"
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
30
|
-
- - ">="
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: 1.5.1
|
26
|
+
version: 2.0.4
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
name: rainbow
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -135,8 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
129
|
- !ruby/object:Gem::Version
|
136
130
|
version: '0'
|
137
131
|
requirements: []
|
138
|
-
|
139
|
-
rubygems_version: 2.5.2.1
|
132
|
+
rubygems_version: 3.0.3
|
140
133
|
signing_key:
|
141
134
|
specification_version: 4
|
142
135
|
summary: RDAP Client
|