internet_security_event 1.0.0 → 1.0.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6028e31de34aca5377e011e84066b8ce6532cf406464edf4a8a67eb4e2230bec
|
4
|
+
data.tar.gz: 61198576708f2460fb9a21c682676b038917b150be82bcf36f1cc7c4888c4a42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3949507e6194312a786461c1e335493d2f34f57d63546850164ae5305966743ca4a7637daf66fd4c9084351069f97f35a9f81e53dd1f6fe2d78b84c01b74409
|
7
|
+
data.tar.gz: ecfb68fb113d7846cb0e3278a000a12531f327661e933d09644174f7758ff2efed7ac088ef166446ae3dfe28b8db3851f8588ed34dec1318725813fef5ffb991
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'action_view'
|
4
4
|
require 'action_view/helpers'
|
5
|
+
require 'active_support/core_ext/numeric/time'
|
5
6
|
|
6
7
|
module InternetSecurityEvent
|
7
8
|
class X509Status
|
@@ -59,7 +60,7 @@ module InternetSecurityEvent
|
|
59
60
|
end
|
60
61
|
|
61
62
|
def expired_or_expire_soon?
|
62
|
-
now +
|
63
|
+
now + renewal_duration / 3 > certificate.not_after
|
63
64
|
end
|
64
65
|
|
65
66
|
def expired?
|
@@ -67,7 +68,15 @@ module InternetSecurityEvent
|
|
67
68
|
end
|
68
69
|
|
69
70
|
def expire_soonish?
|
70
|
-
now +
|
71
|
+
now + 2 * renewal_duration / 3 > certificate.not_after
|
72
|
+
end
|
73
|
+
|
74
|
+
def renewal_duration
|
75
|
+
[validity_duration / 3, 90.days].min
|
76
|
+
end
|
77
|
+
|
78
|
+
def validity_duration
|
79
|
+
certificate.not_after - certificate.not_before
|
71
80
|
end
|
72
81
|
|
73
82
|
def now
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: internet_security_event
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Romain Tartière
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionview
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '5.2'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: activesupport
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '5.2'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '5.2'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: bundler
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|