digicert 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/digicert/duplicate_certificate_finder.rb +9 -2
- data/lib/digicert/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd07d0672b7d9440725cbdc1156f2ed227d5a8cc
|
4
|
+
data.tar.gz: 3dcc363333f577e065de67969432da97c22f25fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05c814b1d75b31baee08750aba853d8516c218f45ca67767b772157447f68fc51956eb10864b83277c033d9f5a1774b25498f028748fb8a8ad23e5724a699da8
|
7
|
+
data.tar.gz: 2f4691a607f4a97a459212a00ef1d407593019f581abe204ba32d062702ac0359f313200f17948dae6c277b4bb06aef6838767429280d69bd74b27369a9627fb
|
@@ -21,8 +21,8 @@ module Digicert
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def certificates_by_date_created
|
24
|
-
duplicate_certificates.select do |certificate|
|
25
|
-
certificate.date_created
|
24
|
+
(duplicate_certificates || []).select do |certificate|
|
25
|
+
compare_date(certificate.date_created, request_created_at) < 5
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
@@ -35,6 +35,13 @@ module Digicert
|
|
35
35
|
request.order.certificate.date_created
|
36
36
|
end
|
37
37
|
|
38
|
+
def compare_date(from_date, to_date)
|
39
|
+
from_time = DateTime.parse(from_date).to_time
|
40
|
+
to_time = DateTime.parse(to_date).to_time
|
41
|
+
|
42
|
+
from_time.to_i - to_time.to_i
|
43
|
+
end
|
44
|
+
|
38
45
|
def request
|
39
46
|
@request ||= Digicert::CertificateRequest.fetch(request_id)
|
40
47
|
end
|
data/lib/digicert/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: digicert
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: r509
|
@@ -283,7 +283,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
283
283
|
version: '0'
|
284
284
|
requirements: []
|
285
285
|
rubyforge_project:
|
286
|
-
rubygems_version: 2.
|
286
|
+
rubygems_version: 2.6.14
|
287
287
|
signing_key:
|
288
288
|
specification_version: 4
|
289
289
|
summary: Digicert Ruby API.
|