securitytrails 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/lib/securitytrails/client.rb +1 -0
- data/lib/securitytrails/clients/history.rb +8 -0
- data/lib/securitytrails/version.rb +1 -1
- metadata +1 -2
- data/.rspec_status +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c78dce6d2a5f9f147f573a36a86d2cec52e2248b414233a1a59d6f9ab90ece5
|
4
|
+
data.tar.gz: dc09510aa36bf18d4c5bf16988af4faa5cc7b6e025c5b0108fe21a371077c959
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 935e6ae2b707285d1d7109dabda2c3d17d313b696e98e76026a05dea1713867ba7be8a7d4734f5a3a8560aef96803c055edf63a4135d2081b9bc7e3660c401a0
|
7
|
+
data.tar.gz: 38044581872fab115d9612079fd4cdfb60bbfc9493ecab24d66030e1b96c17402d05c30b3fdd41dcc4cddf4f63417baa1b975e0ac057d73f43cd62cec21c84dd
|
data/.gitignore
CHANGED
@@ -4,6 +4,8 @@ module SecurityTrails
|
|
4
4
|
module Clients
|
5
5
|
class History < Client
|
6
6
|
def get_dns_history(hostname, type, page = 1)
|
7
|
+
raise ArgumentError, "The API currently supports a, aaaa, mx, ns, soa and txt records." unless valid_type?(type)
|
8
|
+
|
7
9
|
get("/history/#{hostname}/dns/#{type.downcase}", page: page) { |json| json }
|
8
10
|
end
|
9
11
|
|
@@ -26,6 +28,12 @@ module SecurityTrails
|
|
26
28
|
def get_whois_history(hostname)
|
27
29
|
get("/history/#{hostname}/whois/") { |json| json }
|
28
30
|
end
|
31
|
+
|
32
|
+
private
|
33
|
+
|
34
|
+
def valid_type?(type)
|
35
|
+
["a", "aaaa", "mx", "ns", "soa", "txt"].include? type.downcase
|
36
|
+
end
|
29
37
|
end
|
30
38
|
end
|
31
39
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: securitytrails
|
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
|
- Manabu Niseki
|
@@ -117,7 +117,6 @@ extra_rdoc_files: []
|
|
117
117
|
files:
|
118
118
|
- ".gitignore"
|
119
119
|
- ".rspec"
|
120
|
-
- ".rspec_status"
|
121
120
|
- ".travis.yml"
|
122
121
|
- Gemfile
|
123
122
|
- LICENSE
|
data/.rspec_status
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
example_id | status | run_time |
|
2
|
-
------------------------------------- | ------ | --------------- |
|
3
|
-
./spec/clients/domain_spec.rb[1:1:1] | passed | 0.00564 seconds |
|
4
|
-
./spec/clients/domain_spec.rb[1:2:1] | passed | 0.00746 seconds |
|
5
|
-
./spec/clients/domain_spec.rb[1:3:1] | passed | 0.00589 seconds |
|
6
|
-
./spec/clients/domain_spec.rb[1:4:1] | passed | 0.00717 seconds |
|
7
|
-
./spec/clients/domain_spec.rb[1:5:1] | passed | 0.00577 seconds |
|
8
|
-
./spec/clients/domains_spec.rb[1:1:1] | passed | 0.00811 seconds |
|
9
|
-
./spec/clients/domains_spec.rb[1:2:1] | passed | 0.00705 seconds |
|
10
|
-
./spec/clients/history_spec.rb[1:1:1] | passed | 0.00653 seconds |
|
11
|
-
./spec/clients/history_spec.rb[1:2:1] | passed | 0.04772 seconds |
|
12
|
-
./spec/clients/history_spec.rb[1:3:1] | passed | 0.00545 seconds |
|
13
|
-
./spec/clients/ips_spec.rb[1:1:1] | passed | 0.00531 seconds |
|
14
|
-
./spec/clients/ips_spec.rb[1:2:1] | passed | 0.00507 seconds |
|
15
|
-
./spec/clients/ips_spec.rb[1:3:1] | passed | 0.00484 seconds |
|
16
|
-
./spec/securitytrails_spec.rb[1:1] | passed | 0.00085 seconds |
|