rdap 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +4 -2
- data/Gemfile +1 -0
- data/Gemfile.lock +12 -0
- data/README.md +2 -1
- data/lib/rdap.rb +4 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37097088b19ddfd4d65ce6d2968da8b6096920134246a8c9ec9277167f80e1be
|
4
|
+
data.tar.gz: 48422426b1fbd15c7a69c6f4b72cda5588a6983e737b9a687311154e6475f1ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2952f430513e86e4b35d48c4b90246ba53ff279053043caa15822513a462079e468d09872c4db42fe3ad3e79383f22db550301b758b09af0ec86a2577700bf3
|
7
|
+
data.tar.gz: 8b5a306cccb1972ad7d530d8b53ea97c6656f455e80436559a46460b1634d177f3706a4f9bd7ae7f545fea0ece6c7345fe7148803848e37997a4a74577589990
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -6,8 +6,15 @@ PATH
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
+
addressable (2.8.0)
|
10
|
+
public_suffix (>= 2.0.2, < 5.0)
|
11
|
+
crack (0.4.5)
|
12
|
+
rexml
|
9
13
|
diff-lcs (1.4.4)
|
14
|
+
hashdiff (1.0.1)
|
15
|
+
public_suffix (4.0.6)
|
10
16
|
rake (13.0.6)
|
17
|
+
rexml (3.2.5)
|
11
18
|
rspec (3.10.0)
|
12
19
|
rspec-core (~> 3.10.0)
|
13
20
|
rspec-expectations (~> 3.10.0)
|
@@ -22,6 +29,10 @@ GEM
|
|
22
29
|
rspec-support (~> 3.10.0)
|
23
30
|
rspec-support (3.10.3)
|
24
31
|
vcr (6.0.0)
|
32
|
+
webmock (3.14.0)
|
33
|
+
addressable (>= 2.8.0)
|
34
|
+
crack (>= 0.3.2)
|
35
|
+
hashdiff (>= 0.4.0, < 2.0.0)
|
25
36
|
|
26
37
|
PLATFORMS
|
27
38
|
ruby
|
@@ -31,6 +42,7 @@ DEPENDENCIES
|
|
31
42
|
rdap!
|
32
43
|
rspec (~> 3.0)
|
33
44
|
vcr (~> 6.0)
|
45
|
+
webmock
|
34
46
|
|
35
47
|
BUNDLED WITH
|
36
48
|
2.1.4
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# RDAP
|
1
|
+
# RDAP [](https://app.travis-ci.com/github/jarthod/rdap)
|
2
2
|
|
3
3
|
A minimal Ruby client to query RDAP APIs though a bootstrap server.
|
4
4
|
No dependencies, no caching or bootstrap file (the query is routed through a bootstrap server first).
|
@@ -83,6 +83,7 @@ The gem make a query to one of the publicly available RDAP bootstrap server (the
|
|
83
83
|
|
84
84
|
## Changelog
|
85
85
|
|
86
|
+
**0.1.1** (2021-12-19) - Added TooManyRequests expection in case of 429
|
86
87
|
**0.1.0** (2021-12-17) - Initial version
|
87
88
|
|
88
89
|
## Contributing
|
data/lib/rdap.rb
CHANGED
@@ -2,13 +2,14 @@ require 'json'
|
|
2
2
|
require 'net/http'
|
3
3
|
|
4
4
|
module RDAP
|
5
|
-
VERSION = "0.1.
|
5
|
+
VERSION = "0.1.1"
|
6
6
|
BOOTSTRAP = "https://rdap.org/"
|
7
7
|
TYPES = [:domain, :ip, :autnum]
|
8
8
|
|
9
9
|
class Error < StandardError; end
|
10
10
|
class ServerError < Error; end
|
11
11
|
class NotFound < Error; end
|
12
|
+
class TooManyRequests < Error; end
|
12
13
|
|
13
14
|
def self.domain name, **opts
|
14
15
|
query name, type: :domain, **opts
|
@@ -54,6 +55,8 @@ module RDAP
|
|
54
55
|
else
|
55
56
|
raise NotFound.new("[#{response.code}] #{response.message}")
|
56
57
|
end
|
58
|
+
when Net::HTTPTooManyRequests
|
59
|
+
raise TooManyRequests.new("[#{response.code}] #{response.message}")
|
57
60
|
when Net::HTTPRedirection
|
58
61
|
get_follow_redirects(URI(response["location"]), timeout: timeout, redirection_limit: redirection_limit - 1)
|
59
62
|
else
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adrien Rey-Jarthon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-12-
|
11
|
+
date: 2021-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|