crtsh-rb 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/README.md +5 -2
- data/crtsh.gemspec +5 -5
- data/lib/crtsh/api.rb +17 -2
- data/lib/crtsh/version.rb +1 -1
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 851220e9259aba8b67dcfe938576be29696f3b14fc10df074017bd31d7db030c
|
4
|
+
data.tar.gz: eadf856be0b928cc1eb7f119017e28bfe83206fd0ecdb35cd43ef4de9c04ff78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91f8029021e4c63b2aea186d21645563d51211ed7c1aebf34f9e197c54cd53dcc3532ab39117926e9471b5bf71823a04dc6f357f3614fedc8a77ba98ac165824
|
7
|
+
data.tar.gz: 2d625457a6048deb60bdd9a9b95890a713b8c4064a262023ca8f1292a61b348866aa19de7015cad6000719fca9ae956ba2b94f22b28196d12a896e08012d3f37
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# crtsh
|
2
2
|
|
3
|
-
[![Build Status](https://travis-ci.
|
3
|
+
[![Build Status](https://travis-ci.com/ninoseki/crtsh.svg?branch=master)](https://travis-ci.com/ninoseki/crtsh)
|
4
4
|
[![Coverage Status](https://coveralls.io/repos/github/ninoseki/crtsh/badge.svg?branch=master)](https://coveralls.io/github/ninoseki/crtsh?branch=master)
|
5
5
|
[![CodeFactor](https://www.codefactor.io/repository/github/ninoseki/crtsh/badge)](https://www.codefactor.io/repository/github/ninoseki/crtsh)
|
6
6
|
|
@@ -18,7 +18,10 @@ gem install crtsh-rb
|
|
18
18
|
require "crtsh"
|
19
19
|
|
20
20
|
api = Crtsh::API.new
|
21
|
-
|
21
|
+
api.search("crt.sh")
|
22
|
+
api.search("crt.sh", match: "LIKE")
|
23
|
+
api.search("crt.sh", exclude: "expired")
|
24
|
+
api.search("crt.sh", match: "LIKE", exclude: "expired")
|
22
25
|
```
|
23
26
|
|
24
27
|
## Contributing
|
data/crtsh.gemspec
CHANGED
@@ -10,8 +10,8 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.authors = ["Manabu Niseki"]
|
11
11
|
spec.email = ["manabu.niseki@gmail.com"]
|
12
12
|
|
13
|
-
spec.summary = "crt.sh API
|
14
|
-
spec.description = "crt.sh API
|
13
|
+
spec.summary = "crt.sh API wrapper for Ruby"
|
14
|
+
spec.description = "crt.sh API wrapper for Ruby"
|
15
15
|
spec.homepage = "https://github.com/ninoseki/crtsh"
|
16
16
|
spec.license = "MIT"
|
17
17
|
|
@@ -24,10 +24,10 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
25
25
|
spec.require_paths = ["lib"]
|
26
26
|
|
27
|
-
spec.add_development_dependency "bundler", "~> 2.
|
27
|
+
spec.add_development_dependency "bundler", "~> 2.1"
|
28
28
|
spec.add_development_dependency "coveralls", "~> 0.8"
|
29
|
-
spec.add_development_dependency "rake", "~>
|
30
|
-
spec.add_development_dependency "rspec", "~> 3.
|
29
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
30
|
+
spec.add_development_dependency "rspec", "~> 3.9"
|
31
31
|
spec.add_development_dependency "vcr", "~> 5.0"
|
32
32
|
spec.add_development_dependency "webmock", "~> 3.7"
|
33
33
|
end
|
data/lib/crtsh/api.rb
CHANGED
@@ -9,8 +9,23 @@ module Crtsh
|
|
9
9
|
HOST = "crt.sh"
|
10
10
|
BASE_URL = "https://#{HOST}"
|
11
11
|
|
12
|
-
|
13
|
-
|
12
|
+
#
|
13
|
+
# Search crt.sh by a given identity
|
14
|
+
#
|
15
|
+
# @param [String] identity
|
16
|
+
# @param [String, nil] match "=", "ILIKE", "LIKE", "single", "any" or nil
|
17
|
+
# @param [String, nil] exclude "expired" or nil
|
18
|
+
#
|
19
|
+
# @return [Hash]
|
20
|
+
#
|
21
|
+
def search(identity, match: nil, exclude: nil)
|
22
|
+
params = {
|
23
|
+
identity: identity,
|
24
|
+
match: match,
|
25
|
+
exclude: exclude,
|
26
|
+
output: "json",
|
27
|
+
}.compact
|
28
|
+
get("/", params) { |json| json }
|
14
29
|
end
|
15
30
|
|
16
31
|
private
|
data/lib/crtsh/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crtsh-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manabu Niseki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '2.
|
19
|
+
version: '2.1'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '2.
|
26
|
+
version: '2.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: coveralls
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,28 +44,28 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '13.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '13.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '3.
|
61
|
+
version: '3.9'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '3.
|
68
|
+
version: '3.9'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: vcr
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,7 +94,7 @@ dependencies:
|
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '3.7'
|
97
|
-
description: crt.sh API
|
97
|
+
description: crt.sh API wrapper for Ruby
|
98
98
|
email:
|
99
99
|
- manabu.niseki@gmail.com
|
100
100
|
executables: []
|
@@ -131,8 +131,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
131
|
- !ruby/object:Gem::Version
|
132
132
|
version: '0'
|
133
133
|
requirements: []
|
134
|
-
rubygems_version: 3.0.
|
134
|
+
rubygems_version: 3.0.3
|
135
135
|
signing_key:
|
136
136
|
specification_version: 4
|
137
|
-
summary: crt.sh API
|
137
|
+
summary: crt.sh API wrapper for Ruby
|
138
138
|
test_files: []
|