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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fe5a0b9b62da6fc47e517a59554407a9ace9d920
4
- data.tar.gz: 07b7c7ee720a26ca85fa31c2030bdf58456127bc
3
+ metadata.gz: a5aeeebd0dd776f4fcc05752ea8b438878398d79
4
+ data.tar.gz: fdff5b40a3526cbff50a83c7811b5a9970ccdf19
5
5
  SHA512:
6
- metadata.gz: 1eb53a2c8b63f7ea73e22756bdfeea62e746660a11b954f07915f0b89ff4d75917b3cd9264d26536277cbfd1c4d7675afea8c9fe7be54fa69ea195d03f21f80a
7
- data.tar.gz: 6f985a7363b7549f71926cfc6ccd31b67c8b2e2e872e642c392c0f2fb8c4744521ac39821a16dd0de4062923b34a4e10d12858a7b2adf7993c79aa49524df0f3
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
  #
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LetsEncrypt
4
- VERSION = '0.5.4'
4
+ VERSION = '0.5.5'
5
5
  end
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
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-03-22 00:00:00.000000000 Z
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