rails-letsencrypt 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/lets_encrypt/certificate.rb +1 -1
- data/lib/letsencrypt/redis.rb +1 -0
- data/lib/letsencrypt/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5aeeebd0dd776f4fcc05752ea8b438878398d79
|
4
|
+
data.tar.gz: fdff5b40a3526cbff50a83c7811b5a9970ccdf19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8759789aae5935de7951c65bb1281de060485ed0ff0d5532f825cd1bb6a0087a2fab3e659c94d42dc76a81f5bf3da7a974eda33e8214d6d94d8f8666a86903f
|
7
|
+
data.tar.gz: d092e84fd25d14dd4e22546f922d9e74cce4a9357f5f0d1948f43c444fa1c8453170fbf313d51817648fcabefccf75e9c6b7ca9529a9bf3a45ef1d7d8d88f2d9
|
@@ -33,7 +33,7 @@ module LetsEncrypt
|
|
33
33
|
scope :expired, -> { where('expires_at <= ?', Time.zone.now) }
|
34
34
|
|
35
35
|
before_create -> { self.key = OpenSSL::PKey::RSA.new(4096).to_s }
|
36
|
-
after_save -> { save_to_redis }, if: -> { LetsEncrypt.config.use_redis? }
|
36
|
+
after_save -> { save_to_redis }, if: -> { LetsEncrypt.config.use_redis? && active? }
|
37
37
|
|
38
38
|
# Returns false if certificate is not issued.
|
39
39
|
#
|
data/lib/letsencrypt/redis.rb
CHANGED
@@ -10,6 +10,7 @@ module LetsEncrypt
|
|
10
10
|
|
11
11
|
# Save certificate into redis.
|
12
12
|
def save(cert)
|
13
|
+
return unless cert.key.present? && cert.certificate.present?
|
13
14
|
LetsEncrypt.logger.info "Save #{cert.domain}'s certificate to redis"
|
14
15
|
connection.set "#{cert.domain}.key", cert.key
|
15
16
|
connection.set "#{cert.domain}.crt", cert.certificate
|
data/lib/letsencrypt/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-letsencrypt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 蒼時弦也
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: acme-client
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
33
|
+
version: '1.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
40
|
+
version: '1.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: redis
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|