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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 887669f2db4c933b460abb1314bdb46c983d35af
4
- data.tar.gz: 417f9b150c70c521493bf0492e3d0a722a2ae966
3
+ metadata.gz: fd07d0672b7d9440725cbdc1156f2ed227d5a8cc
4
+ data.tar.gz: 3dcc363333f577e065de67969432da97c22f25fd
5
5
  SHA512:
6
- metadata.gz: 5d06d51b8585a96e2385c47aeea0106c2ba8c2b9c4b97f9950b004c474109f67a1097044a57d623fd76c5e87b16e32c0e794eee0354df9a0da015fb33f6d1ca6
7
- data.tar.gz: '09d586baf9055abeb8a35e766161489bbb253b881324e9e44ac59b189f9672ebf0410a833244d626df6335421303bb8213df2d89a813fb89ef144462bd6f199b'
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 == request_created_at
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
@@ -21,5 +21,5 @@
21
21
  # ++
22
22
 
23
23
  module Digicert
24
- VERSION = "0.3.0".freeze
24
+ VERSION = "0.3.1".freeze
25
25
  end
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.0
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: 2017-12-08 00:00:00.000000000 Z
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.5.2
286
+ rubygems_version: 2.6.14
287
287
  signing_key:
288
288
  specification_version: 4
289
289
  summary: Digicert Ruby API.