rails-letsencrypt 0.7.0 → 0.8.0

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: 6ca4da4df960626f011a2fb59be5a35c19873c242b563e7813fde925ad20d22f
4
- data.tar.gz: b3eb2890ea970a471ef1c396da8b989d77c0de14f810dbd5571137c38c57e976
3
+ metadata.gz: 8cd16f726ca1f16ff33db2bdde9c5d3e13310ac875d475f209761c3e7e5115bf
4
+ data.tar.gz: 7868c273d7d2058e08b02e6b1561c9222c7132c9cc8c8a604404bee90ec95b5c
5
5
  SHA512:
6
- metadata.gz: b34a33043a5bc381a02034db0192b32f89b4a2e1a6cef8b2b84f76ccf9a12861cb004d887ef9705d4bbfc5eba7d6783bae66f864b0a67aec2865a6c352c5996e
7
- data.tar.gz: 00ed2cf4294b7517b2c82e665a8312e8e859365686c1f094fd7385b4a2bc704165e31f525c92b648fd4ec8b6a0fb0bb380bbc70b1d53782375843661fbe369f9
6
+ metadata.gz: f8b31a39a0eaa18e1aaca42db86e225560db6d6275ab9d11ca128180175bae0bc4c13bacd7f134eb81e2fe7544d4478cbd6447f18706f953ee0d790f33d5542e
7
+ data.tar.gz: d31bfb345ccf6d730a9b0f355be6885feb3e7ff24d55dfdf5fbc530bbe1583489496fd23d3dfd4bcce5ea190539fb6d194347171a8b26a916090323f114c3dd2
data/README.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  Provide manageable Let's Encrypt Certificate for Rails.
4
4
 
5
+ ## Requirement
6
+
7
+ * Rails 5+
8
+ * Ruby 2.5+
9
+
5
10
  ## Installation
6
11
 
7
12
  Puts this in your Gemfile:
@@ -56,6 +61,10 @@ LetsEncrypt.config do |config|
56
61
  # The redis server url
57
62
  # Default is nil
58
63
  config.redis_url = 'redis://localhost:6379/1'
64
+
65
+ # Enable it if you want to customize the model
66
+ # Default is LetsEncrypt::Certificate
67
+ #config.certificate_model = 'MyCertificate'
59
68
  end
60
69
  ```
61
70
 
@@ -17,7 +17,7 @@ module LetsEncrypt
17
17
  end
18
18
 
19
19
  def certificate
20
- LetsEncrypt::Certificate.find_by(verification_path: filename)
20
+ LetsEncrypt.certificate_model.find_by(verification_path: filename)
21
21
  end
22
22
 
23
23
  def filename
@@ -6,7 +6,7 @@ module LetsEncrypt
6
6
  queue_as :default
7
7
 
8
8
  def perform
9
- LetsEncrypt::Certificate.renewable.each do |certificate|
9
+ LetsEncrypt.certificate_model.renewable.each do |certificate|
10
10
  next if certificate.renew
11
11
  certificate.update(renew_after: 1.day.from_now)
12
12
  end
@@ -86,5 +86,9 @@ module LetsEncrypt
86
86
  def table_name_prefix
87
87
  'letsencrypt_'
88
88
  end
89
+
90
+ def certificate_model
91
+ @certificate_model ||= config.certificate_model.constantize
92
+ end
89
93
  end
90
94
  end
@@ -16,6 +16,10 @@ module LetsEncrypt
16
16
  config_accessor :save_to_redis
17
17
  config_accessor :redis_url
18
18
 
19
+ config_accessor :certificate_model do
20
+ 'LetsEncrypt::Certificate'
21
+ end
22
+
19
23
  # Returns true if enabled `save_to_redis` feature
20
24
  def use_redis?
21
25
  save_to_redis == true
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LetsEncrypt
4
- VERSION = '0.7.0'
4
+ VERSION = '0.8.0'
5
5
  end
@@ -5,7 +5,7 @@ namespace :letsencrypt do
5
5
  task renew: :environment do
6
6
  count = 0
7
7
  failed = 0
8
- LetsEncrypt::Certificate.renewable do |certificate|
8
+ LetsEncrypt.certificate_model.renewable.each do |certificate|
9
9
  count += 1
10
10
  next if certificate.renew
11
11
  failed += 1
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.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - 蒼時弦也
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-12 00:00:00.000000000 Z
11
+ date: 2020-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '4.1'
19
+ version: '5.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '4.1'
26
+ version: '5.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: acme-client
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -84,30 +84,30 @@ dependencies:
84
84
  name: simplecov
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: 0.16.1
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '0'
96
+ version: 0.16.1
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: coveralls
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '0'
103
+ version: 0.8.23
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '0'
110
+ version: 0.8.23
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: codeclimate-test-reporter
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -171,8 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
171
171
  - !ruby/object:Gem::Version
172
172
  version: '0'
173
173
  requirements: []
174
- rubyforge_project:
175
- rubygems_version: 2.7.6
174
+ rubygems_version: 3.0.3
176
175
  signing_key:
177
176
  specification_version: 4
178
177
  summary: The Let's Encrypt certificate manager for rails