letsencrypt_heroku 0.2.13 → 0.2.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/letsencrypt_heroku/process/update_certificates.rb +10 -5
- data/lib/letsencrypt_heroku/tools.rb +1 -1
- data/lib/letsencrypt_heroku/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b4266febb3c0d48e0773e9fcd3480514fd7a108
|
4
|
+
data.tar.gz: 272c06da312b4e15268810007fd5fa731f76c128
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46ac4d7514849beef492c85e71935c45512de11c25a23bc3e04aaf720ecc6e3cdec4aaae6ace8fed2f96a2c6e020067a34c9a96682348738fd0ada16e943932d
|
7
|
+
data.tar.gz: c2bd0c3e38d7bf47b39b9e89bfb24bee7762abc116fe512e0afeff66f5db661d4b7298dc9c67df0cbd8986364a9e5ab3b912ce20ff634b20bd064d4842fead8e
|
data/README.md
CHANGED
@@ -70,6 +70,8 @@ Each block in this configuration will issue a new certificate, so if you need to
|
|
70
70
|
heroku_app: stg-example-dev-application
|
71
71
|
```
|
72
72
|
|
73
|
+
You can add `keep_certs: true` to a block if you need to keep the generated certificate.
|
74
|
+
|
73
75
|
Please note that your application will be restarted for every single domain in your config. The restart happens automatically when the heroku challenge response gets set as environment variable.
|
74
76
|
|
75
77
|
|
@@ -8,15 +8,20 @@ class LetsencryptHeroku::Process
|
|
8
8
|
output 'Update certificates' do
|
9
9
|
csr = Acme::Client::CertificateRequest.new(names: context.config.domains)
|
10
10
|
certificate = context.client.new_certificate(csr)
|
11
|
-
|
12
|
-
|
11
|
+
privkey_name = "privkey_#{herokuapp}.pem"
|
12
|
+
fullchain_name = "fullchain_#{herokuapp}.pem"
|
13
|
+
File.write(privkey_name, certificate.request.private_key.to_pem)
|
14
|
+
File.write(fullchain_name, certificate.fullchain_to_pem)
|
13
15
|
|
14
16
|
if has_already_cert(herokuapp)
|
15
|
-
execute "heroku certs:update
|
17
|
+
execute "heroku certs:update #{fullchain_name} #{privkey_name} --confirm #{herokuapp} --app #{herokuapp}"
|
16
18
|
else
|
17
|
-
execute "heroku certs:add
|
19
|
+
execute "heroku certs:add #{fullchain_name} #{privkey_name} --app #{herokuapp}"
|
20
|
+
end
|
21
|
+
|
22
|
+
unless context.config.keep_certs
|
23
|
+
FileUtils.rm [privkey_name, fullchain_name]
|
18
24
|
end
|
19
|
-
FileUtils.rm %w(privkey.pem fullchain.pem)
|
20
25
|
end
|
21
26
|
puts # finish the output with a nice newline ;)
|
22
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: letsencrypt_heroku
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Johannes Opper
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rainbow
|